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
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/impl/BinaryThinning.java
BinaryThinning.apply
public void apply(GrayU8 binary , int maxLoops) { """ Applies the thinning algorithm. Runs for the specified number of loops or until no change is detected. @param binary Input binary image which is to be thinned. This is modified @param maxLoops Maximum number of thinning loops. Set to -1 to run until the ...
java
public void apply(GrayU8 binary , int maxLoops) { this.binary = binary; inputBorder.setImage(binary); ones0.reset(); zerosOut.reset(); findOnePixels(ones0); for (int loop = 0; (loop < maxLoops || maxLoops == -1) && ones0.size > 0; loop++) { boolean changed = false; // do one cycle through all the...
[ "public", "void", "apply", "(", "GrayU8", "binary", ",", "int", "maxLoops", ")", "{", "this", ".", "binary", "=", "binary", ";", "inputBorder", ".", "setImage", "(", "binary", ")", ";", "ones0", ".", "reset", "(", ")", ";", "zerosOut", ".", "reset", ...
Applies the thinning algorithm. Runs for the specified number of loops or until no change is detected. @param binary Input binary image which is to be thinned. This is modified @param maxLoops Maximum number of thinning loops. Set to -1 to run until the image is no longer modified.
[ "Applies", "the", "thinning", "algorithm", ".", "Runs", "for", "the", "specified", "number", "of", "loops", "or", "until", "no", "change", "is", "detected", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/impl/BinaryThinning.java#L99-L136
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformPreview.java
WaveformPreview.segmentHeight
@SuppressWarnings("WeakerAccess") public int segmentHeight(final int segment, final boolean front) { """ Determine the height of the preview given an index into it. @param segment the index of the waveform preview segment to examine @param front if {@code true} the height of the front (brighter) segment of...
java
@SuppressWarnings("WeakerAccess") public int segmentHeight(final int segment, final boolean front) { final ByteBuffer bytes = getData(); if (isColor) { final int base = segment * 6; final int frontHeight = Util.unsign(bytes.get(base + 5)); if (front) { ...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "int", "segmentHeight", "(", "final", "int", "segment", ",", "final", "boolean", "front", ")", "{", "final", "ByteBuffer", "bytes", "=", "getData", "(", ")", ";", "if", "(", "isColor", ")", "...
Determine the height of the preview given an index into it. @param segment the index of the waveform preview segment to examine @param front if {@code true} the height of the front (brighter) segment of a color waveform preview is returned, otherwise the height of the back (dimmer) segment is returned. Has no effect f...
[ "Determine", "the", "height", "of", "the", "preview", "given", "an", "index", "into", "it", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformPreview.java#L218-L232
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.biPredicate
public static <T, U> BiPredicate<T, U> biPredicate(CheckedBiPredicate<T, U> predicate) { """ Wrap a {@link org.jooq.lambda.fi.util.function.CheckedBiPredicate} in a {@link BiPredicate}. """ return biPredicate(predicate, THROWABLE_TO_RUNTIME_EXCEPTION); }
java
public static <T, U> BiPredicate<T, U> biPredicate(CheckedBiPredicate<T, U> predicate) { return biPredicate(predicate, THROWABLE_TO_RUNTIME_EXCEPTION); }
[ "public", "static", "<", "T", ",", "U", ">", "BiPredicate", "<", "T", ",", "U", ">", "biPredicate", "(", "CheckedBiPredicate", "<", "T", ",", "U", ">", "predicate", ")", "{", "return", "biPredicate", "(", "predicate", ",", "THROWABLE_TO_RUNTIME_EXCEPTION", ...
Wrap a {@link org.jooq.lambda.fi.util.function.CheckedBiPredicate} in a {@link BiPredicate}.
[ "Wrap", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L440-L442
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readLines
public static List<String> readLines(String path, String charset) throws IORuntimeException { """ 从文件中读取每一行数据 @param path 文件路径 @param charset 字符集 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常 """ return readLines(path, charset, new ArrayList<String>()); }
java
public static List<String> readLines(String path, String charset) throws IORuntimeException { return readLines(path, charset, new ArrayList<String>()); }
[ "public", "static", "List", "<", "String", ">", "readLines", "(", "String", "path", ",", "String", "charset", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "path", ",", "charset", ",", "new", "ArrayList", "<", "String", ">", "(", ")...
从文件中读取每一行数据 @param path 文件路径 @param charset 字符集 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常
[ "从文件中读取每一行数据" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2343-L2345
codeprimate-software/cp-elements
src/main/java/org/cp/elements/util/PropertiesAdapter.java
PropertiesAdapter.getAsType
public <T> T getAsType(String propertyName, Class<T> type) { """ Gets the assigned value of the named property as an instance of the specified {@link Class} type. @param <T> {@link Class} type of the return value. @param propertyName the name of the property to get. @param type Class type of the value to retu...
java
public <T> T getAsType(String propertyName, Class<T> type) { return getAsType(propertyName, type, null); }
[ "public", "<", "T", ">", "T", "getAsType", "(", "String", "propertyName", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "getAsType", "(", "propertyName", ",", "type", ",", "null", ")", ";", "}" ]
Gets the assigned value of the named property as an instance of the specified {@link Class} type. @param <T> {@link Class} type of the return value. @param propertyName the name of the property to get. @param type Class type of the value to return for the specified property. @return the assigned value of the named pro...
[ "Gets", "the", "assigned", "value", "of", "the", "named", "property", "as", "an", "instance", "of", "the", "specified", "{", "@link", "Class", "}", "type", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/util/PropertiesAdapter.java#L243-L245
JM-Lab/utils-java8
src/main/java/kr/jm/utils/collections/IndexAliasMap.java
IndexAliasMap.addWithAlias
public Integer addWithAlias(String alias, V value) { """ Add with alias integer. @param alias the alias @param value the value @return the integer """ synchronized (dataList) { dataList.add(value); return aliasIndexMap.put(alias, dataList.size() - 1); } }
java
public Integer addWithAlias(String alias, V value) { synchronized (dataList) { dataList.add(value); return aliasIndexMap.put(alias, dataList.size() - 1); } }
[ "public", "Integer", "addWithAlias", "(", "String", "alias", ",", "V", "value", ")", "{", "synchronized", "(", "dataList", ")", "{", "dataList", ".", "add", "(", "value", ")", ";", "return", "aliasIndexMap", ".", "put", "(", "alias", ",", "dataList", "."...
Add with alias integer. @param alias the alias @param value the value @return the integer
[ "Add", "with", "alias", "integer", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/collections/IndexAliasMap.java#L73-L78
romannurik/muzei
muzei-api/src/main/java/com/google/android/apps/muzei/api/provider/ProviderContract.java
ProviderContract.getProviderClient
@RequiresApi(Build.VERSION_CODES.KITKAT) @NonNull public static ProviderClient getProviderClient( @NonNull Context context, @NonNull Class<? extends MuzeiArtProvider> provider) { """ Creates a new {@link ProviderClient} for accessing the given {@link MuzeiArtProvider} from anywhere...
java
@RequiresApi(Build.VERSION_CODES.KITKAT) @NonNull public static ProviderClient getProviderClient( @NonNull Context context, @NonNull Class<? extends MuzeiArtProvider> provider) { ComponentName componentName = new ComponentName(context, provider); PackageManager pm = conte...
[ "@", "RequiresApi", "(", "Build", ".", "VERSION_CODES", ".", "KITKAT", ")", "@", "NonNull", "public", "static", "ProviderClient", "getProviderClient", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "Class", "<", "?", "extends", "MuzeiArtProvider...
Creates a new {@link ProviderClient} for accessing the given {@link MuzeiArtProvider} from anywhere in your application. @param context Context used to construct the ProviderClient. @param provider The {@link MuzeiArtProvider} you need a ProviderClient for. @return a {@link ProviderClient} suitable for accessing the {...
[ "Creates", "a", "new", "{", "@link", "ProviderClient", "}", "for", "accessing", "the", "given", "{", "@link", "MuzeiArtProvider", "}", "from", "anywhere", "in", "your", "application", "." ]
train
https://github.com/romannurik/muzei/blob/d00777a5fc59f34471be338c814ea85ddcbde304/muzei-api/src/main/java/com/google/android/apps/muzei/api/provider/ProviderContract.java#L74-L91
mercadopago/dx-java
src/main/java/com/mercadopago/core/MPBase.java
MPBase.processMethodBulk
protected static MPResourceArray processMethodBulk(Class clazz, String methodName, Boolean useCache) throws MPException { """ Process method to call the api, usually used for loadAll and search methods @param clazz a MPBase extended class @param methodName a String with the decorated...
java
protected static MPResourceArray processMethodBulk(Class clazz, String methodName, Boolean useCache) throws MPException { HashMap<String, String> mapParams = null; return processMethodBulk(clazz, methodName, mapParams, useCache); }
[ "protected", "static", "MPResourceArray", "processMethodBulk", "(", "Class", "clazz", ",", "String", "methodName", ",", "Boolean", "useCache", ")", "throws", "MPException", "{", "HashMap", "<", "String", ",", "String", ">", "mapParams", "=", "null", ";", "return...
Process method to call the api, usually used for loadAll and search methods @param clazz a MPBase extended class @param methodName a String with the decorated method to be processed @param useCache a Boolean flag that indicates if the cache must be used @return @throws MPExcepti...
[ "Process", "method", "to", "call", "the", "api", "usually", "used", "for", "loadAll", "and", "search", "methods" ]
train
https://github.com/mercadopago/dx-java/blob/9df65a6bfb4db0c1fddd7699a5b109643961b03f/src/main/java/com/mercadopago/core/MPBase.java#L204-L208
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.matchCondition
public SDVariable matchCondition(String name, SDVariable in, Condition condition) { """ Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwise @param in Input @param condition Condition @return Boolean mask """ SDVariable ...
java
public SDVariable matchCondition(String name, SDVariable in, Condition condition) { SDVariable ret = f().matchCondition(in, condition); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "matchCondition", "(", "String", "name", ",", "SDVariable", "in", ",", "Condition", "condition", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "matchCondition", "(", "in", ",", "condition", ")", ";", "return", "updateVariabl...
Returns a boolean mask of equal shape to the input, where the condition is satisfied - value 1 where satisfied, 0 otherwise @param in Input @param condition Condition @return Boolean mask
[ "Returns", "a", "boolean", "mask", "of", "equal", "shape", "to", "the", "input", "where", "the", "condition", "is", "satisfied", "-", "value", "1", "where", "satisfied", "0", "otherwise" ]
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#L985-L988
flow/commons
src/main/java/com/flowpowered/commons/StringUtil.java
StringUtil.toNamedString
public static String toNamedString(Object object, Object... components) { """ Wraps all components in between brackets delimited by ','-signs, appending the class name in front of it. @param object name to append in front @param components to turn into a String @return a String representation of the input ...
java
public static String toNamedString(Object object, Object... components) { StringBuilder b = new StringBuilder(components.length * 5 + 2); if (object != null) { b.append(object.getClass().getSimpleName()).append(' '); } b.append('{'); for (int i = 0; i < components.len...
[ "public", "static", "String", "toNamedString", "(", "Object", "object", ",", "Object", "...", "components", ")", "{", "StringBuilder", "b", "=", "new", "StringBuilder", "(", "components", ".", "length", "*", "5", "+", "2", ")", ";", "if", "(", "object", ...
Wraps all components in between brackets delimited by ','-signs, appending the class name in front of it. @param object name to append in front @param components to turn into a String @return a String representation of the input
[ "Wraps", "all", "components", "in", "between", "brackets", "delimited", "by", "-", "signs", "appending", "the", "class", "name", "in", "front", "of", "it", "." ]
train
https://github.com/flow/commons/blob/0690efdac06fd728fcd7e9cf10f2b1319379c45b/src/main/java/com/flowpowered/commons/StringUtil.java#L182-L196
graphql-java/graphql-java
src/main/java/graphql/schema/diff/DiffSet.java
DiffSet.diffSet
public static DiffSet diffSet(Map<String, Object> introspectionOld, Map<String, Object> introspectionNew) { """ Creates a diff set out of the result of 2 introspection queries. @param introspectionOld the older introspection query @param introspectionNew the newer introspection query @return a diff set repr...
java
public static DiffSet diffSet(Map<String, Object> introspectionOld, Map<String, Object> introspectionNew) { return new DiffSet(introspectionOld, introspectionNew); }
[ "public", "static", "DiffSet", "diffSet", "(", "Map", "<", "String", ",", "Object", ">", "introspectionOld", ",", "Map", "<", "String", ",", "Object", ">", "introspectionNew", ")", "{", "return", "new", "DiffSet", "(", "introspectionOld", ",", "introspectionNe...
Creates a diff set out of the result of 2 introspection queries. @param introspectionOld the older introspection query @param introspectionNew the newer introspection query @return a diff set representing them
[ "Creates", "a", "diff", "set", "out", "of", "the", "result", "of", "2", "introspection", "queries", "." ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/schema/diff/DiffSet.java#L51-L53
BioPAX/Paxtools
sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java
L3ToSBGNPDConverter.assignLocation
private void assignLocation(PhysicalEntity pe, Glyph g) { """ /* Assigns compartmentRef of the glyph. @param pe Related PhysicalEntity @param g the glyph """ // Create compartment -- add this inside the compartment Glyph loc = getCompartment(pe); if (loc != null) { g.setCompartmentRef(loc); } }
java
private void assignLocation(PhysicalEntity pe, Glyph g) { // Create compartment -- add this inside the compartment Glyph loc = getCompartment(pe); if (loc != null) { g.setCompartmentRef(loc); } }
[ "private", "void", "assignLocation", "(", "PhysicalEntity", "pe", ",", "Glyph", "g", ")", "{", "// Create compartment -- add this inside the compartment", "Glyph", "loc", "=", "getCompartment", "(", "pe", ")", ";", "if", "(", "loc", "!=", "null", ")", "{", "g", ...
/* Assigns compartmentRef of the glyph. @param pe Related PhysicalEntity @param g the glyph
[ "/", "*", "Assigns", "compartmentRef", "of", "the", "glyph", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L445-L451
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java
DomUtil.addChildNode
public static Node addChildNode(Document doc, Node parentNode, String childName, String childValue) { """ Add a child node @param parentNode - the parent node @param childName - name of child node to create @param childValue - value of child node @return the child node """ if(doc == null ||...
java
public static Node addChildNode(Document doc, Node parentNode, String childName, String childValue){ if(doc == null || parentNode == null || childName == null){ return null; } Node childNode = doc.createElement(childName); if(childV...
[ "public", "static", "Node", "addChildNode", "(", "Document", "doc", ",", "Node", "parentNode", ",", "String", "childName", ",", "String", "childValue", ")", "{", "if", "(", "doc", "==", "null", "||", "parentNode", "==", "null", "||", "childName", "==", "nu...
Add a child node @param parentNode - the parent node @param childName - name of child node to create @param childValue - value of child node @return the child node
[ "Add", "a", "child", "node" ]
train
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/build/maven/DomUtil.java#L107-L117
astrapi69/jaulp-wicket
jaulp-wicket-dropdownchoices/src/main/java/de/alpharogroup/wicket/components/i18n/dropdownchoice/panels/DropdownAutocompleteTextFieldPanel.java
DropdownAutocompleteTextFieldPanel.newRootLabel
protected Label newRootLabel(final String forId, final IModel<String> model) { """ Factory method for creating the root Label. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a Label. @param forId the for id @param model the...
java
protected Label newRootLabel(final String forId, final IModel<String> model) { return ComponentFactory.newLabel("rootLabel", forId, model); }
[ "protected", "Label", "newRootLabel", "(", "final", "String", "forId", ",", "final", "IModel", "<", "String", ">", "model", ")", "{", "return", "ComponentFactory", ".", "newLabel", "(", "\"rootLabel\"", ",", "forId", ",", "model", ")", ";", "}" ]
Factory method for creating the root Label. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a Label. @param forId the for id @param model the model @return the label
[ "Factory", "method", "for", "creating", "the", "root", "Label", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provide", "their", "own", "versi...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-dropdownchoices/src/main/java/de/alpharogroup/wicket/components/i18n/dropdownchoice/panels/DropdownAutocompleteTextFieldPanel.java#L237-L239
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/translator/VariableTranslator.java
VariableTranslator.isDocumentReferenceVariable
public static boolean isDocumentReferenceVariable(Package pkg, String type) { """ If pkg is null then will use any available bundle to provide the translator. """ com.centurylink.mdw.variable.VariableTranslator trans = getTranslator(pkg, type); return (trans instanceof DocumentReferenceTranslat...
java
public static boolean isDocumentReferenceVariable(Package pkg, String type) { com.centurylink.mdw.variable.VariableTranslator trans = getTranslator(pkg, type); return (trans instanceof DocumentReferenceTranslator); }
[ "public", "static", "boolean", "isDocumentReferenceVariable", "(", "Package", "pkg", ",", "String", "type", ")", "{", "com", ".", "centurylink", ".", "mdw", ".", "variable", ".", "VariableTranslator", "trans", "=", "getTranslator", "(", "pkg", ",", "type", ")"...
If pkg is null then will use any available bundle to provide the translator.
[ "If", "pkg", "is", "null", "then", "will", "use", "any", "available", "bundle", "to", "provide", "the", "translator", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/translator/VariableTranslator.java#L170-L173
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/TopicsInner.java
TopicsInner.updateAsync
public Observable<TopicInner> updateAsync(String resourceGroupName, String topicName, Map<String, String> tags) { """ Update a topic. Asynchronously updates a topic with the specified parameters. @param resourceGroupName The name of the resource group within the user's subscription. @param topicName Name of t...
java
public Observable<TopicInner> updateAsync(String resourceGroupName, String topicName, Map<String, String> tags) { return updateWithServiceResponseAsync(resourceGroupName, topicName, tags).map(new Func1<ServiceResponse<TopicInner>, TopicInner>() { @Override public TopicInner call(ServiceR...
[ "public", "Observable", "<", "TopicInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "topicName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",...
Update a topic. Asynchronously updates a topic with the specified parameters. @param resourceGroupName The name of the resource group within the user's subscription. @param topicName Name of the topic @param tags Tags of the resource @throws IllegalArgumentException thrown if parameters fail the validation @return the...
[ "Update", "a", "topic", ".", "Asynchronously", "updates", "a", "topic", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/TopicsInner.java#L666-L673
google/closure-compiler
src/com/google/javascript/jscomp/parsing/parser/Parser.java
Parser.maybeReportNoInitializer
private void maybeReportNoInitializer(TokenType token, ParseTree lvalue) { """ Reports if declaration requires an initializer, assuming initializer is absent. """ if (token == TokenType.CONST) { reportError("const variables must have an initializer"); } else if (lvalue.isPattern()) { report...
java
private void maybeReportNoInitializer(TokenType token, ParseTree lvalue) { if (token == TokenType.CONST) { reportError("const variables must have an initializer"); } else if (lvalue.isPattern()) { reportError("destructuring must have an initializer"); } }
[ "private", "void", "maybeReportNoInitializer", "(", "TokenType", "token", ",", "ParseTree", "lvalue", ")", "{", "if", "(", "token", "==", "TokenType", ".", "CONST", ")", "{", "reportError", "(", "\"const variables must have an initializer\"", ")", ";", "}", "else"...
Reports if declaration requires an initializer, assuming initializer is absent.
[ "Reports", "if", "declaration", "requires", "an", "initializer", "assuming", "initializer", "is", "absent", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/parser/Parser.java#L2038-L2044
james-hu/jabb-core
src/main/java/net/sf/jabb/util/parallel/BackoffStrategies.java
BackoffStrategies.randomBackoff
public static BackoffStrategy randomBackoff(long maximumTime, TimeUnit timeUnit) { """ Returns a strategy that waits a random amount of time before retrying. @param maximumTime the maximum time to wait @param timeUnit the unit of the maximum time @return a backoff strategy with a random wait time @throws ...
java
public static BackoffStrategy randomBackoff(long maximumTime, TimeUnit timeUnit) { Preconditions.checkNotNull(timeUnit, "The time unit may not be null"); return new RandomBackoffStrategy(0L, timeUnit.toMillis(maximumTime)); }
[ "public", "static", "BackoffStrategy", "randomBackoff", "(", "long", "maximumTime", ",", "TimeUnit", "timeUnit", ")", "{", "Preconditions", ".", "checkNotNull", "(", "timeUnit", ",", "\"The time unit may not be null\"", ")", ";", "return", "new", "RandomBackoffStrategy"...
Returns a strategy that waits a random amount of time before retrying. @param maximumTime the maximum time to wait @param timeUnit the unit of the maximum time @return a backoff strategy with a random wait time @throws IllegalStateException if the maximum wait time is &lt;= 0.
[ "Returns", "a", "strategy", "that", "waits", "a", "random", "amount", "of", "time", "before", "retrying", "." ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/parallel/BackoffStrategies.java#L83-L86
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java
XMLConfigAdmin.createSecurityManager
public void createSecurityManager(Password password, String id) throws DOMException, PageException { """ creates a individual security manager based on the default security manager @param id @throws DOMException @throws PageException """ checkWriteAccess(); ConfigServerImpl cs = (ConfigServerImpl) Confi...
java
public void createSecurityManager(Password password, String id) throws DOMException, PageException { checkWriteAccess(); ConfigServerImpl cs = (ConfigServerImpl) ConfigImpl.getConfigServer(config, password); SecurityManagerImpl dsm = (SecurityManagerImpl) cs.getDefaultSecurityManager().cloneSecurityManager(); cs.se...
[ "public", "void", "createSecurityManager", "(", "Password", "password", ",", "String", "id", ")", "throws", "DOMException", ",", "PageException", "{", "checkWriteAccess", "(", ")", ";", "ConfigServerImpl", "cs", "=", "(", "ConfigServerImpl", ")", "ConfigImpl", "."...
creates a individual security manager based on the default security manager @param id @throws DOMException @throws PageException
[ "creates", "a", "individual", "security", "manager", "based", "on", "the", "default", "security", "manager" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigAdmin.java#L3466-L3508
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.addField
public EmbedBuilder addField(String name, String value, boolean inline) { """ Adds a Field to the embed. <p>Note: If a blank string is provided to either {@code name} or {@code value}, the blank string is replaced with {@link net.dv8tion.jda.core.EmbedBuilder#ZERO_WIDTH_SPACE}. <p><b><a href="http://i.imgur...
java
public EmbedBuilder addField(String name, String value, boolean inline) { if (name == null && value == null) return this; this.fields.add(new MessageEmbed.Field(name, value, inline)); return this; }
[ "public", "EmbedBuilder", "addField", "(", "String", "name", ",", "String", "value", ",", "boolean", "inline", ")", "{", "if", "(", "name", "==", "null", "&&", "value", "==", "null", ")", "return", "this", ";", "this", ".", "fields", ".", "add", "(", ...
Adds a Field to the embed. <p>Note: If a blank string is provided to either {@code name} or {@code value}, the blank string is replaced with {@link net.dv8tion.jda.core.EmbedBuilder#ZERO_WIDTH_SPACE}. <p><b><a href="http://i.imgur.com/gnjzCoo.png">Example of Inline</a></b> <p><b><a href="http://i.imgur.com/Ky0KlsT.pn...
[ "Adds", "a", "Field", "to", "the", "embed", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L716-L722
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/MapRow.java
MapRow.getTimestamp
public Date getTimestamp(FastTrackField dateName, FastTrackField timeName) { """ Retrieve a timestamp field. @param dateName field containing the date component @param timeName field containing the time component @return Date instance """ Date result = null; Date date = getDate(dateName); ...
java
public Date getTimestamp(FastTrackField dateName, FastTrackField timeName) { Date result = null; Date date = getDate(dateName); if (date != null) { Calendar dateCal = DateHelper.popCalendar(date); Date time = getDate(timeName); if (time != null) { ...
[ "public", "Date", "getTimestamp", "(", "FastTrackField", "dateName", ",", "FastTrackField", "timeName", ")", "{", "Date", "result", "=", "null", ";", "Date", "date", "=", "getDate", "(", "dateName", ")", ";", "if", "(", "date", "!=", "null", ")", "{", "C...
Retrieve a timestamp field. @param dateName field containing the date component @param timeName field containing the time component @return Date instance
[ "Retrieve", "a", "timestamp", "field", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/MapRow.java#L132-L155
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/eltorito/impl/ElToritoConfig.java
ElToritoConfig.setGenBootInfoTable
public void setGenBootInfoTable(boolean genBootInfoTable) throws ConfigException { """ Set Boot Info Table (only allowed for no-emulation images) @param genBootInfoTable Whether to generate a boot info table """ if (!genBootInfoTable || this.bootMediaType == ElToritoConfig.BOOT_MEDIA_TYPE_NO_EMU) { ...
java
public void setGenBootInfoTable(boolean genBootInfoTable) throws ConfigException { if (!genBootInfoTable || this.bootMediaType == ElToritoConfig.BOOT_MEDIA_TYPE_NO_EMU) { this.genBootInfoTable = genBootInfoTable; } else { throw new ConfigException(this, "Boot info table generatio...
[ "public", "void", "setGenBootInfoTable", "(", "boolean", "genBootInfoTable", ")", "throws", "ConfigException", "{", "if", "(", "!", "genBootInfoTable", "||", "this", ".", "bootMediaType", "==", "ElToritoConfig", ".", "BOOT_MEDIA_TYPE_NO_EMU", ")", "{", "this", ".", ...
Set Boot Info Table (only allowed for no-emulation images) @param genBootInfoTable Whether to generate a boot info table
[ "Set", "Boot", "Info", "Table", "(", "only", "allowed", "for", "no", "-", "emulation", "images", ")" ]
train
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/eltorito/impl/ElToritoConfig.java#L114-L120
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java
LCCore.keepMainThread
public static void keepMainThread(Runnable toContinue) { """ Because some systems may need to use the main thread for specific action (like Cocoa), we keep the current thread aside, and continue on a new thread. @param toContinue the Runnable to run on a new Thread to continue the application startup """ ...
java
public static void keepMainThread(Runnable toContinue) { mainThread = Thread.currentThread(); Thread thread = new Thread(toContinue, "LC Core - Main"); thread.start(); mainThreadLoop(); }
[ "public", "static", "void", "keepMainThread", "(", "Runnable", "toContinue", ")", "{", "mainThread", "=", "Thread", ".", "currentThread", "(", ")", ";", "Thread", "thread", "=", "new", "Thread", "(", "toContinue", ",", "\"LC Core - Main\"", ")", ";", "thread",...
Because some systems may need to use the main thread for specific action (like Cocoa), we keep the current thread aside, and continue on a new thread. @param toContinue the Runnable to run on a new Thread to continue the application startup
[ "Because", "some", "systems", "may", "need", "to", "use", "the", "main", "thread", "for", "specific", "action", "(", "like", "Cocoa", ")", "we", "keep", "the", "current", "thread", "aside", "and", "continue", "on", "a", "new", "thread", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/application/LCCore.java#L169-L174
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericInsdcHeaderFormat.java
GenericInsdcHeaderFormat._write_feature
protected String _write_feature(FeatureInterface<AbstractSequence<C>, C> feature, int record_length) { """ Write a single SeqFeature object to features table. @param feature @param record_length """ String location = _insdc_feature_location_string(feature, record_length); String f_type = feature.getType(...
java
protected String _write_feature(FeatureInterface<AbstractSequence<C>, C> feature, int record_length) { String location = _insdc_feature_location_string(feature, record_length); String f_type = feature.getType().replace(" ", "_"); StringBuilder sb = new StringBuilder(); Formatter formatter = new Formatter(sb,Loc...
[ "protected", "String", "_write_feature", "(", "FeatureInterface", "<", "AbstractSequence", "<", "C", ">", ",", "C", ">", "feature", ",", "int", "record_length", ")", "{", "String", "location", "=", "_insdc_feature_location_string", "(", "feature", ",", "record_len...
Write a single SeqFeature object to features table. @param feature @param record_length
[ "Write", "a", "single", "SeqFeature", "object", "to", "features", "table", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericInsdcHeaderFormat.java#L116-L146
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
ConstantsSummaryBuilder.buildPackageHeader
public void buildPackageHeader(XMLNode node, Content summariesTree) { """ Build the header for the given package. @param node the XML element that specifies which components to document @param summariesTree the tree to which the package header will be added """ String parsedPackageName = parsePacka...
java
public void buildPackageHeader(XMLNode node, Content summariesTree) { String parsedPackageName = parsePackageName(currentPackage.name()); if (! printedPackageHeaders.contains(parsedPackageName)) { writer.addPackageName(currentPackage, parsePackageName(currentPackage.name()), ...
[ "public", "void", "buildPackageHeader", "(", "XMLNode", "node", ",", "Content", "summariesTree", ")", "{", "String", "parsedPackageName", "=", "parsePackageName", "(", "currentPackage", ".", "name", "(", ")", ")", ";", "if", "(", "!", "printedPackageHeaders", "....
Build the header for the given package. @param node the XML element that specifies which components to document @param summariesTree the tree to which the package header will be added
[ "Build", "the", "header", "for", "the", "given", "package", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java#L192-L199
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.registerAbstract
public SerializerRegistry registerAbstract(Class<?> abstractType, int id, Class<? extends TypeSerializer> serializer) { """ Registers the given class as an abstract serializer for the given abstract type. @param abstractType The abstract type for which to register the serializer. @param id The serializable typ...
java
public SerializerRegistry registerAbstract(Class<?> abstractType, int id, Class<? extends TypeSerializer> serializer) { return registerAbstract(abstractType, id, new DefaultTypeSerializerFactory(serializer)); }
[ "public", "SerializerRegistry", "registerAbstract", "(", "Class", "<", "?", ">", "abstractType", ",", "int", "id", ",", "Class", "<", "?", "extends", "TypeSerializer", ">", "serializer", ")", "{", "return", "registerAbstract", "(", "abstractType", ",", "id", "...
Registers the given class as an abstract serializer for the given abstract type. @param abstractType The abstract type for which to register the serializer. @param id The serializable type ID. @param serializer The serializer class. @return The serializer registry.
[ "Registers", "the", "given", "class", "as", "an", "abstract", "serializer", "for", "the", "given", "abstract", "type", "." ]
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L231-L233
kite-sdk/kite
kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/Loader.java
Loader.setMetaStoreURI
private static void setMetaStoreURI( Configuration conf, Map<String, String> match) { """ Sets the MetaStore URI in the given Configuration, if there is a host in the match arguments. If there is no host, then the conf is not changed. @param conf a Configuration that will be used to connect to the MetaSt...
java
private static void setMetaStoreURI( Configuration conf, Map<String, String> match) { try { // If the host is set, construct a new MetaStore URI and set the property // in the Configuration. Otherwise, do not change the MetaStore URI. String host = match.get(URIPattern.HOST); if (host ...
[ "private", "static", "void", "setMetaStoreURI", "(", "Configuration", "conf", ",", "Map", "<", "String", ",", "String", ">", "match", ")", "{", "try", "{", "// If the host is set, construct a new MetaStore URI and set the property", "// in the Configuration. Otherwise, do not...
Sets the MetaStore URI in the given Configuration, if there is a host in the match arguments. If there is no host, then the conf is not changed. @param conf a Configuration that will be used to connect to the MetaStore @param match URIPattern match results
[ "Sets", "the", "MetaStore", "URI", "in", "the", "given", "Configuration", "if", "there", "is", "a", "host", "in", "the", "match", "arguments", ".", "If", "there", "is", "no", "host", "then", "the", "conf", "is", "not", "changed", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hive/src/main/java/org/kitesdk/data/spi/hive/Loader.java#L221-L241
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ArchiveRegistry.java
ArchiveRegistry.getValueAt
@Override public Object getValueAt(final int row, final int col) { """ Returns the value at the specified position. @param row index of the row @param col index of the column @return string representation of the specified field """ switch (col) { case 0: return archives.get(row).getType(); ...
java
@Override public Object getValueAt(final int row, final int col) { switch (col) { case 0: return archives.get(row).getType(); case 1: return archives.get(row).getStartPosition(); case 2: return archives.get(row).getPath(); } return "---"; }
[ "@", "Override", "public", "Object", "getValueAt", "(", "final", "int", "row", ",", "final", "int", "col", ")", "{", "switch", "(", "col", ")", "{", "case", "0", ":", "return", "archives", ".", "get", "(", "row", ")", ".", "getType", "(", ")", ";",...
Returns the value at the specified position. @param row index of the row @param col index of the column @return string representation of the specified field
[ "Returns", "the", "value", "at", "the", "specified", "position", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/config/gui/control/ArchiveRegistry.java#L100-L114
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/impl/edir/entry/EdirEntries.java
EdirEntries.removeGroupMembership
public static void removeGroupMembership( final ChaiUser user, final ChaiGroup group ) throws ChaiOperationException, ChaiUnavailableException { """ Remove a group membership for the supplied user and group. This implementation takes care of all four attributes used in eDirectory static group associa...
java
public static void removeGroupMembership( final ChaiUser user, final ChaiGroup group ) throws ChaiOperationException, ChaiUnavailableException { if ( user == null ) { throw new NullPointerException( "user cannot be null" ); } if ( group == null ) { ...
[ "public", "static", "void", "removeGroupMembership", "(", "final", "ChaiUser", "user", ",", "final", "ChaiGroup", "group", ")", "throws", "ChaiOperationException", ",", "ChaiUnavailableException", "{", "if", "(", "user", "==", "null", ")", "{", "throw", "new", "...
Remove a group membership for the supplied user and group. This implementation takes care of all four attributes used in eDirectory static group associations: <ul> <li>{@link com.novell.ldapchai.ChaiConstant#ATTR_LDAP_GROUP_MEMBERSHIP}</li> <li>{@link com.novell.ldapchai.ChaiConstant#ATTR_LDAP_MEMBER}</li> <li>{@link ...
[ "Remove", "a", "group", "membership", "for", "the", "supplied", "user", "and", "group", ".", "This", "implementation", "takes", "care", "of", "all", "four", "attributes", "used", "in", "eDirectory", "static", "group", "associations", ":", "<ul", ">", "<li", ...
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/impl/edir/entry/EdirEntries.java#L219-L239
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java
GregorianCalendar.setWeekDate
@Override public void setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) { """ Sets this {@code GregorianCalendar} to the date given by the date specifiers - <a href="#week_year">{@code weekYear}</a>, {@code weekOfYear}, and {@code dayOfWeek}. {@code weekOfYear} follows the <a href="#week_and_year">{@...
java
@Override public void setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) { if (dayOfWeek < SUNDAY || dayOfWeek > SATURDAY) { throw new IllegalArgumentException("invalid dayOfWeek: " + dayOfWeek); } // To avoid changing the time of day fields by date // calculations...
[ "@", "Override", "public", "void", "setWeekDate", "(", "int", "weekYear", ",", "int", "weekOfYear", ",", "int", "dayOfWeek", ")", "{", "if", "(", "dayOfWeek", "<", "SUNDAY", "||", "dayOfWeek", ">", "SATURDAY", ")", "{", "throw", "new", "IllegalArgumentExcept...
Sets this {@code GregorianCalendar} to the date given by the date specifiers - <a href="#week_year">{@code weekYear}</a>, {@code weekOfYear}, and {@code dayOfWeek}. {@code weekOfYear} follows the <a href="#week_and_year">{@code WEEK_OF_YEAR} numbering</a>. The {@code dayOfWeek} value must be one of the {@link Calendar...
[ "Sets", "this", "{", "@code", "GregorianCalendar", "}", "to", "the", "date", "given", "by", "the", "date", "specifiers", "-", "<a", "href", "=", "#week_year", ">", "{", "@code", "weekYear", "}", "<", "/", "a", ">", "{", "@code", "weekOfYear", "}", "and...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L2184-L2228
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java
Query.executeScalar
public <V> V executeScalar(Class<V> returnType) { """ Execute the PreparedStatement and return a single 'primitive' value from the ResultSet. @param returnType The type to return. @param <V> The type parameter to return a List of. @return A single result from the execution of the statement, as a type of {@lit...
java
public <V> V executeScalar(Class<V> returnType) { try (ResultSet rs = executeQuery()) { if (!rs.next()) { Object value = null; if (Integer.class == returnType) { value = 0; } else if (Long.class == returnType) { ...
[ "public", "<", "V", ">", "V", "executeScalar", "(", "Class", "<", "V", ">", "returnType", ")", "{", "try", "(", "ResultSet", "rs", "=", "executeQuery", "(", ")", ")", "{", "if", "(", "!", "rs", ".", "next", "(", ")", ")", "{", "Object", "value", ...
Execute the PreparedStatement and return a single 'primitive' value from the ResultSet. @param returnType The type to return. @param <V> The type parameter to return a List of. @return A single result from the execution of the statement, as a type of {@literal returnType}. @throws ApplicationException {@literal retur...
[ "Execute", "the", "PreparedStatement", "and", "return", "a", "single", "primitive", "value", "from", "the", "ResultSet", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/Query.java#L332-L350
wuman/orientdb-android
commons/src/main/java/com/orientechnologies/common/collection/OMVRBTree.java
OMVRBTree.valEquals
final static boolean valEquals(final Object o1, final Object o2) { """ Test two values for equality. Differs from o1.equals(o2) only in that it copes with <tt>null</tt> o1 properly. """ return (o1 == null ? o2 == null : o1.equals(o2)); }
java
final static boolean valEquals(final Object o1, final Object o2) { return (o1 == null ? o2 == null : o1.equals(o2)); }
[ "final", "static", "boolean", "valEquals", "(", "final", "Object", "o1", ",", "final", "Object", "o2", ")", "{", "return", "(", "o1", "==", "null", "?", "o2", "==", "null", ":", "o1", ".", "equals", "(", "o2", ")", ")", ";", "}" ]
Test two values for equality. Differs from o1.equals(o2) only in that it copes with <tt>null</tt> o1 properly.
[ "Test", "two", "values", "for", "equality", ".", "Differs", "from", "o1", ".", "equals", "(", "o2", ")", "only", "in", "that", "it", "copes", "with", "<tt", ">", "null<", "/", "tt", ">", "o1", "properly", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/commons/src/main/java/com/orientechnologies/common/collection/OMVRBTree.java#L1435-L1437
google/closure-compiler
src/com/google/javascript/refactoring/ErrorToFixMapper.java
ErrorToFixMapper.getFixForEarlyReference
private static SuggestedFix getFixForEarlyReference(JSError error, AbstractCompiler compiler) { """ This fix is not ideal. It trades one warning (JSC_REFERENCE_BEFORE_DECLARE) for another (JSC_REDECLARED_VARIABLE). But after running the fixer once, you can then run it again and #getFixForRedeclaration will take ...
java
private static SuggestedFix getFixForEarlyReference(JSError error, AbstractCompiler compiler) { Matcher m = EARLY_REF.matcher(error.description); if (m.matches()) { String name = m.group(1); Node stmt = NodeUtil.getEnclosingStatement(error.node); return new SuggestedFix.Builder() .at...
[ "private", "static", "SuggestedFix", "getFixForEarlyReference", "(", "JSError", "error", ",", "AbstractCompiler", "compiler", ")", "{", "Matcher", "m", "=", "EARLY_REF", ".", "matcher", "(", "error", ".", "description", ")", ";", "if", "(", "m", ".", "matches"...
This fix is not ideal. It trades one warning (JSC_REFERENCE_BEFORE_DECLARE) for another (JSC_REDECLARED_VARIABLE). But after running the fixer once, you can then run it again and #getFixForRedeclaration will take care of the JSC_REDECLARED_VARIABLE warning.
[ "This", "fix", "is", "not", "ideal", ".", "It", "trades", "one", "warning", "(", "JSC_REFERENCE_BEFORE_DECLARE", ")", "for", "another", "(", "JSC_REDECLARED_VARIABLE", ")", ".", "But", "after", "running", "the", "fixer", "once", "you", "can", "then", "run", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/ErrorToFixMapper.java#L182-L193
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2017_03_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_03_01/implementation/RegistriesInner.java
RegistriesInner.updateAsync
public Observable<RegistryInner> updateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { """ Updates a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @para...
java
public Observable<RegistryInner> updateAsync(String resourceGroupName, String registryName, RegistryUpdateParameters registryUpdateParameters) { return updateWithServiceResponseAsync(resourceGroupName, registryName, registryUpdateParameters).map(new Func1<ServiceResponse<RegistryInner>, RegistryInner>() { ...
[ "public", "Observable", "<", "RegistryInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "RegistryUpdateParameters", "registryUpdateParameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ...
Updates a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param registryUpdateParameters The parameters for updating a container registry. @throws IllegalArgumentE...
[ "Updates", "a", "container", "registry", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2017_03_01/src/main/java/com/microsoft/azure/management/containerregistry/v2017_03_01/implementation/RegistriesInner.java#L587-L594
TNG/JGiven
jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionParser.java
ConfigOptionParser.printSuggestion
private void printSuggestion( String arg, List<ConfigOption> co ) { """ Prints a suggestion to stderr for the argument based on the levenshtein distance metric @param arg the argument which could not be assigned to a flag @param co the {@link ConfigOption} List where every flag is stored """ List<C...
java
private void printSuggestion( String arg, List<ConfigOption> co ) { List<ConfigOption> sortedList = new ArrayList<ConfigOption>( co ); Collections.sort( sortedList, new ConfigOptionLevenshteinDistance( arg ) ); System.err.println( "Parse error for argument \"" + arg + "\", did you mean " + sorte...
[ "private", "void", "printSuggestion", "(", "String", "arg", ",", "List", "<", "ConfigOption", ">", "co", ")", "{", "List", "<", "ConfigOption", ">", "sortedList", "=", "new", "ArrayList", "<", "ConfigOption", ">", "(", "co", ")", ";", "Collections", ".", ...
Prints a suggestion to stderr for the argument based on the levenshtein distance metric @param arg the argument which could not be assigned to a flag @param co the {@link ConfigOption} List where every flag is stored
[ "Prints", "a", "suggestion", "to", "stderr", "for", "the", "argument", "based", "on", "the", "levenshtein", "distance", "metric" ]
train
https://github.com/TNG/JGiven/blob/1a69248fc6d7eb380cdc4542e3be273842889748/jgiven-core/src/main/java/com/tngtech/jgiven/report/config/ConfigOptionParser.java#L149-L155
phax/ph-oton
ph-oton-core/src/main/java/com/helger/photon/core/uistate/UIStateRegistry.java
UIStateRegistry.registerState
@Nonnull @SuppressFBWarnings ("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") public EChange registerState (@Nonnull @Nonempty final String sStateID, @Nonnull final IHasUIState aNewState) { """ Registers a new control for the passed tree ID @param sStateID the ID of the state in register. May neither be <code>...
java
@Nonnull @SuppressFBWarnings ("RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE") public EChange registerState (@Nonnull @Nonempty final String sStateID, @Nonnull final IHasUIState aNewState) { ValueEnforcer.notEmpty (sStateID, "StateID"); ValueEnforcer.notNull (aNewState, "NewState"); final ObjectType aOT =...
[ "@", "Nonnull", "@", "SuppressFBWarnings", "(", "\"RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE\"", ")", "public", "EChange", "registerState", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sStateID", ",", "@", "Nonnull", "final", "IHasUIState", "aNewState", ")...
Registers a new control for the passed tree ID @param sStateID the ID of the state in register. May neither be <code>null</code> nor empty. @param aNewState The state to set. May not be <code>null</code>. @return {@link EChange#CHANGED} if the control was registered<br> {@link EChange#UNCHANGED} if an illegal argument...
[ "Registers", "a", "new", "control", "for", "the", "passed", "tree", "ID" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/uistate/UIStateRegistry.java#L156-L176
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WAbbrTextRenderer.java
WAbbrTextRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WAbbrText. @param component the WAbbrText to paint. @param renderContext the RenderContext to paint to. """ WAbbrText abbrText = (WAbbrText) component; XmlStringBuilder xml = rend...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WAbbrText abbrText = (WAbbrText) component; XmlStringBuilder xml = renderContext.getWriter(); xml.appendTagOpen("abbr"); xml.appendOptionalAttribute("title", abbrText.getToolTip()); xml.appendOptionalAttrib...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WAbbrText", "abbrText", "=", "(", "WAbbrText", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderCo...
Paints the given WAbbrText. @param component the WAbbrText to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WAbbrText", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WAbbrTextRenderer.java#L23-L34
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
GetCommand.generateCacheControl
private String generateCacheControl(Map<MediaType, String> cacheControlMap, String contentType) { """ Generates the value of Cache-Control header according to the content type. @param contentType content type @return Cache-Control value """ ArrayList<MediaType> mediaTypesList = new ArrayList<Media...
java
private String generateCacheControl(Map<MediaType, String> cacheControlMap, String contentType) { ArrayList<MediaType> mediaTypesList = new ArrayList<MediaType>(cacheControlMap.keySet()); Collections.sort(mediaTypesList, MediaTypeHelper.MEDIA_TYPE_COMPARATOR); String cacheControlValue = "no-c...
[ "private", "String", "generateCacheControl", "(", "Map", "<", "MediaType", ",", "String", ">", "cacheControlMap", ",", "String", "contentType", ")", "{", "ArrayList", "<", "MediaType", ">", "mediaTypesList", "=", "new", "ArrayList", "<", "MediaType", ">", "(", ...
Generates the value of Cache-Control header according to the content type. @param contentType content type @return Cache-Control value
[ "Generates", "the", "value", "of", "Cache", "-", "Control", "header", "according", "to", "the", "content", "type", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java#L333-L359
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/sorting/SortUtils.java
SortUtils.rowComparator
public static IntComparator rowComparator(Column<?> column, Sort.Order order) { """ Returns a comparator for the column matching the specified name @param column The column to sort @param order Specifies whether the sort should be in ascending or descending order """ IntComparator rowCompa...
java
public static IntComparator rowComparator(Column<?> column, Sort.Order order) { IntComparator rowComparator = column.rowComparator(); if (order == Sort.Order.DESCEND) { return ReversingIntComparator.reverse(rowComparator); } else { return rowComparator; } }
[ "public", "static", "IntComparator", "rowComparator", "(", "Column", "<", "?", ">", "column", ",", "Sort", ".", "Order", "order", ")", "{", "IntComparator", "rowComparator", "=", "column", ".", "rowComparator", "(", ")", ";", "if", "(", "order", "==", "Sor...
Returns a comparator for the column matching the specified name @param column The column to sort @param order Specifies whether the sort should be in ascending or descending order
[ "Returns", "a", "comparator", "for", "the", "column", "matching", "the", "specified", "name" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/sorting/SortUtils.java#L37-L44
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.getInstanceView
public VirtualMachineScaleSetInstanceViewInner getInstanceView(String resourceGroupName, String vmScaleSetName) { """ Gets the status of a VM scale set instance. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown...
java
public VirtualMachineScaleSetInstanceViewInner getInstanceView(String resourceGroupName, String vmScaleSetName) { return getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().body(); }
[ "public", "VirtualMachineScaleSetInstanceViewInner", "getInstanceView", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "getInstanceViewWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", ".", "toBlocking", ...
Gets the status of a VM scale set instance. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException ...
[ "Gets", "the", "status", "of", "a", "VM", "scale", "set", "instance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L1295-L1297
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/AbstractRedisClient.java
AbstractRedisClient.setDefaultTimeout
@Deprecated public void setDefaultTimeout(long timeout, TimeUnit unit) { """ Set the default timeout for connections created by this client. The timeout applies to connection attempts and non-blocking commands. @param timeout Default connection timeout. @param unit Unit of time for the timeout. @deprecat...
java
@Deprecated public void setDefaultTimeout(long timeout, TimeUnit unit) { setDefaultTimeout(Duration.ofNanos(unit.toNanos(timeout))); }
[ "@", "Deprecated", "public", "void", "setDefaultTimeout", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "{", "setDefaultTimeout", "(", "Duration", ".", "ofNanos", "(", "unit", ".", "toNanos", "(", "timeout", ")", ")", ")", ";", "}" ]
Set the default timeout for connections created by this client. The timeout applies to connection attempts and non-blocking commands. @param timeout Default connection timeout. @param unit Unit of time for the timeout. @deprecated since 5.0, use {@link #setDefaultTimeout(Duration)}.
[ "Set", "the", "default", "timeout", "for", "connections", "created", "by", "this", "client", ".", "The", "timeout", "applies", "to", "connection", "attempts", "and", "non", "-", "blocking", "commands", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/AbstractRedisClient.java#L131-L134
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.bitUnSet
public static void bitUnSet(MemorySegment[] segments, int baseOffset, int index) { """ unset bit from segments. @param segments target segments. @param baseOffset bits base offset. @param index bit index from base offset. """ if (segments.length == 1) { MemorySegment segment = segments[0]; int off...
java
public static void bitUnSet(MemorySegment[] segments, int baseOffset, int index) { if (segments.length == 1) { MemorySegment segment = segments[0]; int offset = baseOffset + ((index & BIT_BYTE_POSITION_MASK) >>> 3); byte current = segment.get(offset); current &= ~(1 << (index & BIT_BYTE_INDEX_MASK)); s...
[ "public", "static", "void", "bitUnSet", "(", "MemorySegment", "[", "]", "segments", ",", "int", "baseOffset", ",", "int", "index", ")", "{", "if", "(", "segments", ".", "length", "==", "1", ")", "{", "MemorySegment", "segment", "=", "segments", "[", "0",...
unset bit from segments. @param segments target segments. @param baseOffset bits base offset. @param index bit index from base offset.
[ "unset", "bit", "from", "segments", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L460-L470
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/vector/VectorMath.java
VectorMath.dotProduct
public static double dotProduct(Vector x, Vector y) { """ Computes the dot product, {@code x}<sup>T</sup>{@code y} of the two vectors. @param x the left vector that will be transposed @param y the right vector @return the dot product of the two vectors. @throws IllegalArgumentException if the two vector...
java
public static double dotProduct(Vector x, Vector y) { // If both of the vectors are integer vectors, cast and special case if (x instanceof IntegerVector && y instanceof IntegerVector) return dotProduct((IntegerVector)x, (IntegerVector)y); // Otherwise, just make both vectors double ...
[ "public", "static", "double", "dotProduct", "(", "Vector", "x", ",", "Vector", "y", ")", "{", "// If both of the vectors are integer vectors, cast and special case", "if", "(", "x", "instanceof", "IntegerVector", "&&", "y", "instanceof", "IntegerVector", ")", "return", ...
Computes the dot product, {@code x}<sup>T</sup>{@code y} of the two vectors. @param x the left vector that will be transposed @param y the right vector @return the dot product of the two vectors. @throws IllegalArgumentException if the two vectors are not of equal length
[ "Computes", "the", "dot", "product", "{", "@code", "x", "}", "<sup", ">", "T<", "/", "sup", ">", "{", "@code", "y", "}", "of", "the", "two", "vectors", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/vector/VectorMath.java#L306-L314
knowm/XChange
xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceRawCore.java
DSXMarketDataServiceRawCore.getDSXOrderbook
public DSXOrderbookWrapper getDSXOrderbook(String pairs, String type) throws IOException { """ Get market depth from exchange @param pairs String of currency pairs to retrieve (e.g. "btcusd-btceur") @return DSXOrderbookWrapper object @throws IOException """ return dsx.getOrderbook(pairs.toLowerCase()...
java
public DSXOrderbookWrapper getDSXOrderbook(String pairs, String type) throws IOException { return dsx.getOrderbook(pairs.toLowerCase(), 1, type); }
[ "public", "DSXOrderbookWrapper", "getDSXOrderbook", "(", "String", "pairs", ",", "String", "type", ")", "throws", "IOException", "{", "return", "dsx", ".", "getOrderbook", "(", "pairs", ".", "toLowerCase", "(", ")", ",", "1", ",", "type", ")", ";", "}" ]
Get market depth from exchange @param pairs String of currency pairs to retrieve (e.g. "btcusd-btceur") @return DSXOrderbookWrapper object @throws IOException
[ "Get", "market", "depth", "from", "exchange" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceRawCore.java#L45-L48
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultPluginRegistry.java
DefaultPluginRegistry.downloadArtifactTo
protected void downloadArtifactTo(URL artifactUrl, File pluginFile, IAsyncResultHandler<File> handler) { """ Download the artifact at the given URL and store it locally into the given plugin file path. """ InputStream istream = null; OutputStream ostream = null; try { URLCo...
java
protected void downloadArtifactTo(URL artifactUrl, File pluginFile, IAsyncResultHandler<File> handler) { InputStream istream = null; OutputStream ostream = null; try { URLConnection connection = artifactUrl.openConnection(); connection.connect(); if (connectio...
[ "protected", "void", "downloadArtifactTo", "(", "URL", "artifactUrl", ",", "File", "pluginFile", ",", "IAsyncResultHandler", "<", "File", ">", "handler", ")", "{", "InputStream", "istream", "=", "null", ";", "OutputStream", "ostream", "=", "null", ";", "try", ...
Download the artifact at the given URL and store it locally into the given plugin file path.
[ "Download", "the", "artifact", "at", "the", "given", "URL", "and", "store", "it", "locally", "into", "the", "given", "plugin", "file", "path", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/DefaultPluginRegistry.java#L375-L399
httpcache4j/httpcache4j
httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java
Conditionals.ifUnModifiedSince
public Conditionals ifUnModifiedSince(LocalDateTime time) { """ You should use the server's time here. Otherwise you might get unexpected results. The typical use case is: <pre> HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifUnModifi...
java
public Conditionals ifUnModifiedSince(LocalDateTime time) { Preconditions.checkArgument(noneMatch.isEmpty(), String.format(ERROR_MESSAGE, HeaderConstants.IF_UNMODIFIED_SINCE, HeaderConstants.IF_NONE_MATCH)); Preconditions.checkArgument(!modifiedSince.isPresent(), String.format(ERROR_MESSAGE, HeaderConst...
[ "public", "Conditionals", "ifUnModifiedSince", "(", "LocalDateTime", "time", ")", "{", "Preconditions", ".", "checkArgument", "(", "noneMatch", ".", "isEmpty", "(", ")", ",", "String", ".", "format", "(", "ERROR_MESSAGE", ",", "HeaderConstants", ".", "IF_UNMODIFIE...
You should use the server's time here. Otherwise you might get unexpected results. The typical use case is: <pre> HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifUnModifiedSince(response.getLastModified()); </pre> @param time the time to check. ...
[ "You", "should", "use", "the", "server", "s", "time", "here", ".", "Otherwise", "you", "might", "get", "unexpected", "results", ".", "The", "typical", "use", "case", "is", ":" ]
train
https://github.com/httpcache4j/httpcache4j/blob/9c07ebd63cd104a99eb9e771f760f14efa4fe0f6/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/Conditionals.java#L181-L186
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getUsersAssignedToPrivilegesBatch
private String getUsersAssignedToPrivilegesBatch(List<Long> userIds, URIBuilder url, OAuthClientRequest bearerRequest, OneloginOAuth2JSONResourceResponse oAuth2Response) { """ Get a batch of users assigned to privilege. @param userIds @param url @param bearerRequest @param oAuth2Response @return The Ba...
java
private String getUsersAssignedToPrivilegesBatch(List<Long> userIds, URIBuilder url, OAuthClientRequest bearerRequest, OneloginOAuth2JSONResourceResponse oAuth2Response) { if (oAuth2Response.getResponseCode() == 200) { JSONArray dataArray = (JSONArray)oAuth2Response.getFromContent("users"); for (int i = 0; i...
[ "private", "String", "getUsersAssignedToPrivilegesBatch", "(", "List", "<", "Long", ">", "userIds", ",", "URIBuilder", "url", ",", "OAuthClientRequest", "bearerRequest", ",", "OneloginOAuth2JSONResourceResponse", "oAuth2Response", ")", "{", "if", "(", "oAuth2Response", ...
Get a batch of users assigned to privilege. @param userIds @param url @param bearerRequest @param oAuth2Response @return The Batch reference @see <a target="_blank" href="https://developers.onelogin.com/api-docs/1/users/get-users">Get Users documentation</a>
[ "Get", "a", "batch", "of", "users", "assigned", "to", "privilege", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L3761-L3774
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java
UpstreamComitterRecipientProvider.addUpstreamCommittersTriggeringBuild
private void addUpstreamCommittersTriggeringBuild(Run<?, ?> build, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, final ExtendedEmailPublisherContext context, RecipientProviderUtilities.IDebug debug) { """ Adds for the given upstream build the committers to the recipient l...
java
private void addUpstreamCommittersTriggeringBuild(Run<?, ?> build, Set<InternetAddress> to, Set<InternetAddress> cc, Set<InternetAddress> bcc, EnvVars env, final ExtendedEmailPublisherContext context, RecipientProviderUtilities.IDebug debug) { debug.send("Adding upstream committer from job %s with build number ...
[ "private", "void", "addUpstreamCommittersTriggeringBuild", "(", "Run", "<", "?", ",", "?", ">", "build", ",", "Set", "<", "InternetAddress", ">", "to", ",", "Set", "<", "InternetAddress", ">", "cc", ",", "Set", "<", "InternetAddress", ">", "bcc", ",", "Env...
Adds for the given upstream build the committers to the recipient list for each commit in the upstream build. @param build the upstream build @param to the to recipient list @param cc the cc recipient list @param bcc the bcc recipient list @param env @param listener
[ "Adds", "for", "the", "given", "upstream", "build", "the", "committers", "to", "the", "recipient", "list", "for", "each", "commit", "in", "the", "upstream", "build", "." ]
train
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/recipients/UpstreamComitterRecipientProvider.java#L77-L101
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/FacebookAppLinkResolver.java
FacebookAppLinkResolver.getAppLinkFromUrlInBackground
public Task<AppLink> getAppLinkFromUrlInBackground(final Uri uri) { """ Asynchronously resolves App Link data for the passed in Uri @param uri Uri to be resolved into an App Link @return A Task that, when successful, will return an AppLink for the passed in Uri. This may be null if no App Link data was found ...
java
public Task<AppLink> getAppLinkFromUrlInBackground(final Uri uri) { ArrayList<Uri> uris = new ArrayList<Uri>(); uris.add(uri); Task<Map<Uri, AppLink>> resolveTask = getAppLinkFromUrlsInBackground(uris); return resolveTask.onSuccess(new Continuation<Map<Uri, AppLink>, AppLink>() { ...
[ "public", "Task", "<", "AppLink", ">", "getAppLinkFromUrlInBackground", "(", "final", "Uri", "uri", ")", "{", "ArrayList", "<", "Uri", ">", "uris", "=", "new", "ArrayList", "<", "Uri", ">", "(", ")", ";", "uris", ".", "add", "(", "uri", ")", ";", "Ta...
Asynchronously resolves App Link data for the passed in Uri @param uri Uri to be resolved into an App Link @return A Task that, when successful, will return an AppLink for the passed in Uri. This may be null if no App Link data was found for this Uri. In the case of general server errors, the task will be completed wi...
[ "Asynchronously", "resolves", "App", "Link", "data", "for", "the", "passed", "in", "Uri" ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/FacebookAppLinkResolver.java#L58-L70
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.profile_setProfileFBML
public boolean profile_setProfileFBML(CharSequence fbmlMarkup, Long profileId) throws FacebookException, IOException { """ Sets the FBML for a profile box on the user or page profile with ID <code>profileId</code>. @param fbmlMarkup refer to the FBML documentation for a description of the markup and its role ...
java
public boolean profile_setProfileFBML(CharSequence fbmlMarkup, Long profileId) throws FacebookException, IOException { return profile_setFBML(fbmlMarkup, /* profileActionFbmlMarkup */null, /* mobileFbmlMarkup */null, profileId); }
[ "public", "boolean", "profile_setProfileFBML", "(", "CharSequence", "fbmlMarkup", ",", "Long", "profileId", ")", "throws", "FacebookException", ",", "IOException", "{", "return", "profile_setFBML", "(", "fbmlMarkup", ",", "/* profileActionFbmlMarkup */", "null", ",", "/...
Sets the FBML for a profile box on the user or page profile with ID <code>profileId</code>. @param fbmlMarkup refer to the FBML documentation for a description of the markup and its role in various contexts @param profileId a page or user ID (null for the logged-in user) @return a boolean indicating whether the FBML wa...
[ "Sets", "the", "FBML", "for", "a", "profile", "box", "on", "the", "user", "or", "page", "profile", "with", "ID", "<code", ">", "profileId<", "/", "code", ">", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1475-L1478
square/dagger
compiler/src/main/java/dagger/internal/codegen/InjectAdapterProcessor.java
InjectAdapterProcessor.generateStaticInjection
private void generateStaticInjection(TypeElement type, List<Element> fields) throws IOException { """ Write a companion class for {@code type} that extends {@link StaticInjection}. """ ClassName typeName = ClassName.get(type); ClassName adapterClassName = adapterName(ClassName.get(type), STATIC_INJECTI...
java
private void generateStaticInjection(TypeElement type, List<Element> fields) throws IOException { ClassName typeName = ClassName.get(type); ClassName adapterClassName = adapterName(ClassName.get(type), STATIC_INJECTION_SUFFIX); TypeSpec.Builder result = TypeSpec.classBuilder(adapterClassName.simpleName()) ...
[ "private", "void", "generateStaticInjection", "(", "TypeElement", "type", ",", "List", "<", "Element", ">", "fields", ")", "throws", "IOException", "{", "ClassName", "typeName", "=", "ClassName", ".", "get", "(", "type", ")", ";", "ClassName", "adapterClassName"...
Write a companion class for {@code type} that extends {@link StaticInjection}.
[ "Write", "a", "companion", "class", "for", "{" ]
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/compiler/src/main/java/dagger/internal/codegen/InjectAdapterProcessor.java#L304-L324
fernandospr/javapns-jdk16
src/main/java/javapns/Push.java
Push.combined
public static PushedNotifications combined(String message, int badge, String sound, Object keystore, String password, boolean production, Object devices) throws CommunicationException, KeystoreException { """ Push a notification combining an alert, a badge and a sound. @param message the alert message to push (...
java
public static PushedNotifications combined(String message, int badge, String sound, Object keystore, String password, boolean production, Object devices) throws CommunicationException, KeystoreException { return sendPayload(PushNotificationPayload.combined(message, badge, sound), keystore, password, production, devic...
[ "public", "static", "PushedNotifications", "combined", "(", "String", "message", ",", "int", "badge", ",", "String", "sound", ",", "Object", "keystore", ",", "String", "password", ",", "boolean", "production", ",", "Object", "devices", ")", "throws", "Communicat...
Push a notification combining an alert, a badge and a sound. @param message the alert message to push (set to null to skip). @param badge the badge number to push (set to -1 to skip). @param sound the sound name to push (set to null to skip). @param keystore a keystore containing your private key and the certificate s...
[ "Push", "a", "notification", "combining", "an", "alert", "a", "badge", "and", "a", "sound", "." ]
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/Push.java#L99-L101
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/config/AbstractInterfaceConfig.java
AbstractInterfaceConfig.setParameter
public S setParameter(String key, String value) { """ Sets parameter. @param key the key @param value the value @return the parameter """ if (parameters == null) { parameters = new ConcurrentHashMap<String, String>(); } if (value == null) { parameters.remo...
java
public S setParameter(String key, String value) { if (parameters == null) { parameters = new ConcurrentHashMap<String, String>(); } if (value == null) { parameters.remove(key); } else { parameters.put(key, value); } return castThis(); ...
[ "public", "S", "setParameter", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "parameters", "==", "null", ")", "{", "parameters", "=", "new", "ConcurrentHashMap", "<", "String", ",", "String", ">", "(", ")", ";", "}", "if", "(", "...
Sets parameter. @param key the key @param value the value @return the parameter
[ "Sets", "parameter", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/config/AbstractInterfaceConfig.java#L984-L994
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/ThreadContext.java
ThreadContext.setOutboundConnectionInfoInternal
public void setOutboundConnectionInfoInternal(Map<String, Object> connectionInfo) { """ Set the internal outbound connection info object for this context. @param connectionInfo """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setOutboundConnectionInfoInt...
java
public void setOutboundConnectionInfoInternal(Map<String, Object> connectionInfo) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "setOutboundConnectionInfoInternal :" + connectionInfo); this.outboundConnectionInfoInternal = connectionInfo; }
[ "public", "void", "setOutboundConnectionInfoInternal", "(", "Map", "<", "String", ",", "Object", ">", "connectionInfo", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", ...
Set the internal outbound connection info object for this context. @param connectionInfo
[ "Set", "the", "internal", "outbound", "connection", "info", "object", "for", "this", "context", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/ThreadContext.java#L224-L228
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/route/RouteFetcher.java
RouteFetcher.findRouteFromRouteProgress
public void findRouteFromRouteProgress(Location location, RouteProgress routeProgress) { """ Calculates a new {@link com.mapbox.api.directions.v5.models.DirectionsRoute} given the current {@link Location} and {@link RouteProgress} along the route. <p> Uses {@link RouteOptions#coordinates()} and {@link RouteProg...
java
public void findRouteFromRouteProgress(Location location, RouteProgress routeProgress) { this.routeProgress = routeProgress; NavigationRoute.Builder builder = buildRequestFrom(location, routeProgress); findRouteWith(builder); }
[ "public", "void", "findRouteFromRouteProgress", "(", "Location", "location", ",", "RouteProgress", "routeProgress", ")", "{", "this", ".", "routeProgress", "=", "routeProgress", ";", "NavigationRoute", ".", "Builder", "builder", "=", "buildRequestFrom", "(", "location...
Calculates a new {@link com.mapbox.api.directions.v5.models.DirectionsRoute} given the current {@link Location} and {@link RouteProgress} along the route. <p> Uses {@link RouteOptions#coordinates()} and {@link RouteProgress#remainingWaypoints()} to determine the amount of remaining waypoints there are along the given r...
[ "Calculates", "a", "new", "{", "@link", "com", ".", "mapbox", ".", "api", ".", "directions", ".", "v5", ".", "models", ".", "DirectionsRoute", "}", "given", "the", "current", "{", "@link", "Location", "}", "and", "{", "@link", "RouteProgress", "}", "alon...
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/route/RouteFetcher.java#L98-L102
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.getValue
public static String getValue(Map<String,String> map, String key, String defaultValue) { """ Returns the value contained in a map of string if it exists using the key. @param map a map of string @param key a string @param defaultValue the default value """ return map.containsKey( key ) ? map.get( key ) : ...
java
public static String getValue(Map<String,String> map, String key, String defaultValue) { return map.containsKey( key ) ? map.get( key ) : defaultValue; }
[ "public", "static", "String", "getValue", "(", "Map", "<", "String", ",", "String", ">", "map", ",", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "map", ".", "containsKey", "(", "key", ")", "?", "map", ".", "get", "(", "key", "...
Returns the value contained in a map of string if it exists using the key. @param map a map of string @param key a string @param defaultValue the default value
[ "Returns", "the", "value", "contained", "in", "a", "map", "of", "string", "if", "it", "exists", "using", "the", "key", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1285-L1287
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java
NodeReportsInner.listByNodeWithServiceResponseAsync
public Observable<ServiceResponse<Page<DscNodeReportInner>>> listByNodeWithServiceResponseAsync(final String resourceGroupName, final String automationAccountName, final String nodeId, final String filter) { """ Retrieve the Dsc node report list by node id. @param resourceGroupName Name of an Azure Resource gro...
java
public Observable<ServiceResponse<Page<DscNodeReportInner>>> listByNodeWithServiceResponseAsync(final String resourceGroupName, final String automationAccountName, final String nodeId, final String filter) { return listByNodeSinglePageAsync(resourceGroupName, automationAccountName, nodeId, filter) ....
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "DscNodeReportInner", ">", ">", ">", "listByNodeWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "automationAccountName", ",", "final", "String", "nodeId", ...
Retrieve the Dsc node report list by node id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId The parameters supplied to the list operation. @param filter The filter to apply on the operation. @throws IllegalArgumentException thro...
[ "Retrieve", "the", "Dsc", "node", "report", "list", "by", "node", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java#L276-L288
Claudenw/junit-contracts
junit/src/main/java/org/xenei/junit/contract/MethodUtils.java
MethodUtils.findAnnotatedGetter
public static Method findAnnotatedGetter(Class<?> cls, Class<? extends Annotation> class1) { """ Find a getter with the specified annotation. getter must be annotated, return a value, not be abstract and not take any parameters and is public. @param cls Class that declares the method to find. @param class1 ...
java
public static Method findAnnotatedGetter(Class<?> cls, Class<? extends Annotation> class1) { for (final Method m : cls.getDeclaredMethods()) { if (m.getAnnotation( class1 ) != null) { if (!m.getReturnType().equals( Void.TYPE ) && !Modifier.isAbstract( m.getModifiers() ) ...
[ "public", "static", "Method", "findAnnotatedGetter", "(", "Class", "<", "?", ">", "cls", ",", "Class", "<", "?", "extends", "Annotation", ">", "class1", ")", "{", "for", "(", "final", "Method", "m", ":", "cls", ".", "getDeclaredMethods", "(", ")", ")", ...
Find a getter with the specified annotation. getter must be annotated, return a value, not be abstract and not take any parameters and is public. @param cls Class that declares the method to find. @param class1 the annotation to find. @return getter method or null
[ "Find", "a", "getter", "with", "the", "specified", "annotation", ".", "getter", "must", "be", "annotated", "return", "a", "value", "not", "be", "abstract", "and", "not", "take", "any", "parameters", "and", "is", "public", "." ]
train
https://github.com/Claudenw/junit-contracts/blob/47e7294dbff374cdd875b3aafe28db48a37fe4d4/junit/src/main/java/org/xenei/junit/contract/MethodUtils.java#L41-L53
dita-ot/dita-ot
src/main/java/org/dita/dost/util/MergeUtils.java
MergeUtils.addId
public void addId(final URI id, final String value) { """ Add topic id-value pairs to idMap. @param id id @param value value """ if (id != null && value != null) { final URI localId = id.normalize(); final String localValue = value.trim(); idMap.put(localId, localV...
java
public void addId(final URI id, final String value) { if (id != null && value != null) { final URI localId = id.normalize(); final String localValue = value.trim(); idMap.put(localId, localValue); } }
[ "public", "void", "addId", "(", "final", "URI", "id", ",", "final", "String", "value", ")", "{", "if", "(", "id", "!=", "null", "&&", "value", "!=", "null", ")", "{", "final", "URI", "localId", "=", "id", ".", "normalize", "(", ")", ";", "final", ...
Add topic id-value pairs to idMap. @param id id @param value value
[ "Add", "topic", "id", "-", "value", "pairs", "to", "idMap", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/MergeUtils.java#L88-L94
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/LocaleUtils.java
LocaleUtils.retrieveNonNullUnitType
public String retrieveNonNullUnitType(Context context, String unitType) { """ Returns the unitType passed in if it is not null, otherwise returns the a unitType based on the device Locale. @param context to get device locale @param unitType to check if it is null @return a non-null unitType, either the one p...
java
public String retrieveNonNullUnitType(Context context, String unitType) { if (unitType == null) { return getUnitTypeForDeviceLocale(context); } return unitType; }
[ "public", "String", "retrieveNonNullUnitType", "(", "Context", "context", ",", "String", "unitType", ")", "{", "if", "(", "unitType", "==", "null", ")", "{", "return", "getUnitTypeForDeviceLocale", "(", "context", ")", ";", "}", "return", "unitType", ";", "}" ...
Returns the unitType passed in if it is not null, otherwise returns the a unitType based on the device Locale. @param context to get device locale @param unitType to check if it is null @return a non-null unitType, either the one passed in, or based on the device locale
[ "Returns", "the", "unitType", "passed", "in", "if", "it", "is", "not", "null", "otherwise", "returns", "the", "a", "unitType", "based", "on", "the", "device", "Locale", "." ]
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/LocaleUtils.java#L88-L93
gwtplus/google-gin
src/main/java/com/google/gwt/inject/rebind/util/GuiceUtil.java
GuiceUtil.getMemberInjectionDependencies
public Collection<Dependency> getMemberInjectionDependencies( Key<?> typeKey, TypeLiteral<?> type) { """ Collects and returns all keys required to member-inject the given class. @param typeKey key causing member injection @param type class for which required keys are calculated @return keys required to ...
java
public Collection<Dependency> getMemberInjectionDependencies( Key<?> typeKey, TypeLiteral<?> type) { Set<Dependency> required = new LinkedHashSet<Dependency>(); for (MethodLiteral<?, Method> method : memberCollector.getMethods(type)) { required.addAll(getDependencies(typeKey, method)); } fo...
[ "public", "Collection", "<", "Dependency", ">", "getMemberInjectionDependencies", "(", "Key", "<", "?", ">", "typeKey", ",", "TypeLiteral", "<", "?", ">", "type", ")", "{", "Set", "<", "Dependency", ">", "required", "=", "new", "LinkedHashSet", "<", "Depende...
Collects and returns all keys required to member-inject the given class. @param typeKey key causing member injection @param type class for which required keys are calculated @return keys required to inject given class
[ "Collects", "and", "returns", "all", "keys", "required", "to", "member", "-", "inject", "the", "given", "class", "." ]
train
https://github.com/gwtplus/google-gin/blob/595e61ee0d2fa508815c016e924ec0e5cea2a2aa/src/main/java/com/google/gwt/inject/rebind/util/GuiceUtil.java#L134-L147
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.queryScalarSQLKey
public static <T> T queryScalarSQLKey(String sqlKey, Class<T> scalarType, Object[] params) throws SQLStatementNotFoundException, YankSQLException { """ Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using th...
java
public static <T> T queryScalarSQLKey(String sqlKey, Class<T> scalarType, Object[] params) throws SQLStatementNotFoundException, YankSQLException { return queryScalarSQLKey(YankPoolManager.DEFAULT_POOL_NAME, sqlKey, scalarType, params); }
[ "public", "static", "<", "T", ">", "T", "queryScalarSQLKey", "(", "String", "sqlKey", ",", "Class", "<", "T", ">", "scalarType", ",", "Object", "[", "]", "params", ")", "throws", "SQLStatementNotFoundException", ",", "YankSQLException", "{", "return", "querySc...
Return just one scalar given a SQL Key using an SQL statement matching the sqlKey String in a properties file loaded via Yank.addSQLStatements(...) using the default connection pool. If more than one row match the query, only the first row is returned. @param sqlKey The SQL Key found in a properties file corresponding...
[ "Return", "just", "one", "scalar", "given", "a", "SQL", "Key", "using", "an", "SQL", "statement", "matching", "the", "sqlKey", "String", "in", "a", "properties", "file", "loaded", "via", "Yank", ".", "addSQLStatements", "(", "...", ")", "using", "the", "de...
train
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L233-L237
palatable/lambda
src/main/java/com/jnape/palatable/lambda/optics/lenses/MaybeLens.java
MaybeLens.asMaybe
public static <V> Lens.Simple<V, Maybe<V>> asMaybe() { """ Convenience static factory method for creating a lens that focuses on a value as a {@link Maybe}. @param <V> the value type @return a lens that focuses on the value as a {@link Maybe} """ return simpleLens(Maybe::maybe, (v, maybeV) -> maybe...
java
public static <V> Lens.Simple<V, Maybe<V>> asMaybe() { return simpleLens(Maybe::maybe, (v, maybeV) -> maybeV.orElse(v)); }
[ "public", "static", "<", "V", ">", "Lens", ".", "Simple", "<", "V", ",", "Maybe", "<", "V", ">", ">", "asMaybe", "(", ")", "{", "return", "simpleLens", "(", "Maybe", "::", "maybe", ",", "(", "v", ",", "maybeV", ")", "->", "maybeV", ".", "orElse",...
Convenience static factory method for creating a lens that focuses on a value as a {@link Maybe}. @param <V> the value type @return a lens that focuses on the value as a {@link Maybe}
[ "Convenience", "static", "factory", "method", "for", "creating", "a", "lens", "that", "focuses", "on", "a", "value", "as", "a", "{", "@link", "Maybe", "}", "." ]
train
https://github.com/palatable/lambda/blob/b643ba836c5916d1d8193822e5efb4e7b40c489a/src/main/java/com/jnape/palatable/lambda/optics/lenses/MaybeLens.java#L152-L154
knowm/XChange
xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/v2/service/CoinbaseAccountServiceRaw.java
CoinbaseAccountServiceRaw.getCoinbasePaymentMethods
public List<CoinbasePaymentMethod> getCoinbasePaymentMethods() throws IOException { """ Authenticated resource that shows the current user payment methods. @see <a href="https://developers.coinbase.com/api/v2#list-payment-methods">developers.coinbase.com/api/v2?shell#list-payment-methods</a> """ String...
java
public List<CoinbasePaymentMethod> getCoinbasePaymentMethods() throws IOException { String apiKey = exchange.getExchangeSpecification().getApiKey(); BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch(); return coinbase .getPaymentMethods(Coinbase.CB_VERSION_VALUE,...
[ "public", "List", "<", "CoinbasePaymentMethod", ">", "getCoinbasePaymentMethods", "(", ")", "throws", "IOException", "{", "String", "apiKey", "=", "exchange", ".", "getExchangeSpecification", "(", ")", ".", "getApiKey", "(", ")", ";", "BigDecimal", "timestamp", "=...
Authenticated resource that shows the current user payment methods. @see <a href="https://developers.coinbase.com/api/v2#list-payment-methods">developers.coinbase.com/api/v2?shell#list-payment-methods</a>
[ "Authenticated", "resource", "that", "shows", "the", "current", "user", "payment", "methods", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/v2/service/CoinbaseAccountServiceRaw.java#L115-L122
Waikato/moa
moa/src/main/java/moa/clusterers/dstream/CharacteristicVector.java
CharacteristicVector.densityWithNew
public void densityWithNew(int currTime, double decayFactor) { """ Implements the density update function given in eq 5 (Proposition 3.1) of Chen and Tu 2007. @param currTime the data stream's current internal time @param decayFactor the value of lambda """ // Update the density grid's density double ...
java
public void densityWithNew(int currTime, double decayFactor) { // Update the density grid's density double densityOfG = this.getGridDensity(); //System.out.print("["+decayFactor+"^("+currTime+" - "+this.getDensityTimeStamp()+") * "+densityOfG+"] + 1.0 = "); densityOfG = (Math.pow(decayFactor, (currTime-this...
[ "public", "void", "densityWithNew", "(", "int", "currTime", ",", "double", "decayFactor", ")", "{", "// Update the density grid's density", "double", "densityOfG", "=", "this", ".", "getGridDensity", "(", ")", ";", "//System.out.print(\"[\"+decayFactor+\"^(\"+currTime+\" - ...
Implements the density update function given in eq 5 (Proposition 3.1) of Chen and Tu 2007. @param currTime the data stream's current internal time @param decayFactor the value of lambda
[ "Implements", "the", "density", "update", "function", "given", "in", "eq", "5", "(", "Proposition", "3", ".", "1", ")", "of", "Chen", "and", "Tu", "2007", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/dstream/CharacteristicVector.java#L213-L223
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlerrorpage.java
appfwxmlerrorpage.get
public static appfwxmlerrorpage get(nitro_service service, String name) throws Exception { """ Use this API to fetch appfwxmlerrorpage resource of given name . """ appfwxmlerrorpage obj = new appfwxmlerrorpage(); obj.set_name(name); appfwxmlerrorpage response = (appfwxmlerrorpage) obj.get_resource(servic...
java
public static appfwxmlerrorpage get(nitro_service service, String name) throws Exception{ appfwxmlerrorpage obj = new appfwxmlerrorpage(); obj.set_name(name); appfwxmlerrorpage response = (appfwxmlerrorpage) obj.get_resource(service); return response; }
[ "public", "static", "appfwxmlerrorpage", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "appfwxmlerrorpage", "obj", "=", "new", "appfwxmlerrorpage", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", ...
Use this API to fetch appfwxmlerrorpage resource of given name .
[ "Use", "this", "API", "to", "fetch", "appfwxmlerrorpage", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/appfw/appfwxmlerrorpage.java#L134-L139
mockito/mockito
src/main/java/org/mockito/internal/invocation/InvocationsFinder.java
InvocationsFinder.findFirstUnverifiedInOrder
public static Invocation findFirstUnverifiedInOrder(InOrderContext context, List<Invocation> orderedInvocations) { """ i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v v @param context @param orderedInvocations """ Invocation candidate = null; for(Invocation i : ...
java
public static Invocation findFirstUnverifiedInOrder(InOrderContext context, List<Invocation> orderedInvocations) { Invocation candidate = null; for(Invocation i : orderedInvocations) { if (!context.isVerified(i)) { candidate = candidate != null ? candidate : i; } ...
[ "public", "static", "Invocation", "findFirstUnverifiedInOrder", "(", "InOrderContext", "context", ",", "List", "<", "Invocation", ">", "orderedInvocations", ")", "{", "Invocation", "candidate", "=", "null", ";", "for", "(", "Invocation", "i", ":", "orderedInvocation...
i3 is unverified here: i1, i2, i3 v all good here: i1, i2, i3 v v @param context @param orderedInvocations
[ "i3", "is", "unverified", "here", ":" ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/invocation/InvocationsFinder.java#L187-L197
alkacon/opencms-core
src/org/opencms/configuration/preferences/CmsWrapperPreference.java
CmsWrapperPreference.firstNotNull
String firstNotNull(String a, String b) { """ Returns the first non-null value.<p> @param a a value @param b another value @return the first non-null value """ return a != null ? a : b; }
java
String firstNotNull(String a, String b) { return a != null ? a : b; }
[ "String", "firstNotNull", "(", "String", "a", ",", "String", "b", ")", "{", "return", "a", "!=", "null", "?", "a", ":", "b", ";", "}" ]
Returns the first non-null value.<p> @param a a value @param b another value @return the first non-null value
[ "Returns", "the", "first", "non", "-", "null", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/preferences/CmsWrapperPreference.java#L152-L155
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java
AbstractSequenceClassifier.makeReaderAndWriter
public DocumentReaderAndWriter<IN> makeReaderAndWriter() { """ Makes a DocumentReaderAndWriter based on the flags the CRFClassifier was constructed with. Will create the flags.readerAndWriter and initialize it with the CRFClassifier's flags. """ DocumentReaderAndWriter<IN> readerAndWriter; try { ...
java
public DocumentReaderAndWriter<IN> makeReaderAndWriter() { DocumentReaderAndWriter<IN> readerAndWriter; try { readerAndWriter = ((DocumentReaderAndWriter<IN>) Class.forName(flags.readerAndWriter).newInstance()); } catch (Exception e) { throw new RuntimeException(St...
[ "public", "DocumentReaderAndWriter", "<", "IN", ">", "makeReaderAndWriter", "(", ")", "{", "DocumentReaderAndWriter", "<", "IN", ">", "readerAndWriter", ";", "try", "{", "readerAndWriter", "=", "(", "(", "DocumentReaderAndWriter", "<", "IN", ">", ")", "Class", "...
Makes a DocumentReaderAndWriter based on the flags the CRFClassifier was constructed with. Will create the flags.readerAndWriter and initialize it with the CRFClassifier's flags.
[ "Makes", "a", "DocumentReaderAndWriter", "based", "on", "the", "flags", "the", "CRFClassifier", "was", "constructed", "with", ".", "Will", "create", "the", "flags", ".", "readerAndWriter", "and", "initialize", "it", "with", "the", "CRFClassifier", "s", "flags", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L204-L214
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingEndpointsInner.java
StreamingEndpointsInner.getAsync
public Observable<StreamingEndpointInner> getAsync(String resourceGroupName, String accountName, String streamingEndpointName) { """ Get StreamingEndpoint. Gets a StreamingEndpoint. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services acc...
java
public Observable<StreamingEndpointInner> getAsync(String resourceGroupName, String accountName, String streamingEndpointName) { return getWithServiceResponseAsync(resourceGroupName, accountName, streamingEndpointName).map(new Func1<ServiceResponse<StreamingEndpointInner>, StreamingEndpointInner>() { ...
[ "public", "Observable", "<", "StreamingEndpointInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "streamingEndpointName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName...
Get StreamingEndpoint. Gets a StreamingEndpoint. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param streamingEndpointName The name of the StreamingEndpoint. @throws IllegalArgumentException thrown if parameters fail the vali...
[ "Get", "StreamingEndpoint", ".", "Gets", "a", "StreamingEndpoint", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingEndpointsInner.java#L298-L305
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseShybmv
public static int cusparseShybmv( cusparseHandle handle, int transA, Pointer alpha, cusparseMatDescr descrA, cusparseHybMat hybA, Pointer x, Pointer beta, Pointer y) { """ Description: Matrix-vector multiplication y = alpha * op(A) * x...
java
public static int cusparseShybmv( cusparseHandle handle, int transA, Pointer alpha, cusparseMatDescr descrA, cusparseHybMat hybA, Pointer x, Pointer beta, Pointer y) { return checkResult(cusparseShybmvNative(handle, transA, alp...
[ "public", "static", "int", "cusparseShybmv", "(", "cusparseHandle", "handle", ",", "int", "transA", ",", "Pointer", "alpha", ",", "cusparseMatDescr", "descrA", ",", "cusparseHybMat", "hybA", ",", "Pointer", "x", ",", "Pointer", "beta", ",", "Pointer", "y", ")"...
Description: Matrix-vector multiplication y = alpha * op(A) * x + beta * y, where A is a sparse matrix in HYB storage format, x and y are dense vectors.
[ "Description", ":", "Matrix", "-", "vector", "multiplication", "y", "=", "alpha", "*", "op", "(", "A", ")", "*", "x", "+", "beta", "*", "y", "where", "A", "is", "a", "sparse", "matrix", "in", "HYB", "storage", "format", "x", "and", "y", "are", "den...
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L1723-L1734
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/util/RestRequest.java
RestRequest.requestGetWithStatusAccepted
public Object requestGetWithStatusAccepted(String url, Class type) throws SDKException { """ Executes a http get with to a given url, in contrast to the normal get it uses an http (accept) status check of the response @param url the url path used for the api request @param type the class of the requested enti...
java
public Object requestGetWithStatusAccepted(String url, Class type) throws SDKException { url = this.pathUrl + "/" + url; return requestGetWithStatus(url, HttpURLConnection.HTTP_ACCEPTED, type); }
[ "public", "Object", "requestGetWithStatusAccepted", "(", "String", "url", ",", "Class", "type", ")", "throws", "SDKException", "{", "url", "=", "this", ".", "pathUrl", "+", "\"/\"", "+", "url", ";", "return", "requestGetWithStatus", "(", "url", ",", "HttpURLCo...
Executes a http get with to a given url, in contrast to the normal get it uses an http (accept) status check of the response @param url the url path used for the api request @param type the class of the requested entity @return a string containing the response content @throws SDKException if the request fails
[ "Executes", "a", "http", "get", "with", "to", "a", "given", "url", "in", "contrast", "to", "the", "normal", "get", "it", "uses", "an", "http", "(", "accept", ")", "status", "check", "of", "the", "response" ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/util/RestRequest.java#L886-L889
sarl/sarl
main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java
M2EUtilities.compareMavenVersions
public static int compareMavenVersions(String v1, String v2) { """ Compare two Maven versions. @param v1 first Maven version. @param v2 second Maven version. @return an integer that the sign indicates if v1 is lower, equal ot greater than v2. """ return parseMavenVersion(v1).compareTo(parseMavenVersion(...
java
public static int compareMavenVersions(String v1, String v2) { return parseMavenVersion(v1).compareTo(parseMavenVersion(v2)); }
[ "public", "static", "int", "compareMavenVersions", "(", "String", "v1", ",", "String", "v2", ")", "{", "return", "parseMavenVersion", "(", "v1", ")", ".", "compareTo", "(", "parseMavenVersion", "(", "v2", ")", ")", ";", "}" ]
Compare two Maven versions. @param v1 first Maven version. @param v2 second Maven version. @return an integer that the sign indicates if v1 is lower, equal ot greater than v2.
[ "Compare", "two", "Maven", "versions", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.m2e/src/io/sarl/m2e/utils/M2EUtilities.java#L73-L75
johnkil/Android-ProgressFragment
sherlockprogressfragment/src/com/devspark/progressfragment/SherlockProgressListFragment.java
SherlockProgressListFragment.setListShown
private void setListShown(boolean shown, boolean animate) { """ Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead. @param shown If true, the list view ...
java
private void setListShown(boolean shown, boolean animate) { ensureList(); if (mProgressContainer == null) { throw new IllegalStateException("Can't be used with a custom content view"); } if (mListShown == shown) { return; } mListShown = shown; ...
[ "private", "void", "setListShown", "(", "boolean", "shown", ",", "boolean", "animate", ")", "{", "ensureList", "(", ")", ";", "if", "(", "mProgressContainer", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Can't be used with a custom cont...
Control whether the list is being displayed. You can make it not displayed if you are waiting for the initial data to show in it. During this time an indeterminant progress indicator will be shown instead. @param shown If true, the list view is shown; if false, the progress indicator. The initial value is true. @...
[ "Control", "whether", "the", "list", "is", "being", "displayed", ".", "You", "can", "make", "it", "not", "displayed", "if", "you", "are", "waiting", "for", "the", "initial", "data", "to", "show", "in", "it", ".", "During", "this", "time", "an", "indeterm...
train
https://github.com/johnkil/Android-ProgressFragment/blob/f4b3b969f36f3ac9598c662722630f9ffb151bd6/sherlockprogressfragment/src/com/devspark/progressfragment/SherlockProgressListFragment.java#L223-L257
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ModelConstraints.java
ModelConstraints.usedByReference
private ReferenceDescriptorDef usedByReference(ModelDef modelDef, FieldDescriptorDef fieldDef) { """ Checks whether the given field definition is used as the primary key of a class referenced by a reference. @param modelDef The model @param fieldDef The current field descriptor def @return The reference that...
java
private ReferenceDescriptorDef usedByReference(ModelDef modelDef, FieldDescriptorDef fieldDef) { String ownerClassName = ((ClassDescriptorDef)fieldDef.getOwner()).getQualifiedName(); ClassDescriptorDef classDef; ReferenceDescriptorDef refDef; String ...
[ "private", "ReferenceDescriptorDef", "usedByReference", "(", "ModelDef", "modelDef", ",", "FieldDescriptorDef", "fieldDef", ")", "{", "String", "ownerClassName", "=", "(", "(", "ClassDescriptorDef", ")", "fieldDef", ".", "getOwner", "(", ")", ")", ".", "getQualified...
Checks whether the given field definition is used as the primary key of a class referenced by a reference. @param modelDef The model @param fieldDef The current field descriptor def @return The reference that uses the field or <code>null</code> if the field is not used in this way
[ "Checks", "whether", "the", "given", "field", "definition", "is", "used", "as", "the", "primary", "key", "of", "a", "class", "referenced", "by", "a", "reference", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ModelConstraints.java#L877-L903
LableOrg/java-uniqueid
uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/SynchronizedGeneratorIdentity.java
SynchronizedGeneratorIdentity.basedOn
public static SynchronizedGeneratorIdentity basedOn(String quorum, String znode, Long claimDuration) throws IOException { """ Create a new {@link SynchronizedGeneratorIdentity} instance. @...
java
public static SynchronizedGeneratorIdentity basedOn(String quorum, String znode, Long claimDuration) throws IOException { ZooKeeperConnection zooKeeperConnection = new ZooKeeperConnection(...
[ "public", "static", "SynchronizedGeneratorIdentity", "basedOn", "(", "String", "quorum", ",", "String", "znode", ",", "Long", "claimDuration", ")", "throws", "IOException", "{", "ZooKeeperConnection", "zooKeeperConnection", "=", "new", "ZooKeeperConnection", "(", "quoru...
Create a new {@link SynchronizedGeneratorIdentity} instance. @param quorum Addresses of the ZooKeeper quorum (comma-separated). @param znode Root znode of the ZooKeeper resource-pool. @param claimDuration How long a claim to a generator-ID should be held, in milliseconds. @return A {@link SynchronizedGe...
[ "Create", "a", "new", "{", "@link", "SynchronizedGeneratorIdentity", "}", "instance", "." ]
train
https://github.com/LableOrg/java-uniqueid/blob/554e30b2277765f365e7c7f598108de0ab5744f4/uniqueid-zookeeper/src/main/java/org/lable/oss/uniqueid/zookeeper/SynchronizedGeneratorIdentity.java#L82-L91
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java
Agg.percentRank
public static <T> Collector<T, ?, Optional<Double>> percentRank(T value, Comparator<? super T> comparator) { """ Get a {@link Collector} that calculates the <code>PERCENT_RANK()</code> function given a specific ordering. """ return percentRankBy(value, t -> t, comparator); }
java
public static <T> Collector<T, ?, Optional<Double>> percentRank(T value, Comparator<? super T> comparator) { return percentRankBy(value, t -> t, comparator); }
[ "public", "static", "<", "T", ">", "Collector", "<", "T", ",", "?", ",", "Optional", "<", "Double", ">", ">", "percentRank", "(", "T", "value", ",", "Comparator", "<", "?", "super", "T", ">", "comparator", ")", "{", "return", "percentRankBy", "(", "v...
Get a {@link Collector} that calculates the <code>PERCENT_RANK()</code> function given a specific ordering.
[ "Get", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java#L754-L756
OpenLiberty/open-liberty
dev/com.ibm.ws.event/src/com/ibm/ws/event/internal/EventEngineImpl.java
EventEngineImpl.processWorkStageProperties
protected void processWorkStageProperties(Map<String, Object> config) { """ Process the service configuration looking for properties that fit the format <code>stage.<i>stage name</i>.topics</code> and that point to a list of topics to associate with the stage. @param config the service configuration properti...
java
protected void processWorkStageProperties(Map<String, Object> config) { for (Map.Entry<String, Object> entry : config.entrySet()) { if (entry.getKey().startsWith(CFG_KEY_STAGE_PREFIX)) { String[] topics; Object o = entry.getValue(); if (o instanceof St...
[ "protected", "void", "processWorkStageProperties", "(", "Map", "<", "String", ",", "Object", ">", "config", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "config", ".", "entrySet", "(", ")", ")", "{", "if",...
Process the service configuration looking for properties that fit the format <code>stage.<i>stage name</i>.topics</code> and that point to a list of topics to associate with the stage. @param config the service configuration properties
[ "Process", "the", "service", "configuration", "looking", "for", "properties", "that", "fit", "the", "format", "<code", ">", "stage", ".", "<i", ">", "stage", "name<", "/", "i", ">", ".", "topics<", "/", "code", ">", "and", "that", "point", "to", "a", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.event/src/com/ibm/ws/event/internal/EventEngineImpl.java#L451-L468
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_boostHistory_GET
public ArrayList<Date> serviceName_boostHistory_GET(String serviceName, Date date) throws IOException { """ History of your hosting boost REST: GET /hosting/web/{serviceName}/boostHistory @param date [required] Filter the value of date property (=) @param serviceName [required] The internal name of your hosti...
java
public ArrayList<Date> serviceName_boostHistory_GET(String serviceName, Date date) throws IOException { String qPath = "/hosting/web/{serviceName}/boostHistory"; StringBuilder sb = path(qPath, serviceName); query(sb, "date", date); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, ...
[ "public", "ArrayList", "<", "Date", ">", "serviceName_boostHistory_GET", "(", "String", "serviceName", ",", "Date", "date", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/boostHistory\"", ";", "StringBuilder", "sb", "=", "path...
History of your hosting boost REST: GET /hosting/web/{serviceName}/boostHistory @param date [required] Filter the value of date property (=) @param serviceName [required] The internal name of your hosting
[ "History", "of", "your", "hosting", "boost" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L260-L266
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/KeyStoreManager.java
KeyStoreManager.getInputStream
public InputStream getInputStream(String fileName, boolean create) throws MalformedURLException, IOException { """ Open the provided filename as a keystore, creating if it doesn't exist and the input create flag is true. @param fileName @param create @return InputStream @throws MalformedURLException @throw...
java
public InputStream getInputStream(String fileName, boolean create) throws MalformedURLException, IOException { try { GetKeyStoreInputStreamAction action = new GetKeyStoreInputStreamAction(fileName, create); return AccessController.doPrivileged(action); } catch (PrivilegedActionEx...
[ "public", "InputStream", "getInputStream", "(", "String", "fileName", ",", "boolean", "create", ")", "throws", "MalformedURLException", ",", "IOException", "{", "try", "{", "GetKeyStoreInputStreamAction", "action", "=", "new", "GetKeyStoreInputStreamAction", "(", "fileN...
Open the provided filename as a keystore, creating if it doesn't exist and the input create flag is true. @param fileName @param create @return InputStream @throws MalformedURLException @throws IOException
[ "Open", "the", "provided", "filename", "as", "a", "keystore", "creating", "if", "it", "doesn", "t", "exist", "and", "the", "input", "create", "flag", "is", "true", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/KeyStoreManager.java#L347-L364
geomajas/geomajas-project-client-gwt2
common-gwt/command/src/main/java/org/geomajas/gwt/client/command/GwtCommandDispatcher.java
GwtCommandDispatcher.setToken
private void setToken(String userToken, UserDetail userDetail, boolean loginPending) { """ Set the user token, so it can be sent in every command. This is the internal version, used by the token changed handler. @param userToken user token @param userDetail user details @param loginPending true if this wi...
java
private void setToken(String userToken, UserDetail userDetail, boolean loginPending) { boolean changed = !isEqual(this.userToken, userToken); this.userToken = userToken; if (null == userDetail) { userDetail = new UserDetail(); } this.userDetail = userDetail; if (changed) { TokenChangedEvent event = ne...
[ "private", "void", "setToken", "(", "String", "userToken", ",", "UserDetail", "userDetail", ",", "boolean", "loginPending", ")", "{", "boolean", "changed", "=", "!", "isEqual", "(", "this", ".", "userToken", ",", "userToken", ")", ";", "this", ".", "userToke...
Set the user token, so it can be sent in every command. This is the internal version, used by the token changed handler. @param userToken user token @param userDetail user details @param loginPending true if this will be followed by a fresh token change
[ "Set", "the", "user", "token", "so", "it", "can", "be", "sent", "in", "every", "command", ".", "This", "is", "the", "internal", "version", "used", "by", "the", "token", "changed", "handler", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/command/src/main/java/org/geomajas/gwt/client/command/GwtCommandDispatcher.java#L455-L466
fuinorg/utils4j
src/main/java/org/fuin/utils4j/JandexUtils.java
JandexUtils.indexJar
public static boolean indexJar(final Indexer indexer, final List<File> knownFiles, final File jarFile) { """ Indexes a single JAR, except it was already analyzed. @param indexer Indexer to use. @param knownFiles List of files already analyzed. New files will be added within this method. @param jarFile JAR ...
java
public static boolean indexJar(final Indexer indexer, final List<File> knownFiles, final File jarFile) { if (knownFiles.contains(jarFile)) { return false; } knownFiles.add(jarFile); try (final JarFile jar = new JarFile(jarFile)) { final Enumeration<JarEntry> ent...
[ "public", "static", "boolean", "indexJar", "(", "final", "Indexer", "indexer", ",", "final", "List", "<", "File", ">", "knownFiles", ",", "final", "File", "jarFile", ")", "{", "if", "(", "knownFiles", ".", "contains", "(", "jarFile", ")", ")", "{", "retu...
Indexes a single JAR, except it was already analyzed. @param indexer Indexer to use. @param knownFiles List of files already analyzed. New files will be added within this method. @param jarFile JAR to analyze. @return TRUE if the JAR was indexed or FALSE if it was ignored.
[ "Indexes", "a", "single", "JAR", "except", "it", "was", "already", "analyzed", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/JandexUtils.java#L100-L125
upwork/java-upwork
src/com/Upwork/api/Routers/Hr/Contracts.java
Contracts.endContract
public JSONObject endContract(String reference, HashMap<String, String> params) throws JSONException { """ End Contract @param reference Contract reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} """ return oClient.delete("/hr/v2/contract...
java
public JSONObject endContract(String reference, HashMap<String, String> params) throws JSONException { return oClient.delete("/hr/v2/contracts/" + reference, params); }
[ "public", "JSONObject", "endContract", "(", "String", "reference", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "delete", "(", "\"/hr/v2/contracts/\"", "+", "reference", ",", "params"...
End Contract @param reference Contract reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "End", "Contract" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Hr/Contracts.java#L78-L80
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/processor/PdfConfigurationProcessor.java
PdfConfigurationProcessor.setUpdates
public void setUpdates(final Map<String, Object> updates) { """ The pdf metadata property -&gt; attribute name map. The keys must be one of the values in {@link org.mapfish.print.config.PDFConfig} and the values must be the name of the attribute to obtain the the data from. Example Configuration: <p></p> <pr...
java
public void setUpdates(final Map<String, Object> updates) { Map<String, Update> finalUpdatesMap = new HashMap<>(); for (Map.Entry<String, Object> entry: updates.entrySet()) { String property = entry.getKey(); Update update; if (entry.getValue() instanceof Update) { ...
[ "public", "void", "setUpdates", "(", "final", "Map", "<", "String", ",", "Object", ">", "updates", ")", "{", "Map", "<", "String", ",", "Update", ">", "finalUpdatesMap", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<"...
The pdf metadata property -&gt; attribute name map. The keys must be one of the values in {@link org.mapfish.print.config.PDFConfig} and the values must be the name of the attribute to obtain the the data from. Example Configuration: <p></p> <pre><code> processors: - !updatePdfConfig updates: title: "titleAttribute" ...
[ "The", "pdf", "metadata", "property", "-", "&gt", ";", "attribute", "name", "map", ".", "The", "keys", "must", "be", "one", "of", "the", "values", "in", "{", "@link", "org", ".", "mapfish", ".", "print", ".", "config", ".", "PDFConfig", "}", "and", "...
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/PdfConfigurationProcessor.java#L82-L104
grycap/coreutils
coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/net/UrlBuilder.java
UrlBuilder.buildRelativeUrl
public String buildRelativeUrl(final @Nullable String fragment, final @Nullable Map<String, String> params) { """ Creates a new URL relative to the base URL provided in the constructor of this class. The new relative URL includes the path, query parameters and the internal reference of the {@link UrlBuilder#baseU...
java
public String buildRelativeUrl(final @Nullable String fragment, final @Nullable Map<String, String> params) { String url = null; final Optional<String> fragment2 = ofNullable(trimToNull(fragment)); try { final Optional<URL> fragmentUrl = ofNullable(fragment2.isPresent() ? new URL("http://example.com/" + frag...
[ "public", "String", "buildRelativeUrl", "(", "final", "@", "Nullable", "String", "fragment", ",", "final", "@", "Nullable", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "String", "url", "=", "null", ";", "final", "Optional", "<", "String",...
Creates a new URL relative to the base URL provided in the constructor of this class. The new relative URL includes the path, query parameters and the internal reference of the {@link UrlBuilder#baseUrl base URL} provided with this class. An additional fragment, as well as additional query parameters can be optionally ...
[ "Creates", "a", "new", "URL", "relative", "to", "the", "base", "URL", "provided", "in", "the", "constructor", "of", "this", "class", ".", "The", "new", "relative", "URL", "includes", "the", "path", "query", "parameters", "and", "the", "internal", "reference"...
train
https://github.com/grycap/coreutils/blob/e6db61dc50b49ea7276c0c29c7401204681a10c2/coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/net/UrlBuilder.java#L99-L130
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java
IdleConnectionRemover.registerPool
public void registerPool(ManagedConnectionPool mcp, long mcpInterval) { """ Register pool for idle connection cleanup @param mcp managed connection pool @param mcpInterval validation interval """ try { lock.lock(); synchronized (registeredPools) { ...
java
public void registerPool(ManagedConnectionPool mcp, long mcpInterval) { try { lock.lock(); synchronized (registeredPools) { registeredPools.put(new Key(System.identityHashCode(mcp), System.currentTimeMillis(), mcpInterval), mcp); } ...
[ "public", "void", "registerPool", "(", "ManagedConnectionPool", "mcp", ",", "long", "mcpInterval", ")", "{", "try", "{", "lock", ".", "lock", "(", ")", ";", "synchronized", "(", "registeredPools", ")", "{", "registeredPools", ".", "put", "(", "new", "Key", ...
Register pool for idle connection cleanup @param mcp managed connection pool @param mcpInterval validation interval
[ "Register", "pool", "for", "idle", "connection", "cleanup" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/pool/IdleConnectionRemover.java#L162-L188
aws/aws-sdk-java
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/InventoryItem.java
InventoryItem.withContext
public InventoryItem withContext(java.util.Map<String, String> context) { """ <p> A map of associated properties for a specified inventory type. For example, with this attribute, you can specify the <code>ExecutionId</code>, <code>ExecutionType</code>, <code>ComplianceType</code> properties of the <code>AWS:Com...
java
public InventoryItem withContext(java.util.Map<String, String> context) { setContext(context); return this; }
[ "public", "InventoryItem", "withContext", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "context", ")", "{", "setContext", "(", "context", ")", ";", "return", "this", ";", "}" ]
<p> A map of associated properties for a specified inventory type. For example, with this attribute, you can specify the <code>ExecutionId</code>, <code>ExecutionType</code>, <code>ComplianceType</code> properties of the <code>AWS:ComplianceItem</code> type. </p> @param context A map of associated properties for a spe...
[ "<p", ">", "A", "map", "of", "associated", "properties", "for", "a", "specified", "inventory", "type", ".", "For", "example", "with", "this", "attribute", "you", "can", "specify", "the", "<code", ">", "ExecutionId<", "/", "code", ">", "<code", ">", "Execut...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/InventoryItem.java#L378-L381
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCheckBoxSelectExample.java
WCheckBoxSelectExample.addExampleUsingStringArray
private void addExampleUsingStringArray() { """ This example creates the WCheckBoxSelect from an array of Strings. """ add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect created using a String array")); String[] options = new String[]{"Dog", "Cat", "Bird", "Turtle"}; final WCheckBoxSelect select = new WC...
java
private void addExampleUsingStringArray() { add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect created using a String array")); String[] options = new String[]{"Dog", "Cat", "Bird", "Turtle"}; final WCheckBoxSelect select = new WCheckBoxSelect(options); select.setToolTip("Animals"); select.setMandatory(true);...
[ "private", "void", "addExampleUsingStringArray", "(", ")", "{", "add", "(", "new", "WHeading", "(", "HeadingLevel", ".", "H3", ",", "\"WCheckBoxSelect created using a String array\"", ")", ")", ";", "String", "[", "]", "options", "=", "new", "String", "[", "]", ...
This example creates the WCheckBoxSelect from an array of Strings.
[ "This", "example", "creates", "the", "WCheckBoxSelect", "from", "an", "array", "of", "Strings", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WCheckBoxSelectExample.java#L110-L137
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationIterator.java
CollationIterator.previousCEUnsafe
private final long previousCEUnsafe(int c, UVector32 offsets) { """ Returns the previous CE when data.isUnsafeBackward(c, isNumeric). """ // We just move through the input counting safe and unsafe code points // without collecting the unsafe-backward substring into a buffer and // switc...
java
private final long previousCEUnsafe(int c, UVector32 offsets) { // We just move through the input counting safe and unsafe code points // without collecting the unsafe-backward substring into a buffer and // switching to it. // This is to keep the logic simple. Otherwise we would have to...
[ "private", "final", "long", "previousCEUnsafe", "(", "int", "c", ",", "UVector32", "offsets", ")", "{", "// We just move through the input counting safe and unsafe code points", "// without collecting the unsafe-backward substring into a buffer and", "// switching to it.", "// This is ...
Returns the previous CE when data.isUnsafeBackward(c, isNumeric).
[ "Returns", "the", "previous", "CE", "when", "data", ".", "isUnsafeBackward", "(", "c", "isNumeric", ")", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationIterator.java#L899-L962
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.SquaredEuclidean
public static double SquaredEuclidean(IntPoint p, IntPoint q) { """ Gets the Squared Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Squared euclidean distance between x and y. """ double dx = q.x...
java
public static double SquaredEuclidean(IntPoint p, IntPoint q) { double dx = q.x - p.x; double dy = q.y - p.y; return dx * dx + dy * dy; }
[ "public", "static", "double", "SquaredEuclidean", "(", "IntPoint", "p", ",", "IntPoint", "q", ")", "{", "double", "dx", "=", "q", ".", "x", "-", "p", ".", "x", ";", "double", "dy", "=", "q", ".", "y", "-", "p", ".", "y", ";", "return", "dx", "*...
Gets the Squared Euclidean distance between two points. @param p IntPoint with X and Y axis coordinates. @param q IntPoint with X and Y axis coordinates. @return The Squared euclidean distance between x and y.
[ "Gets", "the", "Squared", "Euclidean", "distance", "between", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L836-L842
anotheria/configureme
src/main/java/org/configureme/parser/IncludeParsedAttribute.java
IncludeParsedAttribute.createIncludeValue
private static IncludeValue createIncludeValue(final String value) { """ Creates internal representation of the attribute value. @param value name of the link attribute in the another config @return internal representation of the include attribute value """ if (value.charAt(1) != '<') return new...
java
private static IncludeValue createIncludeValue(final String value) { if (value.charAt(1) != '<') return new IncludeValue(); //remove wrappers final String unwrapped = value.substring(2, value.length() - 1); return new IncludeValue(StringUtils.getStringBefore(unwrapped, "."), StringUtils.getStringAfter(unwrap...
[ "private", "static", "IncludeValue", "createIncludeValue", "(", "final", "String", "value", ")", "{", "if", "(", "value", ".", "charAt", "(", "1", ")", "!=", "'", "'", ")", "return", "new", "IncludeValue", "(", ")", ";", "//remove wrappers", "final", "Stri...
Creates internal representation of the attribute value. @param value name of the link attribute in the another config @return internal representation of the include attribute value
[ "Creates", "internal", "representation", "of", "the", "attribute", "value", "." ]
train
https://github.com/anotheria/configureme/blob/1f52dd9109349623190586bdf5a592de8016e1fa/src/main/java/org/configureme/parser/IncludeParsedAttribute.java#L33-L39
Samsung/GearVRf
GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec2f.java
MFVec2f.setValue
public void setValue(int size, float[] newValue) { """ Assign an array subset to this field. @param size - number of new values @param newValue - array of the new x,y values, must be divisible by 2, in a single dimensional array """ if ( ((newValue.length%2) == 0) && ((newValue.length/2) == size)) {...
java
public void setValue(int size, float[] newValue) { if ( ((newValue.length%2) == 0) && ((newValue.length/2) == size)) { try { for (int i = 0; i < size; i++) { value.set(i, new SFVec2f(newValue[i*3], newValue[i*3+1])); } } cat...
[ "public", "void", "setValue", "(", "int", "size", ",", "float", "[", "]", "newValue", ")", "{", "if", "(", "(", "(", "newValue", ".", "length", "%", "2", ")", "==", "0", ")", "&&", "(", "(", "newValue", ".", "length", "/", "2", ")", "==", "size...
Assign an array subset to this field. @param size - number of new values @param newValue - array of the new x,y values, must be divisible by 2, in a single dimensional array
[ "Assign", "an", "array", "subset", "to", "this", "field", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/x3d/src/main/java/org/gearvrf/x3d/data_types/MFVec2f.java#L179-L196
mozilla/rhino
toolsrc/org/mozilla/javascript/tools/shell/Global.java
Global.readFile
public static Object readFile(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws IOException { """ The readFile reads the given file content and convert it to a string using the specified character coding or default character coding if explicit coding...
java
public static Object readFile(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws IOException { if (args.length == 0) { throw reportRuntimeError("msg.shell.readFile.bad.args"); } String path = ScriptRuntime.toString(arg...
[ "public", "static", "Object", "readFile", "(", "Context", "cx", ",", "Scriptable", "thisObj", ",", "Object", "[", "]", "args", ",", "Function", "funObj", ")", "throws", "IOException", "{", "if", "(", "args", ".", "length", "==", "0", ")", "{", "throw", ...
The readFile reads the given file content and convert it to a string using the specified character coding or default character coding if explicit coding argument is not given. <p> Usage: <pre> readFile(filePath) readFile(filePath, charCoding) </pre> The first form converts file's context to string using the default cha...
[ "The", "readFile", "reads", "the", "given", "file", "content", "and", "convert", "it", "to", "a", "string", "using", "the", "specified", "character", "coding", "or", "default", "character", "coding", "if", "explicit", "coding", "argument", "is", "not", "given"...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/toolsrc/org/mozilla/javascript/tools/shell/Global.java#L838-L852
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.toComparatorDescending
public static <E> Comparator<E> toComparatorDescending(final Counter<E> counter) { """ Returns a comparator backed by this counter: two objects are compared by their associated values stored in the counter. This comparator returns keys by descending numeric value. Note that this ordering is not fixed, but depen...
java
public static <E> Comparator<E> toComparatorDescending(final Counter<E> counter) { return new Comparator<E>() { public int compare(E o1, E o2) { return Double.compare(counter.getCount(o2), counter.getCount(o1)); } }; }
[ "public", "static", "<", "E", ">", "Comparator", "<", "E", ">", "toComparatorDescending", "(", "final", "Counter", "<", "E", ">", "counter", ")", "{", "return", "new", "Comparator", "<", "E", ">", "(", ")", "{", "public", "int", "compare", "(", "E", ...
Returns a comparator backed by this counter: two objects are compared by their associated values stored in the counter. This comparator returns keys by descending numeric value. Note that this ordering is not fixed, but depends on the mutable values stored in the Counter. Doing this comparison does not depend on the ty...
[ "Returns", "a", "comparator", "backed", "by", "this", "counter", ":", "two", "objects", "are", "compared", "by", "their", "associated", "values", "stored", "in", "the", "counter", ".", "This", "comparator", "returns", "keys", "by", "descending", "numeric", "va...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L812-L818
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java
UserSearch.sendSimpleSearchForm
public ReportedData sendSimpleSearchForm(XMPPConnection con, Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Sends the filled out answer form to be sent and queried by the search service. @param con the cur...
java
public ReportedData sendSimpleSearchForm(XMPPConnection con, Form searchForm, DomainBareJid searchService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { SimpleUserSearch search = new SimpleUserSearch(); search.setForm(searchForm); search.setType(IQ...
[ "public", "ReportedData", "sendSimpleSearchForm", "(", "XMPPConnection", "con", ",", "Form", "searchForm", ",", "DomainBareJid", "searchService", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{",...
Sends the filled out answer form to be sent and queried by the search service. @param con the current XMPPConnection. @param searchForm the <code>Form</code> to send for querying. @param searchService the search service to use. (ex. search.jivesoftware.com) @return ReportedData the data found from the que...
[ "Sends", "the", "filled", "out", "answer", "form", "to", "be", "sent", "and", "queried", "by", "the", "search", "service", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/search/UserSearch.java#L116-L124
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.notEquals
@Throws(IllegalEqualException.class) public static void notEquals(final boolean condition, final boolean expected, final boolean check) { """ Ensures that a passed boolean is not equal to another boolean. The comparison is made using <code>expected == check</code>. <p> We recommend to use the overloaded meth...
java
@Throws(IllegalEqualException.class) public static void notEquals(final boolean condition, final boolean expected, final boolean check) { if (condition) { Check.notEquals(expected, check); } }
[ "@", "Throws", "(", "IllegalEqualException", ".", "class", ")", "public", "static", "void", "notEquals", "(", "final", "boolean", "condition", ",", "final", "boolean", "expected", ",", "final", "boolean", "check", ")", "{", "if", "(", "condition", ")", "{", ...
Ensures that a passed boolean is not equal to another boolean. The comparison is made using <code>expected == check</code>. <p> We recommend to use the overloaded method {@link ConditionalCheck#notEquals(condition,boolean, boolean, String)} and pass as second argument the name of the parameter to enhance the exception...
[ "Ensures", "that", "a", "passed", "boolean", "is", "not", "equal", "to", "another", "boolean", ".", "The", "comparison", "is", "made", "using", "<code", ">", "expected", "==", "check<", "/", "code", ">", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L1464-L1469
buschmais/extended-objects
neo4j/spi/src/main/java/com/buschmais/xo/neo4j/spi/AbstractNeo4jDatastore.java
AbstractNeo4jDatastore.ensureIndex
private void ensureIndex(DS session, L label, PrimitivePropertyMethodMetadata<PropertyMetadata> propertyMethodMetadata, boolean unique) { """ Ensures that an index exists for the given label and property. @param session The datastore session @param label The label. @param propertyMethodMetadata The propert...
java
private void ensureIndex(DS session, L label, PrimitivePropertyMethodMetadata<PropertyMetadata> propertyMethodMetadata, boolean unique) { PropertyMetadata propertyMetadata = propertyMethodMetadata.getDatastoreMetadata(); String statement; if (unique) { LOGGER.debug("Creating constrai...
[ "private", "void", "ensureIndex", "(", "DS", "session", ",", "L", "label", ",", "PrimitivePropertyMethodMetadata", "<", "PropertyMetadata", ">", "propertyMethodMetadata", ",", "boolean", "unique", ")", "{", "PropertyMetadata", "propertyMetadata", "=", "propertyMethodMet...
Ensures that an index exists for the given label and property. @param session The datastore session @param label The label. @param propertyMethodMetadata The property metadata. @param unique if <code>true</code> create a unique constraint
[ "Ensures", "that", "an", "index", "exists", "for", "the", "given", "label", "and", "property", "." ]
train
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/neo4j/spi/src/main/java/com/buschmais/xo/neo4j/spi/AbstractNeo4jDatastore.java#L82-L94
aalmiray/Json-lib
src/main/java/net/sf/json/util/WebUtils.java
WebUtils.protect
public static String protect( JSON json, boolean shrink ) { """ Transforms the input Json string using the configured WebHijackPreventionStrategy.<br> @param json the input string @param shrink if redundant key quotes may be eliminated. @return String a transformed json string """ String output = !...
java
public static String protect( JSON json, boolean shrink ) { String output = !shrink ? json.toString( 0 ) : toString( json ); return webHijackPreventionStrategy.protect( output ); }
[ "public", "static", "String", "protect", "(", "JSON", "json", ",", "boolean", "shrink", ")", "{", "String", "output", "=", "!", "shrink", "?", "json", ".", "toString", "(", "0", ")", ":", "toString", "(", "json", ")", ";", "return", "webHijackPreventionS...
Transforms the input Json string using the configured WebHijackPreventionStrategy.<br> @param json the input string @param shrink if redundant key quotes may be eliminated. @return String a transformed json string
[ "Transforms", "the", "input", "Json", "string", "using", "the", "configured", "WebHijackPreventionStrategy", ".", "<br", ">" ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/util/WebUtils.java#L61-L64
j-easy/easy-batch
easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java
JobScheduler.scheduleCron
public void scheduleCron(final org.easybatch.core.job.Job job, final String cronExpression, MisfireCronHandlingStrategy strategy) throws JobSchedulerException { """ Schedule a job with a unix-like cron expression. @param job the job to schedule @param cronExpression the cron expression to use. For ...
java
public void scheduleCron(final org.easybatch.core.job.Job job, final String cronExpression, MisfireCronHandlingStrategy strategy) throws JobSchedulerException { checkNotNull(job, "job"); checkNotNull(cronExpression, "cronExpression"); String name = job.getName(); String jobName = JOB_NA...
[ "public", "void", "scheduleCron", "(", "final", "org", ".", "easybatch", ".", "core", ".", "job", ".", "Job", "job", ",", "final", "String", "cronExpression", ",", "MisfireCronHandlingStrategy", "strategy", ")", "throws", "JobSchedulerException", "{", "checkNotNul...
Schedule a job with a unix-like cron expression. @param job the job to schedule @param cronExpression the cron expression to use. For a complete tutorial about cron expressions, please refer to <a href="http://quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger">quartz reference documentat...
[ "Schedule", "a", "job", "with", "a", "unix", "-", "like", "cron", "expression", "." ]
train
https://github.com/j-easy/easy-batch/blob/46286e1091dae1206674e2a30e0609c31feae36c/easybatch-extensions/easybatch-quartz/src/main/java/org/easybatch/extensions/quartz/JobScheduler.java#L306-L340
lodborg/interval-tree
src/main/java/com/lodborg/intervaltree/Interval.java
Interval.isRightOf
public boolean isRightOf(T point, boolean inclusive) { """ This method checks, if this current interval is entirely to the right of a point. More formally, the method will return {@code true}, if for every point {@code x} from the current interval the inequality {@code x} &gt; {@code point} holds. If the paramet...
java
public boolean isRightOf(T point, boolean inclusive){ if (point == null || start == null) return false; int compare = point.compareTo(start); if (compare != 0) return compare < 0; return !isStartInclusive() || !inclusive; }
[ "public", "boolean", "isRightOf", "(", "T", "point", ",", "boolean", "inclusive", ")", "{", "if", "(", "point", "==", "null", "||", "start", "==", "null", ")", "return", "false", ";", "int", "compare", "=", "point", ".", "compareTo", "(", "start", ")",...
This method checks, if this current interval is entirely to the right of a point. More formally, the method will return {@code true}, if for every point {@code x} from the current interval the inequality {@code x} &gt; {@code point} holds. If the parameter {@code inclusive} is set to {@code false}, this method will ret...
[ "This", "method", "checks", "if", "this", "current", "interval", "is", "entirely", "to", "the", "right", "of", "a", "point", ".", "More", "formally", "the", "method", "will", "return", "{", "@code", "true", "}", "if", "for", "every", "point", "{", "@code...
train
https://github.com/lodborg/interval-tree/blob/716b18fb0a5a53c9add9926176bc263f14c9bf90/src/main/java/com/lodborg/intervaltree/Interval.java#L379-L386