id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
8,700
Gant/Gant
src/main/groovy/org/codehaus/gant/ant/Gant.java
Gant.execute
@Override public void execute() throws BuildException { // // At first it might seem appropriate to use the Project object from the calling Ant instance as the // Project object used by the AntBuilder object and hence GantBuilder object associated with the Gant // instance we are going to create here...
java
@Override public void execute() throws BuildException { // // At first it might seem appropriate to use the Project object from the calling Ant instance as the // Project object used by the AntBuilder object and hence GantBuilder object associated with the Gant // instance we are going to create here...
[ "@", "Override", "public", "void", "execute", "(", ")", "throws", "BuildException", "{", "//", "// At first it might seem appropriate to use the Project object from the calling Ant instance as the", "// Project object used by the AntBuilder object and hence GantBuilder object associated wi...
Load the file and then execute it.
[ "Load", "the", "file", "and", "then", "execute", "it", "." ]
8f82b3cd8968d5595dc44e2beae9f7948172868b
https://github.com/Gant/Gant/blob/8f82b3cd8968d5595dc44e2beae9f7948172868b/src/main/groovy/org/codehaus/gant/ant/Gant.java#L144-L194
8,701
Gant/Gant
src/main/groovy/org/codehaus/gant/ant/Gant.java
Gant.addAlmostAll
private void addAlmostAll(final Project newProject, final Project oldProject) { final Hashtable<String,Object> properties = oldProject.getProperties(); final Enumeration<String> e = properties.keys(); while (e.hasMoreElements()) { final String key = e.nextElement(); if (!(MagicNames.PROJECT_BASE...
java
private void addAlmostAll(final Project newProject, final Project oldProject) { final Hashtable<String,Object> properties = oldProject.getProperties(); final Enumeration<String> e = properties.keys(); while (e.hasMoreElements()) { final String key = e.nextElement(); if (!(MagicNames.PROJECT_BASE...
[ "private", "void", "addAlmostAll", "(", "final", "Project", "newProject", ",", "final", "Project", "oldProject", ")", "{", "final", "Hashtable", "<", "String", ",", "Object", ">", "properties", "=", "oldProject", ".", "getProperties", "(", ")", ";", "final", ...
Russel Winder rehacked the code provided by Eric Van Dewoestine.
[ "Russel", "Winder", "rehacked", "the", "code", "provided", "by", "Eric", "Van", "Dewoestine", "." ]
8f82b3cd8968d5595dc44e2beae9f7948172868b
https://github.com/Gant/Gant/blob/8f82b3cd8968d5595dc44e2beae9f7948172868b/src/main/groovy/org/codehaus/gant/ant/Gant.java#L204-L213
8,702
Gant/Gant
src/main/groovy/org/codehaus/gant/GantBuilder.java
GantBuilder.invokeMethod
@Override public Object invokeMethod(final String name, final Object arguments) { if (GantState.dryRun) { if (GantState.verbosity > GantState.SILENT) { final StringBuilder sb = new StringBuilder(); int padding = 9 - name.length(); if (padding < 0) { padding = 0; } sb.append(" ...
java
@Override public Object invokeMethod(final String name, final Object arguments) { if (GantState.dryRun) { if (GantState.verbosity > GantState.SILENT) { final StringBuilder sb = new StringBuilder(); int padding = 9 - name.length(); if (padding < 0) { padding = 0; } sb.append(" ...
[ "@", "Override", "public", "Object", "invokeMethod", "(", "final", "String", "name", ",", "final", "Object", "arguments", ")", "{", "if", "(", "GantState", ".", "dryRun", ")", "{", "if", "(", "GantState", ".", "verbosity", ">", "GantState", ".", "SILENT", ...
Invoke a method. @param name The name of the method to invoke. @param arguments The parameters to the method call. @return The value returned by the method call or null if no value is returned.
[ "Invoke", "a", "method", "." ]
8f82b3cd8968d5595dc44e2beae9f7948172868b
https://github.com/Gant/Gant/blob/8f82b3cd8968d5595dc44e2beae9f7948172868b/src/main/groovy/org/codehaus/gant/GantBuilder.java#L69-L100
8,703
pavlospt/RxIAPv3
androidiap/src/main/java/com/pavlospt/androidiap/billing/BillingProcessor.java
BillingProcessor.checkMerchant
private boolean checkMerchant(PurchaseDataModel details) { if (developerMerchantId == null) //omit merchant id checking return true; if (details.getPurchaseTime().before(dateMerchantLimit1)) //new format [merchantId].[orderId] applied or not? return true; if (details.getP...
java
private boolean checkMerchant(PurchaseDataModel details) { if (developerMerchantId == null) //omit merchant id checking return true; if (details.getPurchaseTime().before(dateMerchantLimit1)) //new format [merchantId].[orderId] applied or not? return true; if (details.getP...
[ "private", "boolean", "checkMerchant", "(", "PurchaseDataModel", "details", ")", "{", "if", "(", "developerMerchantId", "==", "null", ")", "//omit merchant id checking", "return", "true", ";", "if", "(", "details", ".", "getPurchaseTime", "(", ")", ".", "before", ...
Checks merchant's id validity. If purchase was generated by Freedom alike program it doesn't know real merchant id, unless publisher GoogleId was hacked If merchantId was not supplied function checks nothing @param details TransactionDetails @return boolean
[ "Checks", "merchant", "s", "id", "validity", ".", "If", "purchase", "was", "generated", "by", "Freedom", "alike", "program", "it", "doesn", "t", "know", "real", "merchant", "id", "unless", "publisher", "GoogleId", "was", "hacked", "If", "merchantId", "was", ...
b7a02458ecc7529adaa25959822bd6d08cd3ebd0
https://github.com/pavlospt/RxIAPv3/blob/b7a02458ecc7529adaa25959822bd6d08cd3ebd0/androidiap/src/main/java/com/pavlospt/androidiap/billing/BillingProcessor.java#L927-L942
8,704
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DocletUtils.java
DocletUtils.getClassName
protected static String getClassName(ProgramElementDoc doc, boolean binaryName) { PackageDoc containingPackage = doc.containingPackage(); String className = doc.name(); if (binaryName) { className = className.replaceAll("\\.", "\\$"); } return containingPackage.name()...
java
protected static String getClassName(ProgramElementDoc doc, boolean binaryName) { PackageDoc containingPackage = doc.containingPackage(); String className = doc.name(); if (binaryName) { className = className.replaceAll("\\.", "\\$"); } return containingPackage.name()...
[ "protected", "static", "String", "getClassName", "(", "ProgramElementDoc", "doc", ",", "boolean", "binaryName", ")", "{", "PackageDoc", "containingPackage", "=", "doc", ".", "containingPackage", "(", ")", ";", "String", "className", "=", "doc", ".", "name", "(",...
Reconstitute the class name from the given class JavaDoc object. @param doc the Javadoc model for the given class. @return The (string) class name of the given class.
[ "Reconstitute", "the", "class", "name", "from", "the", "given", "class", "JavaDoc", "object", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DocletUtils.java#L35-L44
8,705
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.getSummaryForWorkUnit
@Override public String getSummaryForWorkUnit(final DocWorkUnit workUnit) { String summary = workUnit.getDocumentedFeature().summary(); if (summary == null || summary.isEmpty()) { final CommandLineProgramProperties commandLineProperties = workUnit.getCommandLineProperties(); ...
java
@Override public String getSummaryForWorkUnit(final DocWorkUnit workUnit) { String summary = workUnit.getDocumentedFeature().summary(); if (summary == null || summary.isEmpty()) { final CommandLineProgramProperties commandLineProperties = workUnit.getCommandLineProperties(); ...
[ "@", "Override", "public", "String", "getSummaryForWorkUnit", "(", "final", "DocWorkUnit", "workUnit", ")", "{", "String", "summary", "=", "workUnit", ".", "getDocumentedFeature", "(", ")", ".", "summary", "(", ")", ";", "if", "(", "summary", "==", "null", "...
Get the summary string to be used for a given work unit, applying any fallback policy. This is called by the work unit handler after the work unit has been populated, and may be overridden by subclasses to provide custom behavior. @param workUnit @return the summary string to be used for this work unit
[ "Get", "the", "summary", "string", "to", "be", "used", "for", "a", "given", "work", "unit", "applying", "any", "fallback", "policy", ".", "This", "is", "called", "by", "the", "work", "unit", "handler", "after", "the", "work", "unit", "has", "been", "popu...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L56-L73
8,706
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.getGroupNameForWorkUnit
@Override public String getGroupNameForWorkUnit(final DocWorkUnit workUnit) { String groupName = workUnit.getDocumentedFeature().groupName(); if (groupName == null || groupName.isEmpty()) { final CommandLineProgramGroup clpGroup = workUnit.getCommandLineProgramGroup(); if (cl...
java
@Override public String getGroupNameForWorkUnit(final DocWorkUnit workUnit) { String groupName = workUnit.getDocumentedFeature().groupName(); if (groupName == null || groupName.isEmpty()) { final CommandLineProgramGroup clpGroup = workUnit.getCommandLineProgramGroup(); if (cl...
[ "@", "Override", "public", "String", "getGroupNameForWorkUnit", "(", "final", "DocWorkUnit", "workUnit", ")", "{", "String", "groupName", "=", "workUnit", ".", "getDocumentedFeature", "(", ")", ".", "groupName", "(", ")", ";", "if", "(", "groupName", "==", "nu...
Get the group name string to be used for a given work unit, applying any fallback policy. This is called by the work unit handler after the work unit has been populated, and may be overridden by subclasses to provide custom behavior. @param workUnit @return the group name to be used for this work unit
[ "Get", "the", "group", "name", "string", "to", "be", "used", "for", "a", "given", "work", "unit", "applying", "any", "fallback", "policy", ".", "This", "is", "called", "by", "the", "work", "unit", "handler", "after", "the", "work", "unit", "has", "been",...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L83-L97
8,707
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.getGroupSummaryForWorkUnit
@Override public String getGroupSummaryForWorkUnit( final DocWorkUnit workUnit){ String groupSummary = workUnit.getDocumentedFeature().groupSummary(); final CommandLineProgramGroup clpGroup = workUnit.getCommandLineProgramGroup(); if (groupSummary == null || groupSummary.isEmpty()) { ...
java
@Override public String getGroupSummaryForWorkUnit( final DocWorkUnit workUnit){ String groupSummary = workUnit.getDocumentedFeature().groupSummary(); final CommandLineProgramGroup clpGroup = workUnit.getCommandLineProgramGroup(); if (groupSummary == null || groupSummary.isEmpty()) { ...
[ "@", "Override", "public", "String", "getGroupSummaryForWorkUnit", "(", "final", "DocWorkUnit", "workUnit", ")", "{", "String", "groupSummary", "=", "workUnit", ".", "getDocumentedFeature", "(", ")", ".", "groupSummary", "(", ")", ";", "final", "CommandLineProgramGr...
Get the group summary string to be used for a given work unit's group, applying any fallback policy. This is called by the work unit handler after the work unit has been populated, and may be overridden by subclasses to provide custom behavior. @param workUnit @return the group summary to be used for this work unit's ...
[ "Get", "the", "group", "summary", "string", "to", "be", "used", "for", "a", "given", "work", "unit", "s", "group", "applying", "any", "fallback", "policy", ".", "This", "is", "called", "by", "the", "work", "unit", "handler", "after", "the", "work", "unit...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L107-L121
8,708
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.getDescription
protected String getDescription(final DocWorkUnit currentWorkUnit) { return Arrays.stream(currentWorkUnit.getClassDoc().inlineTags()) .filter(t -> getTagPrefix() == null || !t.name().startsWith(getTagPrefix())) .map(t -> t.text()) .collect(Collectors.joining()); ...
java
protected String getDescription(final DocWorkUnit currentWorkUnit) { return Arrays.stream(currentWorkUnit.getClassDoc().inlineTags()) .filter(t -> getTagPrefix() == null || !t.name().startsWith(getTagPrefix())) .map(t -> t.text()) .collect(Collectors.joining()); ...
[ "protected", "String", "getDescription", "(", "final", "DocWorkUnit", "currentWorkUnit", ")", "{", "return", "Arrays", ".", "stream", "(", "currentWorkUnit", ".", "getClassDoc", "(", ")", ".", "inlineTags", "(", ")", ")", ".", "filter", "(", "t", "->", "getT...
Return the description to be used for the work unit. We need to manually strip out any inline custom javadoc tags since we don't those in the summary. @param currentWorkUnit @return Description to be used or the work unit.
[ "Return", "the", "description", "to", "be", "used", "for", "the", "work", "unit", ".", "We", "need", "to", "manually", "strip", "out", "any", "inline", "custom", "javadoc", "tags", "since", "we", "don", "t", "those", "in", "the", "summary", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L130-L135
8,709
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.addHighLevelBindings
protected void addHighLevelBindings(final DocWorkUnit workUnit) { workUnit.setProperty("name", workUnit.getName()); workUnit.setProperty("group", workUnit.getGroupName()); workUnit.setProperty("summary", workUnit.getSummary()); // Note that these properties are inserted into the top...
java
protected void addHighLevelBindings(final DocWorkUnit workUnit) { workUnit.setProperty("name", workUnit.getName()); workUnit.setProperty("group", workUnit.getGroupName()); workUnit.setProperty("summary", workUnit.getSummary()); // Note that these properties are inserted into the top...
[ "protected", "void", "addHighLevelBindings", "(", "final", "DocWorkUnit", "workUnit", ")", "{", "workUnit", ".", "setProperty", "(", "\"name\"", ",", "workUnit", ".", "getName", "(", ")", ")", ";", "workUnit", ".", "setProperty", "(", "\"group\"", ",", "workUn...
Add high-level summary information, such as name, summary, description, version, etc. @param workUnit
[ "Add", "high", "-", "level", "summary", "information", "such", "as", "name", "summary", "description", "version", "etc", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L226-L242
8,710
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.addCustomBindings
protected void addCustomBindings(final DocWorkUnit currentWorkUnit) { final String tagFilterPrefix = getTagPrefix(); Arrays.stream(currentWorkUnit.getClassDoc().inlineTags()) .filter(t -> t.name().startsWith(tagFilterPrefix)) .forEach(t -> currentWorkUnit.setProperty(t.na...
java
protected void addCustomBindings(final DocWorkUnit currentWorkUnit) { final String tagFilterPrefix = getTagPrefix(); Arrays.stream(currentWorkUnit.getClassDoc().inlineTags()) .filter(t -> t.name().startsWith(tagFilterPrefix)) .forEach(t -> currentWorkUnit.setProperty(t.na...
[ "protected", "void", "addCustomBindings", "(", "final", "DocWorkUnit", "currentWorkUnit", ")", "{", "final", "String", "tagFilterPrefix", "=", "getTagPrefix", "(", ")", ";", "Arrays", ".", "stream", "(", "currentWorkUnit", ".", "getClassDoc", "(", ")", ".", "inl...
Add any custom freemarker bindings discovered via custom javadoc tags. Subclasses can override this to provide additional custom bindings. @param currentWorkUnit the work unit for the feature being documented
[ "Add", "any", "custom", "freemarker", "bindings", "discovered", "via", "custom", "javadoc", "tags", ".", "Subclasses", "can", "override", "this", "to", "provide", "additional", "custom", "bindings", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L250-L255
8,711
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.addExtraDocsBindings
protected void addExtraDocsBindings(final DocWorkUnit currentWorkUnit) { final List<Map<String, Object>> extraDocsData = new ArrayList<Map<String, Object>>(); // add in all of the explicitly related extradocs items for (final Class<?> extraDocClass : currentWorkUnit.getDocumentedFeature().e...
java
protected void addExtraDocsBindings(final DocWorkUnit currentWorkUnit) { final List<Map<String, Object>> extraDocsData = new ArrayList<Map<String, Object>>(); // add in all of the explicitly related extradocs items for (final Class<?> extraDocClass : currentWorkUnit.getDocumentedFeature().e...
[ "protected", "void", "addExtraDocsBindings", "(", "final", "DocWorkUnit", "currentWorkUnit", ")", "{", "final", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "extraDocsData", "=", "new", "ArrayList", "<", "Map", "<", "String", ",", "Object", ">...
Add bindings describing related capabilities to currentWorkUnit
[ "Add", "bindings", "describing", "related", "capabilities", "to", "currentWorkUnit" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L266-L293
8,712
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.createArgumentMap
private Map<String, List<Map<String, Object>>> createArgumentMap() { final Map<String, List<Map<String, Object>>> args = new HashMap<String, List<Map<String, Object>>>(); args.put("all", new ArrayList<>()); args.put("common", new ArrayList<>()); args.put("positional", new ArrayList<>());...
java
private Map<String, List<Map<String, Object>>> createArgumentMap() { final Map<String, List<Map<String, Object>>> args = new HashMap<String, List<Map<String, Object>>>(); args.put("all", new ArrayList<>()); args.put("common", new ArrayList<>()); args.put("positional", new ArrayList<>());...
[ "private", "Map", "<", "String", ",", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "createArgumentMap", "(", ")", "{", "final", "Map", "<", "String", ",", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "args", ...
Create the argument map for holding class arguments @return
[ "Create", "the", "argument", "map", "for", "holding", "class", "arguments" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L514-L526
8,713
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.sortArguments
private List<Map<String, Object>> sortArguments(final List<Map<String, Object>> unsorted) { Collections.sort(unsorted, new CompareArgumentsByName()); return unsorted; }
java
private List<Map<String, Object>> sortArguments(final List<Map<String, Object>> unsorted) { Collections.sort(unsorted, new CompareArgumentsByName()); return unsorted; }
[ "private", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "sortArguments", "(", "final", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "unsorted", ")", "{", "Collections", ".", "sort", "(", "unsorted", ",", "new", "CompareArg...
Sorts the individual argument list in unsorted according to CompareArgumentsByName @param unsorted @return
[ "Sorts", "the", "individual", "argument", "list", "in", "unsorted", "according", "to", "CompareArgumentsByName" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L534-L537
8,714
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.prettyPrintValueString
private Object prettyPrintValueString(final Object value) { if (value instanceof String) { return value.equals("") ? "\"\"" : value; } else { return value.toString(); } }
java
private Object prettyPrintValueString(final Object value) { if (value instanceof String) { return value.equals("") ? "\"\"" : value; } else { return value.toString(); } }
[ "private", "Object", "prettyPrintValueString", "(", "final", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "String", ")", "{", "return", "value", ".", "equals", "(", "\"\"", ")", "?", "\"\\\"\\\"\"", ":", "value", ";", "}", "else", "{", ...
Pretty prints value Assumes value != null @param value @return
[ "Pretty", "prints", "value" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L568-L574
8,715
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.argumentTypeString
protected String argumentTypeString(final Type type) { if (type instanceof ParameterizedType) { final ParameterizedType parameterizedType = (ParameterizedType) type; final List<String> subs = new ArrayList<>(); for (final Type actualType : parameterizedType.getActualTypeArgum...
java
protected String argumentTypeString(final Type type) { if (type instanceof ParameterizedType) { final ParameterizedType parameterizedType = (ParameterizedType) type; final List<String> subs = new ArrayList<>(); for (final Type actualType : parameterizedType.getActualTypeArgum...
[ "protected", "String", "argumentTypeString", "(", "final", "Type", "type", ")", "{", "if", "(", "type", "instanceof", "ParameterizedType", ")", "{", "final", "ParameterizedType", "parameterizedType", "=", "(", "ParameterizedType", ")", "type", ";", "final", "List"...
Returns a human readable string that describes the Type type of an argument. This will include parametrized types, so that Set{T} shows up as Set(T) and not just Set in the docs. @param type @return String representing the argument type
[ "Returns", "a", "human", "readable", "string", "that", "describes", "the", "Type", "type", "of", "an", "argument", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L654-L670
8,716
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java
DefaultDocWorkUnitHandler.docForEnumArgument
private List<Map<String, Object>> docForEnumArgument(final Class<?> enumClass) { final ClassDoc doc = this.getDoclet().getClassDocForClass(enumClass); if ( doc == null ) { throw new RuntimeException("Tried to get docs for enum " + enumClass + " but got null instead"); } fina...
java
private List<Map<String, Object>> docForEnumArgument(final Class<?> enumClass) { final ClassDoc doc = this.getDoclet().getClassDocForClass(enumClass); if ( doc == null ) { throw new RuntimeException("Tried to get docs for enum " + enumClass + " but got null instead"); } fina...
[ "private", "List", "<", "Map", "<", "String", ",", "Object", ">", ">", "docForEnumArgument", "(", "final", "Class", "<", "?", ">", "enumClass", ")", "{", "final", "ClassDoc", "doc", "=", "this", ".", "getDoclet", "(", ")", ".", "getClassDocForClass", "("...
Helper routine that provides a FreeMarker map for an enumClass, grabbing the values of the enum and their associated javadoc documentation. @param enumClass @return
[ "Helper", "routine", "that", "provides", "a", "FreeMarker", "map", "for", "an", "enumClass", "grabbing", "the", "values", "of", "the", "enum", "and", "their", "associated", "javadoc", "documentation", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DefaultDocWorkUnitHandler.java#L767-L790
8,717
ReactiveX/RxJavaJoins
src/main/java/rx/observables/JoinObservable.java
JoinObservable.from
public static <T> JoinObservable<T> from(Observable<T> o) { return new JoinObservable<T>(o); }
java
public static <T> JoinObservable<T> from(Observable<T> o) { return new JoinObservable<T>(o); }
[ "public", "static", "<", "T", ">", "JoinObservable", "<", "T", ">", "from", "(", "Observable", "<", "T", ">", "o", ")", "{", "return", "new", "JoinObservable", "<", "T", ">", "(", "o", ")", ";", "}" ]
Creates a JoinObservable from a regular Observable. @param o the observable to wrap @return the created JoinObservable instance
[ "Creates", "a", "JoinObservable", "from", "a", "regular", "Observable", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/observables/JoinObservable.java#L27-L29
8,718
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/Utils.java
Utils.prettyPrintWarningMessage
private static void prettyPrintWarningMessage(final List<String> results, final String message) { for (final String line: message.split("\\r?\\n")) { final StringBuilder builder = new StringBuilder(line); while (builder.length() > TEXT_WARNING_WIDTH) { int space = getLast...
java
private static void prettyPrintWarningMessage(final List<String> results, final String message) { for (final String line: message.split("\\r?\\n")) { final StringBuilder builder = new StringBuilder(line); while (builder.length() > TEXT_WARNING_WIDTH) { int space = getLast...
[ "private", "static", "void", "prettyPrintWarningMessage", "(", "final", "List", "<", "String", ">", "results", ",", "final", "String", "message", ")", "{", "for", "(", "final", "String", "line", ":", "message", ".", "split", "(", "\"\\\\r?\\\\n\"", ")", ")",...
pretty print the warning message supplied @param results the pretty printed message @param message the message
[ "pretty", "print", "the", "warning", "message", "supplied" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/Utils.java#L79-L90
8,719
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/Utils.java
Utils.getLastSpace
private static int getLastSpace(final CharSequence message, int width) { final int length = message.length(); int stopPos = width; int currPos = 0; int lastSpace = -1; boolean inEscape = false; while (currPos < stopPos && currPos < length) { final char c = mes...
java
private static int getLastSpace(final CharSequence message, int width) { final int length = message.length(); int stopPos = width; int currPos = 0; int lastSpace = -1; boolean inEscape = false; while (currPos < stopPos && currPos < length) { final char c = mes...
[ "private", "static", "int", "getLastSpace", "(", "final", "CharSequence", "message", ",", "int", "width", ")", "{", "final", "int", "length", "=", "message", ".", "length", "(", ")", ";", "int", "stopPos", "=", "width", ";", "int", "currPos", "=", "0", ...
Returns the last whitespace location in string, before width characters. @param message The message to break. @param width The width of the line. @return The last whitespace location.
[ "Returns", "the", "last", "whitespace", "location", "in", "string", "before", "width", "characters", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/Utils.java#L98-L119
8,720
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/Utils.java
Utils.dupString
public static String dupString(char c, int nCopies) { char[] chars = new char[nCopies]; Arrays.fill(chars, c); return new String(chars); }
java
public static String dupString(char c, int nCopies) { char[] chars = new char[nCopies]; Arrays.fill(chars, c); return new String(chars); }
[ "public", "static", "String", "dupString", "(", "char", "c", ",", "int", "nCopies", ")", "{", "char", "[", "]", "chars", "=", "new", "char", "[", "nCopies", "]", ";", "Arrays", ".", "fill", "(", "chars", ",", "c", ")", ";", "return", "new", "String...
Create a new string thats a n duplicate copies of c @param c the char to duplicate @param nCopies how many copies? @return a string
[ "Create", "a", "new", "string", "thats", "a", "n", "duplicate", "copies", "of", "c" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/Utils.java#L127-L131
8,721
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/Utils.java
Utils.wrapParagraph
public static String wrapParagraph(final String input, final int width) { if (input == null || input.isEmpty()) { return input; } final StringBuilder out = new StringBuilder(); try (final BufferedReader bufReader = new BufferedReader(new StringReader(input))) { o...
java
public static String wrapParagraph(final String input, final int width) { if (input == null || input.isEmpty()) { return input; } final StringBuilder out = new StringBuilder(); try (final BufferedReader bufReader = new BufferedReader(new StringReader(input))) { o...
[ "public", "static", "String", "wrapParagraph", "(", "final", "String", "input", ",", "final", "int", "width", ")", "{", "if", "(", "input", "==", "null", "||", "input", ".", "isEmpty", "(", ")", ")", "{", "return", "input", ";", "}", "final", "StringBu...
A utility method to wrap multiple lines of text, while respecting the original newlines. @param input the String of text to wrap @param width the width in characters into which to wrap the text. Less than 1 is treated as 1 @return the original string with newlines added, and starting spaces trimmed so that the resulti...
[ "A", "utility", "method", "to", "wrap", "multiple", "lines", "of", "text", "while", "respecting", "the", "original", "newlines", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/Utils.java#L154-L175
8,722
michaelquigley/zabbixj
zabbixj-core/src/main/java/com/quigley/zabbixj/agent/passive/ListenerThread.java
ListenerThread.run
public void run() { if(log.isDebugEnabled()) { log.debug("ListenerThread Starting."); } while(running) { try { Socket clientSocket = serverSocket.accept(); WorkerThread worker = new WorkerThread(container, clientSocket); w...
java
public void run() { if(log.isDebugEnabled()) { log.debug("ListenerThread Starting."); } while(running) { try { Socket clientSocket = serverSocket.accept(); WorkerThread worker = new WorkerThread(container, clientSocket); w...
[ "public", "void", "run", "(", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"ListenerThread Starting.\"", ")", ";", "}", "while", "(", "running", ")", "{", "try", "{", "Socket", "clientSocket", "=", ...
ListenerThread execution begins.
[ "ListenerThread", "execution", "begins", "." ]
15cfe46e45750b3857bec7eecc75ff5e5a3d774d
https://github.com/michaelquigley/zabbixj/blob/15cfe46e45750b3857bec7eecc75ff5e5a3d774d/zabbixj-core/src/main/java/com/quigley/zabbixj/agent/passive/ListenerThread.java#L74-L106
8,723
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/JVMUtils.java
JVMUtils.isConcrete
public static boolean isConcrete( Class<?> clazz ) { return !Modifier.isAbstract(clazz.getModifiers()) && !Modifier.isInterface(clazz.getModifiers()); }
java
public static boolean isConcrete( Class<?> clazz ) { return !Modifier.isAbstract(clazz.getModifiers()) && !Modifier.isInterface(clazz.getModifiers()); }
[ "public", "static", "boolean", "isConcrete", "(", "Class", "<", "?", ">", "clazz", ")", "{", "return", "!", "Modifier", ".", "isAbstract", "(", "clazz", ".", "getModifiers", "(", ")", ")", "&&", "!", "Modifier", ".", "isInterface", "(", "clazz", ".", "...
Is the specified class a concrete implementation of baseClass? @param clazz Class to check. @return True if clazz is concrete. False otherwise.
[ "Is", "the", "specified", "class", "a", "concrete", "implementation", "of", "baseClass?" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/JVMUtils.java#L15-L18
8,724
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/JVMUtils.java
JVMUtils.findField
public static Field findField(Class<?> type, String fieldName ) { while( type != null ) { Field[] fields = type.getDeclaredFields(); for( Field field: fields ) { if( field.getName().equals(fieldName) ) return field; } type = typ...
java
public static Field findField(Class<?> type, String fieldName ) { while( type != null ) { Field[] fields = type.getDeclaredFields(); for( Field field: fields ) { if( field.getName().equals(fieldName) ) return field; } type = typ...
[ "public", "static", "Field", "findField", "(", "Class", "<", "?", ">", "type", ",", "String", "fieldName", ")", "{", "while", "(", "type", "!=", "null", ")", "{", "Field", "[", "]", "fields", "=", "type", ".", "getDeclaredFields", "(", ")", ";", "for...
Find the field with the given name in the class. Will inspect all fields, independent of access level. @param type Class in which to search for the given field. @param fieldName Name of the field for which to search. @return The field, or null if no such field exists.
[ "Find", "the", "field", "with", "the", "given", "name", "in", "the", "class", ".", "Will", "inspect", "all", "fields", "independent", "of", "access", "level", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/JVMUtils.java#L27-L37
8,725
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DocWorkUnit.java
DocWorkUnit.processDoc
public void processDoc(final List<Map<String, String>> featureMaps, final List<Map<String, String>> groupMaps) { workUnitHandler.processWorkUnit(this, featureMaps, groupMaps); }
java
public void processDoc(final List<Map<String, String>> featureMaps, final List<Map<String, String>> groupMaps) { workUnitHandler.processWorkUnit(this, featureMaps, groupMaps); }
[ "public", "void", "processDoc", "(", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "featureMaps", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "groupMaps", ")", "{", "workUnitHandler", ".", "processWork...
Populate the property map for this work unit by delegating to the documented feature handler for this work unit. @param featureMaps map of all features included in this javadoc run @param groupMaps map of all groups included in the javadoc run
[ "Populate", "the", "property", "map", "for", "this", "work", "unit", "by", "delegating", "to", "the", "documented", "feature", "handler", "for", "this", "work", "unit", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DocWorkUnit.java#L147-L150
8,726
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DocWorkUnit.java
DocWorkUnit.getCommandLineProgramGroup
public CommandLineProgramGroup getCommandLineProgramGroup() { if (commandLineProperties != null) { try { return commandLineProperties.programGroup().newInstance(); } catch (IllegalAccessException | InstantiationException e) { logger.warn( ...
java
public CommandLineProgramGroup getCommandLineProgramGroup() { if (commandLineProperties != null) { try { return commandLineProperties.programGroup().newInstance(); } catch (IllegalAccessException | InstantiationException e) { logger.warn( ...
[ "public", "CommandLineProgramGroup", "getCommandLineProgramGroup", "(", ")", "{", "if", "(", "commandLineProperties", "!=", "null", ")", "{", "try", "{", "return", "commandLineProperties", ".", "programGroup", "(", ")", ".", "newInstance", "(", ")", ";", "}", "c...
Get the CommandLineProgramGroup object from the CommandLineProgramProperties of this work unit. @return CommandLineProgramGroup if the feature has one, otherwise null.
[ "Get", "the", "CommandLineProgramGroup", "object", "from", "the", "CommandLineProgramProperties", "of", "this", "work", "unit", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DocWorkUnit.java#L184-L196
8,727
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.startProcessDocs
protected boolean startProcessDocs(final RootDoc rootDoc) throws IOException { for (String[] options : rootDoc.options()) { parseOption(options); } // Make sure the user specified a settings directory OR that we should use the defaults. // Both are not allowed. // Ne...
java
protected boolean startProcessDocs(final RootDoc rootDoc) throws IOException { for (String[] options : rootDoc.options()) { parseOption(options); } // Make sure the user specified a settings directory OR that we should use the defaults. // Both are not allowed. // Ne...
[ "protected", "boolean", "startProcessDocs", "(", "final", "RootDoc", "rootDoc", ")", "throws", "IOException", "{", "for", "(", "String", "[", "]", "options", ":", "rootDoc", ".", "options", "(", ")", ")", "{", "parseOption", "(", "options", ")", ";", "}", ...
Extracts the contents of certain types of javadoc and adds them to an output file. @param rootDoc The documentation root. @return Whether the JavaDoc run succeeded. @throws java.io.IOException if output can't be written.
[ "Extracts", "the", "contents", "of", "certain", "types", "of", "javadoc", "and", "adds", "them", "to", "an", "output", "file", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L139-L164
8,728
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.optionLength
public static int optionLength(final String option) { // Any arguments used for the doclet need to be recognized here. Many javadoc plugins (ie. gradle) // automatically add some such as "-doctitle", "-windowtitle", which we ignore. if (option.equals(DOC_TITLE_OPTION) || option.equal...
java
public static int optionLength(final String option) { // Any arguments used for the doclet need to be recognized here. Many javadoc plugins (ie. gradle) // automatically add some such as "-doctitle", "-windowtitle", which we ignore. if (option.equals(DOC_TITLE_OPTION) || option.equal...
[ "public", "static", "int", "optionLength", "(", "final", "String", "option", ")", "{", "// Any arguments used for the doclet need to be recognized here. Many javadoc plugins (ie. gradle)", "// automatically add some such as \"-doctitle\", \"-windowtitle\", which we ignore.", "if", "(", "...
Validates the given options against options supported by this doclet. <p>Custom Barclay doclets that want to have custom command line options should provide an implementation of this static method, and also override override {@link #parseOption}). Both methods should handle the custom options, delegating back to the b...
[ "Validates", "the", "given", "options", "against", "options", "supported", "by", "this", "doclet", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L230-L249
8,729
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.processDocs
private void processDocs(final RootDoc rootDoc) { this.rootDoc = rootDoc; // Get a list of all the features and groups that we'll actually retain workUnits = computeWorkUnits(); final Set<String> uniqueGroups = new HashSet<>(); final List<Map<String, String>> featureMaps = new ...
java
private void processDocs(final RootDoc rootDoc) { this.rootDoc = rootDoc; // Get a list of all the features and groups that we'll actually retain workUnits = computeWorkUnits(); final Set<String> uniqueGroups = new HashSet<>(); final List<Map<String, String>> featureMaps = new ...
[ "private", "void", "processDocs", "(", "final", "RootDoc", "rootDoc", ")", "{", "this", ".", "rootDoc", "=", "rootDoc", ";", "// Get a list of all the features and groups that we'll actually retain", "workUnits", "=", "computeWorkUnits", "(", ")", ";", "final", "Set", ...
Process the classes that have been included by the javadoc process in the rootDoc object. @param rootDoc root structure containing the the set of objects accumulated by the javadoc process
[ "Process", "the", "classes", "that", "have", "been", "included", "by", "the", "javadoc", "process", "in", "the", "rootDoc", "object", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L256-L282
8,730
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.computeWorkUnits
private Set<DocWorkUnit> computeWorkUnits() { final TreeSet<DocWorkUnit> workUnits = new TreeSet<>(); for (final ClassDoc classDoc : rootDoc.classes()) { final Class<?> clazz = getClassForClassDoc(classDoc); final DocumentedFeature documentedFeature = getDocumentedFeatureForClas...
java
private Set<DocWorkUnit> computeWorkUnits() { final TreeSet<DocWorkUnit> workUnits = new TreeSet<>(); for (final ClassDoc classDoc : rootDoc.classes()) { final Class<?> clazz = getClassForClassDoc(classDoc); final DocumentedFeature documentedFeature = getDocumentedFeatureForClas...
[ "private", "Set", "<", "DocWorkUnit", ">", "computeWorkUnits", "(", ")", "{", "final", "TreeSet", "<", "DocWorkUnit", ">", "workUnits", "=", "new", "TreeSet", "<>", "(", ")", ";", "for", "(", "final", "ClassDoc", "classDoc", ":", "rootDoc", ".", "classes",...
For each class in the rootDoc class list, delegate to the appropriate DocWorkUnitHandler to determine if it should be included in this run, and for each included feature, construct a DocWorkUnit. @return the set of all DocWorkUnits for which we are actually generating docs
[ "For", "each", "class", "in", "the", "rootDoc", "class", "list", "delegate", "to", "the", "appropriate", "DocWorkUnitHandler", "to", "determine", "if", "it", "should", "be", "included", "in", "this", "run", "and", "for", "each", "included", "feature", "constru...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L291-L314
8,731
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.includeInDocs
public boolean includeInDocs(final DocumentedFeature documentedFeature, final ClassDoc classDoc, final Class<?> clazz) { boolean hidden = !showHiddenFeatures() && clazz.isAnnotationPresent(Hidden.class); return !hidden && JVMUtils.isConcrete(clazz); }
java
public boolean includeInDocs(final DocumentedFeature documentedFeature, final ClassDoc classDoc, final Class<?> clazz) { boolean hidden = !showHiddenFeatures() && clazz.isAnnotationPresent(Hidden.class); return !hidden && JVMUtils.isConcrete(clazz); }
[ "public", "boolean", "includeInDocs", "(", "final", "DocumentedFeature", "documentedFeature", ",", "final", "ClassDoc", "classDoc", ",", "final", "Class", "<", "?", ">", "clazz", ")", "{", "boolean", "hidden", "=", "!", "showHiddenFeatures", "(", ")", "&&", "c...
Determine if a particular class should be included in the output. This is called by the doclet to determine if a DocWorkUnit should be created for this feature. @param documentedFeature feature that is being considered for inclusion in the docs @param classDoc for the class that is being considered for inclusion in th...
[ "Determine", "if", "a", "particular", "class", "should", "be", "included", "in", "the", "output", ".", "This", "is", "called", "by", "the", "doclet", "to", "determine", "if", "a", "DocWorkUnit", "should", "be", "created", "for", "this", "feature", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L361-L364
8,732
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.createWorkUnit
protected DocWorkUnit createWorkUnit( final DocumentedFeature documentedFeature, final ClassDoc classDoc, final Class<?> clazz) { return new DocWorkUnit( new DefaultDocWorkUnitHandler(this), documentedFeature, classDoc, ...
java
protected DocWorkUnit createWorkUnit( final DocumentedFeature documentedFeature, final ClassDoc classDoc, final Class<?> clazz) { return new DocWorkUnit( new DefaultDocWorkUnitHandler(this), documentedFeature, classDoc, ...
[ "protected", "DocWorkUnit", "createWorkUnit", "(", "final", "DocumentedFeature", "documentedFeature", ",", "final", "ClassDoc", "classDoc", ",", "final", "Class", "<", "?", ">", "clazz", ")", "{", "return", "new", "DocWorkUnit", "(", "new", "DefaultDocWorkUnitHandle...
Create a work unit and handler capable of documenting the feature specified by the input arguments. Returns null if no appropriate handler is found or doc shouldn't be documented at all.
[ "Create", "a", "work", "unit", "and", "handler", "capable", "of", "documenting", "the", "feature", "specified", "by", "the", "input", "arguments", ".", "Returns", "null", "if", "no", "appropriate", "handler", "is", "found", "or", "doc", "shouldn", "t", "be",...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L410-L420
8,733
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.getDocumentedFeatureForClass
private DocumentedFeature getDocumentedFeatureForClass(final Class<?> clazz) { if (clazz != null && clazz.isAnnotationPresent(DocumentedFeature.class)) { return clazz.getAnnotation(DocumentedFeature.class); } else { return null; } }
java
private DocumentedFeature getDocumentedFeatureForClass(final Class<?> clazz) { if (clazz != null && clazz.isAnnotationPresent(DocumentedFeature.class)) { return clazz.getAnnotation(DocumentedFeature.class); } else { return null; } }
[ "private", "DocumentedFeature", "getDocumentedFeatureForClass", "(", "final", "Class", "<", "?", ">", "clazz", ")", "{", "if", "(", "clazz", "!=", "null", "&&", "clazz", ".", "isAnnotationPresent", "(", "DocumentedFeature", ".", "class", ")", ")", "{", "return...
Returns the instantiated DocumentedFeature that describes the doc for this class. @param clazz @return DocumentedFeature, or null if this classDoc shouldn't be included/documented
[ "Returns", "the", "instantiated", "DocumentedFeature", "that", "describes", "the", "doc", "for", "this", "class", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L428-L435
8,734
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.getClassForClassDoc
private Class<? extends Object> getClassForClassDoc(final ClassDoc doc) { try { return DocletUtils.getClassForDoc(doc); } catch (ClassNotFoundException e) { // we got a classdoc for a class we can't find. Maybe in a library or something return null; } catch (...
java
private Class<? extends Object> getClassForClassDoc(final ClassDoc doc) { try { return DocletUtils.getClassForDoc(doc); } catch (ClassNotFoundException e) { // we got a classdoc for a class we can't find. Maybe in a library or something return null; } catch (...
[ "private", "Class", "<", "?", "extends", "Object", ">", "getClassForClassDoc", "(", "final", "ClassDoc", "doc", ")", "{", "try", "{", "return", "DocletUtils", ".", "getClassForDoc", "(", "doc", ")", ";", "}", "catch", "(", "ClassNotFoundException", "e", ")",...
Return the Java class described by the ClassDoc doc @param doc @return
[ "Return", "the", "Java", "class", "described", "by", "the", "ClassDoc", "doc" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L443-L454
8,735
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.processIndexTemplate
protected void processIndexTemplate( final Configuration cfg, final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) throws IOException { // Get or create a template and merge in the data final Template template = cfg.getTemplate(getIndex...
java
protected void processIndexTemplate( final Configuration cfg, final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) throws IOException { // Get or create a template and merge in the data final Template template = cfg.getTemplate(getIndex...
[ "protected", "void", "processIndexTemplate", "(", "final", "Configuration", "cfg", ",", "final", "List", "<", "DocWorkUnit", ">", "workUnitList", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "groupMaps", ")", "throws", "IOException...
Create the php index listing all of the Docs features @param cfg @param workUnitList @param groupMaps @throws IOException
[ "Create", "the", "php", "index", "listing", "all", "of", "the", "Docs", "features" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L464-L482
8,736
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.groupIndexMap
protected Map<String, Object> groupIndexMap( final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) { // // root -> data -> { summary -> y, filename -> z }, etc // -> groups -> group1, group2, etc. Map<String, Object> root = new...
java
protected Map<String, Object> groupIndexMap( final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) { // // root -> data -> { summary -> y, filename -> z }, etc // -> groups -> group1, group2, etc. Map<String, Object> root = new...
[ "protected", "Map", "<", "String", ",", "Object", ">", "groupIndexMap", "(", "final", "List", "<", "DocWorkUnit", ">", "workUnitList", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "groupMaps", ")", "{", "//", "// root -> data -...
Helpful function to create the php index. Given all of the already run DocWorkUnits, create the high-level grouping data listing individual features by group. @param workUnitList @return The map used to populate the index template used by this doclet.
[ "Helpful", "function", "to", "create", "the", "php", "index", ".", "Given", "all", "of", "the", "already", "run", "DocWorkUnits", "create", "the", "high", "-", "level", "grouping", "data", "listing", "individual", "features", "by", "group", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L491-L511
8,737
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.getGroupMap
protected Map<String, String> getGroupMap(final DocWorkUnit workUnit) { Map<String, String> propertyMap = new HashMap<>(); propertyMap.put("id", getGroupIdFromName(workUnit.getGroupName())); propertyMap.put("name", workUnit.getGroupName()); propertyMap.put("summary", workUnit.getGroupSum...
java
protected Map<String, String> getGroupMap(final DocWorkUnit workUnit) { Map<String, String> propertyMap = new HashMap<>(); propertyMap.put("id", getGroupIdFromName(workUnit.getGroupName())); propertyMap.put("name", workUnit.getGroupName()); propertyMap.put("summary", workUnit.getGroupSum...
[ "protected", "Map", "<", "String", ",", "String", ">", "getGroupMap", "(", "final", "DocWorkUnit", "workUnit", ")", "{", "Map", "<", "String", ",", "String", ">", "propertyMap", "=", "new", "HashMap", "<>", "(", ")", ";", "propertyMap", ".", "put", "(", ...
Helper routine that returns the map of group name and summary given the workUnit. Subclasses that override this should call this method before doing further processing. @param workUnit @return The property map for the work unit's entry in the index map for this doclet.
[ "Helper", "routine", "that", "returns", "the", "map", "of", "group", "name", "and", "summary", "given", "the", "workUnit", ".", "Subclasses", "that", "override", "this", "should", "call", "this", "method", "before", "doing", "further", "processing", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L520-L526
8,738
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.indexDataMap
public Map<String, String> indexDataMap(final DocWorkUnit workUnit) { Map<String, String> propertyMap = new HashMap<>(); propertyMap.put("name", workUnit.getName()); propertyMap.put("summary", workUnit.getSummary()); propertyMap.put("filename", workUnit.getTargetFileName()); prop...
java
public Map<String, String> indexDataMap(final DocWorkUnit workUnit) { Map<String, String> propertyMap = new HashMap<>(); propertyMap.put("name", workUnit.getName()); propertyMap.put("summary", workUnit.getSummary()); propertyMap.put("filename", workUnit.getTargetFileName()); prop...
[ "public", "Map", "<", "String", ",", "String", ">", "indexDataMap", "(", "final", "DocWorkUnit", "workUnit", ")", "{", "Map", "<", "String", ",", "String", ">", "propertyMap", "=", "new", "HashMap", "<>", "(", ")", ";", "propertyMap", ".", "put", "(", ...
Return a String -> String map suitable for FreeMarker to create an index to this WorkUnit @return
[ "Return", "a", "String", "-", ">", "String", "map", "suitable", "for", "FreeMarker", "to", "create", "an", "index", "to", "this", "WorkUnit" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L535-L549
8,739
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.findWorkUnitForClass
public final DocWorkUnit findWorkUnitForClass(final Class<?> c) { for (final DocWorkUnit workUnit : this.workUnits) if (workUnit.getClazz().equals(c)) return workUnit; return null; }
java
public final DocWorkUnit findWorkUnitForClass(final Class<?> c) { for (final DocWorkUnit workUnit : this.workUnits) if (workUnit.getClazz().equals(c)) return workUnit; return null; }
[ "public", "final", "DocWorkUnit", "findWorkUnitForClass", "(", "final", "Class", "<", "?", ">", "c", ")", "{", "for", "(", "final", "DocWorkUnit", "workUnit", ":", "this", ".", "workUnits", ")", "if", "(", "workUnit", ".", "getClazz", "(", ")", ".", "equ...
Helper function that finding the DocWorkUnit associated with class from among all of the work units @param c the class we are looking for @return the DocWorkUnit whose .clazz.equals(c), or null if none could be found
[ "Helper", "function", "that", "finding", "the", "DocWorkUnit", "associated", "with", "class", "from", "among", "all", "of", "the", "work", "units" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L557-L562
8,740
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java
HelpDoclet.processWorkUnitTemplate
protected void processWorkUnitTemplate( final Configuration cfg, final DocWorkUnit workUnit, final List<Map<String, String>> indexByGroupMaps, final List<Map<String, String>> featureMaps) { try { // Merge data-model with template Templa...
java
protected void processWorkUnitTemplate( final Configuration cfg, final DocWorkUnit workUnit, final List<Map<String, String>> indexByGroupMaps, final List<Map<String, String>> featureMaps) { try { // Merge data-model with template Templa...
[ "protected", "void", "processWorkUnitTemplate", "(", "final", "Configuration", "cfg", ",", "final", "DocWorkUnit", "workUnit", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "indexByGroupMaps", ",", "final", "List", "<", "Map", "<", ...
High-level function that processes a single DocWorkUnit unit using its handler @param cfg @param workUnit @param featureMaps @throws IOException
[ "High", "-", "level", "function", "that", "processes", "a", "single", "DocWorkUnit", "unit", "using", "its", "handler" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/HelpDoclet.java#L582-L627
8,741
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java
TaggedArgumentParser.preprocessTaggedOptions
public String[] preprocessTaggedOptions(final String[] argArray) { List<String> finalArgs = new ArrayList<>(argArray.length); Iterator<String> argIt = Arrays.asList(argArray).iterator(); while (argIt.hasNext()) { final String arg = argIt.next(); if (isShortOptionToken(ar...
java
public String[] preprocessTaggedOptions(final String[] argArray) { List<String> finalArgs = new ArrayList<>(argArray.length); Iterator<String> argIt = Arrays.asList(argArray).iterator(); while (argIt.hasNext()) { final String arg = argIt.next(); if (isShortOptionToken(ar...
[ "public", "String", "[", "]", "preprocessTaggedOptions", "(", "final", "String", "[", "]", "argArray", ")", "{", "List", "<", "String", ">", "finalArgs", "=", "new", "ArrayList", "<>", "(", "argArray", ".", "length", ")", ";", "Iterator", "<", "String", ...
Given an array of raw arguments provided by the user, return an array of args where tagged arguments have been replaced with curated arguments containing a key to be used by the parser to retrieve the actual values. @param argArray raw arguments as provided by the user @return curated string of arguments to be presente...
[ "Given", "an", "array", "of", "raw", "arguments", "provided", "by", "the", "user", "return", "an", "array", "of", "args", "where", "tagged", "arguments", "have", "been", "replaced", "with", "curated", "arguments", "containing", "a", "key", "to", "be", "used"...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java#L74-L89
8,742
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java
TaggedArgumentParser.replaceTaggedOption
private void replaceTaggedOption( final String optionPrefix, // the option prefix used (short or long) final String optionString, // the option string, minus prefix, including any tags/attributes final Iterator<String> userArgIt, // the original, raw, un-curated i...
java
private void replaceTaggedOption( final String optionPrefix, // the option prefix used (short or long) final String optionString, // the option string, minus prefix, including any tags/attributes final Iterator<String> userArgIt, // the original, raw, un-curated i...
[ "private", "void", "replaceTaggedOption", "(", "final", "String", "optionPrefix", ",", "// the option prefix used (short or long)", "final", "String", "optionString", ",", "// the option string, minus prefix, including any tags/attributes", "final", "Iterator", "<", "String", ">"...
Process a single option and add it to the curated args list. If the option is tagged, add the curated key and value. Otherwise just add the raw option. @param optionPrefix the actual option prefix used for this option, either "-" or "--" @param optionString the option string including everything but the prefix @param ...
[ "Process", "a", "single", "option", "and", "add", "it", "to", "the", "curated", "args", "list", ".", "If", "the", "option", "is", "tagged", "add", "the", "curated", "key", "and", "value", ".", "Otherwise", "just", "add", "the", "raw", "option", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java#L109-L149
8,743
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java
TaggedArgumentParser.getSurrogateKeyForTaggedOption
private String getSurrogateKeyForTaggedOption( final String rawOptionString, // the raw option string provided by the user, including the prefix and option name final String rawArgumentValue, // the raw argument value provided by the user final String tagString // the tag...
java
private String getSurrogateKeyForTaggedOption( final String rawOptionString, // the raw option string provided by the user, including the prefix and option name final String rawArgumentValue, // the raw argument value provided by the user final String tagString // the tag...
[ "private", "String", "getSurrogateKeyForTaggedOption", "(", "final", "String", "rawOptionString", ",", "// the raw option string provided by the user, including the prefix and option name", "final", "String", "rawArgumentValue", ",", "// the raw argument value provided by the user", "fin...
Stores the option string and value in the tagSurrogates hash map and returns a surrogate key.
[ "Stores", "the", "option", "string", "and", "value", "in", "the", "tagSurrogates", "hash", "map", "and", "returns", "a", "surrogate", "key", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java#L187-L199
8,744
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java
TaggedArgumentParser.populateArgumentTags
public static void populateArgumentTags(final TaggedArgument taggedArg, final String longArgName, final String tagString) { if (tagString == null) { taggedArg.setTag(null); taggedArg.setTagAttributes(Collections.emptyMap()); } else { final ParsedArgument pa = ParsedAr...
java
public static void populateArgumentTags(final TaggedArgument taggedArg, final String longArgName, final String tagString) { if (tagString == null) { taggedArg.setTag(null); taggedArg.setTagAttributes(Collections.emptyMap()); } else { final ParsedArgument pa = ParsedAr...
[ "public", "static", "void", "populateArgumentTags", "(", "final", "TaggedArgument", "taggedArg", ",", "final", "String", "longArgName", ",", "final", "String", "tagString", ")", "{", "if", "(", "tagString", "==", "null", ")", "{", "taggedArg", ".", "setTag", "...
Parse a tag string and populate a TaggedArgument with values. @param taggedArg TaggedArgument to receive tags @param longArgName name of the argument being tagged @param tagString tag string (including logical name and attributes, no option name)
[ "Parse", "a", "tag", "string", "and", "populate", "a", "TaggedArgument", "with", "values", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java#L231-L240
8,745
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java
TaggedArgumentParser.getDisplayString
public static String getDisplayString(final String longArgName, final TaggedArgument taggedArg) { Utils.nonNull(longArgName); Utils.nonNull(taggedArg); StringBuilder sb = new StringBuilder(); sb.append(longArgName); if (taggedArg.getTag() != null) { sb.append(ARGUMEN...
java
public static String getDisplayString(final String longArgName, final TaggedArgument taggedArg) { Utils.nonNull(longArgName); Utils.nonNull(taggedArg); StringBuilder sb = new StringBuilder(); sb.append(longArgName); if (taggedArg.getTag() != null) { sb.append(ARGUMEN...
[ "public", "static", "String", "getDisplayString", "(", "final", "String", "longArgName", ",", "final", "TaggedArgument", "taggedArg", ")", "{", "Utils", ".", "nonNull", "(", "longArgName", ")", ";", "Utils", ".", "nonNull", "(", "taggedArg", ")", ";", "StringB...
Given a TaggedArgument implementation and a long argument name, return a string representation of argument, including the tag and attributes, for display purposes. @param taggedArg implementation of TaggedArgument interface @return a display string representing the tag name and attributes. May be empty if no tag name/...
[ "Given", "a", "TaggedArgument", "implementation", "and", "a", "long", "argument", "name", "return", "a", "string", "representation", "of", "argument", "including", "the", "tag", "and", "attributes", "for", "display", "purposes", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java#L249-L272
8,746
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/BashTabCompletionDoclet.java
BashTabCompletionDoclet.optionLength
public static int optionLength(final String option) { if (option.equals(CALLER_SCRIPT_NAME) || option.equals(CALLER_SCRIPT_PREFIX_LEGAL_ARGS) || option.equals(CALLER_SCRIPT_PREFIX_ARG_VALUE_TYPES) || option.equals(CALLER_SCRIPT_PREFIX_MUTEX_ARGS) || option.equals...
java
public static int optionLength(final String option) { if (option.equals(CALLER_SCRIPT_NAME) || option.equals(CALLER_SCRIPT_PREFIX_LEGAL_ARGS) || option.equals(CALLER_SCRIPT_PREFIX_ARG_VALUE_TYPES) || option.equals(CALLER_SCRIPT_PREFIX_MUTEX_ARGS) || option.equals...
[ "public", "static", "int", "optionLength", "(", "final", "String", "option", ")", "{", "if", "(", "option", ".", "equals", "(", "CALLER_SCRIPT_NAME", ")", "||", "option", ".", "equals", "(", "CALLER_SCRIPT_PREFIX_LEGAL_ARGS", ")", "||", "option", ".", "equals"...
Must add options that are applicable to this doclet so that they will be accepted.
[ "Must", "add", "options", "that", "are", "applicable", "to", "this", "doclet", "so", "that", "they", "will", "be", "accepted", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/BashTabCompletionDoclet.java#L276-L297
8,747
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/BashTabCompletionDoclet.java
BashTabCompletionDoclet.processIndexTemplate
@Override protected void processIndexTemplate( final Configuration cfg, final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) throws IOException { // Create a root map for all the work units so we can access all the info we need: fi...
java
@Override protected void processIndexTemplate( final Configuration cfg, final List<DocWorkUnit> workUnitList, final List<Map<String, String>> groupMaps ) throws IOException { // Create a root map for all the work units so we can access all the info we need: fi...
[ "@", "Override", "protected", "void", "processIndexTemplate", "(", "final", "Configuration", "cfg", ",", "final", "List", "<", "DocWorkUnit", ">", "workUnitList", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "groupMaps", ")", "th...
The Index file in the Bash Completion Doclet is what generates the actual tab-completion script. This will actually write out the shell completion output file. The Freemarker instance will see a top-level map that has two keys in it. The first key is for caller script options: SimpleMap callerScriptOptions = SimpleM...
[ "The", "Index", "file", "in", "the", "Bash", "Completion", "Doclet", "is", "what", "generates", "the", "actual", "tab", "-", "completion", "script", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/BashTabCompletionDoclet.java#L478-L534
8,748
michaelquigley/zabbixj
zabbixj-core/src/main/java/com/quigley/zabbixj/agent/passive/WorkerThread.java
WorkerThread.run
public void run() { // For log messages. String client = socket.getInetAddress().getHostAddress(); if(log.isDebugEnabled()) { log.info("Accepted Connection From: " + client); } PrintWriter out = null; BufferedReader in = null; try { // S...
java
public void run() { // For log messages. String client = socket.getInetAddress().getHostAddress(); if(log.isDebugEnabled()) { log.info("Accepted Connection From: " + client); } PrintWriter out = null; BufferedReader in = null; try { // S...
[ "public", "void", "run", "(", ")", "{", "// For log messages.", "String", "client", "=", "socket", ".", "getInetAddress", "(", ")", ".", "getHostAddress", "(", ")", ";", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "info", "...
WorkerThread execution begins.
[ "WorkerThread", "execution", "begins", "." ]
15cfe46e45750b3857bec7eecc75ff5e5a3d774d
https://github.com/michaelquigley/zabbixj/blob/15cfe46e45750b3857bec7eecc75ff5e5a3d774d/zabbixj-core/src/main/java/com/quigley/zabbixj/agent/passive/WorkerThread.java#L56-L113
8,749
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java
LegacyCommandLineArgumentParser.hasWebDocumentation
public boolean hasWebDocumentation(final Class<?> clazz) { for (final String pkg : PACKAGES_WITH_WEB_DOCUMENTATION) { if (clazz.getPackage().getName().startsWith(pkg)) { return true; } } return false; }
java
public boolean hasWebDocumentation(final Class<?> clazz) { for (final String pkg : PACKAGES_WITH_WEB_DOCUMENTATION) { if (clazz.getPackage().getName().startsWith(pkg)) { return true; } } return false; }
[ "public", "boolean", "hasWebDocumentation", "(", "final", "Class", "<", "?", ">", "clazz", ")", "{", "for", "(", "final", "String", "pkg", ":", "PACKAGES_WITH_WEB_DOCUMENTATION", ")", "{", "if", "(", "clazz", ".", "getPackage", "(", ")", ".", "getName", "(...
Determines if a class has web documentation based on its package name @param clazz @return true if the class has web documentation, false otherwise
[ "Determines", "if", "a", "class", "has", "web", "documentation", "based", "on", "its", "package", "name" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java#L127-L134
8,750
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java
LegacyCommandLineArgumentParser.usage
@Override public String usage(final boolean printCommon, final boolean printHidden) { final StringBuilder sb = new StringBuilder(); if (!printHidden) { logger.warn("Hidden arguments are always printed in LegacyCommandLineArgumentParser"); } if (prefix.isEmpty()) { ...
java
@Override public String usage(final boolean printCommon, final boolean printHidden) { final StringBuilder sb = new StringBuilder(); if (!printHidden) { logger.warn("Hidden arguments are always printed in LegacyCommandLineArgumentParser"); } if (prefix.isEmpty()) { ...
[ "@", "Override", "public", "String", "usage", "(", "final", "boolean", "printCommon", ",", "final", "boolean", "printHidden", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "!", "printHidden", ")", "{", "lo...
Print a usage message based on the options object passed to the ctor. @param printCommon True if common args should be included in the usage message. @param printHidden Ignored in legacy. @return Usage string generated by the command line parser.
[ "Print", "a", "usage", "message", "based", "on", "the", "options", "object", "passed", "to", "the", "ctor", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java#L266-L310
8,751
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java
LegacyCommandLineArgumentParser.convertFromHtml
static String convertFromHtml(final String textToConvert) { //LinkedHashmap since the order matters final Map<String, String> regexps = new LinkedHashMap<>(); regexps.put("< *a *href=[\'\"](.*?)[\'\"] *>(.*?)</ *a *>","$2 ($1)"); regexps.put("< *a *href=[\'\"](.*?)[\'\"] *>(.*?)< *a */...
java
static String convertFromHtml(final String textToConvert) { //LinkedHashmap since the order matters final Map<String, String> regexps = new LinkedHashMap<>(); regexps.put("< *a *href=[\'\"](.*?)[\'\"] *>(.*?)</ *a *>","$2 ($1)"); regexps.put("< *a *href=[\'\"](.*?)[\'\"] *>(.*?)< *a */...
[ "static", "String", "convertFromHtml", "(", "final", "String", "textToConvert", ")", "{", "//LinkedHashmap since the order matters", "final", "Map", "<", "String", ",", "String", ">", "regexps", "=", "new", "LinkedHashMap", "<>", "(", ")", ";", "regexps", ".", "...
package local for testing
[ "package", "local", "for", "testing" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java#L322-L338
8,752
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java
LegacyCommandLineArgumentParser.parseArguments
@Override public boolean parseArguments(final PrintStream messageStream, final String[] args) { this.argv = args; this.messageStream = messageStream; if (prefix.isEmpty()) { commandLine = callerOptions.getClass().getSimpleName(); } for (int i = 0; i < args.length;...
java
@Override public boolean parseArguments(final PrintStream messageStream, final String[] args) { this.argv = args; this.messageStream = messageStream; if (prefix.isEmpty()) { commandLine = callerOptions.getClass().getSimpleName(); } for (int i = 0; i < args.length;...
[ "@", "Override", "public", "boolean", "parseArguments", "(", "final", "PrintStream", "messageStream", ",", "final", "String", "[", "]", "args", ")", "{", "this", ".", "argv", "=", "args", ";", "this", ".", "messageStream", "=", "messageStream", ";", "if", ...
Parse command-line options, and store values in callerOptions object passed to ctor. @param messageStream Where to write error messages. @param args Command line tokens. @return true if command line is valid.
[ "Parse", "command", "-", "line", "options", "and", "store", "values", "in", "callerOptions", "object", "passed", "to", "ctor", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java#L365-L411
8,753
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java
LegacyCommandLineArgumentParser.getUnderlyingType
private Class<?> getUnderlyingType(final Field field) { if (isCollectionField(field)) { final ParameterizedType clazz = (ParameterizedType) (field.getGenericType()); final Type[] genericTypes = clazz.getActualTypeArguments(); if (genericTypes.length != 1) { th...
java
private Class<?> getUnderlyingType(final Field field) { if (isCollectionField(field)) { final ParameterizedType clazz = (ParameterizedType) (field.getGenericType()); final Type[] genericTypes = clazz.getActualTypeArguments(); if (genericTypes.length != 1) { th...
[ "private", "Class", "<", "?", ">", "getUnderlyingType", "(", "final", "Field", "field", ")", "{", "if", "(", "isCollectionField", "(", "field", ")", ")", "{", "final", "ParameterizedType", "clazz", "=", "(", "ParameterizedType", ")", "(", "field", ".", "ge...
Returns the type that each instance of the argument needs to be converted to. In the case of primitive fields it will return the wrapper type so that String constructors can be found.
[ "Returns", "the", "type", "that", "each", "instance", "of", "the", "argument", "needs", "to", "be", "converted", "to", ".", "In", "the", "case", "of", "primitive", "fields", "it", "will", "return", "the", "wrapper", "type", "so", "that", "String", "constru...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/LegacyCommandLineArgumentParser.java#L902-L924
8,754
ReactiveX/RxJavaJoins
src/main/java/rx/joins/Pattern9.java
Pattern9.and
public PatternN and(Observable<? extends Object> other) { if (other == null) { throw new NullPointerException(); } List<Observable<? extends Object>> list = new ArrayList<Observable<? extends Object>>(); list.add(o1); list.add(o2); list.add(o3); list.a...
java
public PatternN and(Observable<? extends Object> other) { if (other == null) { throw new NullPointerException(); } List<Observable<? extends Object>> list = new ArrayList<Observable<? extends Object>>(); list.add(o1); list.add(o2); list.add(o3); list.a...
[ "public", "PatternN", "and", "(", "Observable", "<", "?", "extends", "Object", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "List", "<", "Observable", "<", "?", "extends...
Creates a pattern that matches when all nine observable sequences have an available element. @param other Observable sequence to match with the eight previous sequences. @return Pattern object that matches when all observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "all", "nine", "observable", "sequences", "have", "an", "available", "element", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/Pattern9.java#L103-L119
8,755
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.parseArguments
@Override public boolean parseArguments(final PrintStream messageStream, String[] args) { final OptionSet parsedArguments; final OptionParser parser = getOptionParser(); try { // Preprocess the arguments before the parser sees them, replacing any tagged options // and...
java
@Override public boolean parseArguments(final PrintStream messageStream, String[] args) { final OptionSet parsedArguments; final OptionParser parser = getOptionParser(); try { // Preprocess the arguments before the parser sees them, replacing any tagged options // and...
[ "@", "Override", "public", "boolean", "parseArguments", "(", "final", "PrintStream", "messageStream", ",", "String", "[", "]", "args", ")", "{", "final", "OptionSet", "parsedArguments", ";", "final", "OptionParser", "parser", "=", "getOptionParser", "(", ")", ";...
Parse command-line arguments, and store values in callerArguments object passed to ctor. @param messageStream Where to write error messages. @param args Command line tokens. @return true if command line is valid and the program should run, false if help or version was requested @throws CommandLineException if ...
[ "Parse", "command", "-", "line", "arguments", "and", "store", "values", "in", "callerArguments", "object", "passed", "to", "ctor", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L134-L167
8,756
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.getPluginDescriptor
@Override public <T> T getPluginDescriptor(final Class<T> targetDescriptor) { return targetDescriptor.cast(pluginDescriptors.get(targetDescriptor.getName())); }
java
@Override public <T> T getPluginDescriptor(final Class<T> targetDescriptor) { return targetDescriptor.cast(pluginDescriptors.get(targetDescriptor.getName())); }
[ "@", "Override", "public", "<", "T", ">", "T", "getPluginDescriptor", "(", "final", "Class", "<", "T", ">", "targetDescriptor", ")", "{", "return", "targetDescriptor", ".", "cast", "(", "pluginDescriptors", ".", "get", "(", "targetDescriptor", ".", "getName", ...
Return the plugin instance corresponding to the targetDescriptor class
[ "Return", "the", "plugin", "instance", "corresponding", "to", "the", "targetDescriptor", "class" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L198-L201
8,757
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.validateArgumentDefinitions
private void validateArgumentDefinitions() { for (final NamedArgumentDefinition mutexSourceDef : namedArgumentDefinitions) { for (final String mutexTarget : mutexSourceDef.getMutexTargetList()) { final NamedArgumentDefinition mutexTargetDef = namedArgumentsDefinitionsByAlias.get(mute...
java
private void validateArgumentDefinitions() { for (final NamedArgumentDefinition mutexSourceDef : namedArgumentDefinitions) { for (final String mutexTarget : mutexSourceDef.getMutexTargetList()) { final NamedArgumentDefinition mutexTargetDef = namedArgumentsDefinitionsByAlias.get(mute...
[ "private", "void", "validateArgumentDefinitions", "(", ")", "{", "for", "(", "final", "NamedArgumentDefinition", "mutexSourceDef", ":", "namedArgumentDefinitions", ")", "{", "for", "(", "final", "String", "mutexTarget", ":", "mutexSourceDef", ".", "getMutexTargetList", ...
arguments involved.
[ "arguments", "involved", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L266-L283
8,758
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.createCommandLinePluginArgumentDefinitions
private void createCommandLinePluginArgumentDefinitions( final List<? extends CommandLinePluginDescriptor<?>> requestedPluginDescriptors) { // For each descriptor, create the argument definitions for the descriptor object itself, // then process it's plugin classes requestedPlugi...
java
private void createCommandLinePluginArgumentDefinitions( final List<? extends CommandLinePluginDescriptor<?>> requestedPluginDescriptors) { // For each descriptor, create the argument definitions for the descriptor object itself, // then process it's plugin classes requestedPlugi...
[ "private", "void", "createCommandLinePluginArgumentDefinitions", "(", "final", "List", "<", "?", "extends", "CommandLinePluginDescriptor", "<", "?", ">", ">", "requestedPluginDescriptors", ")", "{", "// For each descriptor, create the argument definitions for the descriptor object ...
Find all the instances of plugins specified by the provided plugin descriptors
[ "Find", "all", "the", "instances", "of", "plugins", "specified", "by", "the", "provided", "plugin", "descriptors" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L347-L359
8,759
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.findPluginsForDescriptor
private void findPluginsForDescriptor(final CommandLinePluginDescriptor<?> pluginDescriptor) { final ClassFinder classFinder = new ClassFinder(); pluginDescriptor.getPackageNames().forEach( pkg -> classFinder.find(pkg, pluginDescriptor.getPluginBaseClass())); final Set<Class<...
java
private void findPluginsForDescriptor(final CommandLinePluginDescriptor<?> pluginDescriptor) { final ClassFinder classFinder = new ClassFinder(); pluginDescriptor.getPackageNames().forEach( pkg -> classFinder.find(pkg, pluginDescriptor.getPluginBaseClass())); final Set<Class<...
[ "private", "void", "findPluginsForDescriptor", "(", "final", "CommandLinePluginDescriptor", "<", "?", ">", "pluginDescriptor", ")", "{", "final", "ClassFinder", "classFinder", "=", "new", "ClassFinder", "(", ")", ";", "pluginDescriptor", ".", "getPackageNames", "(", ...
instance each and add its ArgumentDefinitions
[ "instance", "each", "and", "add", "its", "ArgumentDefinitions" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L363-L381
8,760
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.isSpecialFlagSet
private boolean isSpecialFlagSet(final OptionSet parsedArguments, final String flagName){ if (parsedArguments.has(flagName)){ Object value = parsedArguments.valueOf(flagName); return (value == null || !value.equals("false")); } else{ return false; } }
java
private boolean isSpecialFlagSet(final OptionSet parsedArguments, final String flagName){ if (parsedArguments.has(flagName)){ Object value = parsedArguments.valueOf(flagName); return (value == null || !value.equals("false")); } else{ return false; } }
[ "private", "boolean", "isSpecialFlagSet", "(", "final", "OptionSet", "parsedArguments", ",", "final", "String", "flagName", ")", "{", "if", "(", "parsedArguments", ".", "has", "(", "flagName", ")", ")", "{", "Object", "value", "=", "parsedArguments", ".", "val...
helper to deal with the case of special flags that are evaluated before the options are properly set
[ "helper", "to", "deal", "with", "the", "case", "of", "special", "flags", "that", "are", "evaluated", "before", "the", "options", "are", "properly", "set" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L541-L548
8,761
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.validatePluginArgumentValues
private List<NamedArgumentDefinition> validatePluginArgumentValues() { final List<NamedArgumentDefinition> actualArgumentDefinitions = new ArrayList<>(); for (final NamedArgumentDefinition argumentDefinition : namedArgumentDefinitions) { if (!argumentDefinition.isControlledByPlugin()) { ...
java
private List<NamedArgumentDefinition> validatePluginArgumentValues() { final List<NamedArgumentDefinition> actualArgumentDefinitions = new ArrayList<>(); for (final NamedArgumentDefinition argumentDefinition : namedArgumentDefinitions) { if (!argumentDefinition.isControlledByPlugin()) { ...
[ "private", "List", "<", "NamedArgumentDefinition", ">", "validatePluginArgumentValues", "(", ")", "{", "final", "List", "<", "NamedArgumentDefinition", ">", "actualArgumentDefinitions", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "NamedArgumen...
other arguments that require validation.
[ "other", "arguments", "that", "require", "validation", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L573-L606
8,762
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.expandFromExpansionFile
public List<String> expandFromExpansionFile( final ArgumentDefinition argumentDefinition, final String stringValue, final List<String> originalValuesForPreservation) { List<String> expandedValues = new ArrayList<>(); if (EXPANSION_FILE_EXTENSIONS.stream().anyMatch(ext...
java
public List<String> expandFromExpansionFile( final ArgumentDefinition argumentDefinition, final String stringValue, final List<String> originalValuesForPreservation) { List<String> expandedValues = new ArrayList<>(); if (EXPANSION_FILE_EXTENSIONS.stream().anyMatch(ext...
[ "public", "List", "<", "String", ">", "expandFromExpansionFile", "(", "final", "ArgumentDefinition", "argumentDefinition", ",", "final", "String", "stringValue", ",", "final", "List", "<", "String", ">", "originalValuesForPreservation", ")", "{", "List", "<", "Strin...
Expand any collection value that references a filename that ends in one of the accepted expansion extensions, and add the contents of the file to the list of values for that argument. @param argumentDefinition ArgumentDefinition for the arg being populated @param stringValue the argument value as presented on the comma...
[ "Expand", "any", "collection", "value", "that", "references", "a", "filename", "that", "ends", "in", "one", "of", "the", "accepted", "expansion", "extensions", "and", "add", "the", "contents", "of", "the", "file", "to", "the", "list", "of", "values", "for", ...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L618-L634
8,763
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.gatherArgumentValuesOfType
@Override public <T> List<Pair<ArgumentDefinition, T>> gatherArgumentValuesOfType( final Class<T> type ) { final List<Pair<ArgumentDefinition, T>> argumentValues = new ArrayList<>(); // include all named and positional argument definitions final List<ArgumentDefinition> allArgDefs = new Arr...
java
@Override public <T> List<Pair<ArgumentDefinition, T>> gatherArgumentValuesOfType( final Class<T> type ) { final List<Pair<ArgumentDefinition, T>> argumentValues = new ArrayList<>(); // include all named and positional argument definitions final List<ArgumentDefinition> allArgDefs = new Arr...
[ "@", "Override", "public", "<", "T", ">", "List", "<", "Pair", "<", "ArgumentDefinition", ",", "T", ">", ">", "gatherArgumentValuesOfType", "(", "final", "Class", "<", "T", ">", "type", ")", "{", "final", "List", "<", "Pair", "<", "ArgumentDefinition", "...
Locates and returns the VALUES of all Argument-annotated fields of a specified type in a given object, pairing each field value with its corresponding Field object. Must be called AFTER argument parsing and value injection into argumentSource is complete (otherwise there will be no values to gather!). Locates Argumen...
[ "Locates", "and", "returns", "the", "VALUES", "of", "all", "Argument", "-", "annotated", "fields", "of", "a", "specified", "type", "in", "a", "given", "object", "pairing", "each", "field", "value", "with", "its", "corresponding", "Field", "object", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L729-L769
8,764
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/ClassFinder.java
ClassFinder.scanDir
protected void scanDir(final File file, final String path) { for ( final File child: file.listFiles() ) { final String newPath = (path==null ? child.getName() : path + '/' + child.getName() ); if ( child.isDirectory() ) { scanDir(child, newPath); } ...
java
protected void scanDir(final File file, final String path) { for ( final File child: file.listFiles() ) { final String newPath = (path==null ? child.getName() : path + '/' + child.getName() ); if ( child.isDirectory() ) { scanDir(child, newPath); } ...
[ "protected", "void", "scanDir", "(", "final", "File", "file", ",", "final", "String", "path", ")", "{", "for", "(", "final", "File", "child", ":", "file", ".", "listFiles", "(", ")", ")", "{", "final", "String", "newPath", "=", "(", "path", "==", "nu...
Scans a directory on the filesystem for classes. @param file the directory or file to examine @param path the package path acculmulated so far (e.g. edu/mit/broad)
[ "Scans", "a", "directory", "on", "the", "filesystem", "for", "classes", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/ClassFinder.java#L124-L134
8,765
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/ClassFinder.java
ClassFinder.handleItem
protected void handleItem(final String name) { if (name.endsWith(".class")) { final String classname = toClassName(name); try { final Class<?> type = loader.loadClass(classname); if (parentType.isAssignableFrom(type)) { this.classes.ad...
java
protected void handleItem(final String name) { if (name.endsWith(".class")) { final String classname = toClassName(name); try { final Class<?> type = loader.loadClass(classname); if (parentType.isAssignableFrom(type)) { this.classes.ad...
[ "protected", "void", "handleItem", "(", "final", "String", "name", ")", "{", "if", "(", "name", ".", "endsWith", "(", "\".class\"", ")", ")", "{", "final", "String", "classname", "=", "toClassName", "(", "name", ")", ";", "try", "{", "final", "Class", ...
Checks an item to see if it is a class and is annotated with the specified annotation. If so, adds it to the set, otherwise ignores it. @param name the path equivelant to the package + class/item name
[ "Checks", "an", "item", "to", "see", "if", "it", "is", "a", "class", "and", "is", "annotated", "with", "the", "specified", "annotation", ".", "If", "so", "adds", "it", "to", "the", "set", "otherwise", "ignores", "it", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/ClassFinder.java#L141-L155
8,766
ReactiveX/RxJavaJoins
src/main/java/rx/joins/operators/OperatorJoinPatterns.java
OperatorJoinPatterns.and
public static <T1, T2> Pattern2<T1, T2> and(/* this */Observable<T1> left, Observable<T2> right) { if (left == null) { throw new NullPointerException("left"); } if (right == null) { throw new NullPointerException("right"); } return new Pattern2<T1, T2>(lef...
java
public static <T1, T2> Pattern2<T1, T2> and(/* this */Observable<T1> left, Observable<T2> right) { if (left == null) { throw new NullPointerException("left"); } if (right == null) { throw new NullPointerException("right"); } return new Pattern2<T1, T2>(lef...
[ "public", "static", "<", "T1", ",", "T2", ">", "Pattern2", "<", "T1", ",", "T2", ">", "and", "(", "/* this */", "Observable", "<", "T1", ">", "left", ",", "Observable", "<", "T2", ">", "right", ")", "{", "if", "(", "left", "==", "null", ")", "{",...
Creates a pattern that matches when both observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "both", "observable", "sequences", "have", "an", "available", "element", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/operators/OperatorJoinPatterns.java#L45-L53
8,767
ReactiveX/RxJavaJoins
src/main/java/rx/joins/operators/OperatorJoinPatterns.java
OperatorJoinPatterns.then
public static <T1, R> Plan0<R> then(/* this */Observable<T1> source, Func1<T1, R> selector) { if (source == null) { throw new NullPointerException("source"); } if (selector == null) { throw new NullPointerException("selector"); } return new Pattern1<T1>(so...
java
public static <T1, R> Plan0<R> then(/* this */Observable<T1> source, Func1<T1, R> selector) { if (source == null) { throw new NullPointerException("source"); } if (selector == null) { throw new NullPointerException("selector"); } return new Pattern1<T1>(so...
[ "public", "static", "<", "T1", ",", "R", ">", "Plan0", "<", "R", ">", "then", "(", "/* this */", "Observable", "<", "T1", ">", "source", ",", "Func1", "<", "T1", ",", "R", ">", "selector", ")", "{", "if", "(", "source", "==", "null", ")", "{", ...
Matches when the observable sequence has an available element and projects the element by invoking the selector function.
[ "Matches", "when", "the", "observable", "sequence", "has", "an", "available", "element", "and", "projects", "the", "element", "by", "invoking", "the", "selector", "function", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/operators/OperatorJoinPatterns.java#L58-L66
8,768
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.getArgumentAliases
public List<String> getArgumentAliases() { final List<String> aliases = new ArrayList<>(); if (!getShortName().isEmpty()) { aliases.add(getShortName()); } if (!getFullName().isEmpty()) { aliases.add(getFullName()); } else { aliases.add(getUnder...
java
public List<String> getArgumentAliases() { final List<String> aliases = new ArrayList<>(); if (!getShortName().isEmpty()) { aliases.add(getShortName()); } if (!getFullName().isEmpty()) { aliases.add(getFullName()); } else { aliases.add(getUnder...
[ "public", "List", "<", "String", ">", "getArgumentAliases", "(", ")", "{", "final", "List", "<", "String", ">", "aliases", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "!", "getShortName", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "...
Get the list of short and long aliases for this argument. @return The list of possible aliases for this argument. Will not be null or empty, and contain only 1 or 2 values. the names are drawn from the fullName, shortName, and {@code Field} name for this argument.
[ "Get", "the", "list", "of", "short", "and", "long", "aliases", "for", "this", "argument", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L252-L263
8,769
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.setCollectionValues
@SuppressWarnings({"rawtypes", "unchecked"}) private void setCollectionValues( final CommandLineArgumentParser commandLineArgumentParser, final List<String> preprocessedValues) // Note that some of these might be tag surrogates { final Collection c = (Collection) getArgumentValue...
java
@SuppressWarnings({"rawtypes", "unchecked"}) private void setCollectionValues( final CommandLineArgumentParser commandLineArgumentParser, final List<String> preprocessedValues) // Note that some of these might be tag surrogates { final Collection c = (Collection) getArgumentValue...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "private", "void", "setCollectionValues", "(", "final", "CommandLineArgumentParser", "commandLineArgumentParser", ",", "final", "List", "<", "String", ">", "preprocessedValues", ")", "/...
surrogate, each instance added to the collection must be populated with any tags and attributes.
[ "surrogate", "each", "instance", "added", "to", "the", "collection", "must", "be", "populated", "with", "any", "tags", "and", "attributes", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L298-L345
8,770
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.setScalarValue
private void setScalarValue( final CommandLineArgumentParser commandLineArgumentParser, final List<String> originalValues) // Note that these might be tag surrogates { if (getHasBeenSet() || originalValues.size() > 1) { throw new CommandLineException.BadArgumentValue( ...
java
private void setScalarValue( final CommandLineArgumentParser commandLineArgumentParser, final List<String> originalValues) // Note that these might be tag surrogates { if (getHasBeenSet() || originalValues.size() > 1) { throw new CommandLineException.BadArgumentValue( ...
[ "private", "void", "setScalarValue", "(", "final", "CommandLineArgumentParser", "commandLineArgumentParser", ",", "final", "List", "<", "String", ">", "originalValues", ")", "// Note that these might be tag surrogates", "{", "if", "(", "getHasBeenSet", "(", ")", "||", "...
one value, in which case we throw.
[ "one", "value", "in", "which", "case", "we", "throw", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L351-L377
8,771
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.getArgumentUsage
public String getArgumentUsage( final Map<String, NamedArgumentDefinition> allActualArguments, final Collection<CommandLinePluginDescriptor<?>> pluginDescriptors, final int argumentColumnWidth, final int descriptionColumnWidth) { final StringBuilder sb = new Stri...
java
public String getArgumentUsage( final Map<String, NamedArgumentDefinition> allActualArguments, final Collection<CommandLinePluginDescriptor<?>> pluginDescriptors, final int argumentColumnWidth, final int descriptionColumnWidth) { final StringBuilder sb = new Stri...
[ "public", "String", "getArgumentUsage", "(", "final", "Map", "<", "String", ",", "NamedArgumentDefinition", ">", "allActualArguments", ",", "final", "Collection", "<", "CommandLinePluginDescriptor", "<", "?", ">", ">", "pluginDescriptors", ",", "final", "int", "argu...
Return a string with the usage statement for this argument. @param allActualArguments {code Map} of all namedArgumentDefinitions for the containing object @param pluginDescriptors Collection of {@code CommandLinePluginDescriptor} objects for the containing object @param argumentColumnWidth width reserved for argument n...
[ "Return", "a", "string", "with", "the", "usage", "statement", "for", "this", "argument", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L429-L463
8,772
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.getNameValuePairForDisplay
private String getNameValuePairForDisplay(final Object value) { if (value != null) { if (argumentAnnotation.sensitive()) { return String.format("--%s ***********", getLongName()); } else { // if we're displaying a tagged argument, include the tag name and ...
java
private String getNameValuePairForDisplay(final Object value) { if (value != null) { if (argumentAnnotation.sensitive()) { return String.format("--%s ***********", getLongName()); } else { // if we're displaying a tagged argument, include the tag name and ...
[ "private", "String", "getNameValuePairForDisplay", "(", "final", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "argumentAnnotation", ".", "sensitive", "(", ")", ")", "{", "return", "String", ".", "format", "(", "\"--%s...
Get a name value pair for this argument and a value, suitable for display.
[ "Get", "a", "name", "value", "pair", "for", "this", "argument", "and", "a", "value", "suitable", "for", "display", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L466-L480
8,773
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.convertDefaultValueToString
private String convertDefaultValueToString() { final Object initialValue = getArgumentValue(); if (initialValue != null) { if (isCollection() && ((Collection<?>) initialValue).isEmpty()) { // treat empty collections the same as uninitialized non-collection types ...
java
private String convertDefaultValueToString() { final Object initialValue = getArgumentValue(); if (initialValue != null) { if (isCollection() && ((Collection<?>) initialValue).isEmpty()) { // treat empty collections the same as uninitialized non-collection types ...
[ "private", "String", "convertDefaultValueToString", "(", ")", "{", "final", "Object", "initialValue", "=", "getArgumentValue", "(", ")", ";", "if", "(", "initialValue", "!=", "null", ")", "{", "if", "(", "isCollection", "(", ")", "&&", "(", "(", "Collection"...
Convert the initial value for this argument to a string representation.
[ "Convert", "the", "initial", "value", "for", "this", "argument", "to", "a", "string", "representation", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L483-L496
8,774
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.validateBoundsDefinitions
private void validateBoundsDefinitions() { // bounds should be only set for numeric arguments and if the type is integer it should // be set to an integer if (!Number.class.isAssignableFrom(getUnderlyingFieldClass())) { if (hasBoundedRange() || hasRecommendedRange()) { ...
java
private void validateBoundsDefinitions() { // bounds should be only set for numeric arguments and if the type is integer it should // be set to an integer if (!Number.class.isAssignableFrom(getUnderlyingFieldClass())) { if (hasBoundedRange() || hasRecommendedRange()) { ...
[ "private", "void", "validateBoundsDefinitions", "(", ")", "{", "// bounds should be only set for numeric arguments and if the type is integer it should", "// be set to an integer", "if", "(", "!", "Number", ".", "class", ".", "isAssignableFrom", "(", "getUnderlyingFieldClass", "(...
and are self-consistent.
[ "and", "are", "self", "-", "consistent", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L505-L528
8,775
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.getValuePopulatedWithTags
private Object getValuePopulatedWithTags(final String originalTag, final String stringValue) { // See if the value is a surrogate key in the tag parser's map that was placed there during preprocessing, // and if so, unpack the values retrieved via the key and use those to populate the field ...
java
private Object getValuePopulatedWithTags(final String originalTag, final String stringValue) { // See if the value is a surrogate key in the tag parser's map that was placed there during preprocessing, // and if so, unpack the values retrieved via the key and use those to populate the field ...
[ "private", "Object", "getValuePopulatedWithTags", "(", "final", "String", "originalTag", ",", "final", "String", "stringValue", ")", "{", "// See if the value is a surrogate key in the tag parser's map that was placed there during preprocessing,", "// and if so, unpack the values retriev...
populated with the actual value and tags and attributes provided by the user for that argument.
[ "populated", "with", "the", "actual", "value", "and", "tags", "and", "attributes", "provided", "by", "the", "user", "for", "that", "argument", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L532-L554
8,776
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.getArgumentDescription
private String getArgumentDescription( final Map<String, NamedArgumentDefinition> allActualArguments, final Collection<CommandLinePluginDescriptor<?>> pluginDescriptors) { final StringBuilder sb = new StringBuilder(); if (!getDocString().isEmpty()) { sb.append(getDocS...
java
private String getArgumentDescription( final Map<String, NamedArgumentDefinition> allActualArguments, final Collection<CommandLinePluginDescriptor<?>> pluginDescriptors) { final StringBuilder sb = new StringBuilder(); if (!getDocString().isEmpty()) { sb.append(getDocS...
[ "private", "String", "getArgumentDescription", "(", "final", "Map", "<", "String", ",", "NamedArgumentDefinition", ">", "allActualArguments", ",", "final", "Collection", "<", "CommandLinePluginDescriptor", "<", "?", ">", ">", "pluginDescriptors", ")", "{", "final", ...
Return a usage string representing this argument.
[ "Return", "a", "usage", "string", "representing", "this", "argument", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L557-L599
8,777
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.checkArgumentRange
private void checkArgumentRange(final Object argumentValue) { // Only validate numeric types because we have already ensured at constructor time that only numeric types have bounds if (!Number.class.isAssignableFrom(getUnderlyingFieldClass())) { return; } final Double argume...
java
private void checkArgumentRange(final Object argumentValue) { // Only validate numeric types because we have already ensured at constructor time that only numeric types have bounds if (!Number.class.isAssignableFrom(getUnderlyingFieldClass())) { return; } final Double argume...
[ "private", "void", "checkArgumentRange", "(", "final", "Object", "argumentValue", ")", "{", "// Only validate numeric types because we have already ensured at constructor time that only numeric types have bounds", "if", "(", "!", "Number", ".", "class", ".", "isAssignableFrom", "...
Check the provided value against any range constraints specified in the Argument annotation for the corresponding field. Throw an exception if limits are violated. - Only checks numeric types (int, double, etc.)
[ "Check", "the", "provided", "value", "against", "any", "range", "constraints", "specified", "in", "the", "Argument", "annotation", "for", "the", "corresponding", "field", ".", "Throw", "an", "exception", "if", "limits", "are", "violated", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L638-L667
8,778
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.setArgumentValue
private void setArgumentValue(final Object value) { try { getUnderlyingField().set(getContainingObject(), value); } catch (final IllegalAccessException e) { throw new CommandLineException.ShouldNeverReachHereException( String.format( ...
java
private void setArgumentValue(final Object value) { try { getUnderlyingField().set(getContainingObject(), value); } catch (final IllegalAccessException e) { throw new CommandLineException.ShouldNeverReachHereException( String.format( ...
[ "private", "void", "setArgumentValue", "(", "final", "Object", "value", ")", "{", "try", "{", "getUnderlyingField", "(", ")", ".", "set", "(", "getContainingObject", "(", ")", ",", "value", ")", ";", "}", "catch", "(", "final", "IllegalAccessException", "e",...
Set the underlying field to the new value.
[ "Set", "the", "underlying", "field", "to", "the", "new", "value", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L670-L682
8,779
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java
NamedArgumentDefinition.isValueOutOfRange
private boolean isValueOutOfRange(final Double value) { return value == null || getMinValue() != Double.NEGATIVE_INFINITY && value < getMinValue() || getMaxValue() != Double.POSITIVE_INFINITY && value > getMaxValue(); }
java
private boolean isValueOutOfRange(final Double value) { return value == null || getMinValue() != Double.NEGATIVE_INFINITY && value < getMinValue() || getMaxValue() != Double.POSITIVE_INFINITY && value > getMaxValue(); }
[ "private", "boolean", "isValueOutOfRange", "(", "final", "Double", "value", ")", "{", "return", "value", "==", "null", "||", "getMinValue", "(", ")", "!=", "Double", ".", "NEGATIVE_INFINITY", "&&", "value", "<", "getMinValue", "(", ")", "||", "getMaxValue", ...
null values are always out of range
[ "null", "values", "are", "always", "out", "of", "range" ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/NamedArgumentDefinition.java#L685-L688
8,780
ReactiveX/RxJavaJoins
src/main/java/rx/joins/Pattern4.java
Pattern4.and
public <T5> Pattern5<T1, T2, T3, T4, T5> and(Observable<T5> other) { if (other == null) { throw new NullPointerException(); } return new Pattern5<T1, T2, T3, T4, T5>(o1, o2, o3, o4, other); }
java
public <T5> Pattern5<T1, T2, T3, T4, T5> and(Observable<T5> other) { if (other == null) { throw new NullPointerException(); } return new Pattern5<T1, T2, T3, T4, T5>(o1, o2, o3, o4, other); }
[ "public", "<", "T5", ">", "Pattern5", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ">", "and", "(", "Observable", "<", "T5", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "throw", "new", "NullPointerException", "("...
Creates a pattern that matches when all four observable sequences have an available element. @param other Observable sequence to match with the three previous sequences. @return Pattern object that matches when all observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "all", "four", "observable", "sequences", "have", "an", "available", "element", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/Pattern4.java#L65-L70
8,781
michaelquigley/zabbixj
zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java
MetricsContainer.listProviders
public String[] listProviders() { String[] providers = new String[container.size()]; int i = 0; Iterator<String> ki = container.keySet().iterator(); while(ki.hasNext()) { providers[i++] = (String) ki.next(); } return providers; }
java
public String[] listProviders() { String[] providers = new String[container.size()]; int i = 0; Iterator<String> ki = container.keySet().iterator(); while(ki.hasNext()) { providers[i++] = (String) ki.next(); } return providers; }
[ "public", "String", "[", "]", "listProviders", "(", ")", "{", "String", "[", "]", "providers", "=", "new", "String", "[", "container", ".", "size", "(", ")", "]", ";", "int", "i", "=", "0", ";", "Iterator", "<", "String", ">", "ki", "=", "container...
List the MetricsProvider keys in this MetricsContainer. @return a String[] containing the MetricsProvider keys.
[ "List", "the", "MetricsProvider", "keys", "in", "this", "MetricsContainer", "." ]
15cfe46e45750b3857bec7eecc75ff5e5a3d774d
https://github.com/michaelquigley/zabbixj/blob/15cfe46e45750b3857bec7eecc75ff5e5a3d774d/zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java#L35-L45
8,782
michaelquigley/zabbixj
zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java
MetricsContainer.addProvider
public void addProvider(String name, MetricsProvider provider) { if(log.isInfoEnabled()) { log.info("Adding Provider: " + provider.getClass().getName() + "=" + name); } container.put(name, provider); }
java
public void addProvider(String name, MetricsProvider provider) { if(log.isInfoEnabled()) { log.info("Adding Provider: " + provider.getClass().getName() + "=" + name); } container.put(name, provider); }
[ "public", "void", "addProvider", "(", "String", "name", ",", "MetricsProvider", "provider", ")", "{", "if", "(", "log", ".", "isInfoEnabled", "(", ")", ")", "{", "log", ".", "info", "(", "\"Adding Provider: \"", "+", "provider", ".", "getClass", "(", ")", ...
Add a MetricsProvider to this container. @param name the name of the MetricsProvider. @param provider the MetricsProvider instance.
[ "Add", "a", "MetricsProvider", "to", "this", "container", "." ]
15cfe46e45750b3857bec7eecc75ff5e5a3d774d
https://github.com/michaelquigley/zabbixj/blob/15cfe46e45750b3857bec7eecc75ff5e5a3d774d/zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java#L52-L58
8,783
michaelquigley/zabbixj
zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java
MetricsContainer.getProvider
public MetricsProvider getProvider(String name) throws MetricsException { if(container.containsKey(name)) { return (MetricsProvider) container.get(name); } else { throw new MetricsException("No MetricsProvider with name: " + name); } }
java
public MetricsProvider getProvider(String name) throws MetricsException { if(container.containsKey(name)) { return (MetricsProvider) container.get(name); } else { throw new MetricsException("No MetricsProvider with name: " + name); } }
[ "public", "MetricsProvider", "getProvider", "(", "String", "name", ")", "throws", "MetricsException", "{", "if", "(", "container", ".", "containsKey", "(", "name", ")", ")", "{", "return", "(", "MetricsProvider", ")", "container", ".", "get", "(", "name", ")...
Retrieve a MetricsProvider. @param name the name of the MetricsProvider to retrieve. @return the named MetricsProvider instance. @throws MetricsException when the named MetricsProvider does not exist.
[ "Retrieve", "a", "MetricsProvider", "." ]
15cfe46e45750b3857bec7eecc75ff5e5a3d774d
https://github.com/michaelquigley/zabbixj/blob/15cfe46e45750b3857bec7eecc75ff5e5a3d774d/zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java#L76-L82
8,784
michaelquigley/zabbixj
zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java
MetricsContainer.getMetric
public Object getMetric(String key) throws MetricsException { MetricsKey mk = new MetricsKey(key); MetricsProvider provider = getProvider(mk.getProvider()); return provider.getValue(mk); }
java
public Object getMetric(String key) throws MetricsException { MetricsKey mk = new MetricsKey(key); MetricsProvider provider = getProvider(mk.getProvider()); return provider.getValue(mk); }
[ "public", "Object", "getMetric", "(", "String", "key", ")", "throws", "MetricsException", "{", "MetricsKey", "mk", "=", "new", "MetricsKey", "(", "key", ")", ";", "MetricsProvider", "provider", "=", "getProvider", "(", "mk", ".", "getProvider", "(", ")", ")"...
Retrieve a value from this MetricsContainer. @param key the fully-qualified key naming the metric. @return the requested value. @throws MetricsException when the fully-qualified key does not exist.
[ "Retrieve", "a", "value", "from", "this", "MetricsContainer", "." ]
15cfe46e45750b3857bec7eecc75ff5e5a3d774d
https://github.com/michaelquigley/zabbixj/blob/15cfe46e45750b3857bec7eecc75ff5e5a3d774d/zabbixj-core/src/main/java/com/quigley/zabbixj/metrics/MetricsContainer.java#L90-L94
8,785
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/ArgumentDefinition.java
ArgumentDefinition.intializeCollection
protected void intializeCollection(final String annotationType) { final Field field = getUnderlyingField(); final Object callerArguments = containingObject; try { if (field.get(containingObject) == null) { field.set(callerArguments, field.getType().newInstance()); ...
java
protected void intializeCollection(final String annotationType) { final Field field = getUnderlyingField(); final Object callerArguments = containingObject; try { if (field.get(containingObject) == null) { field.set(callerArguments, field.getType().newInstance()); ...
[ "protected", "void", "intializeCollection", "(", "final", "String", "annotationType", ")", "{", "final", "Field", "field", "=", "getUnderlyingField", "(", ")", ";", "final", "Object", "callerArguments", "=", "containingObject", ";", "try", "{", "if", "(", "field...
Initialize a collection value for this field. If the collection can't be instantiated directly because its the underlying type is not a concrete type, an attempt assign an ArrayList will be made. @param annotationType the type of annotation used for ths argument, for error reporting purposes
[ "Initialize", "a", "collection", "value", "for", "this", "field", ".", "If", "the", "collection", "can", "t", "be", "instantiated", "directly", "because", "its", "the", "underlying", "type", "is", "not", "a", "concrete", "type", "an", "attempt", "assign", "a...
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/ArgumentDefinition.java#L174-L198
8,786
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/ArgumentDefinition.java
ArgumentDefinition.getOptionsAsDisplayString
@SuppressWarnings({"unchecked","rawtypes"}) protected String getOptionsAsDisplayString() { final Class<?> clazz = getUnderlyingFieldClass(); if (clazz == Boolean.class) { return String.format("%s%s, %s%s", OPTION_DOC_PREFIX, Boolean.TRUE, Boolean.FALSE, OPTION_DOC_SUFFIX); } else...
java
@SuppressWarnings({"unchecked","rawtypes"}) protected String getOptionsAsDisplayString() { final Class<?> clazz = getUnderlyingFieldClass(); if (clazz == Boolean.class) { return String.format("%s%s, %s%s", OPTION_DOC_PREFIX, Boolean.TRUE, Boolean.FALSE, OPTION_DOC_SUFFIX); } else...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "protected", "String", "getOptionsAsDisplayString", "(", ")", "{", "final", "Class", "<", "?", ">", "clazz", "=", "getUnderlyingFieldClass", "(", ")", ";", "if", "(", "clazz", ...
Returns the list of possible options values for this argument. <p> Currently this only make sense with {@link Boolean} and {@link Enum}. Any other class will result in an empty string. </p> @return String representing the list of possible option values, never {@code null}.
[ "Returns", "the", "list", "of", "possible", "options", "values", "for", "this", "argument", "." ]
7e56d725766b0da3baff23e79a31c3d01c3589c2
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/ArgumentDefinition.java#L271-L282
8,787
ReactiveX/RxJavaJoins
src/main/java/rx/joins/Pattern8.java
Pattern8.and
public <T9> Pattern9<T1, T2, T3, T4, T5, T6, T7, T8, T9> and(Observable<T9> other) { if (other == null) { throw new NullPointerException(); } return new Pattern9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(o1, o2, o3, o4, o5, o6, o7, o8, other); }
java
public <T9> Pattern9<T1, T2, T3, T4, T5, T6, T7, T8, T9> and(Observable<T9> other) { if (other == null) { throw new NullPointerException(); } return new Pattern9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(o1, o2, o3, o4, o5, o6, o7, o8, other); }
[ "public", "<", "T9", ">", "Pattern9", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ",", "T7", ",", "T8", ",", "T9", ">", "and", "(", "Observable", "<", "T9", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")"...
Creates a pattern that matches when all eight observable sequences have an available element. @param other Observable sequence to match with the seven previous sequences. @return Pattern object that matches when all observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "all", "eight", "observable", "sequences", "have", "an", "available", "element", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/Pattern8.java#L93-L98
8,788
ReactiveX/RxJavaJoins
src/main/java/rx/joins/Pattern5.java
Pattern5.and
public <T6> Pattern6<T1, T2, T3, T4, T5, T6> and(Observable<T6> other) { if (other == null) { throw new NullPointerException(); } return new Pattern6<T1, T2, T3, T4, T5, T6>(o1, o2, o3, o4, o5, other); }
java
public <T6> Pattern6<T1, T2, T3, T4, T5, T6> and(Observable<T6> other) { if (other == null) { throw new NullPointerException(); } return new Pattern6<T1, T2, T3, T4, T5, T6>(o1, o2, o3, o4, o5, other); }
[ "public", "<", "T6", ">", "Pattern6", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "T6", ">", "and", "(", "Observable", "<", "T6", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "throw", "new", "NullPointerEx...
Creates a pattern that matches when all five observable sequences have an available element. @param other Observable sequence to match with the four previous sequences. @return Pattern object that matches when all observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "all", "five", "observable", "sequences", "have", "an", "available", "element", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/Pattern5.java#L72-L77
8,789
ReactiveX/RxJavaJoins
src/main/java/rx/joins/PatternN.java
PatternN.and
public PatternN and(Observable<? extends Object> other) { if (other == null) { throw new NullPointerException(); } return new PatternN(observables, other); }
java
public PatternN and(Observable<? extends Object> other) { if (other == null) { throw new NullPointerException(); } return new PatternN(observables, other); }
[ "public", "PatternN", "and", "(", "Observable", "<", "?", "extends", "Object", ">", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "return", "new", "PatternN", "(", "observables"...
Creates a pattern that matches when all previous observable sequences have an available element. @param other Observable sequence to match with the previous sequences. @return Pattern object that matches when all observable sequences have an available element.
[ "Creates", "a", "pattern", "that", "matches", "when", "all", "previous", "observable", "sequences", "have", "an", "available", "element", "." ]
65b5c7fa03bd375c9e1f7906d7143068fde9b714
https://github.com/ReactiveX/RxJavaJoins/blob/65b5c7fa03bd375c9e1f7906d7143068fde9b714/src/main/java/rx/joins/PatternN.java#L61-L66
8,790
Clivern/Racter
src/main/java/com/clivern/racter/senders/templates/GenericTemplate.java
GenericTemplate.setElementDefaultAction
public void setElementDefaultAction(Integer index, String type, String url, Boolean messenger_extensions, String webview_height_ratio, String fallback_url) { this.elements.get(index).put("default_action_type", type); this.elements.get(index).put("default_action_url", url); this.elements.get(...
java
public void setElementDefaultAction(Integer index, String type, String url, Boolean messenger_extensions, String webview_height_ratio, String fallback_url) { this.elements.get(index).put("default_action_type", type); this.elements.get(index).put("default_action_url", url); this.elements.get(...
[ "public", "void", "setElementDefaultAction", "(", "Integer", "index", ",", "String", "type", ",", "String", "url", ",", "Boolean", "messenger_extensions", ",", "String", "webview_height_ratio", ",", "String", "fallback_url", ")", "{", "this", ".", "elements", ".",...
Set Element Default Action @param index the element index @param type the element type @param url the element url @param messenger_extensions the messenger extensions @param webview_height_ratio the webview height ratio @param fallback_url the fallback url
[ "Set", "Element", "Default", "Action" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/templates/GenericTemplate.java#L84-L91
8,791
Clivern/Racter
src/main/java/com/clivern/racter/senders/templates/GenericTemplate.java
GenericTemplate.setElementButton
public void setElementButton(Integer index, String title, String type, String url, Boolean messenger_extensions, String webview_height_ratio, String fallback_url) { if( this.elements.get(index).containsKey("buttons") ){ HashMap<String, String> button = new HashMap<String, String>(); ...
java
public void setElementButton(Integer index, String title, String type, String url, Boolean messenger_extensions, String webview_height_ratio, String fallback_url) { if( this.elements.get(index).containsKey("buttons") ){ HashMap<String, String> button = new HashMap<String, String>(); ...
[ "public", "void", "setElementButton", "(", "Integer", "index", ",", "String", "title", ",", "String", "type", ",", "String", "url", ",", "Boolean", "messenger_extensions", ",", "String", "webview_height_ratio", ",", "String", "fallback_url", ")", "{", "if", "(",...
Set Element Button @param index the element index @param title the element title @param type the element type @param url the element url @param messenger_extensions the messenger extensions @param webview_height_ratio the webview height ratio @param fallback_url the fallback url
[ "Set", "Element", "Button" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/templates/GenericTemplate.java#L104-L130
8,792
Clivern/Racter
src/main/java/com/clivern/racter/receivers/VerifyWebhook.java
VerifyWebhook.challenge
public Boolean challenge() { if( (this.hub_mode.equals("subscribe")) && (this.hub_verify_token.equals(this.configs.get("verify_token", ""))) ){ Logger.info("Verify token validated successfully."); return true; } Logger.error("Error validating verify token."); ...
java
public Boolean challenge() { if( (this.hub_mode.equals("subscribe")) && (this.hub_verify_token.equals(this.configs.get("verify_token", ""))) ){ Logger.info("Verify token validated successfully."); return true; } Logger.error("Error validating verify token."); ...
[ "public", "Boolean", "challenge", "(", ")", "{", "if", "(", "(", "this", ".", "hub_mode", ".", "equals", "(", "\"subscribe\"", ")", ")", "&&", "(", "this", ".", "hub_verify_token", ".", "equals", "(", "this", ".", "configs", ".", "get", "(", "\"verify_...
Verify Challenge Data @return boolean whether challenge passed or not
[ "Verify", "Challenge", "Data" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/receivers/VerifyWebhook.java#L110-L119
8,793
Clivern/Racter
src/main/java/com/clivern/racter/senders/templates/MessageTemplate.java
MessageTemplate.setQuickReply
public void setQuickReply(String content_type, String title, String payload, String image_url) { HashMap<String, String> quick_reply = new HashMap<String, String>(); quick_reply.put("content_type", content_type); quick_reply.put("title", title); quick_reply.put("payload", payload); ...
java
public void setQuickReply(String content_type, String title, String payload, String image_url) { HashMap<String, String> quick_reply = new HashMap<String, String>(); quick_reply.put("content_type", content_type); quick_reply.put("title", title); quick_reply.put("payload", payload); ...
[ "public", "void", "setQuickReply", "(", "String", "content_type", ",", "String", "title", ",", "String", "payload", ",", "String", "image_url", ")", "{", "HashMap", "<", "String", ",", "String", ">", "quick_reply", "=", "new", "HashMap", "<", "String", ",", ...
Set Quick Reply @param content_type the content type @param title the title @param payload the payload flag @param image_url the image URL
[ "Set", "Quick", "Reply" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/templates/MessageTemplate.java#L117-L125
8,794
Clivern/Racter
src/main/java/com/clivern/racter/utils/Config.java
Config.loadPropertiesFile
public Boolean loadPropertiesFile(String path) throws IOException { Properties prop = new Properties(); InputStream input = null; try { input = new FileInputStream(path); prop.load(input); for(String key : prop.stringPropertyNames()) { S...
java
public Boolean loadPropertiesFile(String path) throws IOException { Properties prop = new Properties(); InputStream input = null; try { input = new FileInputStream(path); prop.load(input); for(String key : prop.stringPropertyNames()) { S...
[ "public", "Boolean", "loadPropertiesFile", "(", "String", "path", ")", "throws", "IOException", "{", "Properties", "prop", "=", "new", "Properties", "(", ")", ";", "InputStream", "input", "=", "null", ";", "try", "{", "input", "=", "new", "FileInputStream", ...
Load Properties File @param path relative path to the config file @return Boolean whether config file loaded or not @throws IOException May throw IOException if it cannot open configs file
[ "Load", "Properties", "File" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/utils/Config.java#L47-L66
8,795
Clivern/Racter
src/main/java/com/clivern/racter/utils/Config.java
Config.storePropertiesFile
public Boolean storePropertiesFile(String path) throws IOException { Properties prop = new Properties(); OutputStream output = null; try { output = new FileOutputStream(path); for (String key : configs.keySet()){ prop.setProperty(key, configs.get(key...
java
public Boolean storePropertiesFile(String path) throws IOException { Properties prop = new Properties(); OutputStream output = null; try { output = new FileOutputStream(path); for (String key : configs.keySet()){ prop.setProperty(key, configs.get(key...
[ "public", "Boolean", "storePropertiesFile", "(", "String", "path", ")", "throws", "IOException", "{", "Properties", "prop", "=", "new", "Properties", "(", ")", ";", "OutputStream", "output", "=", "null", ";", "try", "{", "output", "=", "new", "FileOutputStream...
Store Configs in Properties File @param path relative path to the config file @return Boolean whether config file stored or not @throws IOException May throw IOException if it cannot open configs file
[ "Store", "Configs", "in", "Properties", "File" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/utils/Config.java#L75-L92
8,796
Clivern/Racter
src/main/java/com/clivern/racter/senders/BaseSender.java
BaseSender.send
public Boolean send(MessageTemplate template) throws UnirestException { String url = this.remote_url + this.configs.get("page_access_token", ""); String body = template.build(); Logger.info("curl -X POST -H \"Content-Type: application/json\" -d '" + body + "' \"" + url + "\""); HttpR...
java
public Boolean send(MessageTemplate template) throws UnirestException { String url = this.remote_url + this.configs.get("page_access_token", ""); String body = template.build(); Logger.info("curl -X POST -H \"Content-Type: application/json\" -d '" + body + "' \"" + url + "\""); HttpR...
[ "public", "Boolean", "send", "(", "MessageTemplate", "template", ")", "throws", "UnirestException", "{", "String", "url", "=", "this", ".", "remote_url", "+", "this", ".", "configs", ".", "get", "(", "\"page_access_token\"", ",", "\"\"", ")", ";", "String", ...
Send Default Message @param template an instance of message template @return Boolean whether the message sent or not @throws UnirestException Throws exception in case it fails to perform the request
[ "Send", "Default", "Message" ]
bbde02f0c2a8a80653ad6b1607376d8408acd71c
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/BaseSender.java#L114-L122
8,797
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/LockingFollowingJournalReader.java
LockingFollowingJournalReader.openNextFile
@Override protected synchronized JournalInputFile openNextFile() throws JournalException { while (open) { boolean locked = processLockingMechanism(); if (pauseBeforePolling) { try { wait(pollingIntervalMillis); } catch ...
java
@Override protected synchronized JournalInputFile openNextFile() throws JournalException { while (open) { boolean locked = processLockingMechanism(); if (pauseBeforePolling) { try { wait(pollingIntervalMillis); } catch ...
[ "@", "Override", "protected", "synchronized", "JournalInputFile", "openNextFile", "(", ")", "throws", "JournalException", "{", "while", "(", "open", ")", "{", "boolean", "locked", "=", "processLockingMechanism", "(", ")", ";", "if", "(", "pauseBeforePolling", ")",...
Process the locking mechanism. If we are not locked, we should look for another journal file to process. Ask for a new file, using the superclass method, but if none is found, wait for a while and repeat. This will continue until we get a server shutdown signal.
[ "Process", "the", "locking", "mechanism", ".", "If", "we", "are", "not", "locked", "we", "should", "look", "for", "another", "journal", "file", "to", "process", ".", "Ask", "for", "a", "new", "file", "using", "the", "superclass", "method", "but", "if", "...
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/LockingFollowingJournalReader.java#L92-L120
8,798
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/LockingFollowingJournalReader.java
LockingFollowingJournalReader.processLockingMechanism
private boolean processLockingMechanism() throws JournalException { boolean locked; if (lockRequestedFile.exists()) { try { if (!lockAcceptedFile.exists()) { lockAcceptedFile.createNewFile(); } } catch (IOException e) { ...
java
private boolean processLockingMechanism() throws JournalException { boolean locked; if (lockRequestedFile.exists()) { try { if (!lockAcceptedFile.exists()) { lockAcceptedFile.createNewFile(); } } catch (IOException e) { ...
[ "private", "boolean", "processLockingMechanism", "(", ")", "throws", "JournalException", "{", "boolean", "locked", ";", "if", "(", "lockRequestedFile", ".", "exists", "(", ")", ")", "{", "try", "{", "if", "(", "!", "lockAcceptedFile", ".", "exists", "(", ")"...
If we see a lock request, issue an acceptance. If we do not, withdraw the acceptance. @return true if locked, false if not locked. @throws JournalException if we fail to create the 'lock accepted' file.
[ "If", "we", "see", "a", "lock", "request", "issue", "an", "acceptance", ".", "If", "we", "do", "not", "withdraw", "the", "acceptance", "." ]
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/readerwriter/multifile/LockingFollowingJournalReader.java#L139-L169
8,799
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/lowlevel/akubra/HashPathIdMapper.java
HashPathIdMapper.getPath
private void getPath(String uri, StringBuilder builder) { if (pattern.length() == 0) { return; } String hash = getHash(uri); int hashPos = 0; for (int i = 0; i < pattern.length(); i++) { char c = pattern.charAt(i); if (c == '#') { ...
java
private void getPath(String uri, StringBuilder builder) { if (pattern.length() == 0) { return; } String hash = getHash(uri); int hashPos = 0; for (int i = 0; i < pattern.length(); i++) { char c = pattern.charAt(i); if (c == '#') { ...
[ "private", "void", "getPath", "(", "String", "uri", ",", "StringBuilder", "builder", ")", "{", "if", "(", "pattern", ".", "length", "(", ")", "==", "0", ")", "{", "return", ";", "}", "String", "hash", "=", "getHash", "(", "uri", ")", ";", "int", "h...
gets the path based on the hash of the uri, or "" if the pattern is empty
[ "gets", "the", "path", "based", "on", "the", "hash", "of", "the", "uri", "or", "if", "the", "pattern", "is", "empty" ]
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/lowlevel/akubra/HashPathIdMapper.java#L130-L145