repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.notBlank
public static <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { """ <p>Validate that the specified argument character sequence is neither {@code null}, a length of zero (no characters), empty nor whitespace; otherwise throwing an exception with the specified mess...
java
public static <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { if (chars == null) { throw new NullPointerException(StringUtils.simpleFormat(message, values)); } if (StringUtils.isBlank(chars)) { throw new IllegalArgumentEx...
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "notBlank", "(", "final", "T", "chars", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "chars", "==", "null", ")", "{", "throw", "new",...
<p>Validate that the specified argument character sequence is neither {@code null}, a length of zero (no characters), empty nor whitespace; otherwise throwing an exception with the specified message. <pre>Validate.notBlank(myString, "The string must not be blank");</pre> @param <T> the character sequence type @param ...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "character", "sequence", "is", "neither", "{", "@code", "null", "}", "a", "length", "of", "zero", "(", "no", "characters", ")", "empty", "nor", "whitespace", ";", "otherwise", "throwing", "an", ...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L451-L459
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.evaluateRegression
public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data) { """ Evaluate the network (regression performance) in a distributed manner on the provided data @param data Data to evaluate @return {@link RegressionEvaluation} instance with regression performance """ return ...
java
public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data) { return evaluateRegression(data, DEFAULT_EVAL_SCORE_BATCH_SIZE); }
[ "public", "<", "T", "extends", "RegressionEvaluation", ">", "T", "evaluateRegression", "(", "JavaRDD", "<", "DataSet", ">", "data", ")", "{", "return", "evaluateRegression", "(", "data", ",", "DEFAULT_EVAL_SCORE_BATCH_SIZE", ")", ";", "}" ]
Evaluate the network (regression performance) in a distributed manner on the provided data @param data Data to evaluate @return {@link RegressionEvaluation} instance with regression performance
[ "Evaluate", "the", "network", "(", "regression", "performance", ")", "in", "a", "distributed", "manner", "on", "the", "provided", "data" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L628-L630
sailthru/sailthru-java-client
src/main/com/sailthru/client/SailthruClient.java
SailthruClient.getInstance
public static synchronized SailthruClient getInstance(String apiKey, String apiSecret) { """ Synchronized singleton instance method using default URL string @param apiKey Sailthru API key string @param apiSecret Sailthru API secret string @return singleton instance of SailthruClient @deprecated """ ...
java
public static synchronized SailthruClient getInstance(String apiKey, String apiSecret) { if (_instance == null) { _instance = new SailthruClient(apiKey, apiSecret, DEFAULT_API_URL); } return _instance; }
[ "public", "static", "synchronized", "SailthruClient", "getInstance", "(", "String", "apiKey", ",", "String", "apiSecret", ")", "{", "if", "(", "_instance", "==", "null", ")", "{", "_instance", "=", "new", "SailthruClient", "(", "apiKey", ",", "apiSecret", ",",...
Synchronized singleton instance method using default URL string @param apiKey Sailthru API key string @param apiSecret Sailthru API secret string @return singleton instance of SailthruClient @deprecated
[ "Synchronized", "singleton", "instance", "method", "using", "default", "URL", "string" ]
train
https://github.com/sailthru/sailthru-java-client/blob/62b491f6a39b41b836bfc021779200d29b6d2069/src/main/com/sailthru/client/SailthruClient.java#L56-L61
zk1931/jzab
src/main/java/com/github/zk1931/jzab/FileUtils.java
FileUtils.writeLongToFile
public static void writeLongToFile(long value, File file) throws IOException { """ Atomically writes a long integer to a file. This method writes a long integer to a file by first writing the long integer to a temporary file and then atomically moving it to the destination, overwriting the destination file if...
java
public static void writeLongToFile(long value, File file) throws IOException { // Create a temp file in the same directory as the file parameter. File temp = File.createTempFile(file.getName(), null, file.getAbsoluteFile().getParentFile()); try (FileOutputStream fos = new...
[ "public", "static", "void", "writeLongToFile", "(", "long", "value", ",", "File", "file", ")", "throws", "IOException", "{", "// Create a temp file in the same directory as the file parameter.", "File", "temp", "=", "File", ".", "createTempFile", "(", "file", ".", "ge...
Atomically writes a long integer to a file. This method writes a long integer to a file by first writing the long integer to a temporary file and then atomically moving it to the destination, overwriting the destination file if it already exists. @param value a long integer value to write. @param file file to write t...
[ "Atomically", "writes", "a", "long", "integer", "to", "a", "file", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/FileUtils.java#L60-L73
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java
CommonOps_ZDRM.add
public static void add(ZMatrixD1 a , ZMatrixD1 b , ZMatrixD1 c ) { """ <p>Performs the following operation:<br> <br> c = a + b <br> c<sub>ij</sub> = a<sub>ij</sub> + b<sub>ij</sub> <br> </p> <p> Matrix C can be the same instance as Matrix A and/or B. </p> @param a A Matrix. Not modified. @param b A Ma...
java
public static void add(ZMatrixD1 a , ZMatrixD1 b , ZMatrixD1 c ) { if( a.numCols != b.numCols || a.numRows != b.numRows || a.numCols != c.numCols || a.numRows != c.numRows ) { throw new IllegalArgumentException("The matrices are not all the same dimension."); } f...
[ "public", "static", "void", "add", "(", "ZMatrixD1", "a", ",", "ZMatrixD1", "b", ",", "ZMatrixD1", "c", ")", "{", "if", "(", "a", ".", "numCols", "!=", "b", ".", "numCols", "||", "a", ".", "numRows", "!=", "b", ".", "numRows", "||", "a", ".", "nu...
<p>Performs the following operation:<br> <br> c = a + b <br> c<sub>ij</sub> = a<sub>ij</sub> + b<sub>ij</sub> <br> </p> <p> Matrix C can be the same instance as Matrix A and/or B. </p> @param a A Matrix. Not modified. @param b A Matrix. Not modified. @param c A Matrix where the results are stored. Modified.
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "a", "+", "b", "<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "a<sub", ">", "ij<", "/", "sub", ">", "+", "b<sub", ">", "ij<", "/", "sub", "...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L285-L297
cybazeitalia/emaze-dysfunctional
src/main/java/net/emaze/dysfunctional/Filtering.java
Filtering.takeLast
public static <E> Iterator<E> takeLast(int howMany, Iterable<E> from) { """ Creates an iterator yielding last n elements from the source iterable. Consuming the resulting iterator yields an IllegalArgumentException if not enough elements can be fetched. E.g: <code>takeLast(2, [1, 2, 3]) -> [2, 3]</code> @par...
java
public static <E> Iterator<E> takeLast(int howMany, Iterable<E> from) { dbc.precondition(from != null, "cannot call last with a null iterable"); return takeLast(howMany, from.iterator()); }
[ "public", "static", "<", "E", ">", "Iterator", "<", "E", ">", "takeLast", "(", "int", "howMany", ",", "Iterable", "<", "E", ">", "from", ")", "{", "dbc", ".", "precondition", "(", "from", "!=", "null", ",", "\"cannot call last with a null iterable\"", ")",...
Creates an iterator yielding last n elements from the source iterable. Consuming the resulting iterator yields an IllegalArgumentException if not enough elements can be fetched. E.g: <code>takeLast(2, [1, 2, 3]) -> [2, 3]</code> @param <E> the iterable element type @param howMany number of elements to be yielded @para...
[ "Creates", "an", "iterator", "yielding", "last", "n", "elements", "from", "the", "source", "iterable", ".", "Consuming", "the", "resulting", "iterator", "yields", "an", "IllegalArgumentException", "if", "not", "enough", "elements", "can", "be", "fetched", ".", "...
train
https://github.com/cybazeitalia/emaze-dysfunctional/blob/98115a436e35335c5e8831f9fdc12f6d93d524be/src/main/java/net/emaze/dysfunctional/Filtering.java#L82-L85
DiUS/pact-jvm
pact-jvm-consumer-junit/src/main/java/au/com/dius/pact/consumer/BaseProviderRule.java
BaseProviderRule.getPacts
protected Map<String, RequestResponsePact> getPacts(String fragment) { """ scan all methods for @Pact annotation and execute them, if not already initialized @param fragment """ if (pacts == null) { pacts = new HashMap<>(); for (Method m: target.getClass().getMethods()) { ...
java
protected Map<String, RequestResponsePact> getPacts(String fragment) { if (pacts == null) { pacts = new HashMap<>(); for (Method m: target.getClass().getMethods()) { if (JUnitTestSupport.conformsToSignature(m) && methodMatchesFragment(m, fragment)) { Pact pactAnno...
[ "protected", "Map", "<", "String", ",", "RequestResponsePact", ">", "getPacts", "(", "String", "fragment", ")", "{", "if", "(", "pacts", "==", "null", ")", "{", "pacts", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "Method", "m", ":", "tar...
scan all methods for @Pact annotation and execute them, if not already initialized @param fragment
[ "scan", "all", "methods", "for" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer-junit/src/main/java/au/com/dius/pact/consumer/BaseProviderRule.java#L177-L198
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
public Section addSection(Component component, String title, File... files) throws IOException { """ Adds a section relating to a {@link Component} from one or more files. @param component the {@link Component} the documentation content relates to @param title the section title @param files ...
java
public Section addSection(Component component, String title, File... files) throws IOException { return add(component, title, files); }
[ "public", "Section", "addSection", "(", "Component", "component", ",", "String", "title", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "add", "(", "component", ",", "title", ",", "files", ")", ";", "}" ]
Adds a section relating to a {@link Component} from one or more files. @param component the {@link Component} the documentation content relates to @param title the section title @param files one or more File objects that point to the documentation content @return a documentation {@...
[ "Adds", "a", "section", "relating", "to", "a", "{", "@link", "Component", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L126-L128
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java
PatternsImpl.updatePatternAsync
public Observable<PatternRuleInfo> updatePatternAsync(UUID appId, String versionId, UUID patternId, PatternRuleUpdateObject pattern) { """ Updates a pattern. @param appId The application ID. @param versionId The version ID. @param patternId The pattern ID. @param pattern An object representing a pattern. @t...
java
public Observable<PatternRuleInfo> updatePatternAsync(UUID appId, String versionId, UUID patternId, PatternRuleUpdateObject pattern) { return updatePatternWithServiceResponseAsync(appId, versionId, patternId, pattern).map(new Func1<ServiceResponse<PatternRuleInfo>, PatternRuleInfo>() { @Override ...
[ "public", "Observable", "<", "PatternRuleInfo", ">", "updatePatternAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "patternId", ",", "PatternRuleUpdateObject", "pattern", ")", "{", "return", "updatePatternWithServiceResponseAsync", "(", "appId", ...
Updates a pattern. @param appId The application ID. @param versionId The version ID. @param patternId The pattern ID. @param pattern An object representing a pattern. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PatternRuleInfo object
[ "Updates", "a", "pattern", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java#L690-L697
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/Stage.java
Stage.withVariables
public Stage withVariables(java.util.Map<String, String> variables) { """ <p> A map that defines the stage variables for a <a>Stage</a> resource. Variable names can have alphanumeric and underscore characters, and the values must match <code>[A-Za-z0-9-._~:/?#&amp;=,]+</code>. </p> @param variables A map th...
java
public Stage withVariables(java.util.Map<String, String> variables) { setVariables(variables); return this; }
[ "public", "Stage", "withVariables", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "variables", ")", "{", "setVariables", "(", "variables", ")", ";", "return", "this", ";", "}" ]
<p> A map that defines the stage variables for a <a>Stage</a> resource. Variable names can have alphanumeric and underscore characters, and the values must match <code>[A-Za-z0-9-._~:/?#&amp;=,]+</code>. </p> @param variables A map that defines the stage variables for a <a>Stage</a> resource. Variable names can have a...
[ "<p", ">", "A", "map", "that", "defines", "the", "stage", "variables", "for", "a", "<a", ">", "Stage<", "/", "a", ">", "resource", ".", "Variable", "names", "can", "have", "alphanumeric", "and", "underscore", "characters", "and", "the", "values", "must", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/Stage.java#L585-L588
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java
ProcessApplicationContext.withProcessApplicationContext
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationInterface processApplication) throws Exception { """ <p>Takes a callable and executes all engine API invocations within that callable in the context of the given process application <p>Equivalent to <pre> try { Process...
java
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationInterface processApplication) throws Exception { try { setCurrentProcessApplication(processApplication); return callable.call(); } finally { clear(); } }
[ "public", "static", "<", "T", ">", "T", "withProcessApplicationContext", "(", "Callable", "<", "T", ">", "callable", ",", "ProcessApplicationInterface", "processApplication", ")", "throws", "Exception", "{", "try", "{", "setCurrentProcessApplication", "(", "processApp...
<p>Takes a callable and executes all engine API invocations within that callable in the context of the given process application <p>Equivalent to <pre> try { ProcessApplicationContext.setCurrentProcessApplication("someProcessApplication"); callable.call(); } finally { ProcessApplicationContext.clear(); } </pre> @para...
[ "<p", ">", "Takes", "a", "callable", "and", "executes", "all", "engine", "API", "invocations", "within", "that", "callable", "in", "the", "context", "of", "the", "given", "process", "application" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java#L174-L182
osglworks/java-tool
src/main/java/org/osgl/Lang.java
F4.orElse
public F4<P1, P2, P3, P4, R> orElse( final Func4<? super P1, ? super P2, ? super P3, ? super P4, ? extends R> fallback ) { """ Returns a composed function that when applied, try to apply this function first, in case a {@link NotAppliedException} is captured apply to the fallback function s...
java
public F4<P1, P2, P3, P4, R> orElse( final Func4<? super P1, ? super P2, ? super P3, ? super P4, ? extends R> fallback ) { final F4<P1, P2, P3, P4, R> me = this; return new F4<P1, P2, P3, P4, R>() { @Override public R apply(P1 p1, P2 p2, P3...
[ "public", "F4", "<", "P1", ",", "P2", ",", "P3", ",", "P4", ",", "R", ">", "orElse", "(", "final", "Func4", "<", "?", "super", "P1", ",", "?", "super", "P2", ",", "?", "super", "P3", ",", "?", "super", "P4", ",", "?", "extends", "R", ">", "...
Returns a composed function that when applied, try to apply this function first, in case a {@link NotAppliedException} is captured apply to the fallback function specified. This method helps to implement partial function @param fallback the function to applied if this function doesn't apply to the parameter(s) @return...
[ "Returns", "a", "composed", "function", "that", "when", "applied", "try", "to", "apply", "this", "function", "first", "in", "case", "a", "{", "@link", "NotAppliedException", "}", "is", "captured", "apply", "to", "the", "fallback", "function", "specified", ".",...
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L1603-L1617
voldemort/voldemort
src/java/voldemort/server/protocol/admin/FetchStreamRequestHandler.java
FetchStreamRequestHandler.sendMessage
protected void sendMessage(DataOutputStream outputStream, Message message) throws IOException { """ Helper method to send message on outputStream and account for network time stats. @param outputStream @param message @throws IOException """ long startNs = System.nanoTime(); ProtoUtils.wri...
java
protected void sendMessage(DataOutputStream outputStream, Message message) throws IOException { long startNs = System.nanoTime(); ProtoUtils.writeMessage(outputStream, message); if(streamStats != null) { streamStats.reportNetworkTime(operation, ...
[ "protected", "void", "sendMessage", "(", "DataOutputStream", "outputStream", ",", "Message", "message", ")", "throws", "IOException", "{", "long", "startNs", "=", "System", ".", "nanoTime", "(", ")", ";", "ProtoUtils", ".", "writeMessage", "(", "outputStream", "...
Helper method to send message on outputStream and account for network time stats. @param outputStream @param message @throws IOException
[ "Helper", "method", "to", "send", "message", "on", "outputStream", "and", "account", "for", "network", "time", "stats", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/server/protocol/admin/FetchStreamRequestHandler.java#L206-L213
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java
IndexAVL.findFirstRow
@Override public RowIterator findFirstRow(Session session, PersistentStore store, Object[] rowdata, int match) { """ Return the first node equal to the indexdata object. The rowdata has the same column mapping as this index. @param session session object @param store st...
java
@Override public RowIterator findFirstRow(Session session, PersistentStore store, Object[] rowdata, int match) { NodeAVL node = findNode(session, store, rowdata, defaultColMap, match); return getIterator(session, store, node); }
[ "@", "Override", "public", "RowIterator", "findFirstRow", "(", "Session", "session", ",", "PersistentStore", "store", ",", "Object", "[", "]", "rowdata", ",", "int", "match", ")", "{", "NodeAVL", "node", "=", "findNode", "(", "session", ",", "store", ",", ...
Return the first node equal to the indexdata object. The rowdata has the same column mapping as this index. @param session session object @param store store object @param rowdata array containing index column data @param match count of columns to match @return iterator
[ "Return", "the", "first", "node", "equal", "to", "the", "indexdata", "object", ".", "The", "rowdata", "has", "the", "same", "column", "mapping", "as", "this", "index", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/index/IndexAVL.java#L808-L815
BioPAX/Paxtools
sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java
SBGNLayoutManager.createVNodes
private void createVNodes(VCompound parent,List<Glyph> glyphs) { """ Recursively creates VNodes from Glyphs of Sbgn. @param parent Parent of the glyphs that are passed as second arguement. @param glyphs Glyphs that are child of parent which is passed as first arguement. """ for(Glyph glyph: glyphs ...
java
private void createVNodes(VCompound parent,List<Glyph> glyphs) { for(Glyph glyph: glyphs ) { if (!glyphClazzOneOf(glyph, GlyphClazz.UNIT_OF_INFORMATION, GlyphClazz.STATE_VARIABLE)) { // if(glyph.getClazz().equals(GlyphClazz.PROCESS.getClazz())) // ...
[ "private", "void", "createVNodes", "(", "VCompound", "parent", ",", "List", "<", "Glyph", ">", "glyphs", ")", "{", "for", "(", "Glyph", "glyph", ":", "glyphs", ")", "{", "if", "(", "!", "glyphClazzOneOf", "(", "glyph", ",", "GlyphClazz", ".", "UNIT_OF_IN...
Recursively creates VNodes from Glyphs of Sbgn. @param parent Parent of the glyphs that are passed as second arguement. @param glyphs Glyphs that are child of parent which is passed as first arguement.
[ "Recursively", "creates", "VNodes", "from", "Glyphs", "of", "Sbgn", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L390-L418
marklogic/marklogic-contentpump
mlcp/src/main/java/com/marklogic/contentpump/LocalJobRunner.java
LocalJobRunner.assignThreads
private int assignThreads(int splitIndex, int splitCount) { """ Assign thread count for a given split @param splitIndex split index @param splitCount @return """ if (threadsPerSplit > 0) { return threadsPerSplit; } if (splitCount == 1) { return threadCount; } ...
java
private int assignThreads(int splitIndex, int splitCount) { if (threadsPerSplit > 0) { return threadsPerSplit; } if (splitCount == 1) { return threadCount; } if (splitCount * minThreads > threadCount) { return minThreads; } if (splitIndex %...
[ "private", "int", "assignThreads", "(", "int", "splitIndex", ",", "int", "splitCount", ")", "{", "if", "(", "threadsPerSplit", ">", "0", ")", "{", "return", "threadsPerSplit", ";", "}", "if", "(", "splitCount", "==", "1", ")", "{", "return", "threadCount",...
Assign thread count for a given split @param splitIndex split index @param splitCount @return
[ "Assign", "thread", "count", "for", "a", "given", "split" ]
train
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mlcp/src/main/java/com/marklogic/contentpump/LocalJobRunner.java#L306-L321
headius/invokebinder
src/main/java/com/headius/invokebinder/SmartBinder.java
SmartBinder.invokeStatic
public SmartHandle invokeStatic(Lookup lookup, Class<?> target, String name) throws NoSuchMethodException, IllegalAccessException { """ Terminate this binder by looking up the named static method on the given target type. Perform the actual method lookup using the given Lookup object. @param lookup the Lookup...
java
public SmartHandle invokeStatic(Lookup lookup, Class<?> target, String name) throws NoSuchMethodException, IllegalAccessException { return new SmartHandle(start, binder.invokeStatic(lookup, target, name)); }
[ "public", "SmartHandle", "invokeStatic", "(", "Lookup", "lookup", ",", "Class", "<", "?", ">", "target", ",", "String", "name", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", "{", "return", "new", "SmartHandle", "(", "start", ",", "binder...
Terminate this binder by looking up the named static method on the given target type. Perform the actual method lookup using the given Lookup object. @param lookup the Lookup to use for handle lookups @param target the type on which to find the static method @param name the name of the target static method @return a...
[ "Terminate", "this", "binder", "by", "looking", "up", "the", "named", "static", "method", "on", "the", "given", "target", "type", ".", "Perform", "the", "actual", "method", "lookup", "using", "the", "given", "Lookup", "object", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/SmartBinder.java#L1018-L1020
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.getSequence
public DerValue[] getSequence(int startLen, boolean originalEncodedFormRetained) throws IOException { """ Return a sequence of encoded entities. ASN.1 sequences are ordered, and they are often used, like a "struct" in C or C++, to group data values. They may have optional or context specific value...
java
public DerValue[] getSequence(int startLen, boolean originalEncodedFormRetained) throws IOException { tag = (byte)buffer.read(); if (tag != DerValue.tag_Sequence) throw new IOException("Sequence tag error"); return readVector(startLen, originalEncodedFormRetained); }
[ "public", "DerValue", "[", "]", "getSequence", "(", "int", "startLen", ",", "boolean", "originalEncodedFormRetained", ")", "throws", "IOException", "{", "tag", "=", "(", "byte", ")", "buffer", ".", "read", "(", ")", ";", "if", "(", "tag", "!=", "DerValue",...
Return a sequence of encoded entities. ASN.1 sequences are ordered, and they are often used, like a "struct" in C or C++, to group data values. They may have optional or context specific values. @param startLen guess about how long the sequence will be (used to initialize an auto-growing data structure) @return arra...
[ "Return", "a", "sequence", "of", "encoded", "entities", ".", "ASN", ".", "1", "sequences", "are", "ordered", "and", "they", "are", "often", "used", "like", "a", "struct", "in", "C", "or", "C", "++", "to", "group", "data", "values", ".", "They", "may", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L294-L300
ops4j/org.ops4j.pax.web
pax-web-runtime/src/main/java/org/ops4j/pax/web/service/internal/HttpServiceStarted.java
HttpServiceStarted.withWhiteboardDtoService
private <T> T withWhiteboardDtoService(Function<WhiteboardDtoService, T> function) { """ WhiteboardDtoService is registered as DS component. Should be removed if this class gets full DS support @param function a function which is applied against WhiteboardDtoService @param <T> Type of the functions return value ...
java
private <T> T withWhiteboardDtoService(Function<WhiteboardDtoService, T> function) { final BundleContext bundleContext = serviceBundle.getBundleContext(); ServiceReference<WhiteboardDtoService> ref = bundleContext.getServiceReference(WhiteboardDtoService.class); if (ref != null) { WhiteboardDtoService service ...
[ "private", "<", "T", ">", "T", "withWhiteboardDtoService", "(", "Function", "<", "WhiteboardDtoService", ",", "T", ">", "function", ")", "{", "final", "BundleContext", "bundleContext", "=", "serviceBundle", ".", "getBundleContext", "(", ")", ";", "ServiceReference...
WhiteboardDtoService is registered as DS component. Should be removed if this class gets full DS support @param function a function which is applied against WhiteboardDtoService @param <T> Type of the functions return value @return value provided by given function
[ "WhiteboardDtoService", "is", "registered", "as", "DS", "component", ".", "Should", "be", "removed", "if", "this", "class", "gets", "full", "DS", "support" ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-runtime/src/main/java/org/ops4j/pax/web/service/internal/HttpServiceStarted.java#L1443-L1457
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.sshKey_keyName_GET
public OvhSshKey sshKey_keyName_GET(String keyName) throws IOException { """ Get this object properties REST: GET /me/sshKey/{keyName} @param keyName [required] Name of this public SSH key """ String qPath = "/me/sshKey/{keyName}"; StringBuilder sb = path(qPath, keyName); String resp = exec(qPath, "G...
java
public OvhSshKey sshKey_keyName_GET(String keyName) throws IOException { String qPath = "/me/sshKey/{keyName}"; StringBuilder sb = path(qPath, keyName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSshKey.class); }
[ "public", "OvhSshKey", "sshKey_keyName_GET", "(", "String", "keyName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/sshKey/{keyName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "keyName", ")", ";", "String", "resp", "=", ...
Get this object properties REST: GET /me/sshKey/{keyName} @param keyName [required] Name of this public SSH key
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1292-L1297
phax/ph-css
ph-css/src/main/java/com/helger/css/decl/CSSMediaRule.java
CSSMediaRule.addMediaQuery
@Nonnull public CSSMediaRule addMediaQuery (@Nonnegative final int nIndex, @Nonnull @Nonempty final CSSMediaQuery aMediaQuery) { """ Add a media query at the specified index. @param nIndex The index to use. Must be &ge; 0. If the index is &ge; {@link #getMediaQueryCount()} than the media query is appended l...
java
@Nonnull public CSSMediaRule addMediaQuery (@Nonnegative final int nIndex, @Nonnull @Nonempty final CSSMediaQuery aMediaQuery) { ValueEnforcer.isGE0 (nIndex, "Index"); ValueEnforcer.notNull (aMediaQuery, "MediaQuery"); if (nIndex >= getMediaQueryCount ()) m_aMediaQueries.add (aMediaQuery); el...
[ "@", "Nonnull", "public", "CSSMediaRule", "addMediaQuery", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "@", "Nonempty", "final", "CSSMediaQuery", "aMediaQuery", ")", "{", "ValueEnforcer", ".", "isGE0", "(", "nIndex", ",", "\"Index\"",...
Add a media query at the specified index. @param nIndex The index to use. Must be &ge; 0. If the index is &ge; {@link #getMediaQueryCount()} than the media query is appended like in {@link #addMediaQuery(CSSMediaQuery)}. @param aMediaQuery The media query to be added. May not be <code>null</code>. @return this for cha...
[ "Add", "a", "media", "query", "at", "the", "specified", "index", "." ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/decl/CSSMediaRule.java#L103-L114
vorburger/ch.vorburger.exec
src/main/java/ch/vorburger/exec/ManagedProcessBuilder.java
ManagedProcessBuilder.getCommandLine
CommandLine getCommandLine() { """ /* package-local... let's keep ch.vorburger.exec's API separate from Apache Commons Exec, so it COULD be replaced """ if (getWorkingDirectory() == null) { if (commonsExecCommandLine.isFile()) { File exec = new File(commonsExecCommandLine.g...
java
CommandLine getCommandLine() { if (getWorkingDirectory() == null) { if (commonsExecCommandLine.isFile()) { File exec = new File(commonsExecCommandLine.getExecutable()); File dir = exec.getParentFile(); if (dir == null) { throw new I...
[ "CommandLine", "getCommandLine", "(", ")", "{", "if", "(", "getWorkingDirectory", "(", ")", "==", "null", ")", "{", "if", "(", "commonsExecCommandLine", ".", "isFile", "(", ")", ")", "{", "File", "exec", "=", "new", "File", "(", "commonsExecCommandLine", "...
/* package-local... let's keep ch.vorburger.exec's API separate from Apache Commons Exec, so it COULD be replaced
[ "/", "*", "package", "-", "local", "...", "let", "s", "keep", "ch", ".", "vorburger", ".", "exec", "s", "API", "separate", "from", "Apache", "Commons", "Exec", "so", "it", "COULD", "be", "replaced" ]
train
https://github.com/vorburger/ch.vorburger.exec/blob/98853c55c8dfb3a6185019b8928df2a091baa471/src/main/java/ch/vorburger/exec/ManagedProcessBuilder.java#L241-L257
james-hu/jabb-core
src/main/java/net/sf/jabb/util/prop/PropertiesLoader.java
PropertiesLoader.getPropertyFromSystemOrEnv
static public String getPropertyFromSystemOrEnv(String lowerCamelCaseName, String defaultValue) { """ Try to get property value in the following order: <ol> <li>JVM system property with the same name</li> <li>JVM system property with the converted upper underscore name (e.g. converting nameOfTheProperty to NAME...
java
static public String getPropertyFromSystemOrEnv(String lowerCamelCaseName, String defaultValue){ String upperCaseName = lowerCamelCaseName; try{ upperCaseName = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_UNDERSCORE).convert(lowerCamelCaseName); }catch(Exception e){ // could there be any error duri...
[ "static", "public", "String", "getPropertyFromSystemOrEnv", "(", "String", "lowerCamelCaseName", ",", "String", "defaultValue", ")", "{", "String", "upperCaseName", "=", "lowerCamelCaseName", ";", "try", "{", "upperCaseName", "=", "CaseFormat", ".", "LOWER_CAMEL", "."...
Try to get property value in the following order: <ol> <li>JVM system property with the same name</li> <li>JVM system property with the converted upper underscore name (e.g. converting nameOfTheProperty to NAME_OF_THE_PROPERTY)</li> <li>OS environment variable with the same name</li> <li>OS environment variable with th...
[ "Try", "to", "get", "property", "value", "in", "the", "following", "order", ":", "<ol", ">", "<li", ">", "JVM", "system", "property", "with", "the", "same", "name<", "/", "li", ">", "<li", ">", "JVM", "system", "property", "with", "the", "converted", "...
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/prop/PropertiesLoader.java#L86-L113
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.deleteStorageAccount
public void deleteStorageAccount(String resourceGroupName, String accountName, String storageAccountName) { """ Updates the specified Data Lake Analytics account to remove an Azure Storage account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @par...
java
public void deleteStorageAccount(String resourceGroupName, String accountName, String storageAccountName) { deleteStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName).toBlocking().single().body(); }
[ "public", "void", "deleteStorageAccount", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "storageAccountName", ")", "{", "deleteStorageAccountWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "storageAccountName", ...
Updates the specified Data Lake Analytics account to remove an Azure Storage account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account from which to remove the Azure Storage account. @param storag...
[ "Updates", "the", "specified", "Data", "Lake", "Analytics", "account", "to", "remove", "an", "Azure", "Storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L284-L286
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.notNull
public static Validator<Object> notNull(@NonNull final Context context, @StringRes final int resourceId) { """ Creates and returns a validator, which allows to ensure, that values are not null. @param context The context, which should be used to retrieve the error me...
java
public static Validator<Object> notNull(@NonNull final Context context, @StringRes final int resourceId) { return new NotNullValidator(context, resourceId); }
[ "public", "static", "Validator", "<", "Object", ">", "notNull", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "StringRes", "final", "int", "resourceId", ")", "{", "return", "new", "NotNullValidator", "(", "context", ",", "resourceId", ")", ";...
Creates and returns a validator, which allows to ensure, that values are not null. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @param resourceId The resource ID of the string resource, which contains the error ...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "ensure", "that", "values", "are", "not", "null", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L273-L276
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.saveRewriteAliases
public void saveRewriteAliases(CmsDbContext dbc, String siteRoot, List<CmsRewriteAlias> newAliases) throws CmsException { """ Replaces the complete list of rewrite aliases for a given site root.<p> @param dbc the current database context @param siteRoot the site root for which the rewrite aliases should be...
java
public void saveRewriteAliases(CmsDbContext dbc, String siteRoot, List<CmsRewriteAlias> newAliases) throws CmsException { CmsRewriteAliasFilter filter = new CmsRewriteAliasFilter().setSiteRoot(siteRoot); getVfsDriver(dbc).deleteRewriteAliases(dbc, filter); getVfsDriver(dbc).insertRewriteAli...
[ "public", "void", "saveRewriteAliases", "(", "CmsDbContext", "dbc", ",", "String", "siteRoot", ",", "List", "<", "CmsRewriteAlias", ">", "newAliases", ")", "throws", "CmsException", "{", "CmsRewriteAliasFilter", "filter", "=", "new", "CmsRewriteAliasFilter", "(", ")...
Replaces the complete list of rewrite aliases for a given site root.<p> @param dbc the current database context @param siteRoot the site root for which the rewrite aliases should be replaced @param newAliases the new aliases for the given site root @throws CmsException if something goes wrong
[ "Replaces", "the", "complete", "list", "of", "rewrite", "aliases", "for", "a", "given", "site", "root", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L8793-L8799
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/user/TileDaoUtils.java
TileDaoUtils.getZoomLevel
public static Long getZoomLevel(double[] widths, double[] heights, List<TileMatrix> tileMatrices, double width, double height) { """ Get the zoom level for the provided width and height in the default units @param widths sorted widths @param heights sorted heights @param tileMatrices tile matrices @par...
java
public static Long getZoomLevel(double[] widths, double[] heights, List<TileMatrix> tileMatrices, double width, double height) { return getZoomLevel(widths, heights, tileMatrices, width, height, true); }
[ "public", "static", "Long", "getZoomLevel", "(", "double", "[", "]", "widths", ",", "double", "[", "]", "heights", ",", "List", "<", "TileMatrix", ">", "tileMatrices", ",", "double", "width", ",", "double", "height", ")", "{", "return", "getZoomLevel", "("...
Get the zoom level for the provided width and height in the default units @param widths sorted widths @param heights sorted heights @param tileMatrices tile matrices @param width in default units @param height in default units @return tile matrix zoom level @since 1.2.1
[ "Get", "the", "zoom", "level", "for", "the", "provided", "width", "and", "height", "in", "the", "default", "units" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/user/TileDaoUtils.java#L80-L83
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriQueryParam
public static void escapeUriQueryParam(final String text, final Writer writer, final String encoding) throws IOException { """ <p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> The followi...
java
public static void escapeUriQueryParam(final String text, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (encoding == null) { throw new Illeg...
[ "public", "static", "void", "escapeUriQueryParam", "(", "final", "String", "text", ",", "final", "Writer", "writer", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalA...
<p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> The following are the only allowed chars in an URI query parameter (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></li> <li><tt>- . _ ~</tt></li> <li>...
[ "<p", ">", "Perform", "am", "URI", "query", "parameter", "(", "name", "or", "value", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", "...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L657-L670
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/HrefOperator.java
HrefOperator.doExec
@Override protected Object doExec(Element element, Object scope, String propertyPath, Object... arguments) throws TemplateException { """ Execute HREF operator. Uses property path to extract content value, convert it to string and set <em>href</em> attribute. @param element context element, unused, @param sc...
java
@Override protected Object doExec(Element element, Object scope, String propertyPath, Object... arguments) throws TemplateException { if (!propertyPath.equals(".") && ConverterRegistry.hasType(scope.getClass())) { throw new TemplateException("Operand is property path but scope is not an object."); } Obje...
[ "@", "Override", "protected", "Object", "doExec", "(", "Element", "element", ",", "Object", "scope", ",", "String", "propertyPath", ",", "Object", "...", "arguments", ")", "throws", "TemplateException", "{", "if", "(", "!", "propertyPath", ".", "equals", "(", ...
Execute HREF operator. Uses property path to extract content value, convert it to string and set <em>href</em> attribute. @param element context element, unused, @param scope scope object, @param propertyPath property path, @param arguments optional arguments, unused. @return always returns null for void. @throws Temp...
[ "Execute", "HREF", "operator", ".", "Uses", "property", "path", "to", "extract", "content", "value", "convert", "it", "to", "string", "and", "set", "<em", ">", "href<", "/", "em", ">", "attribute", "." ]
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/HrefOperator.java#L43-L59
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/AttributeService.java
AttributeService.getAttribute
public Object getAttribute(File file, String view, String attribute) { """ Gets the value of the given attribute for the given view and file. Neither view nor attribute may have a ':' character. """ Object value = getAttributeInternal(file, view, attribute); if (value == null) { throw new Illega...
java
public Object getAttribute(File file, String view, String attribute) { Object value = getAttributeInternal(file, view, attribute); if (value == null) { throw new IllegalArgumentException("invalid attribute for view '" + view + "': " + attribute); } return value; }
[ "public", "Object", "getAttribute", "(", "File", "file", ",", "String", "view", ",", "String", "attribute", ")", "{", "Object", "value", "=", "getAttributeInternal", "(", "file", ",", "view", ",", "attribute", ")", ";", "if", "(", "value", "==", "null", ...
Gets the value of the given attribute for the given view and file. Neither view nor attribute may have a ':' character.
[ "Gets", "the", "value", "of", "the", "given", "attribute", "for", "the", "given", "view", "and", "file", ".", "Neither", "view", "nor", "attribute", "may", "have", "a", ":", "character", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/AttributeService.java#L199-L205
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/util/CompareUtil.java
CompareUtil.elementIsNotContainedInList
public static <T> boolean elementIsNotContainedInList(T element, Collection<T> values) { """ Checks if the element is not contained within the list of values. If the element, or the list are null then true is returned. @param element to check @param values to check in @param <T> the type of the element @retu...
java
public static <T> boolean elementIsNotContainedInList(T element, Collection<T> values) { if (element != null && values != null) { return !values.contains(element); } else { return false; } }
[ "public", "static", "<", "T", ">", "boolean", "elementIsNotContainedInList", "(", "T", "element", ",", "Collection", "<", "T", ">", "values", ")", "{", "if", "(", "element", "!=", "null", "&&", "values", "!=", "null", ")", "{", "return", "!", "values", ...
Checks if the element is not contained within the list of values. If the element, or the list are null then true is returned. @param element to check @param values to check in @param <T> the type of the element @return {@code true} if the element and values are not {@code null} and the values does not contain the elem...
[ "Checks", "if", "the", "element", "is", "not", "contained", "within", "the", "list", "of", "values", ".", "If", "the", "element", "or", "the", "list", "are", "null", "then", "true", "is", "returned", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/util/CompareUtil.java#L86-L93
lucee/Lucee
core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java
CFMLExpressionInterpreter.interpretPart
protected Object interpretPart(PageContext pc, ParserString cfml) throws PageException { """ /* private FunctionLibFunction getFLF(String name) { FunctionLibFunction flf=null; for (int i = 0; i < flds.length; i++) { flf = flds[i].getFunction(name); if (flf != null) break; } return flf; } """ this.cfml = cfm...
java
protected Object interpretPart(PageContext pc, ParserString cfml) throws PageException { this.cfml = cfml; init(pc); cfml.removeSpace(); return assignOp().getValue(pc); }
[ "protected", "Object", "interpretPart", "(", "PageContext", "pc", ",", "ParserString", "cfml", ")", "throws", "PageException", "{", "this", ".", "cfml", "=", "cfml", ";", "init", "(", "pc", ")", ";", "cfml", ".", "removeSpace", "(", ")", ";", "return", "...
/* private FunctionLibFunction getFLF(String name) { FunctionLibFunction flf=null; for (int i = 0; i < flds.length; i++) { flf = flds[i].getFunction(name); if (flf != null) break; } return flf; }
[ "/", "*", "private", "FunctionLibFunction", "getFLF", "(", "String", "name", ")", "{", "FunctionLibFunction", "flf", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "flds", ".", "length", ";", "i", "++", ")", "{", "flf", "=", "fl...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java#L243-L249
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.noNullElements
@GwtIncompatible("incompatible method") public static <T extends Iterable<?>> T noNullElements(final T iterable) { """ <p>Validate that the specified argument iterable is neither {@code null} nor contains any elements that are {@code null}; otherwise throwing an exception. <pre>Validate.noNullElements(myC...
java
@GwtIncompatible("incompatible method") public static <T extends Iterable<?>> T noNullElements(final T iterable) { return noNullElements(iterable, DEFAULT_NO_NULL_ELEMENTS_COLLECTION_EX_MESSAGE); }
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "<", "T", "extends", "Iterable", "<", "?", ">", ">", "T", "noNullElements", "(", "final", "T", "iterable", ")", "{", "return", "noNullElements", "(", "iterable", ",", "DEFAULT_NO_...
<p>Validate that the specified argument iterable is neither {@code null} nor contains any elements that are {@code null}; otherwise throwing an exception. <pre>Validate.noNullElements(myCollection);</pre> <p>If the iterable is {@code null}, then the message in the exception is &quot;The validated object is null&quot;...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "iterable", "is", "neither", "{", "@code", "null", "}", "nor", "contains", "any", "elements", "that", "are", "{", "@code", "null", "}", ";", "otherwise", "throwing", "an", "exception", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L608-L611
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java
SeqRes2AtomAligner.mapSeqresRecords
public void mapSeqresRecords(Chain atomRes, Chain seqRes) { """ Map the seqRes groups to the atomRes chain. Updates the atomRes chain object with the mapped data The seqRes chain should not be needed after this and atomRes should be further used. @param atomRes the chain containing ATOM groups (in atomGroups ...
java
public void mapSeqresRecords(Chain atomRes, Chain seqRes) { List<Group> seqResGroups = seqRes.getAtomGroups(); List<Group> atmResGroups = atomRes.getAtomGroups(); logger.debug("Comparing ATOM {} ({} groups) to SEQRES {} ({} groups) ", atomRes.getId(), atmResGroups.size(), seqRes.getId(), seqResGroups.size(...
[ "public", "void", "mapSeqresRecords", "(", "Chain", "atomRes", ",", "Chain", "seqRes", ")", "{", "List", "<", "Group", ">", "seqResGroups", "=", "seqRes", ".", "getAtomGroups", "(", ")", ";", "List", "<", "Group", ">", "atmResGroups", "=", "atomRes", ".", ...
Map the seqRes groups to the atomRes chain. Updates the atomRes chain object with the mapped data The seqRes chain should not be needed after this and atomRes should be further used. @param atomRes the chain containing ATOM groups (in atomGroups slot). This chain is modified to contain in its seqresGroups slot the map...
[ "Map", "the", "seqRes", "groups", "to", "the", "atomRes", "chain", ".", "Updates", "the", "atomRes", "chain", "object", "with", "the", "mapped", "data", "The", "seqRes", "chain", "should", "not", "be", "needed", "after", "this", "and", "atomRes", "should", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java#L162-L214
jdereg/java-util
src/main/java/com/cedarsoftware/util/UrlUtilities.java
UrlUtilities.getContentFromUrl
public static byte[] getContentFromUrl(URL url, Map inCookies, Map outCookies, boolean allowAllCerts) { """ Get content from the passed in URL. This code will open a connection to the passed in server, fetch the requested content, and return it as a byte[]. @param url URL to hit @param inCookies Map of sess...
java
public static byte[] getContentFromUrl(URL url, Map inCookies, Map outCookies, boolean allowAllCerts) { URLConnection c = null; try { c = getConnection(url, inCookies, true, false, false, allowAllCerts); ByteArrayOutputStream out = new ByteArrayOutputStream(16384); ...
[ "public", "static", "byte", "[", "]", "getContentFromUrl", "(", "URL", "url", ",", "Map", "inCookies", ",", "Map", "outCookies", ",", "boolean", "allowAllCerts", ")", "{", "URLConnection", "c", "=", "null", ";", "try", "{", "c", "=", "getConnection", "(", ...
Get content from the passed in URL. This code will open a connection to the passed in server, fetch the requested content, and return it as a byte[]. @param url URL to hit @param inCookies Map of session cookies (or null if not needed) @param outCookies Map of session cookies (or null if not needed) @param allowAllCe...
[ "Get", "content", "from", "the", "passed", "in", "URL", ".", "This", "code", "will", "open", "a", "connection", "to", "the", "passed", "in", "server", "fetch", "the", "requested", "content", "and", "return", "it", "as", "a", "byte", "[]", "." ]
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/UrlUtilities.java#L521-L558
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.getPeeringStatsAsync
public Observable<ExpressRouteCircuitStatsInner> getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName) { """ Gets all stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express rou...
java
public Observable<ExpressRouteCircuitStatsInner> getPeeringStatsAsync(String resourceGroupName, String circuitName, String peeringName) { return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).map(new Func1<ServiceResponse<ExpressRouteCircuitStatsInner>, ExpressRouteCircuitS...
[ "public", "Observable", "<", "ExpressRouteCircuitStatsInner", ">", "getPeeringStatsAsync", "(", "String", "resourceGroupName", ",", "String", "circuitName", ",", "String", "peeringName", ")", "{", "return", "getPeeringStatsWithServiceResponseAsync", "(", "resourceGroupName", ...
Gets all stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @param peeringName The name of the peering. @throws IllegalArgumentException thrown if parameters fail the validation @return the observab...
[ "Gets", "all", "stats", "from", "an", "express", "route", "circuit", "in", "a", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L1528-L1535
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.readLines
public static void readLines(InputStream in, Charset charset, LineHandler lineHandler) throws IORuntimeException { """ 按行读取数据,针对每行的数据做处理 @param in {@link InputStream} @param charset {@link Charset}编码 @param lineHandler 行处理接口,实现handle方法用于编辑一行的数据后入到指定地方 @throws IORuntimeException IO异常 @since 3.0.9 """ ...
java
public static void readLines(InputStream in, Charset charset, LineHandler lineHandler) throws IORuntimeException { readLines(getReader(in, charset), lineHandler); }
[ "public", "static", "void", "readLines", "(", "InputStream", "in", ",", "Charset", "charset", ",", "LineHandler", "lineHandler", ")", "throws", "IORuntimeException", "{", "readLines", "(", "getReader", "(", "in", ",", "charset", ")", ",", "lineHandler", ")", "...
按行读取数据,针对每行的数据做处理 @param in {@link InputStream} @param charset {@link Charset}编码 @param lineHandler 行处理接口,实现handle方法用于编辑一行的数据后入到指定地方 @throws IORuntimeException IO异常 @since 3.0.9
[ "按行读取数据,针对每行的数据做处理" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L702-L704
google/closure-compiler
src/com/google/javascript/jscomp/ant/CompileTask.java
CompileTask.getLastModifiedTime
private long getLastModifiedTime(List<?> fileLists) { """ Returns the most recent modified timestamp of the file collection. Note: this must be combined into one method to account for both Path and FileList erasure types. @param fileLists Collection of FileList or Path @return Most recent modified timestam...
java
private long getLastModifiedTime(List<?> fileLists) { long lastModified = 0; for (Object entry : fileLists) { if (entry instanceof FileList) { FileList list = (FileList) entry; for (String fileName : list.getFiles(this.getProject())) { File path = list.getDir(this.getProject())...
[ "private", "long", "getLastModifiedTime", "(", "List", "<", "?", ">", "fileLists", ")", "{", "long", "lastModified", "=", "0", ";", "for", "(", "Object", "entry", ":", "fileLists", ")", "{", "if", "(", "entry", "instanceof", "FileList", ")", "{", "FileLi...
Returns the most recent modified timestamp of the file collection. Note: this must be combined into one method to account for both Path and FileList erasure types. @param fileLists Collection of FileList or Path @return Most recent modified timestamp
[ "Returns", "the", "most", "recent", "modified", "timestamp", "of", "the", "file", "collection", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ant/CompileTask.java#L722-L744
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/AbstractPlugin.java
AbstractPlugin.matchHeaderPattern
protected boolean matchHeaderPattern(HttpMessage msg, String header, Pattern pattern) { """ Check if the given pattern can be found in the header. @param msg the message that will be checked @param header the name of the header @param pattern the pattern that will be used @return true if the pattern can be f...
java
protected boolean matchHeaderPattern(HttpMessage msg, String header, Pattern pattern) { if (msg.getResponseHeader().isEmpty()) { return false; } String val = msg.getResponseHeader().getHeader(header); if (val == null) { return false; } ...
[ "protected", "boolean", "matchHeaderPattern", "(", "HttpMessage", "msg", ",", "String", "header", ",", "Pattern", "pattern", ")", "{", "if", "(", "msg", ".", "getResponseHeader", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", ...
Check if the given pattern can be found in the header. @param msg the message that will be checked @param header the name of the header @param pattern the pattern that will be used @return true if the pattern can be found.
[ "Check", "if", "the", "given", "pattern", "can", "be", "found", "in", "the", "header", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/AbstractPlugin.java#L707-L719
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java
BindDataSourceBuilder.generateRx
public void generateRx(ClassName dataSourceName, String daoFactory) { """ <p> Generate RX observable support </p> . @param dataSourceName the data source name @param daoFactory the dao factory """ classBuilder.addField(FieldSpec.builder(Scheduler.class, "globalSubscribeOn", Modifier.PROTECTED).build...
java
public void generateRx(ClassName dataSourceName, String daoFactory) { classBuilder.addField(FieldSpec.builder(Scheduler.class, "globalSubscribeOn", Modifier.PROTECTED).build()); classBuilder.addMethod(MethodSpec.methodBuilder("globalSubscribeOn").returns(dataSourceName) .addParameter(Scheduler.class, "scheduler...
[ "public", "void", "generateRx", "(", "ClassName", "dataSourceName", ",", "String", "daoFactory", ")", "{", "classBuilder", ".", "addField", "(", "FieldSpec", ".", "builder", "(", "Scheduler", ".", "class", ",", "\"globalSubscribeOn\"", ",", "Modifier", ".", "PRO...
<p> Generate RX observable support </p> . @param dataSourceName the data source name @param daoFactory the dao factory
[ "<p", ">", "Generate", "RX", "observable", "support", "<", "/", "p", ">", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindDataSourceBuilder.java#L1220-L1253
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetBulkDeploymentStatusResult.java
GetBulkDeploymentStatusResult.withTags
public GetBulkDeploymentStatusResult withTags(java.util.Map<String, String> tags) { """ The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public GetBulkDeploymentStatusResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "GetBulkDeploymentStatusResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "tags", "for", "the", "definition", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetBulkDeploymentStatusResult.java#L283-L286
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsPreferences.java
CmsPreferences.getOptionsForLanguageStatic
public static SelectOptions getOptionsForLanguageStatic(Locale setLocale, Locale prevLocale) { """ Gets the options for the language selector.<p> @param setLocale the locale for the select options @param prevLocale the locale currently set @return the options for the language selector """ // ge...
java
public static SelectOptions getOptionsForLanguageStatic(Locale setLocale, Locale prevLocale) { // get available locales from the workplace manager List<Locale> locales = OpenCms.getWorkplaceManager().getLocales(); List<String> options = new ArrayList<String>(locales.size()); List<String...
[ "public", "static", "SelectOptions", "getOptionsForLanguageStatic", "(", "Locale", "setLocale", ",", "Locale", "prevLocale", ")", "{", "// get available locales from the workplace manager", "List", "<", "Locale", ">", "locales", "=", "OpenCms", ".", "getWorkplaceManager", ...
Gets the options for the language selector.<p> @param setLocale the locale for the select options @param prevLocale the locale currently set @return the options for the language selector
[ "Gets", "the", "options", "for", "the", "language", "selector", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L290-L319
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/CopyCriteria.java
CopyCriteria.getColumnsReferencedBy
public static Set<Column> getColumnsReferencedBy( Visitable visitable ) { """ Get the set of Column objects that represent those columns referenced by the visitable object. @param visitable the object to be visited @return the set of Column objects, with column names that always are the string-form of the {@li...
java
public static Set<Column> getColumnsReferencedBy( Visitable visitable ) { if (visitable == null) return Collections.emptySet(); final Set<Column> symbols = new HashSet<Column>(); // Walk the entire structure, so only supply a StrategyVisitor (that does no navigation) ... Visitors.visitAl...
[ "public", "static", "Set", "<", "Column", ">", "getColumnsReferencedBy", "(", "Visitable", "visitable", ")", "{", "if", "(", "visitable", "==", "null", ")", "return", "Collections", ".", "emptySet", "(", ")", ";", "final", "Set", "<", "Column", ">", "symbo...
Get the set of Column objects that represent those columns referenced by the visitable object. @param visitable the object to be visited @return the set of Column objects, with column names that always are the string-form of the {@link Column#getPropertyName() property name}; never null
[ "Get", "the", "set", "of", "Column", "objects", "that", "represent", "those", "columns", "referenced", "by", "the", "visitable", "object", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/CopyCriteria.java#L173-L213
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/HttpUtils.java
HttpUtils.sendPostData
public static void sendPostData(HttpURLConnection conn, String encodedData) throws IOException { """ Submits http post data to an HttpURLConnection. @param conn teh connection @param encodedData the encoded data to be sent @throws IOException on any connection """ StreamManager sm = new StreamMan...
java
public static void sendPostData(HttpURLConnection conn, String encodedData) throws IOException { StreamManager sm = new StreamManager(); try { conn.setDoOutput(true); conn.setRequestMethod("POST"); if (conn.getRequestProperty("Content-Type") == null) { ...
[ "public", "static", "void", "sendPostData", "(", "HttpURLConnection", "conn", ",", "String", "encodedData", ")", "throws", "IOException", "{", "StreamManager", "sm", "=", "new", "StreamManager", "(", ")", ";", "try", "{", "conn", ".", "setDoOutput", "(", "true...
Submits http post data to an HttpURLConnection. @param conn teh connection @param encodedData the encoded data to be sent @throws IOException on any connection
[ "Submits", "http", "post", "data", "to", "an", "HttpURLConnection", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/utils/HttpUtils.java#L95-L117
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/JwtFatActions.java
JwtFatActions.logInAndObtainJwtCookie
public Cookie logInAndObtainJwtCookie(String testName, WebClient webClient, String protectedUrl, String username, String password) throws Exception { """ Accesses the protected resource and logs in successfully, ensuring that a JWT SSO cookie is included in the result. """ return logInAndObtainJwtCooki...
java
public Cookie logInAndObtainJwtCookie(String testName, WebClient webClient, String protectedUrl, String username, String password) throws Exception { return logInAndObtainJwtCookie(testName, webClient, protectedUrl, username, password, JwtFatConstants.DEFAULT_ISS_REGEX); }
[ "public", "Cookie", "logInAndObtainJwtCookie", "(", "String", "testName", ",", "WebClient", "webClient", ",", "String", "protectedUrl", ",", "String", "username", ",", "String", "password", ")", "throws", "Exception", "{", "return", "logInAndObtainJwtCookie", "(", "...
Accesses the protected resource and logs in successfully, ensuring that a JWT SSO cookie is included in the result.
[ "Accesses", "the", "protected", "resource", "and", "logs", "in", "successfully", "ensuring", "that", "a", "JWT", "SSO", "cookie", "is", "included", "in", "the", "result", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/JwtFatActions.java#L36-L38
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java
PageFlowUtils.getSharedFlow
public static SharedFlowController getSharedFlow( String sharedFlowClassName, HttpServletRequest request, ServletContext servletContext ) { """ Get the shared flow with the given class name. @param sharedFlowClassName the class name of the shared flow to ret...
java
public static SharedFlowController getSharedFlow( String sharedFlowClassName, HttpServletRequest request, ServletContext servletContext ) { StorageHandler sh = Handlers.get( servletContext ).getStorageHandler(); HttpServletRequest unwrappedReques...
[ "public", "static", "SharedFlowController", "getSharedFlow", "(", "String", "sharedFlowClassName", ",", "HttpServletRequest", "request", ",", "ServletContext", "servletContext", ")", "{", "StorageHandler", "sh", "=", "Handlers", ".", "get", "(", "servletContext", ")", ...
Get the shared flow with the given class name. @param sharedFlowClassName the class name of the shared flow to retrieve. @param request the current HttpServletRequest. @return the {@link SharedFlowController} of the given class name which is stored in the user session.
[ "Get", "the", "shared", "flow", "with", "the", "given", "class", "name", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java#L374-L387
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/depth/VisualDepthOps.java
VisualDepthOps.depthTo3D
public static void depthTo3D(CameraPinholeBrown param , GrayU16 depth , FastQueue<Point3D_F64> cloud ) { """ Creates a point cloud from a depth image. @param param Intrinsic camera parameters for depth image @param depth depth image. each value is in millimeters. @param cloud Output point cloud """ cloud...
java
public static void depthTo3D(CameraPinholeBrown param , GrayU16 depth , FastQueue<Point3D_F64> cloud ) { cloud.reset(); Point2Transform2_F64 p2n = LensDistortionFactory.narrow(param).undistort_F64(true,false); Point2D_F64 n = new Point2D_F64(); for( int y = 0; y < depth.height; y++ ) { int index = depth.s...
[ "public", "static", "void", "depthTo3D", "(", "CameraPinholeBrown", "param", ",", "GrayU16", "depth", ",", "FastQueue", "<", "Point3D_F64", ">", "cloud", ")", "{", "cloud", ".", "reset", "(", ")", ";", "Point2Transform2_F64", "p2n", "=", "LensDistortionFactory",...
Creates a point cloud from a depth image. @param param Intrinsic camera parameters for depth image @param depth depth image. each value is in millimeters. @param cloud Output point cloud
[ "Creates", "a", "point", "cloud", "from", "a", "depth", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/depth/VisualDepthOps.java#L45-L70
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/StreamReader.java
StreamReader.readUnknownTable
public List<MapRow> readUnknownTable(int rowSize, int rowMagicNumber) throws IOException { """ Read a nested table whose contents we don't understand. @param rowSize fixed row size @param rowMagicNumber row magic number @return table rows """ TableReader reader = new UnknownTableReader(this, rowSize...
java
public List<MapRow> readUnknownTable(int rowSize, int rowMagicNumber) throws IOException { TableReader reader = new UnknownTableReader(this, rowSize, rowMagicNumber); reader.read(); return reader.getRows(); }
[ "public", "List", "<", "MapRow", ">", "readUnknownTable", "(", "int", "rowSize", ",", "int", "rowMagicNumber", ")", "throws", "IOException", "{", "TableReader", "reader", "=", "new", "UnknownTableReader", "(", "this", ",", "rowSize", ",", "rowMagicNumber", ")", ...
Read a nested table whose contents we don't understand. @param rowSize fixed row size @param rowMagicNumber row magic number @return table rows
[ "Read", "a", "nested", "table", "whose", "contents", "we", "don", "t", "understand", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/StreamReader.java#L93-L98
defei/codelogger-utils
src/main/java/org/codelogger/utils/MethodUtils.java
MethodUtils.findPublicMethod
public static Method findPublicMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { """ Returns a public Method object that reflects the specified public member method of the class or interface represented by given class.<br> Returns null if not find. @param clazz the method bel...
java
public static Method findPublicMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) { try { return clazz.getMethod(methodName, parameterTypes); } catch (Exception e) { Class<?> superclass = clazz.getSuperclass(); if (superclass != null) { ...
[ "public", "static", "Method", "findPublicMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "parameterTypes", ")", "{", "try", "{", "return", "clazz", ".", "getMethod", "(", "methodName", ",...
Returns a public Method object that reflects the specified public member method of the class or interface represented by given class.<br> Returns null if not find. @param clazz the method belong to. @param methodName the name of the method which you want to get. @param parameterTypes the parameter types of the method ...
[ "Returns", "a", "public", "Method", "object", "that", "reflects", "the", "specified", "public", "member", "method", "of", "the", "class", "or", "interface", "represented", "by", "given", "class", ".", "<br", ">", "Returns", "null", "if", "not", "find", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/MethodUtils.java#L40-L52
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_firewall_ipOnFirewall_rule_sequence_GET
public OvhFirewallNetworkRule ip_firewall_ipOnFirewall_rule_sequence_GET(String ip, String ipOnFirewall, Long sequence) throws IOException { """ Get this object properties REST: GET /ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence} @param ip [required] @param ipOnFirewall [required] @param sequence [required]...
java
public OvhFirewallNetworkRule ip_firewall_ipOnFirewall_rule_sequence_GET(String ip, String ipOnFirewall, Long sequence) throws IOException { String qPath = "/ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence}"; StringBuilder sb = path(qPath, ip, ipOnFirewall, sequence); String resp = exec(qPath, "GET", sb.toString()...
[ "public", "OvhFirewallNetworkRule", "ip_firewall_ipOnFirewall_rule_sequence_GET", "(", "String", "ip", ",", "String", "ipOnFirewall", ",", "Long", "sequence", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence}\"", ";...
Get this object properties REST: GET /ip/{ip}/firewall/{ipOnFirewall}/rule/{sequence} @param ip [required] @param ipOnFirewall [required] @param sequence [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1048-L1053
knowm/XChange
xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceRawCore.java
DSXMarketDataServiceRawCore.getDSXTrades
public DSXTradesWrapper getDSXTrades(String pairs, int size, String type) throws IOException { """ Get recent trades from exchange @param pairs String of currency pairs to retrieve (e.g. "btcusd-btceur") @param size Integer value from 1 -> get corresponding number of items @return DSXTradesWrapper @throws IO...
java
public DSXTradesWrapper getDSXTrades(String pairs, int size, String type) throws IOException { if (size < 1) { size = 1; } if (size > FULL_SIZE) { size = FULL_SIZE; } return dsx.getTrades(pairs.toLowerCase(), size, 1, type); }
[ "public", "DSXTradesWrapper", "getDSXTrades", "(", "String", "pairs", ",", "int", "size", ",", "String", "type", ")", "throws", "IOException", "{", "if", "(", "size", "<", "1", ")", "{", "size", "=", "1", ";", "}", "if", "(", "size", ">", "FULL_SIZE", ...
Get recent trades from exchange @param pairs String of currency pairs to retrieve (e.g. "btcusd-btceur") @param size Integer value from 1 -> get corresponding number of items @return DSXTradesWrapper @throws IOException
[ "Get", "recent", "trades", "from", "exchange" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceRawCore.java#L58-L69
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/Cipher.java
Cipher.updateAAD
public final void updateAAD(byte[] src, int offset, int len) { """ Continues a multi-part update of the Additional Authentication Data (AAD), using a subset of the provided buffer. <p> Calls to this method provide AAD to the cipher when operating in modes such as AEAD (GCM/CCM). If this cipher is operating in...
java
public final void updateAAD(byte[] src, int offset, int len) { checkCipherState(); // Input sanity check if ((src == null) || (offset < 0) || (len < 0) || ((len + offset) > src.length)) { throw new IllegalArgumentException("Bad arguments"); } updateP...
[ "public", "final", "void", "updateAAD", "(", "byte", "[", "]", "src", ",", "int", "offset", ",", "int", "len", ")", "{", "checkCipherState", "(", ")", ";", "// Input sanity check", "if", "(", "(", "src", "==", "null", ")", "||", "(", "offset", "<", "...
Continues a multi-part update of the Additional Authentication Data (AAD), using a subset of the provided buffer. <p> Calls to this method provide AAD to the cipher when operating in modes such as AEAD (GCM/CCM). If this cipher is operating in either GCM or CCM mode, all AAD must be supplied before beginning operation...
[ "Continues", "a", "multi", "-", "part", "update", "of", "the", "Additional", "Authentication", "Data", "(", "AAD", ")", "using", "a", "subset", "of", "the", "provided", "buffer", ".", "<p", ">", "Calls", "to", "this", "method", "provide", "AAD", "to", "t...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/Cipher.java#L2604-L2618
liyiorg/weixin-popular
src/main/java/weixin/popular/util/XMLConverUtil.java
XMLConverUtil.convertToObject
public static <T> T convertToObject(Class<T> clazz, InputStream inputStream) { """ XML to Object @param <T> T @param clazz clazz @param inputStream inputStream @return T """ return convertToObject(clazz, new InputStreamReader(inputStream)); }
java
public static <T> T convertToObject(Class<T> clazz, InputStream inputStream) { return convertToObject(clazz, new InputStreamReader(inputStream)); }
[ "public", "static", "<", "T", ">", "T", "convertToObject", "(", "Class", "<", "T", ">", "clazz", ",", "InputStream", "inputStream", ")", "{", "return", "convertToObject", "(", "clazz", ",", "new", "InputStreamReader", "(", "inputStream", ")", ")", ";", "}"...
XML to Object @param <T> T @param clazz clazz @param inputStream inputStream @return T
[ "XML", "to", "Object" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/util/XMLConverUtil.java#L77-L79
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java
MRCompactor.checkAlreadyCompactedBasedOnSourceDirName
private static boolean checkAlreadyCompactedBasedOnSourceDirName (FileSystem fs, Dataset dataset) { """ When renaming source directory strategy is used, a compaction completion means source directories {@link Dataset#inputPaths()} contains at least one directory which has been renamed to something with {@link MR...
java
private static boolean checkAlreadyCompactedBasedOnSourceDirName (FileSystem fs, Dataset dataset) { try { Set<Path> renamedDirs = getDeepestLevelRenamedDirsWithFileExistence(fs, dataset.inputPaths()); return !renamedDirs.isEmpty(); } catch (IOException e) { LOG.error("Failed to get deepest dir...
[ "private", "static", "boolean", "checkAlreadyCompactedBasedOnSourceDirName", "(", "FileSystem", "fs", ",", "Dataset", "dataset", ")", "{", "try", "{", "Set", "<", "Path", ">", "renamedDirs", "=", "getDeepestLevelRenamedDirsWithFileExistence", "(", "fs", ",", "dataset"...
When renaming source directory strategy is used, a compaction completion means source directories {@link Dataset#inputPaths()} contains at least one directory which has been renamed to something with {@link MRCompactor#COMPACTION_RENAME_SOURCE_DIR_SUFFIX}.
[ "When", "renaming", "source", "directory", "strategy", "is", "used", "a", "compaction", "completion", "means", "source", "directories", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java#L620-L628
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/AbstractContext.java
AbstractContext.getMapper
@SuppressWarnings("unchecked") static <E, M extends BinderMapper<E>> M getMapper(Class<E> cls) { """ Gets the mapper. @param <E> the element type @param <M> the generic type @param cls the cls @return the mapper """ M mapper = (M) OBJECT_MAPPERS.get(cls); if (mapper == null) { // The only way the...
java
@SuppressWarnings("unchecked") static <E, M extends BinderMapper<E>> M getMapper(Class<E> cls) { M mapper = (M) OBJECT_MAPPERS.get(cls); if (mapper == null) { // The only way the mapper wouldn't already be loaded into // OBJECT_MAPPERS is if it was compiled separately, but let's handle // it anyway Str...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "static", "<", "E", ",", "M", "extends", "BinderMapper", "<", "E", ">", ">", "M", "getMapper", "(", "Class", "<", "E", ">", "cls", ")", "{", "M", "mapper", "=", "(", "M", ")", "OBJECT_MAPPERS", ".",...
Gets the mapper. @param <E> the element type @param <M> the generic type @param cls the cls @return the mapper
[ "Gets", "the", "mapper", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/AbstractContext.java#L96-L120
morimekta/utils
io-util/src/main/java/net/morimekta/util/io/IOUtils.java
IOUtils.readString
public static String readString(Reader is, String term) throws IOException { """ Read next string from input stream. @param is The reader to read characters from. @param term Terminator character. @return The string up until, but not including the terminator. @throws IOException when unable to read from st...
java
public static String readString(Reader is, String term) throws IOException { CharArrayWriter baos = new CharArrayWriter(); int ch_int; char last = term.charAt(term.length() - 1); while ((ch_int = is.read()) >= 0) { final char ch = (char) ch_int; baos.write(ch); ...
[ "public", "static", "String", "readString", "(", "Reader", "is", ",", "String", "term", ")", "throws", "IOException", "{", "CharArrayWriter", "baos", "=", "new", "CharArrayWriter", "(", ")", ";", "int", "ch_int", ";", "char", "last", "=", "term", ".", "cha...
Read next string from input stream. @param is The reader to read characters from. @param term Terminator character. @return The string up until, but not including the terminator. @throws IOException when unable to read from stream.
[ "Read", "next", "string", "from", "input", "stream", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/io/IOUtils.java#L218-L236
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/Ci_ScRun.java
Ci_ScRun.interpretInfo
protected int interpretInfo(LineParser lp, MessageMgr mm) { """ Interprets the actual info command @param lp line parser @param mm the message manager to use for reporting errors, warnings, and infos @return 0 for success, non-zero otherwise """ String fileName = this.getFileName(lp); String content = t...
java
protected int interpretInfo(LineParser lp, MessageMgr mm){ String fileName = this.getFileName(lp); String content = this.getContent(fileName, mm); if(content==null){ return 1; } String[] lines = StringUtils.split(content, "\n"); String info = null; for(String s : lines){ if(s.startsWith("//**")){ ...
[ "protected", "int", "interpretInfo", "(", "LineParser", "lp", ",", "MessageMgr", "mm", ")", "{", "String", "fileName", "=", "this", ".", "getFileName", "(", "lp", ")", ";", "String", "content", "=", "this", ".", "getContent", "(", "fileName", ",", "mm", ...
Interprets the actual info command @param lp line parser @param mm the message manager to use for reporting errors, warnings, and infos @return 0 for success, non-zero otherwise
[ "Interprets", "the", "actual", "info", "command" ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/Ci_ScRun.java#L134-L154
tvesalainen/util
util/src/main/java/org/vesalainen/nio/IntArray.java
IntArray.getInstance
public static IntArray getInstance(int size, int bitCount, ByteOrder order) { """ Creates IntArray of given length, bitCount and byte-order @param size @param bitCount @param order @return """ switch (bitCount) { case 8: return getInstance(new byte[size], bit...
java
public static IntArray getInstance(int size, int bitCount, ByteOrder order) { switch (bitCount) { case 8: return getInstance(new byte[size], bitCount, order); case 16: return getInstance(new byte[2*size], bitCount, order); c...
[ "public", "static", "IntArray", "getInstance", "(", "int", "size", ",", "int", "bitCount", ",", "ByteOrder", "order", ")", "{", "switch", "(", "bitCount", ")", "{", "case", "8", ":", "return", "getInstance", "(", "new", "byte", "[", "size", "]", ",", "...
Creates IntArray of given length, bitCount and byte-order @param size @param bitCount @param order @return
[ "Creates", "IntArray", "of", "given", "length", "bitCount", "and", "byte", "-", "order" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/IntArray.java#L199-L212
DavidPizarro/PinView
library/src/main/java/com/dpizarro/pinview/library/PinViewBaseHelper.java
PinViewBaseHelper.generatePinText
TextView generatePinText(int i, String[] titles) { """ Generate a Title {@link TextView} with all attributes to add to {@link PinView} @param i index of new Title @return new title """ TextView pinTitle = (TextView) LayoutInflater.from(getContext()) .inflate(R.layout.partial_pin_tex...
java
TextView generatePinText(int i, String[] titles) { TextView pinTitle = (TextView) LayoutInflater.from(getContext()) .inflate(R.layout.partial_pin_text, this, false); int generateViewId = PinViewUtils.generateViewId(); pinTitle.setId(generateViewId); pinTitle.setText(title...
[ "TextView", "generatePinText", "(", "int", "i", ",", "String", "[", "]", "titles", ")", "{", "TextView", "pinTitle", "=", "(", "TextView", ")", "LayoutInflater", ".", "from", "(", "getContext", "(", ")", ")", ".", "inflate", "(", "R", ".", "layout", "....
Generate a Title {@link TextView} with all attributes to add to {@link PinView} @param i index of new Title @return new title
[ "Generate", "a", "Title", "{", "@link", "TextView", "}", "with", "all", "attributes", "to", "add", "to", "{", "@link", "PinView", "}" ]
train
https://github.com/DavidPizarro/PinView/blob/b171a89694921475b5442585810b8475ef1cfe35/library/src/main/java/com/dpizarro/pinview/library/PinViewBaseHelper.java#L248-L257
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/Var2Data.java
Var2Data.getShort
public int getShort(Integer id, Integer type) { """ This method retrieves an integer of the specified type, belonging to the item with the specified unique ID. @param id unique ID of entity to which this data belongs @param type data type identifier @return required integer data """ int result = 0;...
java
public int getShort(Integer id, Integer type) { int result = 0; Integer offset = m_meta.getOffset(id, type); if (offset != null) { byte[] value = m_map.get(offset); if (value != null && value.length >= 2) { result = MPPUtility.getShort(value, 0); ...
[ "public", "int", "getShort", "(", "Integer", "id", ",", "Integer", "type", ")", "{", "int", "result", "=", "0", ";", "Integer", "offset", "=", "m_meta", ".", "getOffset", "(", "id", ",", "type", ")", ";", "if", "(", "offset", "!=", "null", ")", "{"...
This method retrieves an integer of the specified type, belonging to the item with the specified unique ID. @param id unique ID of entity to which this data belongs @param type data type identifier @return required integer data
[ "This", "method", "retrieves", "an", "integer", "of", "the", "specified", "type", "belonging", "to", "the", "item", "with", "the", "specified", "unique", "ID", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/Var2Data.java#L252-L269
geomajas/geomajas-project-client-gwt2
plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/service/GeometryIndexService.java
GeometryIndexService.isChildOf
public boolean isChildOf(GeometryIndex parentIndex, GeometryIndex childIndex) { """ Checks to see if a given index is the child of another index. @param parentIndex The so-called parent index. @param childIndex The so-called child index. @return Is the second index really a child of the first index? """ ...
java
public boolean isChildOf(GeometryIndex parentIndex, GeometryIndex childIndex) { return delegate.isChildOf(toDelegate(parentIndex), toDelegate(childIndex)); }
[ "public", "boolean", "isChildOf", "(", "GeometryIndex", "parentIndex", ",", "GeometryIndex", "childIndex", ")", "{", "return", "delegate", ".", "isChildOf", "(", "toDelegate", "(", "parentIndex", ")", ",", "toDelegate", "(", "childIndex", ")", ")", ";", "}" ]
Checks to see if a given index is the child of another index. @param parentIndex The so-called parent index. @param childIndex The so-called child index. @return Is the second index really a child of the first index?
[ "Checks", "to", "see", "if", "a", "given", "index", "is", "the", "child", "of", "another", "index", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/service/GeometryIndexService.java#L221-L223
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.getBinary
protected Binary getBinary(final InputStream _in) throws EFapsException { """ Gets the binary. @param _in the in @return the binary @throws EFapsException on error """ Binary ret = null; try { ret = SerialValueFactory.getInstance().createBinary(_in); } catch (fi...
java
protected Binary getBinary(final InputStream _in) throws EFapsException { Binary ret = null; try { ret = SerialValueFactory.getInstance().createBinary(_in); } catch (final RepositoryException e) { throw new EFapsException("RepositoryException", e); } ...
[ "protected", "Binary", "getBinary", "(", "final", "InputStream", "_in", ")", "throws", "EFapsException", "{", "Binary", "ret", "=", "null", ";", "try", "{", "ret", "=", "SerialValueFactory", ".", "getInstance", "(", ")", ".", "createBinary", "(", "_in", ")",...
Gets the binary. @param _in the in @return the binary @throws EFapsException on error
[ "Gets", "the", "binary", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L308-L318
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.encryptAsync
public ServiceFuture<KeyOperationResult> encryptAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback<KeyOperationResult> serviceCallback) { """ Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a k...
java
public ServiceFuture<KeyOperationResult> encryptAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback<KeyOperationResult> serviceCallback) { return ServiceFuture.fromResponse(encryptWithServiceResponseAsync(vaultBaseUrl, keyNam...
[ "public", "ServiceFuture", "<", "KeyOperationResult", ">", "encryptAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ",", "JsonWebKeyEncryptionAlgorithm", "algorithm", ",", "byte", "[", "]", "value", ",", "final", "Service...
Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault. The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is dependent on ...
[ "Encrypts", "an", "arbitrary", "sequence", "of", "bytes", "using", "an", "encryption", "key", "that", "is", "stored", "in", "a", "key", "vault", ".", "The", "ENCRYPT", "operation", "encrypts", "an", "arbitrary", "sequence", "of", "bytes", "using", "an", "enc...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L2163-L2165
xiancloud/xian
xian-message/src/main/java/info/xiancloud/message/short_msg/yunpian/JavaSmsApi.java
JavaSmsApi.sendSms
public static Single<String> sendSms(String apikey, String text, String mobile) { """ 智能匹配模版接口发短信 @param apikey apikey @param text  短信内容 @param mobile  接受的手机号 @return json格式字符串 """ Map<String, String> params = new HashMap<String, String>(); params.put("apikey", apikey); params.p...
java
public static Single<String> sendSms(String apikey, String text, String mobile) { Map<String, String> params = new HashMap<String, String>(); params.put("apikey", apikey); params.put("text", text); params.put("mobile", mobile); return post(URI_SEND_SMS, params); }
[ "public", "static", "Single", "<", "String", ">", "sendSms", "(", "String", "apikey", ",", "String", "text", ",", "String", "mobile", ")", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "HashMap", "<", "String", ",", "String", ">"...
智能匹配模版接口发短信 @param apikey apikey @param text  短信内容 @param mobile  接受的手机号 @return json格式字符串
[ "智能匹配模版接口发短信" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-message/src/main/java/info/xiancloud/message/short_msg/yunpian/JavaSmsApi.java#L90-L96
wisdom-framework/wisdom-jdbc
wisdom-jdbc-drivers/abstract-jdbc-driver/src/main/java/org/wisdom/jdbc/driver/helpers/BeanUtils.java
BeanUtils.setProperty
public static void setProperty(Object object, String name, String value) throws SQLException { """ Tries to set the property 'name' to `value` in the given object. This assignation is made using a <em>setter</em> method discovered and invoked using reflection. @param object the object @param name th...
java
public static void setProperty(Object object, String name, String value) throws SQLException { Class<?> type = object.getClass(); PropertyDescriptor[] descriptors; try { descriptors = Introspector.getBeanInfo(type) .getPropertyDescriptors(); }...
[ "public", "static", "void", "setProperty", "(", "Object", "object", ",", "String", "name", ",", "String", "value", ")", "throws", "SQLException", "{", "Class", "<", "?", ">", "type", "=", "object", ".", "getClass", "(", ")", ";", "PropertyDescriptor", "[",...
Tries to set the property 'name' to `value` in the given object. This assignation is made using a <em>setter</em> method discovered and invoked using reflection. @param object the object @param name the property name @param value the value @throws SQLException if the property cannot be set. This happens if there are no...
[ "Tries", "to", "set", "the", "property", "name", "to", "value", "in", "the", "given", "object", ".", "This", "assignation", "is", "made", "using", "a", "<em", ">", "setter<", "/", "em", ">", "method", "discovered", "and", "invoked", "using", "reflection", ...
train
https://github.com/wisdom-framework/wisdom-jdbc/blob/931f5acf0b2bcb0a8f3b683d60d326caafd09a72/wisdom-jdbc-drivers/abstract-jdbc-driver/src/main/java/org/wisdom/jdbc/driver/helpers/BeanUtils.java#L47-L82
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRanges.java
PluralRanges.isExplicit
@Deprecated public boolean isExplicit(StandardPlural start, StandardPlural end) { """ Returns whether the appropriate plural category for a range from start to end is explicitly in the data (vs given an implicit value). See also {@link #get}. @param start plural category for the start of the range @param...
java
@Deprecated public boolean isExplicit(StandardPlural start, StandardPlural end) { return matrix.get(start, end) != null; }
[ "@", "Deprecated", "public", "boolean", "isExplicit", "(", "StandardPlural", "start", ",", "StandardPlural", "end", ")", "{", "return", "matrix", ".", "get", "(", "start", ",", "end", ")", "!=", "null", ";", "}" ]
Returns whether the appropriate plural category for a range from start to end is explicitly in the data (vs given an implicit value). See also {@link #get}. @param start plural category for the start of the range @param end plural category for the end of the range @return whether the value for (start,end) is explicit ...
[ "Returns", "whether", "the", "appropriate", "plural", "category", "for", "a", "range", "from", "start", "to", "end", "is", "explicitly", "in", "the", "data", "(", "vs", "given", "an", "implicit", "value", ")", ".", "See", "also", "{", "@link", "#get", "}...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRanges.java#L262-L265
ysc/word
src/main/java/org/apdplat/word/recognition/RecognitionTool.java
RecognitionTool.isFraction
public static boolean isFraction(final String text, final int start, final int len) { """ 小数和分数识别 @param text 识别文本 @param start 待识别文本开始索引 @param len 识别长度 @return 是否识别 """ if(len < 3){ return false; } int index = -1; for(int i=start; i<start+len; i++){ ...
java
public static boolean isFraction(final String text, final int start, final int len){ if(len < 3){ return false; } int index = -1; for(int i=start; i<start+len; i++){ char c = text.charAt(i); if(c=='.' || c=='/' || c=='/' || c=='.' || c=='·'){ ...
[ "public", "static", "boolean", "isFraction", "(", "final", "String", "text", ",", "final", "int", "start", ",", "final", "int", "len", ")", "{", "if", "(", "len", "<", "3", ")", "{", "return", "false", ";", "}", "int", "index", "=", "-", "1", ";", ...
小数和分数识别 @param text 识别文本 @param start 待识别文本开始索引 @param len 识别长度 @return 是否识别
[ "小数和分数识别" ]
train
https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/recognition/RecognitionTool.java#L75-L92
azkaban/azkaban
az-core/src/main/java/azkaban/metrics/MetricsManager.java
MetricsManager.startReporting
public synchronized void startReporting(final String reporterName, final Props props) { """ reporting metrics to remote metrics collector. Note: this method must be synchronized, since both web server and executor will call it during initialization. """ final String metricsReporterClassName = props.get(CU...
java
public synchronized void startReporting(final String reporterName, final Props props) { final String metricsReporterClassName = props.get(CUSTOM_METRICS_REPORTER_CLASS_NAME); final String metricsServerURL = props.get(METRICS_SERVER_URL); if (metricsReporterClassName != null && metricsServerURL != null) { ...
[ "public", "synchronized", "void", "startReporting", "(", "final", "String", "reporterName", ",", "final", "Props", "props", ")", "{", "final", "String", "metricsReporterClassName", "=", "props", ".", "get", "(", "CUSTOM_METRICS_REPORTER_CLASS_NAME", ")", ";", "final...
reporting metrics to remote metrics collector. Note: this method must be synchronized, since both web server and executor will call it during initialization.
[ "reporting", "metrics", "to", "remote", "metrics", "collector", ".", "Note", ":", "this", "method", "must", "be", "synchronized", "since", "both", "web", "server", "and", "executor", "will", "call", "it", "during", "initialization", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-core/src/main/java/azkaban/metrics/MetricsManager.java#L108-L129
WolfgangFahl/Mediawiki-Japi
src/main/java/com/bitplan/mediawiki/japi/jaxb/JaxbFactory.java
JaxbFactory.getString
public String getString(Marshaller marshaller, T instance) throws JAXBException { """ get the string representation of the given marshaller @param marshaller @param instance @return the string representation for the given marshaller @throws JAXBException """ StringWriter sw = new StringWriter()...
java
public String getString(Marshaller marshaller, T instance) throws JAXBException { StringWriter sw = new StringWriter(); marshaller.marshal(instance, sw); String result = sw.toString(); return result; }
[ "public", "String", "getString", "(", "Marshaller", "marshaller", ",", "T", "instance", ")", "throws", "JAXBException", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "marshaller", ".", "marshal", "(", "instance", ",", "sw", ")", ";", ...
get the string representation of the given marshaller @param marshaller @param instance @return the string representation for the given marshaller @throws JAXBException
[ "get", "the", "string", "representation", "of", "the", "given", "marshaller" ]
train
https://github.com/WolfgangFahl/Mediawiki-Japi/blob/78d0177ebfe02eb05da5550839727861f1e888a5/src/main/java/com/bitplan/mediawiki/japi/jaxb/JaxbFactory.java#L170-L176
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
MethodUtils.invokeMethod
public static Object invokeMethod(final Object object, final String methodName, final Object[] args, final Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { """ <p>Invokes a named method whose parameter type matches the ...
java
public static Object invokeMethod(final Object object, final String methodName, final Object[] args, final Class<?>[] parameterTypes) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { return invokeMethod(object, false, methodName, args, paramet...
[ "public", "static", "Object", "invokeMethod", "(", "final", "Object", "object", ",", "final", "String", "methodName", ",", "final", "Object", "[", "]", "args", ",", "final", "Class", "<", "?", ">", "[", "]", "parameterTypes", ")", "throws", "NoSuchMethodExce...
<p>Invokes a named method whose parameter type matches the object type.</p> <p>This method delegates the method search to {@link #getMatchingAccessibleMethod(Class, String, Class[])}.</p> <p>This method supports calls to methods taking primitive parameters via passing in wrapping classes. So, for example, a {@code Bo...
[ "<p", ">", "Invokes", "a", "named", "method", "whose", "parameter", "type", "matches", "the", "object", "type", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java#L255-L260
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java
ImageIOGreyScale.getImageReadersByMIMEType
public static Iterator<ImageReader> getImageReadersByMIMEType(String MIMEType) { """ Returns an <code>Iterator</code> containing all currently registered <code>ImageReader</code>s that claim to be able to decode files with the given MIME type. @param MIMEType a <code>String</code> containing a file suffix (<i...
java
public static Iterator<ImageReader> getImageReadersByMIMEType(String MIMEType) { if (MIMEType == null) { throw new IllegalArgumentException("MIMEType == null!"); } // Ensure category is present Iterator iter; try { iter = theRegistry.getServiceProviders(ImageReaderSpi.class, new ContainsFilter(re...
[ "public", "static", "Iterator", "<", "ImageReader", ">", "getImageReadersByMIMEType", "(", "String", "MIMEType", ")", "{", "if", "(", "MIMEType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"MIMEType == null!\"", ")", ";", "}", "//...
Returns an <code>Iterator</code> containing all currently registered <code>ImageReader</code>s that claim to be able to decode files with the given MIME type. @param MIMEType a <code>String</code> containing a file suffix (<i>e.g.</i>, "image/jpeg" or "image/x-bmp"). @return an <code>Iterator</code> containing <code>...
[ "Returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "containing", "all", "currently", "registered", "<code", ">", "ImageReader<", "/", "code", ">", "s", "that", "claim", "to", "be", "able", "to", "decode", "files", "with", "the", "given", "MIME",...
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java#L680-L692
sdl/Testy
src/main/java/com/sdl/selenium/extjs3/grid/GridPanel.java
GridPanel.isCellPresent
public boolean isCellPresent(String searchElement, int columnId, SearchType... searchTypes) { """ Scroll Page Down to find the cell. If you found it return true, if not return false. @param searchElement searchElement @param columnId columnId @param searchTypes SearchType.EQUALS @return true or false...
java
public boolean isCellPresent(String searchElement, int columnId, SearchType... searchTypes) { ready(); GridCell cell = new GridCell(columnId, searchElement, searchTypes).setContainer(this); boolean selected; do { selected = cell.isElementPresent(); } while (!selected ...
[ "public", "boolean", "isCellPresent", "(", "String", "searchElement", ",", "int", "columnId", ",", "SearchType", "...", "searchTypes", ")", "{", "ready", "(", ")", ";", "GridCell", "cell", "=", "new", "GridCell", "(", "columnId", ",", "searchElement", ",", "...
Scroll Page Down to find the cell. If you found it return true, if not return false. @param searchElement searchElement @param columnId columnId @param searchTypes SearchType.EQUALS @return true or false
[ "Scroll", "Page", "Down", "to", "find", "the", "cell", ".", "If", "you", "found", "it", "return", "true", "if", "not", "return", "false", "." ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/extjs3/grid/GridPanel.java#L267-L275
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/utils/Utils.java
Utils.dupString
public static String dupString(char c, int nCopies) { """ 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 """ 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" ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/utils/Utils.java#L127-L131
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotateAffineZYX
public Matrix4f rotateAffineZYX(float angleZ, float angleY, float angleX) { """ Apply rotation of <code>angleZ</code> radians about the Z axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleX</code> radians about the X axis. <p> When used with a ...
java
public Matrix4f rotateAffineZYX(float angleZ, float angleY, float angleX) { return rotateAffineZYX(angleZ, angleY, angleX, thisOrNew()); }
[ "public", "Matrix4f", "rotateAffineZYX", "(", "float", "angleZ", ",", "float", "angleY", ",", "float", "angleX", ")", "{", "return", "rotateAffineZYX", "(", "angleZ", ",", "angleY", ",", "angleX", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Apply rotation of <code>angleZ</code> radians about the Z axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleX</code> radians about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clock...
[ "Apply", "rotation", "of", "<code", ">", "angleZ<", "/", "code", ">", "radians", "about", "the", "Z", "axis", "followed", "by", "a", "rotation", "of", "<code", ">", "angleY<", "/", "code", ">", "radians", "about", "the", "Y", "axis", "and", "followed", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L5579-L5581
xwiki/xwiki-commons
xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin/src/main/java/org/xwiki/tool/xar/FormatMojo.java
FormatMojo.removeNodes
private void removeNodes(String xpathExpression, Document domdoc) { """ Remove the nodes found with the xpath expression. @param xpathExpression the xpath expression of the nodes @param domdoc The DOM document """ List<Node> nodes = domdoc.selectNodes(xpathExpression); for (Node node : node...
java
private void removeNodes(String xpathExpression, Document domdoc) { List<Node> nodes = domdoc.selectNodes(xpathExpression); for (Node node : nodes) { node.detach(); } }
[ "private", "void", "removeNodes", "(", "String", "xpathExpression", ",", "Document", "domdoc", ")", "{", "List", "<", "Node", ">", "nodes", "=", "domdoc", ".", "selectNodes", "(", "xpathExpression", ")", ";", "for", "(", "Node", "node", ":", "nodes", ")", ...
Remove the nodes found with the xpath expression. @param xpathExpression the xpath expression of the nodes @param domdoc The DOM document
[ "Remove", "the", "nodes", "found", "with", "the", "xpath", "expression", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin/src/main/java/org/xwiki/tool/xar/FormatMojo.java#L204-L210
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/caching/CacheHeader.java
CacheHeader.isNotModified
public static boolean isNotModified(@NotNull ModificationDateProvider dateProvider, @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws IOException { """ Compares the "If-Modified-Since header" of the incoming request with the last modification date of an aggregated ...
java
public static boolean isNotModified(@NotNull ModificationDateProvider dateProvider, @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws IOException { boolean isAuthor = WCMMode.fromRequest(request) != WCMMode.DISABLED; return isNotModified(dateProvider, request, re...
[ "public", "static", "boolean", "isNotModified", "(", "@", "NotNull", "ModificationDateProvider", "dateProvider", ",", "@", "NotNull", "SlingHttpServletRequest", "request", ",", "@", "NotNull", "SlingHttpServletResponse", "response", ")", "throws", "IOException", "{", "b...
Compares the "If-Modified-Since header" of the incoming request with the last modification date of an aggregated resource. If the resource was not modified since the client retrieved the resource, a 304-redirect is send to the response (and the method returns true). If the resource has changed (or the client didn't) su...
[ "Compares", "the", "If", "-", "Modified", "-", "Since", "header", "of", "the", "incoming", "request", "with", "the", "last", "modification", "date", "of", "an", "aggregated", "resource", ".", "If", "the", "resource", "was", "not", "modified", "since", "the",...
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/caching/CacheHeader.java#L139-L143
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java
ObjectEnvelopeTable.cascadeInsertFor
private void cascadeInsertFor(ObjectEnvelope mod, List alreadyPrepared) { """ Walk through the object graph of the specified insert object. Was used for recursive object graph walk. """ // avoid endless recursion, so use List for registration if(alreadyPrepared.contains(mod.getIdentity())) r...
java
private void cascadeInsertFor(ObjectEnvelope mod, List alreadyPrepared) { // avoid endless recursion, so use List for registration if(alreadyPrepared.contains(mod.getIdentity())) return; alreadyPrepared.add(mod.getIdentity()); ClassDescriptor cld = getTransaction().getBroker()...
[ "private", "void", "cascadeInsertFor", "(", "ObjectEnvelope", "mod", ",", "List", "alreadyPrepared", ")", "{", "// avoid endless recursion, so use List for registration\r", "if", "(", "alreadyPrepared", ".", "contains", "(", "mod", ".", "getIdentity", "(", ")", ")", "...
Walk through the object graph of the specified insert object. Was used for recursive object graph walk.
[ "Walk", "through", "the", "object", "graph", "of", "the", "specified", "insert", "object", ".", "Was", "used", "for", "recursive", "object", "graph", "walk", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/ObjectEnvelopeTable.java#L545-L558
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/text.java
text.getParagraph
public static String getParagraph(int maxSentences, boolean startLorem) { """ Get a paragraph of lorem ipsum text. A paragraph is made of <i>n</i> number of sentences. <i>n</i> is random between 1 and {@code maxSenteces } sentences. @param maxSentences maximum number of sentences to include in paragraph @par...
java
public static String getParagraph(int maxSentences, boolean startLorem) { String paragraph = ""; int sentences = QuickUtils.math.getRandomInteger(1, maxSentences); for (int i = 0; i < sentences; i++) { paragraph += getSentence(startLorem); startLorem = false; // run this ...
[ "public", "static", "String", "getParagraph", "(", "int", "maxSentences", ",", "boolean", "startLorem", ")", "{", "String", "paragraph", "=", "\"\"", ";", "int", "sentences", "=", "QuickUtils", ".", "math", ".", "getRandomInteger", "(", "1", ",", "maxSentences...
Get a paragraph of lorem ipsum text. A paragraph is made of <i>n</i> number of sentences. <i>n</i> is random between 1 and {@code maxSenteces } sentences. @param maxSentences maximum number of sentences to include in paragraph @param startLorem whether to start first paragraph with standard lorem ipsum text or not. ...
[ "Get", "a", "paragraph", "of", "lorem", "ipsum", "text", ".", "A", "paragraph", "is", "made", "of", "<i", ">", "n<", "/", "i", ">", "number", "of", "sentences", ".", "<i", ">", "n<", "/", "i", ">", "is", "random", "between", "1", "and", "{", "@co...
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/text.java#L223-L231
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/media/MediaClient.java
MediaClient.createPipeline
public CreatePipelineResponse createPipeline( String pipelineName, String sourceBucket, String targetBucket, int capacity) { """ Creates a pipeline which enable you to perform multiple transcodes in parallel. @param pipelineName The name of the new pipeline. @param sourceBucket The name of source b...
java
public CreatePipelineResponse createPipeline( String pipelineName, String sourceBucket, String targetBucket, int capacity) { return createPipeline(pipelineName, null, sourceBucket, targetBucket, capacity); }
[ "public", "CreatePipelineResponse", "createPipeline", "(", "String", "pipelineName", ",", "String", "sourceBucket", ",", "String", "targetBucket", ",", "int", "capacity", ")", "{", "return", "createPipeline", "(", "pipelineName", ",", "null", ",", "sourceBucket", ",...
Creates a pipeline which enable you to perform multiple transcodes in parallel. @param pipelineName The name of the new pipeline. @param sourceBucket The name of source bucket in Bos. @param targetBucket The name of target bucket in Bos. @param capacity The concurrent capability of the new pipeline.
[ "Creates", "a", "pipeline", "which", "enable", "you", "to", "perform", "multiple", "transcodes", "in", "parallel", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/media/MediaClient.java#L505-L508
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.replaceWhere
public SDVariable replaceWhere(SDVariable update, Number value, Condition condition) { """ Element-wise replace where condition:<br> out[i] = value if condition(update[i]) is satisfied, or<br> out[i] = update[i] if condition(update[i]) is NOT satisfied @param update Source array @param value Value to ...
java
public SDVariable replaceWhere(SDVariable update, Number value, Condition condition) { return replaceWhere(null, update, value, condition); }
[ "public", "SDVariable", "replaceWhere", "(", "SDVariable", "update", ",", "Number", "value", ",", "Condition", "condition", ")", "{", "return", "replaceWhere", "(", "null", ",", "update", ",", "value", ",", "condition", ")", ";", "}" ]
Element-wise replace where condition:<br> out[i] = value if condition(update[i]) is satisfied, or<br> out[i] = update[i] if condition(update[i]) is NOT satisfied @param update Source array @param value Value to set at the output, if the condition is satisfied @param condition Condition to check on update array ...
[ "Element", "-", "wise", "replace", "where", "condition", ":", "<br", ">", "out", "[", "i", "]", "=", "value", "if", "condition", "(", "update", "[", "i", "]", ")", "is", "satisfied", "or<br", ">", "out", "[", "i", "]", "=", "update", "[", "i", "]...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L1732-L1734
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNElement.java
XNElement.getLong
public long getLong(String attribute, String namespace) { """ Retrieve an integer attribute or throw an exception if not exists. @param attribute the attribute name @param namespace the attribute namespace URI @return the value """ return Long.parseLong(get(attribute, namespace)); }
java
public long getLong(String attribute, String namespace) { return Long.parseLong(get(attribute, namespace)); }
[ "public", "long", "getLong", "(", "String", "attribute", ",", "String", "namespace", ")", "{", "return", "Long", ".", "parseLong", "(", "get", "(", "attribute", ",", "namespace", ")", ")", ";", "}" ]
Retrieve an integer attribute or throw an exception if not exists. @param attribute the attribute name @param namespace the attribute namespace URI @return the value
[ "Retrieve", "an", "integer", "attribute", "or", "throw", "an", "exception", "if", "not", "exists", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNElement.java#L872-L874
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java
CommsLightTrace.traceMessageIds
public static void traceMessageIds(TraceComponent callersTrace, String action, SIMessageHandle[] messageHandles) { """ Allow tracing of messages and transaction when deleting @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix the keyword incl...
java
public static void traceMessageIds(TraceComponent callersTrace, String action, SIMessageHandle[] messageHandles) { if ((light_tc.isDebugEnabled() || callersTrace.isDebugEnabled()) && messageHandles != null) { // Build our trace string StringBuffer trcBuffer = new StringBuffer(); t...
[ "public", "static", "void", "traceMessageIds", "(", "TraceComponent", "callersTrace", ",", "String", "action", ",", "SIMessageHandle", "[", "]", "messageHandles", ")", "{", "if", "(", "(", "light_tc", ".", "isDebugEnabled", "(", ")", "||", "callersTrace", ".", ...
Allow tracing of messages and transaction when deleting @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix the keyword included in the trace line @param messageHandles The messages handles to trace
[ "Allow", "tracing", "of", "messages", "and", "transaction", "when", "deleting" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java#L100-L124
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_blocIp_POST
public OvhTask serviceName_modem_blocIp_POST(String serviceName, OvhServiceStatusEnum status) throws IOException { """ Change the status of the Bloc IP on modem REST: POST /xdsl/{serviceName}/modem/blocIp @param status [required] the new status of the bloc ip service @param serviceName [required] The internal...
java
public OvhTask serviceName_modem_blocIp_POST(String serviceName, OvhServiceStatusEnum status) throws IOException { String qPath = "/xdsl/{serviceName}/modem/blocIp"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "status", status); String resp...
[ "public", "OvhTask", "serviceName_modem_blocIp_POST", "(", "String", "serviceName", ",", "OvhServiceStatusEnum", "status", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/blocIp\"", ";", "StringBuilder", "sb", "=", "path", "(", "q...
Change the status of the Bloc IP on modem REST: POST /xdsl/{serviceName}/modem/blocIp @param status [required] the new status of the bloc ip service @param serviceName [required] The internal name of your XDSL offer
[ "Change", "the", "status", "of", "the", "Bloc", "IP", "on", "modem" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L805-L812
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/records/converter/RecordReaderConverter.java
RecordReaderConverter.convert
public static void convert(SequenceRecordReader reader, SequenceRecordWriter writer, boolean closeOnCompletion) throws IOException { """ Write all sequences from the specified sequence record reader to the specified sequence record writer. Closes the sequence record writer on completion. @param reader Sequence...
java
public static void convert(SequenceRecordReader reader, SequenceRecordWriter writer, boolean closeOnCompletion) throws IOException { if(!reader.hasNext()){ throw new UnsupportedOperationException("Cannot convert SequenceRecordReader: reader has no next element"); } while(reader.has...
[ "public", "static", "void", "convert", "(", "SequenceRecordReader", "reader", ",", "SequenceRecordWriter", "writer", ",", "boolean", "closeOnCompletion", ")", "throws", "IOException", "{", "if", "(", "!", "reader", ".", "hasNext", "(", ")", ")", "{", "throw", ...
Write all sequences from the specified sequence record reader to the specified sequence record writer. Closes the sequence record writer on completion. @param reader Sequence record reader (source of data) @param writer Sequence record writer (location to write data) @param closeOnCompletion if true: close the record ...
[ "Write", "all", "sequences", "from", "the", "specified", "sequence", "record", "reader", "to", "the", "specified", "sequence", "record", "writer", ".", "Closes", "the", "sequence", "record", "writer", "on", "completion", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/records/converter/RecordReaderConverter.java#L93-L106
citrusframework/citrus
modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/message/JmxMessageConverter.java
JmxMessageConverter.getServiceInvocation
private ManagedBeanInvocation getServiceInvocation(Message message, JmxEndpointConfiguration endpointConfiguration) { """ Reads Citrus internal RMI message model object from message payload. Either payload is actually a service invocation object or XML payload String is unmarshalled to proper object representatio...
java
private ManagedBeanInvocation getServiceInvocation(Message message, JmxEndpointConfiguration endpointConfiguration) { Object payload = message.getPayload(); ManagedBeanInvocation serviceInvocation = null; if (payload != null) { if (payload instanceof ManagedBeanInvocation) { ...
[ "private", "ManagedBeanInvocation", "getServiceInvocation", "(", "Message", "message", ",", "JmxEndpointConfiguration", "endpointConfiguration", ")", "{", "Object", "payload", "=", "message", ".", "getPayload", "(", ")", ";", "ManagedBeanInvocation", "serviceInvocation", ...
Reads Citrus internal RMI message model object from message payload. Either payload is actually a service invocation object or XML payload String is unmarshalled to proper object representation. @param message @param endpointConfiguration @return
[ "Reads", "Citrus", "internal", "RMI", "message", "model", "object", "from", "message", "payload", ".", "Either", "payload", "is", "actually", "a", "service", "invocation", "object", "or", "XML", "payload", "String", "is", "unmarshalled", "to", "proper", "object"...
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jmx/src/main/java/com/consol/citrus/jmx/message/JmxMessageConverter.java#L116-L132
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java
CacheConfigurationBuilder.withResourcePools
public CacheConfigurationBuilder<K, V> withResourcePools(ResourcePoolsBuilder resourcePoolsBuilder) { """ Convenience method to add a {@link ResourcePools} through a {@link ResourcePoolsBuilder} to the returned builder. @param resourcePoolsBuilder the builder providing the resource pool @return a new builder w...
java
public CacheConfigurationBuilder<K, V> withResourcePools(ResourcePoolsBuilder resourcePoolsBuilder) { return withResourcePools(requireNonNull(resourcePoolsBuilder, "Null resource pools builder").build()); }
[ "public", "CacheConfigurationBuilder", "<", "K", ",", "V", ">", "withResourcePools", "(", "ResourcePoolsBuilder", "resourcePoolsBuilder", ")", "{", "return", "withResourcePools", "(", "requireNonNull", "(", "resourcePoolsBuilder", ",", "\"Null resource pools builder\"", ")"...
Convenience method to add a {@link ResourcePools} through a {@link ResourcePoolsBuilder} to the returned builder. @param resourcePoolsBuilder the builder providing the resource pool @return a new builder with the added resource pools @see #withResourcePools(ResourcePools)
[ "Convenience", "method", "to", "add", "a", "{", "@link", "ResourcePools", "}", "through", "a", "{", "@link", "ResourcePoolsBuilder", "}", "to", "the", "returned", "builder", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java#L284-L286
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java
OperationOutcomeUtil.addIssue
public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) { """ Add an issue to an OperationOutcome @param theCtx The fhir context @param theOperationOutcome The OO resource to add to @param theSeveri...
java
public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) { IBase issue = createIssue(theCtx, theOperationOutcome); populateDetails(theCtx, issue, theSeverity, theDetails, theLocation, theCode); }
[ "public", "static", "void", "addIssue", "(", "FhirContext", "theCtx", ",", "IBaseOperationOutcome", "theOperationOutcome", ",", "String", "theSeverity", ",", "String", "theDetails", ",", "String", "theLocation", ",", "String", "theCode", ")", "{", "IBase", "issue", ...
Add an issue to an OperationOutcome @param theCtx The fhir context @param theOperationOutcome The OO resource to add to @param theSeverity The severity (fatal | error | warning | information) @param theDetails The details string @param theCode
[ "Add", "an", "issue", "to", "an", "OperationOutcome" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java#L57-L60
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/type/ResolvableType.java
ResolvableType.forConstructorParameter
public static ResolvableType forConstructorParameter(Constructor<?> constructor, int parameterIndex) { """ Return a {@link ResolvableType} for the specified {@link Constructor} parameter. @param constructor the source constructor (must not be {@code null}) @param parameterIndex the parameter index @return a {@l...
java
public static ResolvableType forConstructorParameter(Constructor<?> constructor, int parameterIndex) { Assert.notNull(constructor, "Constructor must not be null"); return forMethodParameter(new MethodParameter(constructor, parameterIndex)); }
[ "public", "static", "ResolvableType", "forConstructorParameter", "(", "Constructor", "<", "?", ">", "constructor", ",", "int", "parameterIndex", ")", "{", "Assert", ".", "notNull", "(", "constructor", ",", "\"Constructor must not be null\"", ")", ";", "return", "for...
Return a {@link ResolvableType} for the specified {@link Constructor} parameter. @param constructor the source constructor (must not be {@code null}) @param parameterIndex the parameter index @return a {@link ResolvableType} for the specified constructor parameter @see #forConstructorParameter(Constructor, int, Class)
[ "Return", "a", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/type/ResolvableType.java#L998-L1001
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/marshal/TypeParser.java
TypeParser.stringifyTypeParameters
public static String stringifyTypeParameters(List<AbstractType<?>> types, boolean ignoreFreezing) { """ Helper function to ease the writing of AbstractType.toString() methods. """ StringBuilder sb = new StringBuilder("("); for (int i = 0; i < types.size(); i++) { if (i > 0) ...
java
public static String stringifyTypeParameters(List<AbstractType<?>> types, boolean ignoreFreezing) { StringBuilder sb = new StringBuilder("("); for (int i = 0; i < types.size(); i++) { if (i > 0) sb.append(","); sb.append(types.get(i).toString(ignoreFre...
[ "public", "static", "String", "stringifyTypeParameters", "(", "List", "<", "AbstractType", "<", "?", ">", ">", "types", ",", "boolean", "ignoreFreezing", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "\"(\"", ")", ";", "for", "(", "int",...
Helper function to ease the writing of AbstractType.toString() methods.
[ "Helper", "function", "to", "ease", "the", "writing", "of", "AbstractType", ".", "toString", "()", "methods", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/marshal/TypeParser.java#L548-L558
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/NullArgumentException.java
NullArgumentException.validateNotNull
public static void validateNotNull( Object obj, String objectName ) throws NullArgumentException { """ Validates that the object <code>obj</code> is not null. @param obj The object to be tested. @param objectName The name of the object, which is used to construct the exception message. @throw...
java
public static void validateNotNull( Object obj, String objectName ) throws NullArgumentException { if( obj == null ) { throw new NullArgumentException( objectName + IS_NULL ); } }
[ "public", "static", "void", "validateNotNull", "(", "Object", "obj", ",", "String", "objectName", ")", "throws", "NullArgumentException", "{", "if", "(", "obj", "==", "null", ")", "{", "throw", "new", "NullArgumentException", "(", "objectName", "+", "IS_NULL", ...
Validates that the object <code>obj</code> is not null. @param obj The object to be tested. @param objectName The name of the object, which is used to construct the exception message. @throws NullArgumentException if the stringToCheck is either null or zero characters long.
[ "Validates", "that", "the", "object", "<code", ">", "obj<", "/", "code", ">", "is", "not", "null", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/NullArgumentException.java#L70-L77
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.copyDirectories
public static void copyDirectories(String[] directories, String storageFolder) throws IOException { """ 批量复制文件夹 @param directories 文件夹路径数组 @param storageFolder 存储目录 @throws IOException 异常 """ copyDirectories(getFiles(directories), storageFolder); }
java
public static void copyDirectories(String[] directories, String storageFolder) throws IOException { copyDirectories(getFiles(directories), storageFolder); }
[ "public", "static", "void", "copyDirectories", "(", "String", "[", "]", "directories", ",", "String", "storageFolder", ")", "throws", "IOException", "{", "copyDirectories", "(", "getFiles", "(", "directories", ")", ",", "storageFolder", ")", ";", "}" ]
批量复制文件夹 @param directories 文件夹路径数组 @param storageFolder 存储目录 @throws IOException 异常
[ "批量复制文件夹" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L382-L384
guardtime/ksi-java-sdk
ksi-service-ha/src/main/java/com/guardtime/ksi/service/ha/HAConfUtil.java
HAConfUtil.isBigger
static boolean isBigger(Long a, Long b) { """ Is value of b bigger than value of a. @return True, if b is bigger than a. Always true, if value of a is null. """ return a == null || (b != null && b > a); }
java
static boolean isBigger(Long a, Long b) { return a == null || (b != null && b > a); }
[ "static", "boolean", "isBigger", "(", "Long", "a", ",", "Long", "b", ")", "{", "return", "a", "==", "null", "||", "(", "b", "!=", "null", "&&", "b", ">", "a", ")", ";", "}" ]
Is value of b bigger than value of a. @return True, if b is bigger than a. Always true, if value of a is null.
[ "Is", "value", "of", "b", "bigger", "than", "value", "of", "a", "." ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-service-ha/src/main/java/com/guardtime/ksi/service/ha/HAConfUtil.java#L34-L36
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/av/Broadcaster.java
Broadcaster.queueOrSubmitUpload
private void queueOrSubmitUpload(String key, File file) { """ Handle an upload, either submitting to the S3 client or queueing for submission once credentials are ready @param key destination key @param file local file """ if (mReadyToBroadcast) { submitUpload(key, file); } el...
java
private void queueOrSubmitUpload(String key, File file) { if (mReadyToBroadcast) { submitUpload(key, file); } else { if (VERBOSE) Log.i(TAG, "queueing " + key + " until S3 Credentials available"); queueUpload(key, file); } }
[ "private", "void", "queueOrSubmitUpload", "(", "String", "key", ",", "File", "file", ")", "{", "if", "(", "mReadyToBroadcast", ")", "{", "submitUpload", "(", "key", ",", "file", ")", ";", "}", "else", "{", "if", "(", "VERBOSE", ")", "Log", ".", "i", ...
Handle an upload, either submitting to the S3 client or queueing for submission once credentials are ready @param key destination key @param file local file
[ "Handle", "an", "upload", "either", "submitting", "to", "the", "S3", "client", "or", "queueing", "for", "submission", "once", "credentials", "are", "ready" ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/av/Broadcaster.java#L456-L463
martinpaljak/apdu4j
src/main/java/apdu4j/remote/RemoteTerminal.java
RemoteTerminal.verifyPIN
public boolean verifyPIN(int p2, String text) throws IOException, UserCancelExcption { """ Issues a ISO VERIFY on the remote terminal. @param p2 P2 parameter in the VERIFY APDU @param text to be displayed to the user @return true if VERIFY returned 0x9000, false otherwise @throws IOException when communicati...
java
public boolean verifyPIN(int p2, String text) throws IOException, UserCancelExcption{ Map<String, Object> m = JSONProtocol.cmd("verify"); m.put("p2", p2); m.put("text", text); pipe.send(m); return JSONProtocol.check(m, pipe.recv()); }
[ "public", "boolean", "verifyPIN", "(", "int", "p2", ",", "String", "text", ")", "throws", "IOException", ",", "UserCancelExcption", "{", "Map", "<", "String", ",", "Object", ">", "m", "=", "JSONProtocol", ".", "cmd", "(", "\"verify\"", ")", ";", "m", "."...
Issues a ISO VERIFY on the remote terminal. @param p2 P2 parameter in the VERIFY APDU @param text to be displayed to the user @return true if VERIFY returned 0x9000, false otherwise @throws IOException when communication fails
[ "Issues", "a", "ISO", "VERIFY", "on", "the", "remote", "terminal", "." ]
train
https://github.com/martinpaljak/apdu4j/blob/dca977bfa9e4fa236a9a7b87a2a09e5472ea9969/src/main/java/apdu4j/remote/RemoteTerminal.java#L175-L181
google/closure-compiler
src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java
ProcessClosureProvidesAndRequires.rewriteProvidesAndRequires
void rewriteProvidesAndRequires(Node externs, Node root) { """ Rewrites all provides and requires in the given namespace. <p>Call this instead of {@link #collectProvidedNames(Node, Node)} if you want rewriting. """ checkState(!hasRewritingOccurred, "Cannot call rewriteProvidesAndRequires twice per insta...
java
void rewriteProvidesAndRequires(Node externs, Node root) { checkState(!hasRewritingOccurred, "Cannot call rewriteProvidesAndRequires twice per instance"); hasRewritingOccurred = true; collectProvidedNames(externs, root); for (ProvidedName pn : providedNames.values()) { pn.replace(); } de...
[ "void", "rewriteProvidesAndRequires", "(", "Node", "externs", ",", "Node", "root", ")", "{", "checkState", "(", "!", "hasRewritingOccurred", ",", "\"Cannot call rewriteProvidesAndRequires twice per instance\"", ")", ";", "hasRewritingOccurred", "=", "true", ";", "collectP...
Rewrites all provides and requires in the given namespace. <p>Call this instead of {@link #collectProvidedNames(Node, Node)} if you want rewriting.
[ "Rewrites", "all", "provides", "and", "requires", "in", "the", "given", "namespace", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ProcessClosureProvidesAndRequires.java#L111-L135
mojohaus/webstart
webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/AbstractJnlpMojo.java
AbstractJnlpMojo.prepareExtensions
private void prepareExtensions() throws MojoExecutionException { """ Prepare extensions. <p> Copy all includes of all extensions as to be excluded. @throws MojoExecutionException if could not prepare extensions """ List<String> includes = new ArrayList<>(); for ( JnlpExtension ...
java
private void prepareExtensions() throws MojoExecutionException { List<String> includes = new ArrayList<>(); for ( JnlpExtension extension : jnlpExtensions ) { // Check extensions (mandatory name, title and vendor and at least one include) checkExtension( ...
[ "private", "void", "prepareExtensions", "(", ")", "throws", "MojoExecutionException", "{", "List", "<", "String", ">", "includes", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "JnlpExtension", "extension", ":", "jnlpExtensions", ")", "{", "// Chec...
Prepare extensions. <p> Copy all includes of all extensions as to be excluded. @throws MojoExecutionException if could not prepare extensions
[ "Prepare", "extensions", ".", "<p", ">", "Copy", "all", "includes", "of", "all", "extensions", "as", "to", "be", "excluded", "." ]
train
https://github.com/mojohaus/webstart/blob/38fdd1d21f063f21716cfcd61ebeabd963487576/webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/AbstractJnlpMojo.java#L887-L923
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/CrossValidator.java
CrossValidator.computeAverage
public double computeAverage (Function<Triple<GeneralDataset<L, F>,GeneralDataset<L, F>,SavedState>,Double> function) { """ This computes the average over all folds of the function we're trying to optimize. The input triple contains, in order, the train set, the test set, and the saved state. You don't have to u...
java
public double computeAverage (Function<Triple<GeneralDataset<L, F>,GeneralDataset<L, F>,SavedState>,Double> function) { double sum = 0; Iterator<Triple<GeneralDataset<L, F>,GeneralDataset<L, F>,SavedState>> foldIt = iterator(); while (foldIt.hasNext()) { sum += function.apply(foldIt.next()); ...
[ "public", "double", "computeAverage", "(", "Function", "<", "Triple", "<", "GeneralDataset", "<", "L", ",", "F", ">", ",", "GeneralDataset", "<", "L", ",", "F", ">", ",", "SavedState", ">", ",", "Double", ">", "function", ")", "{", "double", "sum", "="...
This computes the average over all folds of the function we're trying to optimize. The input triple contains, in order, the train set, the test set, and the saved state. You don't have to use the saved state if you don't want to.
[ "This", "computes", "the", "average", "over", "all", "folds", "of", "the", "function", "we", "re", "trying", "to", "optimize", ".", "The", "input", "triple", "contains", "in", "order", "the", "train", "set", "the", "test", "set", "and", "the", "saved", "...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/CrossValidator.java#L48-L56
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.plotCharts
public static void plotCharts(List<Chart> charts) { """ Plots a list of charts in matrix with 2 columns. @param charts """ int numRows =1; int numCols =1; if(charts.size()>1){ numRows = (int) Math.ceil(charts.size()/2.0); numCols = 2; } final JFrame frame = new JFrame(""); frame.set...
java
public static void plotCharts(List<Chart> charts){ int numRows =1; int numCols =1; if(charts.size()>1){ numRows = (int) Math.ceil(charts.size()/2.0); numCols = 2; } final JFrame frame = new JFrame(""); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.getContentPane().setLay...
[ "public", "static", "void", "plotCharts", "(", "List", "<", "Chart", ">", "charts", ")", "{", "int", "numRows", "=", "1", ";", "int", "numCols", "=", "1", ";", "if", "(", "charts", ".", "size", "(", ")", ">", "1", ")", "{", "numRows", "=", "(", ...
Plots a list of charts in matrix with 2 columns. @param charts
[ "Plots", "a", "list", "of", "charts", "in", "matrix", "with", "2", "columns", "." ]
train
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L341-L366
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/PathHelper.java
PathHelper.isParentDirectory
@SuppressFBWarnings ("IL_INFINITE_LOOP") public static boolean isParentDirectory (@Nonnull final Path aSearchDirectory, @Nonnull final Path aStartDirectory) { """ Check if the searched directory is a parent object of the start directory @param aSearchDirectory The directory to be searched. May not be <code>n...
java
@SuppressFBWarnings ("IL_INFINITE_LOOP") public static boolean isParentDirectory (@Nonnull final Path aSearchDirectory, @Nonnull final Path aStartDirectory) { ValueEnforcer.notNull (aSearchDirectory, "SearchDirectory"); ValueEnforcer.notNull (aStartDirectory, "StartDirectory"); Path aRealSearchDirector...
[ "@", "SuppressFBWarnings", "(", "\"IL_INFINITE_LOOP\"", ")", "public", "static", "boolean", "isParentDirectory", "(", "@", "Nonnull", "final", "Path", "aSearchDirectory", ",", "@", "Nonnull", "final", "Path", "aStartDirectory", ")", "{", "ValueEnforcer", ".", "notNu...
Check if the searched directory is a parent object of the start directory @param aSearchDirectory The directory to be searched. May not be <code>null</code>. @param aStartDirectory The directory where the search starts. May not be <code>null</code>. @return <code>true</code> if the search directory is a parent of the ...
[ "Check", "if", "the", "searched", "directory", "is", "a", "parent", "object", "of", "the", "start", "directory" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/PathHelper.java#L246-L274
OrienteerBAP/wicket-orientdb
wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/security/OSecurityHelper.java
OSecurityHelper.isAllowed
public static boolean isAllowed(OClass oClass, OrientPermission... permissions) { """ Check that all required permissions present for specified {@link OClass} @param oClass {@link OClass} to check security rights for @param permissions {@link OrientPermission}s to check @return true of all permissions are allow...
java
public static boolean isAllowed(OClass oClass, OrientPermission... permissions) { return isAllowed(ORule.ResourceGeneric.CLASS, oClass.getName(), permissions); }
[ "public", "static", "boolean", "isAllowed", "(", "OClass", "oClass", ",", "OrientPermission", "...", "permissions", ")", "{", "return", "isAllowed", "(", "ORule", ".", "ResourceGeneric", ".", "CLASS", ",", "oClass", ".", "getName", "(", ")", ",", "permissions"...
Check that all required permissions present for specified {@link OClass} @param oClass {@link OClass} to check security rights for @param permissions {@link OrientPermission}s to check @return true of all permissions are allowable
[ "Check", "that", "all", "required", "permissions", "present", "for", "specified", "{" ]
train
https://github.com/OrienteerBAP/wicket-orientdb/blob/eb1d94f00a6bff9e266c5c032baa6043afc1db92/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/security/OSecurityHelper.java#L201-L204