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
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java
Whitebox.setInternalState
public static void setInternalState(Object object, Object value, Object... additionalValues) { """ Set the value of a field using reflection. This method will traverse the super class hierarchy until the first field assignable to the <tt>value</tt> type is found. The <tt>value</tt> (or <tt>additionaValues</tt> ...
java
public static void setInternalState(Object object, Object value, Object... additionalValues) { WhiteboxImpl.setInternalState(object, value, additionalValues); }
[ "public", "static", "void", "setInternalState", "(", "Object", "object", ",", "Object", "value", ",", "Object", "...", "additionalValues", ")", "{", "WhiteboxImpl", ".", "setInternalState", "(", "object", ",", "value", ",", "additionalValues", ")", ";", "}" ]
Set the value of a field using reflection. This method will traverse the super class hierarchy until the first field assignable to the <tt>value</tt> type is found. The <tt>value</tt> (or <tt>additionaValues</tt> if present) will then be assigned to this field. @param object the object to modify @param value the new v...
[ "Set", "the", "value", "of", "a", "field", "using", "reflection", ".", "This", "method", "will", "traverse", "the", "super", "class", "hierarchy", "until", "the", "first", "field", "assignable", "to", "the", "<tt", ">", "value<", "/", "tt", ">", "type", ...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java#L206-L208
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringCropper.java
StringCropper.getBeforeOfWithDetails
public StrPosition getBeforeOfWithDetails(String srcStr, String token) { """ returns the string that is cropped before token with position-detail-info<br> @param srcStr @param token @return """ final StrPosition retVal = new StrPosition(); if (isBlank(srcStr) || isBlank(token)) { ...
java
public StrPosition getBeforeOfWithDetails(String srcStr, String token) { final StrPosition retVal = new StrPosition(); if (isBlank(srcStr) || isBlank(token)) { return retVal; } int tokenStartIndex = srcStr.indexOf(token); if (tokenStartIndex < 0) { ...
[ "public", "StrPosition", "getBeforeOfWithDetails", "(", "String", "srcStr", ",", "String", "token", ")", "{", "final", "StrPosition", "retVal", "=", "new", "StrPosition", "(", ")", ";", "if", "(", "isBlank", "(", "srcStr", ")", "||", "isBlank", "(", "token",...
returns the string that is cropped before token with position-detail-info<br> @param srcStr @param token @return
[ "returns", "the", "string", "that", "is", "cropped", "before", "token", "with", "position", "-", "detail", "-", "info<br", ">" ]
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringCropper.java#L232-L253
elki-project/elki
elki-index/src/main/java/de/lmu/ifi/dbs/elki/index/tree/IndexTree.java
IndexTree.initializeFromFile
public void initializeFromFile(TreeIndexHeader header, PageFile<N> file) { """ Initializes this index from an existing persistent file. @param header File header @param file Page file """ this.dirCapacity = header.getDirCapacity(); this.leafCapacity = header.getLeafCapacity(); this.dirMinimum =...
java
public void initializeFromFile(TreeIndexHeader header, PageFile<N> file) { this.dirCapacity = header.getDirCapacity(); this.leafCapacity = header.getLeafCapacity(); this.dirMinimum = header.getDirMinimum(); this.leafMinimum = header.getLeafMinimum(); if(getLogger().isDebugging()) { StringBuil...
[ "public", "void", "initializeFromFile", "(", "TreeIndexHeader", "header", ",", "PageFile", "<", "N", ">", "file", ")", "{", "this", ".", "dirCapacity", "=", "header", ".", "getDirCapacity", "(", ")", ";", "this", ".", "leafCapacity", "=", "header", ".", "g...
Initializes this index from an existing persistent file. @param header File header @param file Page file
[ "Initializes", "this", "index", "from", "an", "existing", "persistent", "file", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index/src/main/java/de/lmu/ifi/dbs/elki/index/tree/IndexTree.java#L219-L233
restfb/restfb
src/main/java/com/restfb/util/EncodingUtils.java
EncodingUtils.encodeAppSecretProof
public static String encodeAppSecretProof(String appSecret, String accessToken) { """ Generates an appsecret_proof for facebook. See https://developers.facebook.com/docs/graph-api/securing-requests for more info @param appSecret The facebook application secret @param accessToken The facebook access token ...
java
public static String encodeAppSecretProof(String appSecret, String accessToken) { try { byte[] key = appSecret.getBytes(StandardCharsets.UTF_8); SecretKeySpec signingKey = new SecretKeySpec(key, "HmacSHA256"); Mac mac = Mac.getInstance("HmacSHA256"); mac.init(signingKey); byte[] raw = ...
[ "public", "static", "String", "encodeAppSecretProof", "(", "String", "appSecret", ",", "String", "accessToken", ")", "{", "try", "{", "byte", "[", "]", "key", "=", "appSecret", ".", "getBytes", "(", "StandardCharsets", ".", "UTF_8", ")", ";", "SecretKeySpec", ...
Generates an appsecret_proof for facebook. See https://developers.facebook.com/docs/graph-api/securing-requests for more info @param appSecret The facebook application secret @param accessToken The facebook access token @return A Hex encoded SHA256 Hash as a String
[ "Generates", "an", "appsecret_proof", "for", "facebook", "." ]
train
https://github.com/restfb/restfb/blob/fb77ba5486d1339e7deb81b9830670fa209b1047/src/main/java/com/restfb/util/EncodingUtils.java#L112-L124
hal/elemento
core/src/main/java/org/jboss/gwt/elemento/core/Elements.java
Elements.toggle
public static void toggle(HTMLElement element, String css, boolean condition) { """ Adds the specified CSS class to the element if {@code condition} is {@code true}, removes it otherwise. """ if (element != null) { if (condition) { element.classList.add(css); } e...
java
public static void toggle(HTMLElement element, String css, boolean condition) { if (element != null) { if (condition) { element.classList.add(css); } else { element.classList.remove(css); } } }
[ "public", "static", "void", "toggle", "(", "HTMLElement", "element", ",", "String", "css", ",", "boolean", "condition", ")", "{", "if", "(", "element", "!=", "null", ")", "{", "if", "(", "condition", ")", "{", "element", ".", "classList", ".", "add", "...
Adds the specified CSS class to the element if {@code condition} is {@code true}, removes it otherwise.
[ "Adds", "the", "specified", "CSS", "class", "to", "the", "element", "if", "{" ]
train
https://github.com/hal/elemento/blob/26da2d5a1fe2ec55b779737dbaeda25a942eee61/core/src/main/java/org/jboss/gwt/elemento/core/Elements.java#L787-L795
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/api/OAuth2AuthorizationResource.java
OAuth2AuthorizationResource.refreshAccessToken
@POST @Path("refresh") @Consumes(MediaType.APPLICATION_JSON) public Response refreshAccessToken(RefreshTokenRequest refreshToken) { """ Refresh an access_token using the refresh token @param refreshToken refresh token @return @return access_token and refresh token if successful. Success response http://...
java
@POST @Path("refresh") @Consumes(MediaType.APPLICATION_JSON) public Response refreshAccessToken(RefreshTokenRequest refreshToken) { // Perform all validation here to control the exact error message returned to comply with the Oauth2 standard if (null == refreshToken.getRefresh_token() || null == ...
[ "@", "POST", "@", "Path", "(", "\"refresh\"", ")", "@", "Consumes", "(", "MediaType", ".", "APPLICATION_JSON", ")", "public", "Response", "refreshAccessToken", "(", "RefreshTokenRequest", "refreshToken", ")", "{", "// Perform all validation here to control the exact error...
Refresh an access_token using the refresh token @param refreshToken refresh token @return @return access_token and refresh token if successful. Success response http://tools.ietf.org/html/rfc6749#section-5.1 Failure response http://tools.ietf.org/html/rfc6749#section-5.2
[ "Refresh", "an", "access_token", "using", "the", "refresh", "token" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/OAuth2AuthorizationResource.java#L206-L243
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java
SDLoss.sparseSoftmaxCrossEntropy
public SDVariable sparseSoftmaxCrossEntropy(String name, @NonNull SDVariable logits, @NonNull SDVariable labels) { """ As per {@link #softmaxCrossEntropy(String, SDVariable, SDVariable, LossReduce)} but the labels variable is represented as an integer array instead of the equivalent one-hot array.<br> i.e., if l...
java
public SDVariable sparseSoftmaxCrossEntropy(String name, @NonNull SDVariable logits, @NonNull SDVariable labels) { validateFloatingPoint("sparse softmax cross entropy", "logits (predictions)", logits); validateInteger("sparse softmax cross entropy", "labels", labels); Preconditions.checkState(la...
[ "public", "SDVariable", "sparseSoftmaxCrossEntropy", "(", "String", "name", ",", "@", "NonNull", "SDVariable", "logits", ",", "@", "NonNull", "SDVariable", "labels", ")", "{", "validateFloatingPoint", "(", "\"sparse softmax cross entropy\"", ",", "\"logits (predictions)\"...
As per {@link #softmaxCrossEntropy(String, SDVariable, SDVariable, LossReduce)} but the labels variable is represented as an integer array instead of the equivalent one-hot array.<br> i.e., if logits are rank N, then labels have rank N-1 @param name Name of the output variable. May be null @param logits Logits array...
[ "As", "per", "{", "@link", "#softmaxCrossEntropy", "(", "String", "SDVariable", "SDVariable", "LossReduce", ")", "}", "but", "the", "labels", "variable", "is", "represented", "as", "an", "integer", "array", "instead", "of", "the", "equivalent", "one", "-", "ho...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java#L500-L508
Azure/azure-sdk-for-java
sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ServerVulnerabilityAssessmentsInner.java
ServerVulnerabilityAssessmentsInner.createOrUpdateAsync
public Observable<ServerVulnerabilityAssessmentInner> createOrUpdateAsync(String resourceGroupName, String serverName, ServerVulnerabilityAssessmentInner parameters) { """ Creates or updates the server's vulnerability assessment. @param resourceGroupName The name of the resource group that contains the resource...
java
public Observable<ServerVulnerabilityAssessmentInner> createOrUpdateAsync(String resourceGroupName, String serverName, ServerVulnerabilityAssessmentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerVulnerabilityAssess...
[ "public", "Observable", "<", "ServerVulnerabilityAssessmentInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "ServerVulnerabilityAssessmentInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", ...
Creates or updates the server's vulnerability assessment. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server for which the vulnerability assessment is defined. @param p...
[ "Creates", "or", "updates", "the", "server", "s", "vulnerability", "assessment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ServerVulnerabilityAssessmentsInner.java#L212-L219
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayPut
public static Expression arrayPut(Expression expression, Expression value) { """ Returned expression results in new array with value appended, if value is not already present, otherwise the unmodified input array. """ return x("ARRAY_PUT(" + expression.toString() + ", " + value.toString() + ")"); ...
java
public static Expression arrayPut(Expression expression, Expression value) { return x("ARRAY_PUT(" + expression.toString() + ", " + value.toString() + ")"); }
[ "public", "static", "Expression", "arrayPut", "(", "Expression", "expression", ",", "Expression", "value", ")", "{", "return", "x", "(", "\"ARRAY_PUT(\"", "+", "expression", ".", "toString", "(", ")", "+", "\", \"", "+", "value", ".", "toString", "(", ")", ...
Returned expression results in new array with value appended, if value is not already present, otherwise the unmodified input array.
[ "Returned", "expression", "results", "in", "new", "array", "with", "value", "appended", "if", "value", "is", "not", "already", "present", "otherwise", "the", "unmodified", "input", "array", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L304-L306
gsi-upm/BeastTool
beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/Reader.java
Reader.createFolder
public static File createFolder(String path, String dest_dir) throws BeastException { """ This method returns the existing folder, and if it does not exist, the method generates it. @param path @param dest_dir @return the folder @throws BeastException """ File f = new File(dest_dir);...
java
public static File createFolder(String path, String dest_dir) throws BeastException { File f = new File(dest_dir); if (!f.isDirectory()) { try { f.mkdirs(); } catch (Exception e) { logger.severe("Problem creating directory: " + path ...
[ "public", "static", "File", "createFolder", "(", "String", "path", ",", "String", "dest_dir", ")", "throws", "BeastException", "{", "File", "f", "=", "new", "File", "(", "dest_dir", ")", ";", "if", "(", "!", "f", ".", "isDirectory", "(", ")", ")", "{",...
This method returns the existing folder, and if it does not exist, the method generates it. @param path @param dest_dir @return the folder @throws BeastException
[ "This", "method", "returns", "the", "existing", "folder", "and", "if", "it", "does", "not", "exist", "the", "method", "generates", "it", "." ]
train
https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/Reader.java#L202-L229
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.readAncestor
@SuppressWarnings("deprecation") public CmsFolder readAncestor(String resourcename, int type) throws CmsException { """ Returns the first ancestor folder matching the resource type.<p> If no folder with the requested resource type is found, null is returned.<p> @param resourcename the name of the resourc...
java
@SuppressWarnings("deprecation") public CmsFolder readAncestor(String resourcename, int type) throws CmsException { return readAncestor(resourcename, CmsResourceFilter.requireType(type)); }
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "CmsFolder", "readAncestor", "(", "String", "resourcename", ",", "int", "type", ")", "throws", "CmsException", "{", "return", "readAncestor", "(", "resourcename", ",", "CmsResourceFilter", ".", "require...
Returns the first ancestor folder matching the resource type.<p> If no folder with the requested resource type is found, null is returned.<p> @param resourcename the name of the resource to start (full current site relative path) @param type the resource type of the folder to match @return the first ancestor folder ...
[ "Returns", "the", "first", "ancestor", "folder", "matching", "the", "resource", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L2343-L2347
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantLongInfo.java
ConstantLongInfo.make
static ConstantLongInfo make(ConstantPool cp, long value) { """ Will return either a new ConstantLongInfo object or one already in the constant pool. If it is a new ConstantLongInfo, it will be inserted into the pool. """ ConstantInfo ci = new ConstantLongInfo(value); return (ConstantLongInfo...
java
static ConstantLongInfo make(ConstantPool cp, long value) { ConstantInfo ci = new ConstantLongInfo(value); return (ConstantLongInfo)cp.addConstant(ci); }
[ "static", "ConstantLongInfo", "make", "(", "ConstantPool", "cp", ",", "long", "value", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantLongInfo", "(", "value", ")", ";", "return", "(", "ConstantLongInfo", ")", "cp", ".", "addConstant", "(", "ci", ")", ...
Will return either a new ConstantLongInfo object or one already in the constant pool. If it is a new ConstantLongInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantLongInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantLongInfo", "it", "will", "be", "inserted", "into", "the", "pool", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantLongInfo.java#L35-L38
openengsb/openengsb
components/ekb/persistence-persist-edb/src/main/java/org/openengsb/core/ekb/persistence/persist/edb/internal/EngineeringObjectEnhancer.java
EngineeringObjectEnhancer.reloadReferencesAndUpdateEO
private void reloadReferencesAndUpdateEO(ModelDiff diff, EngineeringObjectModelWrapper model) { """ Reload the references which have changed in the actual update and update the Engineering Object accordingly. """ for (ModelDiffEntry entry : diff.getDifferences().values()) { mergeEngineering...
java
private void reloadReferencesAndUpdateEO(ModelDiff diff, EngineeringObjectModelWrapper model) { for (ModelDiffEntry entry : diff.getDifferences().values()) { mergeEngineeringObjectWithReferencedModel(entry.getField(), model); } }
[ "private", "void", "reloadReferencesAndUpdateEO", "(", "ModelDiff", "diff", ",", "EngineeringObjectModelWrapper", "model", ")", "{", "for", "(", "ModelDiffEntry", "entry", ":", "diff", ".", "getDifferences", "(", ")", ".", "values", "(", ")", ")", "{", "mergeEng...
Reload the references which have changed in the actual update and update the Engineering Object accordingly.
[ "Reload", "the", "references", "which", "have", "changed", "in", "the", "actual", "update", "and", "update", "the", "Engineering", "Object", "accordingly", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/persistence-persist-edb/src/main/java/org/openengsb/core/ekb/persistence/persist/edb/internal/EngineeringObjectEnhancer.java#L204-L208
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/ProcessEngines.java
ProcessEngines.retry
public static ProcessEngineInfo retry(String resourceUrl) { """ retries to initialize a process engine that previously failed. """ try { return initProcessEngineFromResource(new URL(resourceUrl)); } catch (MalformedURLException e) { throw new ProcessEngineException("invalid url: "+resourceU...
java
public static ProcessEngineInfo retry(String resourceUrl) { try { return initProcessEngineFromResource(new URL(resourceUrl)); } catch (MalformedURLException e) { throw new ProcessEngineException("invalid url: "+resourceUrl, e); } }
[ "public", "static", "ProcessEngineInfo", "retry", "(", "String", "resourceUrl", ")", "{", "try", "{", "return", "initProcessEngineFromResource", "(", "new", "URL", "(", "resourceUrl", ")", ")", ";", "}", "catch", "(", "MalformedURLException", "e", ")", "{", "t...
retries to initialize a process engine that previously failed.
[ "retries", "to", "initialize", "a", "process", "engine", "that", "previously", "failed", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/ProcessEngines.java#L255-L261
wildfly/wildfly-maven-plugin
plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java
AddResourceMojo.handleDmrString
private void handleDmrString(final ModelNode node, final String name, final String value) { """ Handles DMR strings in the configuration @param node the node to create. @param name the name for the node. @param value the value for the node. """ final String realValue = value.substring(2); ...
java
private void handleDmrString(final ModelNode node, final String name, final String value) { final String realValue = value.substring(2); node.get(name).set(ModelNode.fromString(realValue)); }
[ "private", "void", "handleDmrString", "(", "final", "ModelNode", "node", ",", "final", "String", "name", ",", "final", "String", "value", ")", "{", "final", "String", "realValue", "=", "value", ".", "substring", "(", "2", ")", ";", "node", ".", "get", "(...
Handles DMR strings in the configuration @param node the node to create. @param name the name for the node. @param value the value for the node.
[ "Handles", "DMR", "strings", "in", "the", "configuration" ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java#L274-L277
legsem/legstar-core2
legstar-base/src/main/java/com/legstar/base/type/primitive/CobolPrimitiveType.java
CobolPrimitiveType.fromHost
public FromHostPrimitiveResult < T > fromHost(CobolContext cobolContext, byte[] hostData, int start) { """ Convert mainframe data into a Java object. @param cobolContext host COBOL configuration parameters @param hostData the byte array containing mainframe data @param start the start position for...
java
public FromHostPrimitiveResult < T > fromHost(CobolContext cobolContext, byte[] hostData, int start) { return fromHost(javaClass, cobolContext, hostData, start); }
[ "public", "FromHostPrimitiveResult", "<", "T", ">", "fromHost", "(", "CobolContext", "cobolContext", ",", "byte", "[", "]", "hostData", ",", "int", "start", ")", "{", "return", "fromHost", "(", "javaClass", ",", "cobolContext", ",", "hostData", ",", "start", ...
Convert mainframe data into a Java object. @param cobolContext host COBOL configuration parameters @param hostData the byte array containing mainframe data @param start the start position for the expected type in the byte array @return the mainframe value as a java object
[ "Convert", "mainframe", "data", "into", "a", "Java", "object", "." ]
train
https://github.com/legsem/legstar-core2/blob/f74d25d5b2b21a2ebaaaf2162b3fb7138dca40c6/legstar-base/src/main/java/com/legstar/base/type/primitive/CobolPrimitiveType.java#L79-L82
mediathekview/MServer
src/main/java/mServer/crawler/sender/MediathekBr.java
MediathekBr.getUrl
private String getUrl(MSStringBuilder seiteXml, String pattern) { """ gets the url for the specified pattern @param seiteXml The xml site where to extract the url @param pattern The pattern used to identify the url type @return The extracted url """ return seiteXml.extract(pattern, PATTERN_DLURL, ...
java
private String getUrl(MSStringBuilder seiteXml, String pattern) { return seiteXml.extract(pattern, PATTERN_DLURL, PATTERN_END); }
[ "private", "String", "getUrl", "(", "MSStringBuilder", "seiteXml", ",", "String", "pattern", ")", "{", "return", "seiteXml", ".", "extract", "(", "pattern", ",", "PATTERN_DLURL", ",", "PATTERN_END", ")", ";", "}" ]
gets the url for the specified pattern @param seiteXml The xml site where to extract the url @param pattern The pattern used to identify the url type @return The extracted url
[ "gets", "the", "url", "for", "the", "specified", "pattern" ]
train
https://github.com/mediathekview/MServer/blob/ba8d03e6a1a303db3807a1327f553f1decd30388/src/main/java/mServer/crawler/sender/MediathekBr.java#L585-L587
davidmarquis/fluent-interface-proxy
src/main/java/com/fluentinterface/beans/ObjectWrapper.java
ObjectWrapper.getMappedValue
public Object getMappedValue(String propertyName, Object key) { """ Returns the value of the specified mapped property from the wrapped object. @param propertyName the name of the mapped property whose value is to be extracted, cannot be {@code null} @param key the key of the property value to be extr...
java
public Object getMappedValue(String propertyName, Object key) { return getMappedValue(object, getPropertyOrThrow(bean, propertyName), key); }
[ "public", "Object", "getMappedValue", "(", "String", "propertyName", ",", "Object", "key", ")", "{", "return", "getMappedValue", "(", "object", ",", "getPropertyOrThrow", "(", "bean", ",", "propertyName", ")", ",", "key", ")", ";", "}" ]
Returns the value of the specified mapped property from the wrapped object. @param propertyName the name of the mapped property whose value is to be extracted, cannot be {@code null} @param key the key of the property value to be extracted, can be {@code null} @return the mapped property value @throws Reflect...
[ "Returns", "the", "value", "of", "the", "specified", "mapped", "property", "from", "the", "wrapped", "object", "." ]
train
https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/beans/ObjectWrapper.java#L269-L271
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineRunCommandsInner.java
VirtualMachineRunCommandsInner.getAsync
public Observable<RunCommandDocumentInner> getAsync(String location, String commandId) { """ Gets specific run command for a subscription in a location. @param location The location upon which run commands is queried. @param commandId The command id. @throws IllegalArgumentException thrown if parameters fail ...
java
public Observable<RunCommandDocumentInner> getAsync(String location, String commandId) { return getWithServiceResponseAsync(location, commandId).map(new Func1<ServiceResponse<RunCommandDocumentInner>, RunCommandDocumentInner>() { @Override public RunCommandDocumentInner call(ServiceRespo...
[ "public", "Observable", "<", "RunCommandDocumentInner", ">", "getAsync", "(", "String", "location", ",", "String", "commandId", ")", "{", "return", "getWithServiceResponseAsync", "(", "location", ",", "commandId", ")", ".", "map", "(", "new", "Func1", "<", "Serv...
Gets specific run command for a subscription in a location. @param location The location upon which run commands is queried. @param commandId The command id. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RunCommandDocumentInner object
[ "Gets", "specific", "run", "command", "for", "a", "subscription", "in", "a", "location", "." ]
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/VirtualMachineRunCommandsInner.java#L224-L231
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.getObject
public InputStream getObject(String bucketName, String objectName) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, Invali...
java
public InputStream getObject(String bucketName, String objectName) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, Invali...
[ "public", "InputStream", "getObject", "(", "String", "bucketName", ",", "String", "objectName", ")", "throws", "InvalidBucketNameException", ",", "NoSuchAlgorithmException", ",", "InsufficientDataException", ",", "IOException", ",", "InvalidKeyException", ",", "NoResponseEx...
Gets entire object's data as {@link InputStream} in given bucket. The InputStream must be closed after use else the connection will remain open. <p><b>Example:</b> <pre>{@code InputStream stream = minioClient.getObject("my-bucketname", "my-objectname"); byte[] buf = new byte[16384]; int bytesRead; while ((bytesRead = ...
[ "Gets", "entire", "object", "s", "data", "as", "{", "@link", "InputStream", "}", "in", "given", "bucket", ".", "The", "InputStream", "must", "be", "closed", "after", "use", "else", "the", "connection", "will", "remain", "open", "." ]
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L1603-L1609
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java
GlobalUsersInner.startEnvironmentAsync
public Observable<Void> startEnvironmentAsync(String userName, String environmentId) { """ Starts an environment by starting all resources inside the environment. This operation can take a while to complete. @param userName The name of the user. @param environmentId The resourceId of the environment @throws I...
java
public Observable<Void> startEnvironmentAsync(String userName, String environmentId) { return startEnvironmentWithServiceResponseAsync(userName, environmentId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { retu...
[ "public", "Observable", "<", "Void", ">", "startEnvironmentAsync", "(", "String", "userName", ",", "String", "environmentId", ")", "{", "return", "startEnvironmentWithServiceResponseAsync", "(", "userName", ",", "environmentId", ")", ".", "map", "(", "new", "Func1",...
Starts an environment by starting all resources inside the environment. This operation can take a while to complete. @param userName The name of the user. @param environmentId The resourceId of the environment @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the requ...
[ "Starts", "an", "environment", "by", "starting", "all", "resources", "inside", "the", "environment", ".", "This", "operation", "can", "take", "a", "while", "to", "complete", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L1107-L1114
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreWriter.java
DefaultDatastoreWriter.updateWithOptimisticLockingInternal
@SuppressWarnings("unchecked") protected <E> E updateWithOptimisticLockingInternal(E entity, PropertyMetadata versionMetadata) { """ Worker method for updating the given entity with optimistic locking. @param entity the entity to update @param versionMetadata the metadata for optimistic locking @return th...
java
@SuppressWarnings("unchecked") protected <E> E updateWithOptimisticLockingInternal(E entity, PropertyMetadata versionMetadata) { Transaction transaction = null; try { entityManager.executeEntityListeners(CallbackType.PRE_UPDATE, entity); Entity nativeEntity = (Entity) Marshaller.marshal(entityMana...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "E", ">", "E", "updateWithOptimisticLockingInternal", "(", "E", "entity", ",", "PropertyMetadata", "versionMetadata", ")", "{", "Transaction", "transaction", "=", "null", ";", "try", "{", "entit...
Worker method for updating the given entity with optimistic locking. @param entity the entity to update @param versionMetadata the metadata for optimistic locking @return the updated entity
[ "Worker", "method", "for", "updating", "the", "given", "entity", "with", "optimistic", "locking", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/DefaultDatastoreWriter.java#L257-L286
paypal/SeLion
client/src/main/java/com/paypal/selion/platform/html/DatePicker.java
DatePicker.datePickerInit
public void datePickerInit(String prevMonthLocator, String nextMonthLocator, String dateTextLocator) { """ DatePicker comes with default locators for widget controls previous button, next button, and date text. This method gives access to override these default locators. @param prevMonthLocator calendar widge...
java
public void datePickerInit(String prevMonthLocator, String nextMonthLocator, String dateTextLocator) { this.prevMonthLocator = prevMonthLocator; this.nextMonthLocator = nextMonthLocator; this.dateTextLocator = dateTextLocator; }
[ "public", "void", "datePickerInit", "(", "String", "prevMonthLocator", ",", "String", "nextMonthLocator", ",", "String", "dateTextLocator", ")", "{", "this", ".", "prevMonthLocator", "=", "prevMonthLocator", ";", "this", ".", "nextMonthLocator", "=", "nextMonthLocator...
DatePicker comes with default locators for widget controls previous button, next button, and date text. This method gives access to override these default locators. @param prevMonthLocator calendar widget prev month @param nextMonthLocator calendar widget next month @param dateTextLocator calendar widget month and yea...
[ "DatePicker", "comes", "with", "default", "locators", "for", "widget", "controls", "previous", "button", "next", "button", "and", "date", "text", ".", "This", "method", "gives", "access", "to", "override", "these", "default", "locators", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/DatePicker.java#L311-L315
ops4j/org.ops4j.base
ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java
Resources.getDouble
public double getDouble( String key, double defaultValue ) throws MissingResourceException { """ Retrieve a double from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource double @throws MissingResourceException if the reque...
java
public double getDouble( String key, double defaultValue ) throws MissingResourceException { try { return getDouble( key ); } catch( MissingResourceException mre ) { return defaultValue; } }
[ "public", "double", "getDouble", "(", "String", "key", ",", "double", "defaultValue", ")", "throws", "MissingResourceException", "{", "try", "{", "return", "getDouble", "(", "key", ")", ";", "}", "catch", "(", "MissingResourceException", "mre", ")", "{", "retu...
Retrieve a double from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource double @throws MissingResourceException if the requested key is unknown
[ "Retrieve", "a", "double", "from", "bundle", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java#L477-L488
h2oai/h2o-3
h2o-core/src/main/java/water/ExternalFrameUtils.java
ExternalFrameUtils.putMarkerAndSend
private static void putMarkerAndSend(AutoBuffer ab, ByteChannel channel, long data) throws IOException { """ Sends another byte as a marker if it's needed and send the data """ if(data == NUM_MARKER_NEXT_BYTE_FOLLOWS){ // we need to send another byte because zero is represented as 00 ( 2 by...
java
private static void putMarkerAndSend(AutoBuffer ab, ByteChannel channel, long data) throws IOException{ if(data == NUM_MARKER_NEXT_BYTE_FOLLOWS){ // we need to send another byte because zero is represented as 00 ( 2 bytes ) ab.put1(MARKER_ORIGINAL_VALUE); } writeToChannel...
[ "private", "static", "void", "putMarkerAndSend", "(", "AutoBuffer", "ab", ",", "ByteChannel", "channel", ",", "long", "data", ")", "throws", "IOException", "{", "if", "(", "data", "==", "NUM_MARKER_NEXT_BYTE_FOLLOWS", ")", "{", "// we need to send another byte because...
Sends another byte as a marker if it's needed and send the data
[ "Sends", "another", "byte", "as", "a", "marker", "if", "it", "s", "needed", "and", "send", "the", "data" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/ExternalFrameUtils.java#L303-L309
marvinlabs/android-floatinglabel-widgets
library/src/main/java/com/marvinlabs/widget/floatinglabel/instantpicker/TimePickerFragment.java
TimePickerFragment.newInstance
public static <TimeInstantT extends TimeInstant> TimePickerFragment newInstance(int pickerId, TimeInstantT selectedInstant) { """ Create a new time picker @param pickerId The id of the item picker @param selectedInstant The positions of the items already selected @return The arguments bundle """ ...
java
public static <TimeInstantT extends TimeInstant> TimePickerFragment newInstance(int pickerId, TimeInstantT selectedInstant) { TimePickerFragment f = new TimePickerFragment(); Bundle args = new Bundle(); args.putInt(ARG_PICKER_ID, pickerId); args.putParcelable(ARG_SELECTED_INSTANT, selec...
[ "public", "static", "<", "TimeInstantT", "extends", "TimeInstant", ">", "TimePickerFragment", "newInstance", "(", "int", "pickerId", ",", "TimeInstantT", "selectedInstant", ")", "{", "TimePickerFragment", "f", "=", "new", "TimePickerFragment", "(", ")", ";", "Bundle...
Create a new time picker @param pickerId The id of the item picker @param selectedInstant The positions of the items already selected @return The arguments bundle
[ "Create", "a", "new", "time", "picker" ]
train
https://github.com/marvinlabs/android-floatinglabel-widgets/blob/bb89889f1e75ed9b228b77d3ba895ceeeb41fe4f/library/src/main/java/com/marvinlabs/widget/floatinglabel/instantpicker/TimePickerFragment.java#L33-L42
Alluxio/alluxio
core/server/common/src/main/java/alluxio/worker/BlockUtils.java
BlockUtils.getUfsBlockPath
public static String getUfsBlockPath(UfsManager.UfsClient ufsInfo, long blockId) { """ For a given block ID, derives the corresponding UFS file of this block if it falls back to be stored in UFS. @param ufsInfo the UFS information for the mount point backing this file @param blockId block ID @return the UFS ...
java
public static String getUfsBlockPath(UfsManager.UfsClient ufsInfo, long blockId) { return PathUtils.concatPath(ufsInfo.getUfsMountPointUri(), PathUtils.temporaryFileName(MAGIC_NUMBER, ".alluxio_ufs_blocks"), blockId); }
[ "public", "static", "String", "getUfsBlockPath", "(", "UfsManager", ".", "UfsClient", "ufsInfo", ",", "long", "blockId", ")", "{", "return", "PathUtils", ".", "concatPath", "(", "ufsInfo", ".", "getUfsMountPointUri", "(", ")", ",", "PathUtils", ".", "temporaryFi...
For a given block ID, derives the corresponding UFS file of this block if it falls back to be stored in UFS. @param ufsInfo the UFS information for the mount point backing this file @param blockId block ID @return the UFS path of a block
[ "For", "a", "given", "block", "ID", "derives", "the", "corresponding", "UFS", "file", "of", "this", "block", "if", "it", "falls", "back", "to", "be", "stored", "in", "UFS", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/common/src/main/java/alluxio/worker/BlockUtils.java#L32-L35
threerings/nenya
core/src/main/java/com/threerings/util/DirectionUtil.java
DirectionUtil.getDirection
public static int getDirection (int ax, int ay, int bx, int by) { """ Returns which of the eight compass directions that point <code>b</code> lies in from point <code>a</code> as one of the {@link DirectionCodes} direction constants. <em>Note:</em> that the coordinates supplied are assumed to be logical (screen)...
java
public static int getDirection (int ax, int ay, int bx, int by) { return getDirection(Math.atan2(by-ay, bx-ax)); }
[ "public", "static", "int", "getDirection", "(", "int", "ax", ",", "int", "ay", ",", "int", "bx", ",", "int", "by", ")", "{", "return", "getDirection", "(", "Math", ".", "atan2", "(", "by", "-", "ay", ",", "bx", "-", "ax", ")", ")", ";", "}" ]
Returns which of the eight compass directions that point <code>b</code> lies in from point <code>a</code> as one of the {@link DirectionCodes} direction constants. <em>Note:</em> that the coordinates supplied are assumed to be logical (screen) rather than cartesian coordinates and <code>NORTH</code> is considered to po...
[ "Returns", "which", "of", "the", "eight", "compass", "directions", "that", "point", "<code", ">", "b<", "/", "code", ">", "lies", "in", "from", "point", "<code", ">", "a<", "/", "code", ">", "as", "one", "of", "the", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/DirectionUtil.java#L195-L198
dita-ot/dita-ot
src/main/java/org/dita/dost/writer/AbstractChunkTopicParser.java
AbstractChunkTopicParser.writeEndElement
void writeEndElement(final Writer output, final String name) throws SAXException { """ Convenience method to write an end element. @param name element name """ try { output.write(LESS_THAN); output.write(SLASH); output.write(name); output.write(GREATER...
java
void writeEndElement(final Writer output, final String name) throws SAXException { try { output.write(LESS_THAN); output.write(SLASH); output.write(name); output.write(GREATER_THAN); } catch (IOException e) { throw new SAXException(e); ...
[ "void", "writeEndElement", "(", "final", "Writer", "output", ",", "final", "String", "name", ")", "throws", "SAXException", "{", "try", "{", "output", ".", "write", "(", "LESS_THAN", ")", ";", "output", ".", "write", "(", "SLASH", ")", ";", "output", "."...
Convenience method to write an end element. @param name element name
[ "Convenience", "method", "to", "write", "an", "end", "element", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/AbstractChunkTopicParser.java#L479-L488
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DefaultComparisonFormatter.java
DefaultComparisonFormatter.appendAttribute
protected void appendAttribute(StringBuilder sb, Attr aNode) { """ Formats a placeholder for an attribute for {@link #getShortString}. @param sb the builder to append to @param aNode the attribute @since XMLUnit 2.4.0 """ sb.append("<").append(aNode.getOwnerElement().getNodeName()); sb.a...
java
protected void appendAttribute(StringBuilder sb, Attr aNode) { sb.append("<").append(aNode.getOwnerElement().getNodeName()); sb.append(' ') .append(aNode.getNodeName()).append("=\"") .append(aNode.getNodeValue()).append("\"...>"); }
[ "protected", "void", "appendAttribute", "(", "StringBuilder", "sb", ",", "Attr", "aNode", ")", "{", "sb", ".", "append", "(", "\"<\"", ")", ".", "append", "(", "aNode", ".", "getOwnerElement", "(", ")", ".", "getNodeName", "(", ")", ")", ";", "sb", "."...
Formats a placeholder for an attribute for {@link #getShortString}. @param sb the builder to append to @param aNode the attribute @since XMLUnit 2.4.0
[ "Formats", "a", "placeholder", "for", "an", "attribute", "for", "{", "@link", "#getShortString", "}", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DefaultComparisonFormatter.java#L317-L322
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaGraphicsSubResourceGetMappedArray
public static int cudaGraphicsSubResourceGetMappedArray(cudaArray arrayPtr, cudaGraphicsResource resource, int arrayIndex, int mipLevel) { """ Get an array through which to access a subresource of a mapped graphics resource. <pre> cudaError_t cudaGraphicsSubResourceGetMappedArray ( cudaArray_t* array, cudaGr...
java
public static int cudaGraphicsSubResourceGetMappedArray(cudaArray arrayPtr, cudaGraphicsResource resource, int arrayIndex, int mipLevel) { return checkResult(cudaGraphicsSubResourceGetMappedArrayNative(arrayPtr, resource, arrayIndex, mipLevel)); }
[ "public", "static", "int", "cudaGraphicsSubResourceGetMappedArray", "(", "cudaArray", "arrayPtr", ",", "cudaGraphicsResource", "resource", ",", "int", "arrayIndex", ",", "int", "mipLevel", ")", "{", "return", "checkResult", "(", "cudaGraphicsSubResourceGetMappedArrayNative"...
Get an array through which to access a subresource of a mapped graphics resource. <pre> cudaError_t cudaGraphicsSubResourceGetMappedArray ( cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel ) </pre> <div> <p>Get an array through which to access a subresource of a map...
[ "Get", "an", "array", "through", "which", "to", "access", "a", "subresource", "of", "a", "mapped", "graphics", "resource", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L11659-L11662
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/PairwiseSetOperations.java
PairwiseSetOperations.aNotB
public static CompactSketch aNotB(final Sketch skA, final Sketch skB) { """ This implements a stateless, pair-wise <i>A AND NOT B</i> operation on Sketches that are either Heap-based or Direct. If both inputs are null a null is returned. @param skA The first Sketch argument. @param skB The second Sketch argu...
java
public static CompactSketch aNotB(final Sketch skA, final Sketch skB) { if ((skA == null) && (skB == null)) { return null; } final short seedHash = (skA == null) ? skB.getSeedHash() : skA.getSeedHash(); final HeapAnotB anotb = new HeapAnotB(seedHash); return anotb.aNotB(skA, skB, true, null); }
[ "public", "static", "CompactSketch", "aNotB", "(", "final", "Sketch", "skA", ",", "final", "Sketch", "skB", ")", "{", "if", "(", "(", "skA", "==", "null", ")", "&&", "(", "skB", "==", "null", ")", ")", "{", "return", "null", ";", "}", "final", "sho...
This implements a stateless, pair-wise <i>A AND NOT B</i> operation on Sketches that are either Heap-based or Direct. If both inputs are null a null is returned. @param skA The first Sketch argument. @param skB The second Sketch argument. @return the result as an ordered CompactSketch on the heap.
[ "This", "implements", "a", "stateless", "pair", "-", "wise", "<i", ">", "A", "AND", "NOT", "B<", "/", "i", ">", "operation", "on", "Sketches", "that", "are", "either", "Heap", "-", "based", "or", "Direct", ".", "If", "both", "inputs", "are", "null", ...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/PairwiseSetOperations.java#L51-L56
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_server_PUT
public void organizationName_service_exchangeService_server_PUT(String organizationName, String exchangeService, OvhServer body) throws IOException { """ Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/server @param body [required] New object properties @par...
java
public void organizationName_service_exchangeService_server_PUT(String organizationName, String exchangeService, OvhServer body) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/server"; StringBuilder sb = path(qPath, organizationName, exchangeService); exec(qPath,...
[ "public", "void", "organizationName_service_exchangeService_server_PUT", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "OvhServer", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/exchange/{organizationName}/service/{exch...
Alter this object properties REST: PUT /email/exchange/{organizationName}/service/{exchangeService}/server @param body [required] New object properties @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal name of your exchange service
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L407-L411
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java
CommandLineApplication.addOption
public final void addOption(String shortOpt, String longOpt, String desc, boolean hasArg) { """ Adds a command-line option. This is only useful before calling {@link #start() start}. @param shortOpt Short, one character option (e.g., {@code -t}) @param longOpt Long, one or two word option (e.g., {...
java
public final void addOption(String shortOpt, String longOpt, String desc, boolean hasArg) { cliOptions.addOption(new Option(shortOpt, longOpt, hasArg, desc)); }
[ "public", "final", "void", "addOption", "(", "String", "shortOpt", ",", "String", "longOpt", ",", "String", "desc", ",", "boolean", "hasArg", ")", "{", "cliOptions", ".", "addOption", "(", "new", "Option", "(", "shortOpt", ",", "longOpt", ",", "hasArg", ",...
Adds a command-line option. This is only useful before calling {@link #start() start}. @param shortOpt Short, one character option (e.g., {@code -t}) @param longOpt Long, one or two word option (e.g., {@code --long-option}) @param desc Option description (e.g., {@code does something great}) @param hasArg boolean {@cod...
[ "Adds", "a", "command", "-", "line", "option", ".", "This", "is", "only", "useful", "before", "calling", "{", "@link", "#start", "()", "start", "}", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java#L423-L426
code4everything/util
src/main/java/com/zhazhapan/util/encryption/JavaEncrypt.java
JavaEncrypt.cryptDES
private static String cryptDES(String string, int opmode, String key) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException { """ Cipher加密解密器 @param string {@link String} @param opmode...
java
private static String cryptDES(String string, int opmode, String key) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException { String result = ""; int isInit = "DES".equals(key...
[ "private", "static", "String", "cryptDES", "(", "String", "string", ",", "int", "opmode", ",", "String", "key", ")", "throws", "NoSuchAlgorithmException", ",", "NoSuchPaddingException", ",", "InvalidKeyException", ",", "UnsupportedEncodingException", ",", "IllegalBlockS...
Cipher加密解密器 @param string {@link String} @param opmode {@link Integer} @param key {@link String} @return {@link String} @throws NoSuchPaddingException 异常 @throws NoSuchAlgorithmException 异常 @throws InvalidKeyException 异常 @throws BadPaddingException 异常 @throws IllegalBlockSizeException 异常 @throws UnsupportedEncodingE...
[ "Cipher加密解密器" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/encryption/JavaEncrypt.java#L155-L177
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java
DynamoDBMapper.getVersionAttributeValue
private AttributeValue getVersionAttributeValue(final Method getter, Object getterReturnResult) { """ Gets the attribute value object corresponding to the {@link DynamoDBVersionAttribute} getter, and its result, given. Null values are assumed to be new objects and given the smallest possible positive value. Non...
java
private AttributeValue getVersionAttributeValue(final Method getter, Object getterReturnResult) { ArgumentMarshaller marshaller = reflector.getVersionedArgumentMarshaller(getter, getterReturnResult); return marshaller.marshall(getterReturnResult); }
[ "private", "AttributeValue", "getVersionAttributeValue", "(", "final", "Method", "getter", ",", "Object", "getterReturnResult", ")", "{", "ArgumentMarshaller", "marshaller", "=", "reflector", ".", "getVersionedArgumentMarshaller", "(", "getter", ",", "getterReturnResult", ...
Gets the attribute value object corresponding to the {@link DynamoDBVersionAttribute} getter, and its result, given. Null values are assumed to be new objects and given the smallest possible positive value. Non-null values are incremented from their current value.
[ "Gets", "the", "attribute", "value", "object", "corresponding", "to", "the", "{" ]
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java#L1020-L1023
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.setBodyFilter
public void setBodyFilter(int pathId, String bodyFilter) { """ Sets the body filter for this ID @param pathId ID of path @param bodyFilter Body filter to set """ PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConn...
java
public void setBodyFilter(int pathId, String bodyFilter) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { statement = sqlConnection.prepareStatement( "UPDATE " + Constants.DB_TABLE_PATH + " SET " + Constan...
[ "public", "void", "setBodyFilter", "(", "int", "pathId", ",", "String", "bodyFilter", ")", "{", "PreparedStatement", "statement", "=", "null", ";", "try", "(", "Connection", "sqlConnection", "=", "sqlService", ".", "getConnection", "(", ")", ")", "{", "stateme...
Sets the body filter for this ID @param pathId ID of path @param bodyFilter Body filter to set
[ "Sets", "the", "body", "filter", "for", "this", "ID" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L1177-L1199
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java
EmbedBuilder.addField
public EmbedBuilder addField(String name, String value) { """ Adds a non-inline field to the embed. @param name The name of the field. @param value The value of the field. @return The current instance in order to chain call methods. """ delegate.addField(name, value, false); return this; ...
java
public EmbedBuilder addField(String name, String value) { delegate.addField(name, value, false); return this; }
[ "public", "EmbedBuilder", "addField", "(", "String", "name", ",", "String", "value", ")", "{", "delegate", ".", "addField", "(", "name", ",", "value", ",", "false", ")", ";", "return", "this", ";", "}" ]
Adds a non-inline field to the embed. @param name The name of the field. @param value The value of the field. @return The current instance in order to chain call methods.
[ "Adds", "a", "non", "-", "inline", "field", "to", "the", "embed", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java#L611-L614
sebastiangraf/treetank
interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java
PipelineBuilder.addStep
public void addStep(final AbsAxis axis, final AbsFilter mFilter) { """ Adds a step to the pipeline. @param axis the axis step to add to the pipeline. @param mFilter the node test to add to the pipeline. """ getExpression().add(new FilterAxis(axis, mRtx, mFilter)); }
java
public void addStep(final AbsAxis axis, final AbsFilter mFilter) { getExpression().add(new FilterAxis(axis, mRtx, mFilter)); }
[ "public", "void", "addStep", "(", "final", "AbsAxis", "axis", ",", "final", "AbsFilter", "mFilter", ")", "{", "getExpression", "(", ")", ".", "add", "(", "new", "FilterAxis", "(", "axis", ",", "mRtx", ",", "mFilter", ")", ")", ";", "}" ]
Adds a step to the pipeline. @param axis the axis step to add to the pipeline. @param mFilter the node test to add to the pipeline.
[ "Adds", "a", "step", "to", "the", "pipeline", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/xml/src/main/java/org/treetank/service/xml/xpath/PipelineBuilder.java#L508-L511
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/command/CommandRegistry.java
CommandRegistry.bindShortcuts
private void bindShortcuts(Map<Object, Object> shortcuts) { """ Binds the shortcuts specified in the map to the associated commands. The map key is the command name and the associated value is a list of shortcuts bound to the command. @param shortcuts Shortcut map. """ for (Object commandName : sho...
java
private void bindShortcuts(Map<Object, Object> shortcuts) { for (Object commandName : shortcuts.keySet()) { bindShortcuts(commandName.toString(), shortcuts.get(commandName).toString()); } }
[ "private", "void", "bindShortcuts", "(", "Map", "<", "Object", ",", "Object", ">", "shortcuts", ")", "{", "for", "(", "Object", "commandName", ":", "shortcuts", ".", "keySet", "(", ")", ")", "{", "bindShortcuts", "(", "commandName", ".", "toString", "(", ...
Binds the shortcuts specified in the map to the associated commands. The map key is the command name and the associated value is a list of shortcuts bound to the command. @param shortcuts Shortcut map.
[ "Binds", "the", "shortcuts", "specified", "in", "the", "map", "to", "the", "associated", "commands", ".", "The", "map", "key", "is", "the", "command", "name", "and", "the", "associated", "value", "is", "a", "list", "of", "shortcuts", "bound", "to", "the", ...
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/command/CommandRegistry.java#L101-L105
HtmlUnit/htmlunit-cssparser
src/main/java/com/gargoylesoftware/css/dom/CSSMediaRuleImpl.java
CSSMediaRuleImpl.insertRule
public void insertRule(final String rule, final int index) throws DOMException { """ Insert a new rule at the given index. @param rule the rule to be inserted @param index the insert pos @throws DOMException in case of error """ final CSSStyleSheetImpl parentStyleSheet = getParentStyleSheet(); ...
java
public void insertRule(final String rule, final int index) throws DOMException { final CSSStyleSheetImpl parentStyleSheet = getParentStyleSheet(); try { final CSSOMParser parser = new CSSOMParser(); parser.setParentStyleSheet(parentStyleSheet); parser.setErrorHandler...
[ "public", "void", "insertRule", "(", "final", "String", "rule", ",", "final", "int", "index", ")", "throws", "DOMException", "{", "final", "CSSStyleSheetImpl", "parentStyleSheet", "=", "getParentStyleSheet", "(", ")", ";", "try", "{", "final", "CSSOMParser", "pa...
Insert a new rule at the given index. @param rule the rule to be inserted @param index the insert pos @throws DOMException in case of error
[ "Insert", "a", "new", "rule", "at", "the", "given", "index", "." ]
train
https://github.com/HtmlUnit/htmlunit-cssparser/blob/384e4170737169b5b4c87c5766495d9b8a6d3866/src/main/java/com/gargoylesoftware/css/dom/CSSMediaRuleImpl.java#L126-L157
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/runtime/RuntimeNaaccrDictionary.java
RuntimeNaaccrDictionary.computeId
public static String computeId(String recordType, NaaccrDictionary baseDictionary, Collection<NaaccrDictionary> userDictionaries) { """ Helper method to compute an ID for a runtime dictionary based on the URI of its base and user dictionaries. @param baseDictionary base dictionary (required) @param userDictionar...
java
public static String computeId(String recordType, NaaccrDictionary baseDictionary, Collection<NaaccrDictionary> userDictionaries) { if (baseDictionary == null) return recordType; StringBuilder buf = new StringBuilder(recordType); buf.append(";").append(baseDictionary.getDictionaryUr...
[ "public", "static", "String", "computeId", "(", "String", "recordType", ",", "NaaccrDictionary", "baseDictionary", ",", "Collection", "<", "NaaccrDictionary", ">", "userDictionaries", ")", "{", "if", "(", "baseDictionary", "==", "null", ")", "return", "recordType", ...
Helper method to compute an ID for a runtime dictionary based on the URI of its base and user dictionaries. @param baseDictionary base dictionary (required) @param userDictionaries user-defined dictionaries (optional, can be null or empty) @return computed runtime dictionary ID, never null
[ "Helper", "method", "to", "compute", "an", "ID", "for", "a", "runtime", "dictionary", "based", "on", "the", "URI", "of", "its", "base", "and", "user", "dictionaries", "." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/runtime/RuntimeNaaccrDictionary.java#L124-L135
box/box-java-sdk
src/main/java/com/box/sdk/BoxFolder.java
BoxFolder.uploadLargeFile
public BoxFile.Info uploadLargeFile(InputStream inputStream, String fileName, long fileSize) throws InterruptedException, IOException { """ Creates a new file. @param inputStream the stream instance that contains the data. @param fileName the name of the file to be created. @param fileSize t...
java
public BoxFile.Info uploadLargeFile(InputStream inputStream, String fileName, long fileSize) throws InterruptedException, IOException { URL url = UPLOAD_SESSION_URL_TEMPLATE.build(this.getAPI().getBaseUploadURL()); return new LargeFileUpload(). upload(this.getAPI(), this.getI...
[ "public", "BoxFile", ".", "Info", "uploadLargeFile", "(", "InputStream", "inputStream", ",", "String", "fileName", ",", "long", "fileSize", ")", "throws", "InterruptedException", ",", "IOException", "{", "URL", "url", "=", "UPLOAD_SESSION_URL_TEMPLATE", ".", "build"...
Creates a new file. @param inputStream the stream instance that contains the data. @param fileName the name of the file to be created. @param fileSize the size of the file that will be uploaded. @return the created file instance. @throws InterruptedException when a thread execution is interrupted. @throws IOExce...
[ "Creates", "a", "new", "file", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L1085-L1090
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java
ST_GeometryShadow.computeShadow
public static Geometry computeShadow(Geometry geometry, Geometry sunPosition, double height) { """ Compute the shadow footprint based on @param geometry input geometry @param sunPosition as a point where x = azimuth and y=altitude @param height of the geometry @return """ if (sunPosition != null)...
java
public static Geometry computeShadow(Geometry geometry, Geometry sunPosition, double height) { if (sunPosition != null) { if (sunPosition instanceof Point) { return computeShadow(geometry, sunPosition.getCoordinate().x, sunPosition.getCoordinate().y, height, true); } ...
[ "public", "static", "Geometry", "computeShadow", "(", "Geometry", "geometry", ",", "Geometry", "sunPosition", ",", "double", "height", ")", "{", "if", "(", "sunPosition", "!=", "null", ")", "{", "if", "(", "sunPosition", "instanceof", "Point", ")", "{", "ret...
Compute the shadow footprint based on @param geometry input geometry @param sunPosition as a point where x = azimuth and y=altitude @param height of the geometry @return
[ "Compute", "the", "shadow", "footprint", "based", "on" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java#L70-L80
base2Services/kagura
shared/reporting-core/src/main/java/com/base2/kagura/core/report/parameterTypes/ParamConfig.java
ParamConfig.prepareParameter
public void prepareParameter(Map<String, Object> extra) { """ Prepares the parameter's datasource, passing it the extra options and if necessary executing the appropriate code and caching the value. @param extra """ if (from != null) { from.prepareParameter(extra); } }
java
public void prepareParameter(Map<String, Object> extra) { if (from != null) { from.prepareParameter(extra); } }
[ "public", "void", "prepareParameter", "(", "Map", "<", "String", ",", "Object", ">", "extra", ")", "{", "if", "(", "from", "!=", "null", ")", "{", "from", ".", "prepareParameter", "(", "extra", ")", ";", "}", "}" ]
Prepares the parameter's datasource, passing it the extra options and if necessary executing the appropriate code and caching the value. @param extra
[ "Prepares", "the", "parameter", "s", "datasource", "passing", "it", "the", "extra", "options", "and", "if", "necessary", "executing", "the", "appropriate", "code", "and", "caching", "the", "value", "." ]
train
https://github.com/base2Services/kagura/blob/5564aa71bfa2cb3baaae2eb098c6c673dd4e82ee/shared/reporting-core/src/main/java/com/base2/kagura/core/report/parameterTypes/ParamConfig.java#L263-L268
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/CreateOptions.java
CreateOptions.getOpt
public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) { """ Get an option of desired type @param theClass is the desired class of the opt @param opts - not null - at least one opt must be passed @return an opt from one of the opts of type theClass. returns null ...
java
public static CreateOptions getOpt(Class<? extends CreateOptions> theClass, CreateOptions... opts) { if (opts == null) return null; CreateOptions result = null; for (int i = 0; i < opts.length; ++i) { if (opts[i].getClass() == theClass) { if (result != null) throw new IllegalAr...
[ "public", "static", "CreateOptions", "getOpt", "(", "Class", "<", "?", "extends", "CreateOptions", ">", "theClass", ",", "CreateOptions", "...", "opts", ")", "{", "if", "(", "opts", "==", "null", ")", "return", "null", ";", "CreateOptions", "result", "=", ...
Get an option of desired type @param theClass is the desired class of the opt @param opts - not null - at least one opt must be passed @return an opt from one of the opts of type theClass. returns null if there isn't any
[ "Get", "an", "option", "of", "desired", "type" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/CreateOptions.java#L145-L157
arakelian/more-commons
src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java
XmlStreamReaderUtils.optionalShortAttribute
public static short optionalShortAttribute( final XMLStreamReader reader, final String localName, final short defaultValue) { """ Returns the value of an attribute as a short. If the attribute is empty, this method returns the default value provided. @param reader <code>XML...
java
public static short optionalShortAttribute( final XMLStreamReader reader, final String localName, final short defaultValue) { return optionalShortAttribute(reader, null, localName, defaultValue); }
[ "public", "static", "short", "optionalShortAttribute", "(", "final", "XMLStreamReader", "reader", ",", "final", "String", "localName", ",", "final", "short", "defaultValue", ")", "{", "return", "optionalShortAttribute", "(", "reader", ",", "null", ",", "localName", ...
Returns the value of an attribute as a short. If the attribute is empty, this method returns the default value provided. @param reader <code>XMLStreamReader</code> that contains attribute values. @param localName local name of attribute (the namespace is ignored). @param defaultValue default value @return value of att...
[ "Returns", "the", "value", "of", "an", "attribute", "as", "a", "short", ".", "If", "the", "attribute", "is", "empty", "this", "method", "returns", "the", "default", "value", "provided", "." ]
train
https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L887-L892
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getRune
public Future<Item> getRune(int id, ItemData data) { """ <p> Retrieve a specific runes </p> This method does not count towards the rate limit and is not affected by the throttle @param id The id of the runes @param data Additional information to retrieve @return The runes @see <a href=https://developer.riot...
java
public Future<Item> getRune(int id, ItemData data) { return new DummyFuture<>(handler.getRune(id, data)); }
[ "public", "Future", "<", "Item", ">", "getRune", "(", "int", "id", ",", "ItemData", "data", ")", "{", "return", "new", "DummyFuture", "<>", "(", "handler", ".", "getRune", "(", "id", ",", "data", ")", ")", ";", "}" ]
<p> Retrieve a specific runes </p> This method does not count towards the rate limit and is not affected by the throttle @param id The id of the runes @param data Additional information to retrieve @return The runes @see <a href=https://developer.riotgames.com/api/methods#!/649/2168>Official API documentation</a>
[ "<p", ">", "Retrieve", "a", "specific", "runes", "<", "/", "p", ">", "This", "method", "does", "not", "count", "towards", "the", "rate", "limit", "and", "is", "not", "affected", "by", "the", "throttle" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L684-L686
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.tooSmallArrayParameter
@Pure @Inline(value = "AssertMessages.tooSmallArrayParameter(0, $1, $2)", imported = { """ Size of the first array parameter is too small. @param currentSize current size of the array. @param expectedSize expected size. @return the error message. """AssertMessages.class}) public static String tooSmallAr...
java
@Pure @Inline(value = "AssertMessages.tooSmallArrayParameter(0, $1, $2)", imported = {AssertMessages.class}) public static String tooSmallArrayParameter(int currentSize, int expectedSize) { return tooSmallArrayParameter(0, currentSize, expectedSize); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"AssertMessages.tooSmallArrayParameter(0, $1, $2)\"", ",", "imported", "=", "{", "AssertMessages", ".", "class", "}", ")", "public", "static", "String", "tooSmallArrayParameter", "(", "int", "currentSize", ",", "int",...
Size of the first array parameter is too small. @param currentSize current size of the array. @param expectedSize expected size. @return the error message.
[ "Size", "of", "the", "first", "array", "parameter", "is", "too", "small", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L303-L307
rhuss/jolokia
agent/core/src/main/java/org/jolokia/util/MimeTypeUtil.java
MimeTypeUtil.getResponseMimeType
public static String getResponseMimeType(String pRequestMimeType, String defaultMimeType, String pCallback) { """ Extract the response mime type. This value is calculated for different situations: <p> <ul> <li>If a callback is given and its valid, the mime type is "text/javascript"</li> <li>Otherwise: <ul> <...
java
public static String getResponseMimeType(String pRequestMimeType, String defaultMimeType, String pCallback) { // For a valid given callback, return "text/javascript" for proper inclusion if (pCallback != null && isValidCallback(pCallback)) { return "text/javascript"; } // P...
[ "public", "static", "String", "getResponseMimeType", "(", "String", "pRequestMimeType", ",", "String", "defaultMimeType", ",", "String", "pCallback", ")", "{", "// For a valid given callback, return \"text/javascript\" for proper inclusion", "if", "(", "pCallback", "!=", "nul...
Extract the response mime type. This value is calculated for different situations: <p> <ul> <li>If a callback is given and its valid, the mime type is "text/javascript"</li> <li>Otherwise: <ul> <li>If a valid mimeType is given in the request ("text/plain", "application/json"), then this mimet type is returned</li> <li>...
[ "Extract", "the", "response", "mime", "type", ".", "This", "value", "is", "calculated", "for", "different", "situations", ":", "<p", ">", "<ul", ">", "<li", ">", "If", "a", "callback", "is", "given", "and", "its", "valid", "the", "mime", "type", "is", ...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/util/MimeTypeUtil.java#L34-L48
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java
SlotPoolImpl.releaseTaskManager
@Override public boolean releaseTaskManager(final ResourceID resourceId, final Exception cause) { """ Unregister TaskManager from this pool, all the related slots will be released and tasks be canceled. Called when we find some TaskManager becomes "dead" or "abnormal", and we decide to not using slots from it an...
java
@Override public boolean releaseTaskManager(final ResourceID resourceId, final Exception cause) { componentMainThreadExecutor.assertRunningInMainThread(); if (registeredTaskManagers.remove(resourceId)) { releaseTaskManagerInternal(resourceId, cause); return true; } else { return false; } }
[ "@", "Override", "public", "boolean", "releaseTaskManager", "(", "final", "ResourceID", "resourceId", ",", "final", "Exception", "cause", ")", "{", "componentMainThreadExecutor", ".", "assertRunningInMainThread", "(", ")", ";", "if", "(", "registeredTaskManagers", "."...
Unregister TaskManager from this pool, all the related slots will be released and tasks be canceled. Called when we find some TaskManager becomes "dead" or "abnormal", and we decide to not using slots from it anymore. @param resourceId The id of the TaskManager @param cause for the releasing of the TaskManager
[ "Unregister", "TaskManager", "from", "this", "pool", "all", "the", "related", "slots", "will", "be", "released", "and", "tasks", "be", "canceled", ".", "Called", "when", "we", "find", "some", "TaskManager", "becomes", "dead", "or", "abnormal", "and", "we", "...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImpl.java#L705-L716
qiujuer/Genius-Android
caprice/kit-handler/src/main/java/net/qiujuer/genius/kit/handler/Run.java
Run.onUiAsync
public static Result onUiAsync(Action action) { """ Asynchronously The current thread asynchronous run relative to the main thread, not blocking the current thread @param action Action Interface """ if (Looper.myLooper() == Looper.getMainLooper()) { action.call(); return ne...
java
public static Result onUiAsync(Action action) { if (Looper.myLooper() == Looper.getMainLooper()) { action.call(); return new ActionAsyncTask(action, true); } ActionAsyncTask task = new ActionAsyncTask(action); getUiPoster().async(task); return task; }
[ "public", "static", "Result", "onUiAsync", "(", "Action", "action", ")", "{", "if", "(", "Looper", ".", "myLooper", "(", ")", "==", "Looper", ".", "getMainLooper", "(", ")", ")", "{", "action", ".", "call", "(", ")", ";", "return", "new", "ActionAsyncT...
Asynchronously The current thread asynchronous run relative to the main thread, not blocking the current thread @param action Action Interface
[ "Asynchronously", "The", "current", "thread", "asynchronous", "run", "relative", "to", "the", "main", "thread", "not", "blocking", "the", "current", "thread" ]
train
https://github.com/qiujuer/Genius-Android/blob/babefaf1321f5883a21cada582b6fa5104adc648/caprice/kit-handler/src/main/java/net/qiujuer/genius/kit/handler/Run.java#L134-L142
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.eachCombination
public static void eachCombination(Iterable self, Closure<?> function) { """ Applies a function on each combination of the input lists. <p> Example usage: <pre class="groovyTestCase">[[2, 3],[4, 5, 6]].eachCombination { println "Found $it" }</pre> @param self a Collection of lists @param function a closure ...
java
public static void eachCombination(Iterable self, Closure<?> function) { each(GroovyCollections.combinations(self), function); }
[ "public", "static", "void", "eachCombination", "(", "Iterable", "self", ",", "Closure", "<", "?", ">", "function", ")", "{", "each", "(", "GroovyCollections", ".", "combinations", "(", "self", ")", ",", "function", ")", ";", "}" ]
Applies a function on each combination of the input lists. <p> Example usage: <pre class="groovyTestCase">[[2, 3],[4, 5, 6]].eachCombination { println "Found $it" }</pre> @param self a Collection of lists @param function a closure to be called on each combination @see groovy.util.GroovyCollections#combinations(Iterabl...
[ "Applies", "a", "function", "on", "each", "combination", "of", "the", "input", "lists", ".", "<p", ">", "Example", "usage", ":", "<pre", "class", "=", "groovyTestCase", ">", "[[", "2", "3", "]", "[", "4", "5", "6", "]]", ".", "eachCombination", "{", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L5324-L5326
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/Utils.java
Utils.parseBoolean
public static boolean parseBoolean(String valueName, String value, boolean defaultValue) { """ Validate that the given string value is a valid boolean ("true" or "false", case insensitive) and convert it to a boolean @param valueName @param value @param defaultValue result to be returned if value is null @retu...
java
public static boolean parseBoolean(String valueName, String value, boolean defaultValue) { boolean result = defaultValue; if (value != null) { boolean valid = true; result = Boolean.parseBoolean(value); // parseBoolean allows any value, e.g. so a typo like "trye" woul...
[ "public", "static", "boolean", "parseBoolean", "(", "String", "valueName", ",", "String", "value", ",", "boolean", "defaultValue", ")", "{", "boolean", "result", "=", "defaultValue", ";", "if", "(", "value", "!=", "null", ")", "{", "boolean", "valid", "=", ...
Validate that the given string value is a valid boolean ("true" or "false", case insensitive) and convert it to a boolean @param valueName @param value @param defaultValue result to be returned if value is null @return @throws IllegalArgumentException if the value is not a positive integer (including if it is an empty ...
[ "Validate", "that", "the", "given", "string", "value", "is", "a", "valid", "boolean", "(", "true", "or", "false", "case", "insensitive", ")", "and", "convert", "it", "to", "a", "boolean" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/Utils.java#L525-L543
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/RoaringBitmap.java
RoaringBitmap.andNotCardinality
public static int andNotCardinality(final RoaringBitmap x1, final RoaringBitmap x2) { """ Cardinality of the bitwise ANDNOT (left difference) operation. The provided bitmaps are *not* modified. This operation is thread-safe as long as the provided bitmaps remain unchanged. @param x1 first bitmap @param x2 ot...
java
public static int andNotCardinality(final RoaringBitmap x1, final RoaringBitmap x2) { return x1.getCardinality() - andCardinality(x1, x2); }
[ "public", "static", "int", "andNotCardinality", "(", "final", "RoaringBitmap", "x1", ",", "final", "RoaringBitmap", "x2", ")", "{", "return", "x1", ".", "getCardinality", "(", ")", "-", "andCardinality", "(", "x1", ",", "x2", ")", ";", "}" ]
Cardinality of the bitwise ANDNOT (left difference) operation. The provided bitmaps are *not* modified. This operation is thread-safe as long as the provided bitmaps remain unchanged. @param x1 first bitmap @param x2 other bitmap @return cardinality of the left difference
[ "Cardinality", "of", "the", "bitwise", "ANDNOT", "(", "left", "difference", ")", "operation", ".", "The", "provided", "bitmaps", "are", "*", "not", "*", "modified", ".", "This", "operation", "is", "thread", "-", "safe", "as", "long", "as", "the", "provided...
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/RoaringBitmap.java#L871-L873
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/utils/comments/AbstractReportPageCommentProcessor.java
AbstractReportPageCommentProcessor.setCommentLabel
protected void setCommentLabel(Long id, String caption, String value) { """ Sets a label for a specified comment @param id comment id @param caption caption @param value value """ Map<String, String> valueMap = answers.get(id); if (valueMap == null) { valueMap = new LinkedHashMap<>(); } ...
java
protected void setCommentLabel(Long id, String caption, String value) { Map<String, String> valueMap = answers.get(id); if (valueMap == null) { valueMap = new LinkedHashMap<>(); } valueMap.put(caption, value); answers.put(id, valueMap); }
[ "protected", "void", "setCommentLabel", "(", "Long", "id", ",", "String", "caption", ",", "String", "value", ")", "{", "Map", "<", "String", ",", "String", ">", "valueMap", "=", "answers", ".", "get", "(", "id", ")", ";", "if", "(", "valueMap", "==", ...
Sets a label for a specified comment @param id comment id @param caption caption @param value value
[ "Sets", "a", "label", "for", "a", "specified", "comment" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/comments/AbstractReportPageCommentProcessor.java#L101-L109
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java
RateLimiterBucket.getPeriodBoundary
private static long getPeriodBoundary(long timestamp, RateBucketPeriod period) { """ Gets the boundary timestamp for the given rate bucket period. In other words, returns the timestamp associated with when the rate period will reset. @param timestamp @param period """ Calendar lastCal = Calendar.ge...
java
private static long getPeriodBoundary(long timestamp, RateBucketPeriod period) { Calendar lastCal = Calendar.getInstance(); lastCal.setTimeInMillis(timestamp); switch (period) { case Second: lastCal.set(Calendar.MILLISECOND, 0); lastCal.add(Calendar.SECOND, 1); ...
[ "private", "static", "long", "getPeriodBoundary", "(", "long", "timestamp", ",", "RateBucketPeriod", "period", ")", "{", "Calendar", "lastCal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "lastCal", ".", "setTimeInMillis", "(", "timestamp", ")", ";", "...
Gets the boundary timestamp for the given rate bucket period. In other words, returns the timestamp associated with when the rate period will reset. @param timestamp @param period
[ "Gets", "the", "boundary", "timestamp", "for", "the", "given", "rate", "bucket", "period", ".", "In", "other", "words", "returns", "the", "timestamp", "associated", "with", "when", "the", "rate", "period", "will", "reset", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/rates/RateLimiterBucket.java#L81-L125
GumTreeDiff/gumtree
core/src/main/java/com/github/gumtreediff/tree/TreeContext.java
TreeContext.setMetadata
public Object setMetadata(String key, Object value) { """ Store a global metadata. @param key of the metadata @param value of the metadata @return the previous value of metadata if existed or null """ return metadata.put(key, value); }
java
public Object setMetadata(String key, Object value) { return metadata.put(key, value); }
[ "public", "Object", "setMetadata", "(", "String", "key", ",", "Object", "value", ")", "{", "return", "metadata", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Store a global metadata. @param key of the metadata @param value of the metadata @return the previous value of metadata if existed or null
[ "Store", "a", "global", "metadata", "." ]
train
https://github.com/GumTreeDiff/gumtree/blob/a772d4d652af44bff22c38a234ddffbfbd365a37/core/src/main/java/com/github/gumtreediff/tree/TreeContext.java#L97-L99
caligin/tinytypes
jersey/src/main/java/tech/anima/tinytypes/jersey/JerseyResponseSupport.java
JerseyResponseSupport.registerTinyTypes
public static void registerTinyTypes(Class<?> head, Class<?>... tail) { """ Registers Jersey HeaderDelegateProviders for the specified TinyTypes. @param head a TinyType @param tail other TinyTypes @throws IllegalArgumentException when a non-TinyType is given """ final Set<HeaderDelegateProvider> s...
java
public static void registerTinyTypes(Class<?> head, Class<?>... tail) { final Set<HeaderDelegateProvider> systemRegisteredHeaderProviders = stealAcquireRefToHeaderDelegateProviders(); register(head, systemRegisteredHeaderProviders); for (Class<?> tt : tail) { register(tt, systemRegis...
[ "public", "static", "void", "registerTinyTypes", "(", "Class", "<", "?", ">", "head", ",", "Class", "<", "?", ">", "...", "tail", ")", "{", "final", "Set", "<", "HeaderDelegateProvider", ">", "systemRegisteredHeaderProviders", "=", "stealAcquireRefToHeaderDelegate...
Registers Jersey HeaderDelegateProviders for the specified TinyTypes. @param head a TinyType @param tail other TinyTypes @throws IllegalArgumentException when a non-TinyType is given
[ "Registers", "Jersey", "HeaderDelegateProviders", "for", "the", "specified", "TinyTypes", "." ]
train
https://github.com/caligin/tinytypes/blob/3f79b3b35e241770a9ea0a72782210b0c2b79eb0/jersey/src/main/java/tech/anima/tinytypes/jersey/JerseyResponseSupport.java#L22-L28
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.getByIdAsync
public Observable<GenericResourceInner> getByIdAsync(String resourceId, String apiVersion) { """ Gets a resource by ID. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-pr...
java
public Observable<GenericResourceInner> getByIdAsync(String resourceId, String apiVersion) { return getByIdWithServiceResponseAsync(resourceId, apiVersion).map(new Func1<ServiceResponse<GenericResourceInner>, GenericResourceInner>() { @Override public GenericResourceInner call(ServiceRes...
[ "public", "Observable", "<", "GenericResourceInner", ">", "getByIdAsync", "(", "String", "resourceId", ",", "String", "apiVersion", ")", "{", "return", "getByIdWithServiceResponseAsync", "(", "resourceId", ",", "apiVersion", ")", ".", "map", "(", "new", "Func1", "...
Gets a resource by ID. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} @param apiVersion The API version to use for the opera...
[ "Gets", "a", "resource", "by", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L2415-L2422
google/closure-compiler
src/com/google/javascript/jscomp/TypedScopeCreator.java
TypedScopeCreator.patchGlobalScope
void patchGlobalScope(TypedScope globalScope, Node scriptRoot) { """ Patches a given global scope by removing variables previously declared in a script and re-traversing a new version of that script. @param globalScope The global scope generated by {@code createScope}. @param scriptRoot The script that is mod...
java
void patchGlobalScope(TypedScope globalScope, Node scriptRoot) { // Preconditions: This is supposed to be called only on (named) SCRIPT nodes // and a global typed scope should have been generated already. checkState(scriptRoot.isScript()); checkNotNull(globalScope); checkState(globalScope.isGlobal(...
[ "void", "patchGlobalScope", "(", "TypedScope", "globalScope", ",", "Node", "scriptRoot", ")", "{", "// Preconditions: This is supposed to be called only on (named) SCRIPT nodes", "// and a global typed scope should have been generated already.", "checkState", "(", "scriptRoot", ".", ...
Patches a given global scope by removing variables previously declared in a script and re-traversing a new version of that script. @param globalScope The global scope generated by {@code createScope}. @param scriptRoot The script that is modified.
[ "Patches", "a", "given", "global", "scope", "by", "removing", "variables", "previously", "declared", "in", "a", "script", "and", "re", "-", "traversing", "a", "new", "version", "of", "that", "script", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypedScopeCreator.java#L558-L603
samskivert/samskivert
src/main/java/com/samskivert/util/BaseArrayList.java
BaseArrayList.rangeCheck
protected final void rangeCheck (int index, boolean insert) { """ Check the range of a passed-in index to make sure it's valid. @param insert if true, an index equal to our size is valid. """ if ((index < 0) || (insert ? (index > _size) : (index >= _size))) { throw new IndexOutOfBoundsEx...
java
protected final void rangeCheck (int index, boolean insert) { if ((index < 0) || (insert ? (index > _size) : (index >= _size))) { throw new IndexOutOfBoundsException( "Index: " + index + ", Size: " + _size); } }
[ "protected", "final", "void", "rangeCheck", "(", "int", "index", ",", "boolean", "insert", ")", "{", "if", "(", "(", "index", "<", "0", ")", "||", "(", "insert", "?", "(", "index", ">", "_size", ")", ":", "(", "index", ">=", "_size", ")", ")", ")...
Check the range of a passed-in index to make sure it's valid. @param insert if true, an index equal to our size is valid.
[ "Check", "the", "range", "of", "a", "passed", "-", "in", "index", "to", "make", "sure", "it", "s", "valid", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/BaseArrayList.java#L153-L159
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java
BaseApplet.addSubPanels
public boolean addSubPanels(Container parent, int options) { """ Add any applet sub-panel(s) now. Usually, you override this, although for a simple screen, just pass a screen=class param. @param parent The parent to add the new screen to. @param options options @return true if success """ if (paren...
java
public boolean addSubPanels(Container parent, int options) { if (parent == null) parent = m_parent; String strScreen = this.getProperty(Params.SCREEN); JBasePanel baseScreen = (JBasePanel)ClassServiceUtility.getClassService().makeObjectFromClassName(strScreen); if (baseSc...
[ "public", "boolean", "addSubPanels", "(", "Container", "parent", ",", "int", "options", ")", "{", "if", "(", "parent", "==", "null", ")", "parent", "=", "m_parent", ";", "String", "strScreen", "=", "this", ".", "getProperty", "(", "Params", ".", "SCREEN", ...
Add any applet sub-panel(s) now. Usually, you override this, although for a simple screen, just pass a screen=class param. @param parent The parent to add the new screen to. @param options options @return true if success
[ "Add", "any", "applet", "sub", "-", "panel", "(", "s", ")", "now", ".", "Usually", "you", "override", "this", "although", "for", "a", "simple", "screen", "just", "pass", "a", "screen", "=", "class", "param", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java#L328-L343
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/android/Util.java
Util.encodePostBody
@Deprecated public static String encodePostBody(Bundle parameters, String boundary) { """ Generate the multi-part post body providing the parameters and boundary string @param parameters the parameters need to be posted @param boundary the random string as boundary @return a string of the post body "...
java
@Deprecated public static String encodePostBody(Bundle parameters, String boundary) { if (parameters == null) return ""; StringBuilder sb = new StringBuilder(); for (String key : parameters.keySet()) { Object parameter = parameters.get(key); if (!(parameter instanceo...
[ "@", "Deprecated", "public", "static", "String", "encodePostBody", "(", "Bundle", "parameters", ",", "String", "boundary", ")", "{", "if", "(", "parameters", "==", "null", ")", "return", "\"\"", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "...
Generate the multi-part post body providing the parameters and boundary string @param parameters the parameters need to be posted @param boundary the random string as boundary @return a string of the post body
[ "Generate", "the", "multi", "-", "part", "post", "body", "providing", "the", "parameters", "and", "boundary", "string" ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/android/Util.java#L56-L73
korpling/ANNIS
annis-service/src/main/java/annis/service/internal/QueryServiceImpl.java
QueryServiceImpl.requiredParameter
private void requiredParameter(String value, String name, String description) throws WebApplicationException { """ Throw an exception if the parameter is missing. @param value Value which is checked for null. @param name The short name of parameter. @param description A one line description of the meaing ...
java
private void requiredParameter(String value, String name, String description) throws WebApplicationException { if (value == null) { throw new WebApplicationException( Response.status(Response.Status.BAD_REQUEST).type( MediaType.TEXT_PLAIN).entity( "missing required parameter ...
[ "private", "void", "requiredParameter", "(", "String", "value", ",", "String", "name", ",", "String", "description", ")", "throws", "WebApplicationException", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "Respo...
Throw an exception if the parameter is missing. @param value Value which is checked for null. @param name The short name of parameter. @param description A one line description of the meaing of the parameter.
[ "Throw", "an", "exception", "if", "the", "parameter", "is", "missing", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/service/internal/QueryServiceImpl.java#L1000-L1011
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.removeZeros
public static void removeZeros( DMatrixSparseCSC input , DMatrixSparseCSC output , double tol ) { """ Copies all elements from input into output which are &gt; tol. @param input (Input) input matrix. Not modified. @param output (Output) Output matrix. Modified and shaped to match input. @param tol Tolerance fo...
java
public static void removeZeros( DMatrixSparseCSC input , DMatrixSparseCSC output , double tol ) { ImplCommonOps_DSCC.removeZeros(input,output,tol); }
[ "public", "static", "void", "removeZeros", "(", "DMatrixSparseCSC", "input", ",", "DMatrixSparseCSC", "output", ",", "double", "tol", ")", "{", "ImplCommonOps_DSCC", ".", "removeZeros", "(", "input", ",", "output", ",", "tol", ")", ";", "}" ]
Copies all elements from input into output which are &gt; tol. @param input (Input) input matrix. Not modified. @param output (Output) Output matrix. Modified and shaped to match input. @param tol Tolerance for defining zero
[ "Copies", "all", "elements", "from", "input", "into", "output", "which", "are", "&gt", ";", "tol", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1761-L1763
actorapp/droidkit-actors
actors/src/main/java/com/droidkit/actors/ActorSystem.java
ActorSystem.addDispatcher
public void addDispatcher(String dispatcherId) { """ Adding dispatcher with threads count = {@code Runtime.getRuntime().availableProcessors()} @param dispatcherId dispatcher id """ addDispatcher(dispatcherId, new ActorDispatcher(dispatcherId, this, Runtime.getRuntime().availableProcessors())); }
java
public void addDispatcher(String dispatcherId) { addDispatcher(dispatcherId, new ActorDispatcher(dispatcherId, this, Runtime.getRuntime().availableProcessors())); }
[ "public", "void", "addDispatcher", "(", "String", "dispatcherId", ")", "{", "addDispatcher", "(", "dispatcherId", ",", "new", "ActorDispatcher", "(", "dispatcherId", ",", "this", ",", "Runtime", ".", "getRuntime", "(", ")", ".", "availableProcessors", "(", ")", ...
Adding dispatcher with threads count = {@code Runtime.getRuntime().availableProcessors()} @param dispatcherId dispatcher id
[ "Adding", "dispatcher", "with", "threads", "count", "=", "{", "@code", "Runtime", ".", "getRuntime", "()", ".", "availableProcessors", "()", "}" ]
train
https://github.com/actorapp/droidkit-actors/blob/fdb72fcfdd1c5e54a970f203a33a71fa54344217/actors/src/main/java/com/droidkit/actors/ActorSystem.java#L73-L75
rjeschke/txtmark
src/main/java/com/github/rjeschke/txtmark/Utils.java
Utils.appendMailto
public final static void appendMailto(final StringBuilder out, final String in, final int start, final int end) { """ Appends the given mailto link using obfuscation. @param out The StringBuilder to write to. @param in Input String. @param start Input String starting position. @param end Input String end...
java
public final static void appendMailto(final StringBuilder out, final String in, final int start, final int end) { for (int i = start; i < end; i++) { final char c; final int r = rnd(); switch (c = in.charAt(i)) { case '&': case ...
[ "public", "final", "static", "void", "appendMailto", "(", "final", "StringBuilder", "out", ",", "final", "String", "in", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", "...
Appends the given mailto link using obfuscation. @param out The StringBuilder to write to. @param in Input String. @param start Input String starting position. @param end Input String end position.
[ "Appends", "the", "given", "mailto", "link", "using", "obfuscation", "." ]
train
https://github.com/rjeschke/txtmark/blob/108cee6b209a362843729c032c2d982625d12d98/src/main/java/com/github/rjeschke/txtmark/Utils.java#L556-L595
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/permission/PermissionTemplateService.java
PermissionTemplateService.findTemplate
@CheckForNull private PermissionTemplateDto findTemplate(DbSession dbSession, ComponentDto component) { """ Return the permission template for the given component. If no template key pattern match then consider default template for the component qualifier. """ String organizationUuid = component.getOrga...
java
@CheckForNull private PermissionTemplateDto findTemplate(DbSession dbSession, ComponentDto component) { String organizationUuid = component.getOrganizationUuid(); List<PermissionTemplateDto> allPermissionTemplates = dbClient.permissionTemplateDao().selectAll(dbSession, organizationUuid, null); List<Permis...
[ "@", "CheckForNull", "private", "PermissionTemplateDto", "findTemplate", "(", "DbSession", "dbSession", ",", "ComponentDto", "component", ")", "{", "String", "organizationUuid", "=", "component", ".", "getOrganizationUuid", "(", ")", ";", "List", "<", "PermissionTempl...
Return the permission template for the given component. If no template key pattern match then consider default template for the component qualifier.
[ "Return", "the", "permission", "template", "for", "the", "given", "component", ".", "If", "no", "template", "key", "pattern", "match", "then", "consider", "default", "template", "for", "the", "component", "qualifier", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/permission/PermissionTemplateService.java#L181-L217
comapi/comapi-chat-sdk-android
COMAPI/chat/src/main/java/com/comapi/chat/internal/MessageProcessor.java
MessageProcessor.createFinalMessage
public ChatMessage createFinalMessage(MessageSentResponse response) { """ Create a final message for a conversation. At this point we know message id and sent event id. @param response Response from sending message call. @return Final message to be saved in persistance store. """ return ChatMessage...
java
public ChatMessage createFinalMessage(MessageSentResponse response) { return ChatMessage.builder() .setMessageId(response.getId()) .setSentEventId(response.getEventId()) .setConversationId(conversationId) .setSentBy(sender) .setFrom...
[ "public", "ChatMessage", "createFinalMessage", "(", "MessageSentResponse", "response", ")", "{", "return", "ChatMessage", ".", "builder", "(", ")", ".", "setMessageId", "(", "response", ".", "getId", "(", ")", ")", ".", "setSentEventId", "(", "response", ".", ...
Create a final message for a conversation. At this point we know message id and sent event id. @param response Response from sending message call. @return Final message to be saved in persistance store.
[ "Create", "a", "final", "message", "for", "a", "conversation", ".", "At", "this", "point", "we", "know", "message", "id", "and", "sent", "event", "id", "." ]
train
https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/internal/MessageProcessor.java#L250-L260
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotationXYZ
public Matrix4f rotationXYZ(float angleX, float angleY, float angleZ) { """ Set this matrix to a rotation of <code>angleX</code> radians about the X axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When u...
java
public Matrix4f rotationXYZ(float angleX, float angleY, float angleZ) { float sinX = (float) Math.sin(angleX); float cosX = (float) Math.cosFromSin(sinX, angleX); float sinY = (float) Math.sin(angleY); float cosY = (float) Math.cosFromSin(sinY, angleY); float sinZ = (float) Math....
[ "public", "Matrix4f", "rotationXYZ", "(", "float", "angleX", ",", "float", "angleY", ",", "float", "angleZ", ")", "{", "float", "sinX", "=", "(", "float", ")", "Math", ".", "sin", "(", "angleX", ")", ";", "float", "cosX", "=", "(", "float", ")", "Mat...
Set this matrix to a rotation of <code>angleX</code> radians about the X axis, followed by a rotation of <code>angleY</code> radians about the Y axis and followed by a rotation of <code>angleZ</code> radians about the Z axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vecto...
[ "Set", "this", "matrix", "to", "a", "rotation", "of", "<code", ">", "angleX<", "/", "code", ">", "radians", "about", "the", "X", "axis", "followed", "by", "a", "rotation", "of", "<code", ">", "angleY<", "/", "code", ">", "radians", "about", "the", "Y",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L3611-L3644
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java
FilterExprIteratorSimple.setRoot
public void setRoot(int context, Object environment) { """ Initialize the context values for this expression after it is cloned. @param context The XPath runtime context for this transformation. """ super.setRoot(context, environment); m_exprObj = executeFilterExpr(context, m_execContext, getPrefixR...
java
public void setRoot(int context, Object environment) { super.setRoot(context, environment); m_exprObj = executeFilterExpr(context, m_execContext, getPrefixResolver(), getIsTopLevel(), m_stackFrame, m_expr); }
[ "public", "void", "setRoot", "(", "int", "context", ",", "Object", "environment", ")", "{", "super", ".", "setRoot", "(", "context", ",", "environment", ")", ";", "m_exprObj", "=", "executeFilterExpr", "(", "context", ",", "m_execContext", ",", "getPrefixResol...
Initialize the context values for this expression after it is cloned. @param context The XPath runtime context for this transformation.
[ "Initialize", "the", "context", "values", "for", "this", "expression", "after", "it", "is", "cloned", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java#L76-L81
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java
CommerceAccountPersistenceImpl.filterFindByCompanyId
@Override public List<CommerceAccount> filterFindByCompanyId(long companyId, int start, int end) { """ Returns a range of all the commerce accounts that the user has permission to view where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code...
java
@Override public List<CommerceAccount> filterFindByCompanyId(long companyId, int start, int end) { return filterFindByCompanyId(companyId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccount", ">", "filterFindByCompanyId", "(", "long", "companyId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "filterFindByCompanyId", "(", "companyId", ",", "start", ",", "end", ",", "null", "...
Returns a range of all the commerce accounts that the user has permission to view where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> ...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "accounts", "that", "the", "user", "has", "permission", "to", "view", "where", "companyId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java#L568-L572
stevespringett/Alpine
alpine/src/main/java/alpine/persistence/AlpineQueryManager.java
AlpineQueryManager.hasPermission
public boolean hasPermission(final UserPrincipal user, String permissionName, boolean includeTeams) { """ Determines if the specified UserPrincipal has been assigned the specified permission. @param user the UserPrincipal to query @param permissionName the name of the permission @param includeTeams if true, wil...
java
public boolean hasPermission(final UserPrincipal user, String permissionName, boolean includeTeams) { Query query; if (user instanceof ManagedUser) { query = pm.newQuery(Permission.class, "name == :permissionName && managedUsers.contains(:user)"); } else { query = pm.newQ...
[ "public", "boolean", "hasPermission", "(", "final", "UserPrincipal", "user", ",", "String", "permissionName", ",", "boolean", "includeTeams", ")", "{", "Query", "query", ";", "if", "(", "user", "instanceof", "ManagedUser", ")", "{", "query", "=", "pm", ".", ...
Determines if the specified UserPrincipal has been assigned the specified permission. @param user the UserPrincipal to query @param permissionName the name of the permission @param includeTeams if true, will query all Team membership assigned to the user for the specified permission @return true if the user has the per...
[ "Determines", "if", "the", "specified", "UserPrincipal", "has", "been", "assigned", "the", "specified", "permission", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/persistence/AlpineQueryManager.java#L528-L548
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/io/IOUtils.java
IOUtils.writeObjectToTempFile
public static File writeObjectToTempFile(Object o, String filename) throws IOException { """ Write object to temp file which is destroyed when the program exits. @param o object to be written to file @param filename name of the temp file @throws IOException If file cannot be written @return File contai...
java
public static File writeObjectToTempFile(Object o, String filename) throws IOException { File file = File.createTempFile(filename, ".tmp"); file.deleteOnExit(); ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream( new GZIPOutputStream(new FileOutputStream(file)))); o...
[ "public", "static", "File", "writeObjectToTempFile", "(", "Object", "o", ",", "String", "filename", ")", "throws", "IOException", "{", "File", "file", "=", "File", ".", "createTempFile", "(", "filename", ",", "\".tmp\"", ")", ";", "file", ".", "deleteOnExit", ...
Write object to temp file which is destroyed when the program exits. @param o object to be written to file @param filename name of the temp file @throws IOException If file cannot be written @return File containing the object
[ "Write", "object", "to", "temp", "file", "which", "is", "destroyed", "when", "the", "program", "exits", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/io/IOUtils.java#L124-L133
logic-ng/LogicNG
src/main/java/org/logicng/collections/LNGBooleanVector.java
LNGBooleanVector.growTo
public void growTo(int size, boolean pad) { """ Grows the vector to a new size and initializes the new elements with a given value. @param size the new size @param pad the value for new elements """ if (this.size >= size) return; this.ensure(size); for (int i = this.size; i < size; i++) ...
java
public void growTo(int size, boolean pad) { if (this.size >= size) return; this.ensure(size); for (int i = this.size; i < size; i++) this.elements[i] = pad; this.size = size; }
[ "public", "void", "growTo", "(", "int", "size", ",", "boolean", "pad", ")", "{", "if", "(", "this", ".", "size", ">=", "size", ")", "return", ";", "this", ".", "ensure", "(", "size", ")", ";", "for", "(", "int", "i", "=", "this", ".", "size", "...
Grows the vector to a new size and initializes the new elements with a given value. @param size the new size @param pad the value for new elements
[ "Grows", "the", "vector", "to", "a", "new", "size", "and", "initializes", "the", "new", "elements", "with", "a", "given", "value", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/collections/LNGBooleanVector.java#L176-L183
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GatewayResponse.java
GatewayResponse.withResponseTemplates
public GatewayResponse withResponseTemplates(java.util.Map<String, String> responseTemplates) { """ <p> Response templates of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. </p> @param responseTemplates Response templates of the <a>GatewayResponse</a> as a string-to-string map of ke...
java
public GatewayResponse withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
[ "public", "GatewayResponse", "withResponseTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseTemplates", ")", "{", "setResponseTemplates", "(", "responseTemplates", ")", ";", "return", "this", ";", "}" ]
<p> Response templates of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. </p> @param responseTemplates Response templates of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Response", "templates", "of", "the", "<a", ">", "GatewayResponse<", "/", "a", ">", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GatewayResponse.java#L546-L549
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java
SVGHyperSphere.drawCross
public static Element drawCross(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) { """ Wireframe "cross" hypersphere @param svgp SVG Plot @param proj Visualization projection @param mid mean vector @param radius radius @return path element """ final double[] v_mid = mid.toArray(); ...
java
public static Element drawCross(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) { final double[] v_mid = mid.toArray(); final long[] dims = proj.getVisibleDimensions2D(); SVGPath path = new SVGPath(); for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(dims...
[ "public", "static", "Element", "drawCross", "(", "SVGPlot", "svgp", ",", "Projection2D", "proj", ",", "NumberVector", "mid", ",", "double", "radius", ")", "{", "final", "double", "[", "]", "v_mid", "=", "mid", ".", "toArray", "(", ")", ";", "final", "lon...
Wireframe "cross" hypersphere @param svgp SVG Plot @param proj Visualization projection @param mid mean vector @param radius radius @return path element
[ "Wireframe", "cross", "hypersphere" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java#L253-L267
craterdog/java-primitive-types
src/main/java/craterdog/primitives/VersionString.java
VersionString.getNewVersion
static public VersionString getNewVersion(VersionString version, int depth) { """ This method returns a new version number in the series by incrementing the version at the specified depth and truncating the rest of the version numbers. If the current version is "2.5.7" and the depth is 2, the next version would...
java
static public VersionString getNewVersion(VersionString version, int depth) { if (depth < 1 || depth > version.value.length + 1) throw new NumberFormatException("The depth cannot be less than zero or greater than the depth of the current version number: " + depth); int[] newVersion = Arrays.copyOf(versi...
[ "static", "public", "VersionString", "getNewVersion", "(", "VersionString", "version", ",", "int", "depth", ")", "{", "if", "(", "depth", "<", "1", "||", "depth", ">", "version", ".", "value", ".", "length", "+", "1", ")", "throw", "new", "NumberFormatExce...
This method returns a new version number in the series by incrementing the version at the specified depth and truncating the rest of the version numbers. If the current version is "2.5.7" and the depth is 2, the next version would be "2.6". If the current version is "1.22" and the depth is 3, the next version would be...
[ "This", "method", "returns", "a", "new", "version", "number", "in", "the", "series", "by", "incrementing", "the", "version", "at", "the", "specified", "depth", "and", "truncating", "the", "rest", "of", "the", "version", "numbers", ".", "If", "the", "current"...
train
https://github.com/craterdog/java-primitive-types/blob/730f9bceacfac69f99b094464a7da5747c07a59e/src/main/java/craterdog/primitives/VersionString.java#L144-L149
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java
ProxyTask.getNextIntParam
public int getNextIntParam(InputStream in, String strName, Map<String, Object> properties) { """ Get the next (String) param. @param strName The param name (in most implementations this is optional). @param properties The temporary remote session properties @return The next param as a string. """ St...
java
public int getNextIntParam(InputStream in, String strName, Map<String, Object> properties) { String strInteger = this.getNextStringParam(in, strName, properties); return Integer.parseInt(strInteger); }
[ "public", "int", "getNextIntParam", "(", "InputStream", "in", ",", "String", "strName", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "String", "strInteger", "=", "this", ".", "getNextStringParam", "(", "in", ",", "strName", ",", "...
Get the next (String) param. @param strName The param name (in most implementations this is optional). @param properties The temporary remote session properties @return The next param as a string.
[ "Get", "the", "next", "(", "String", ")", "param", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java#L261-L265
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/Address.java
Address.fromString
public static Address fromString(@Nullable NetworkParameters params, String str) throws AddressFormatException { """ Construct an address from its textual form. @param params the expected network this address is valid for, or null if the network should be derived from the textual form @param str ...
java
public static Address fromString(@Nullable NetworkParameters params, String str) throws AddressFormatException { try { return LegacyAddress.fromBase58(params, str); } catch (AddressFormatException.WrongNetwork x) { throw x; } catch (AddressFormatException x) {...
[ "public", "static", "Address", "fromString", "(", "@", "Nullable", "NetworkParameters", "params", ",", "String", "str", ")", "throws", "AddressFormatException", "{", "try", "{", "return", "LegacyAddress", ".", "fromBase58", "(", "params", ",", "str", ")", ";", ...
Construct an address from its textual form. @param params the expected network this address is valid for, or null if the network should be derived from the textual form @param str the textual form of the address, such as "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL" or "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" @return const...
[ "Construct", "an", "address", "from", "its", "textual", "form", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/Address.java#L54-L69
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java
ResourceUtil.isWriteEnabled
public static boolean isWriteEnabled(Resource resource, String relPath) throws RepositoryException { """ Checks the access control policies for enabled changes (node creation and property change). @param resource @param relPath @return @throws RepositoryException """ ResourceResolver resolver = ...
java
public static boolean isWriteEnabled(Resource resource, String relPath) throws RepositoryException { ResourceResolver resolver = resource.getResourceResolver(); Session session = resolver.adaptTo(Session.class); AccessControlManager accessManager = AccessControlUtil.getAccessControlManager(sess...
[ "public", "static", "boolean", "isWriteEnabled", "(", "Resource", "resource", ",", "String", "relPath", ")", "throws", "RepositoryException", "{", "ResourceResolver", "resolver", "=", "resource", ".", "getResourceResolver", "(", ")", ";", "Session", "session", "=", ...
Checks the access control policies for enabled changes (node creation and property change). @param resource @param relPath @return @throws RepositoryException
[ "Checks", "the", "access", "control", "policies", "for", "enabled", "changes", "(", "node", "creation", "and", "property", "change", ")", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/ResourceUtil.java#L399-L427
thorntail/thorntail
plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java
GradleDependencyResolutionHelper.getCachedReference
@SuppressWarnings("unchecked") private static <T> T getCachedReference(Project project, String key, Supplier<T> supplier) { """ Get data (identified by the given key) that has been cached on the given Gradle project reference. @param project the Gradle project reference. @param key the key used for c...
java
@SuppressWarnings("unchecked") private static <T> T getCachedReference(Project project, String key, Supplier<T> supplier) { if (project == null) { throw new IllegalArgumentException("Gradle project reference cannot be null."); } Project rootProject = project.getRootProject(); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "<", "T", ">", "T", "getCachedReference", "(", "Project", "project", ",", "String", "key", ",", "Supplier", "<", "T", ">", "supplier", ")", "{", "if", "(", "project", "==", "null", ...
Get data (identified by the given key) that has been cached on the given Gradle project reference. @param project the Gradle project reference. @param key the key used for caching the data. @param supplier the function that needs to be executed in the event of a cache-miss. @param <T> the type of the data s...
[ "Get", "data", "(", "identified", "by", "the", "given", "key", ")", "that", "has", "been", "cached", "on", "the", "given", "Gradle", "project", "reference", "." ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java#L382-L398
amaembo/streamex
src/main/java/one/util/streamex/IntStreamEx.java
IntStreamEx.mapFirst
public IntStreamEx mapFirst(IntUnaryOperator mapper) { """ Returns a stream where the first element is the replaced with the result of applying the given function while the other elements are left intact. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate operation</a>. @param mappe...
java
public IntStreamEx mapFirst(IntUnaryOperator mapper) { return delegate(new PairSpliterator.PSOfInt((a, b) -> b, mapper, spliterator(), PairSpliterator.MODE_MAP_FIRST)); }
[ "public", "IntStreamEx", "mapFirst", "(", "IntUnaryOperator", "mapper", ")", "{", "return", "delegate", "(", "new", "PairSpliterator", ".", "PSOfInt", "(", "(", "a", ",", "b", ")", "->", "b", ",", "mapper", ",", "spliterator", "(", ")", ",", "PairSpliterat...
Returns a stream where the first element is the replaced with the result of applying the given function while the other elements are left intact. <p> This is a <a href="package-summary.html#StreamOps">quasi-intermediate operation</a>. @param mapper a <a href="package-summary.html#NonInterference">non-interfering </a>...
[ "Returns", "a", "stream", "where", "the", "first", "element", "is", "the", "replaced", "with", "the", "result", "of", "applying", "the", "given", "function", "while", "the", "other", "elements", "are", "left", "intact", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L1704-L1707
getsentry/sentry-java
sentry/src/main/java/io/sentry/event/EventBuilder.java
EventBuilder.withTag
public EventBuilder withTag(String tagKey, String tagValue) { """ Adds a tag to an event. <p> This allows to set a tag value in different contexts. @param tagKey name of the tag. @param tagValue value of the tag. @return the current {@code EventBuilder} for chained calls. """ event.getTags().p...
java
public EventBuilder withTag(String tagKey, String tagValue) { event.getTags().put(tagKey, tagValue); return this; }
[ "public", "EventBuilder", "withTag", "(", "String", "tagKey", ",", "String", "tagValue", ")", "{", "event", ".", "getTags", "(", ")", ".", "put", "(", "tagKey", ",", "tagValue", ")", ";", "return", "this", ";", "}" ]
Adds a tag to an event. <p> This allows to set a tag value in different contexts. @param tagKey name of the tag. @param tagValue value of the tag. @return the current {@code EventBuilder} for chained calls.
[ "Adds", "a", "tag", "to", "an", "event", ".", "<p", ">", "This", "allows", "to", "set", "a", "tag", "value", "in", "different", "contexts", "." ]
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry/src/main/java/io/sentry/event/EventBuilder.java#L303-L306
apereo/cas
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/MultifactorAuthenticationUtils.java
MultifactorAuthenticationUtils.resolveEventViaSingleAttribute
@SneakyThrows public static Set<Event> resolveEventViaSingleAttribute(final Principal principal, final Object attributeValue, final RegisteredService service, ...
java
@SneakyThrows public static Set<Event> resolveEventViaSingleAttribute(final Principal principal, final Object attributeValue, final RegisteredService service, ...
[ "@", "SneakyThrows", "public", "static", "Set", "<", "Event", ">", "resolveEventViaSingleAttribute", "(", "final", "Principal", "principal", ",", "final", "Object", "attributeValue", ",", "final", "RegisteredService", "service", ",", "final", "Optional", "<", "Reque...
Resolve event via single attribute set. @param principal the principal @param attributeValue the attribute value @param service the service @param context the context @param provider the provider @param predicate the predicate @return the set
[ "Resolve", "event", "via", "single", "attribute", "set", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/MultifactorAuthenticationUtils.java#L156-L174
AzureAD/azure-activedirectory-library-for-java
src/samples/web-app-samples-for-adal4j/src/main/java/com/microsoft/aad/adal4jsample/HttpClientHelper.java
HttpClientHelper.processGoodRespStr
public static JSONObject processGoodRespStr(int responseCode, String goodRespStr) throws JSONException { """ for bad response, whose responseCode is not 200 level @param responseCode @param errorCode @param errorMsg @return @throws JSONException """ JSONObject response = new JSONObject(); ...
java
public static JSONObject processGoodRespStr(int responseCode, String goodRespStr) throws JSONException { JSONObject response = new JSONObject(); response.put("responseCode", responseCode); if (goodRespStr.equalsIgnoreCase("")) { response.put("responseMsg", ""); } else { ...
[ "public", "static", "JSONObject", "processGoodRespStr", "(", "int", "responseCode", ",", "String", "goodRespStr", ")", "throws", "JSONException", "{", "JSONObject", "response", "=", "new", "JSONObject", "(", ")", ";", "response", ".", "put", "(", "\"responseCode\"...
for bad response, whose responseCode is not 200 level @param responseCode @param errorCode @param errorMsg @return @throws JSONException
[ "for", "bad", "response", "whose", "responseCode", "is", "not", "200", "level" ]
train
https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/7f0004fee6faee5818e75623113993a267ceb1c4/src/samples/web-app-samples-for-adal4j/src/main/java/com/microsoft/aad/adal4jsample/HttpClientHelper.java#L133-L143
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
EnhancedBigtableStub.createBulkMutateRowsBatchingCallable
private UnaryCallable<RowMutation, Void> createBulkMutateRowsBatchingCallable() { """ Creates a callable chain to handle MutatesRows RPCs. This is meant to be used for automatic batching with flow control. The chain will: <ul> <li>Convert a {@link RowMutation} into a {@link MutateRowsRequest} with a single en...
java
private UnaryCallable<RowMutation, Void> createBulkMutateRowsBatchingCallable() { UnaryCallable<MutateRowsRequest, Void> baseCallable = createMutateRowsBaseCallable(); BatchingCallSettings.Builder<MutateRowsRequest, Void> batchingCallSettings = BatchingCallSettings.newBuilder(new MutateRowsBatchingDesc...
[ "private", "UnaryCallable", "<", "RowMutation", ",", "Void", ">", "createBulkMutateRowsBatchingCallable", "(", ")", "{", "UnaryCallable", "<", "MutateRowsRequest", ",", "Void", ">", "baseCallable", "=", "createMutateRowsBaseCallable", "(", ")", ";", "BatchingCallSetting...
Creates a callable chain to handle MutatesRows RPCs. This is meant to be used for automatic batching with flow control. The chain will: <ul> <li>Convert a {@link RowMutation} into a {@link MutateRowsRequest} with a single entry. <li>Using gax's {@link com.google.api.gax.rpc.BatchingCallable} to spool the requests and ...
[ "Creates", "a", "callable", "chain", "to", "handle", "MutatesRows", "RPCs", ".", "This", "is", "meant", "to", "be", "used", "for", "automatic", "batching", "with", "flow", "control", ".", "The", "chain", "will", ":" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java#L340-L363
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.removeValue
private void removeValue(TreeMultimap<Long, Long> mm, long value) { """ Convenience method that remove all instances of the given value from the given map @param mm a multimap @param value a value that needs to be removed """ Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); whi...
java
private void removeValue(TreeMultimap<Long, Long> mm, long value) { Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); while (itr.hasNext()) { Map.Entry<Long,Long> e = itr.next(); if (e.getValue().equals(value)) { itr.remove(); } } ...
[ "private", "void", "removeValue", "(", "TreeMultimap", "<", "Long", ",", "Long", ">", "mm", ",", "long", "value", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "Long", ",", "Long", ">", ">", "itr", "=", "mm", ".", "entries", "(", ")", ".", ...
Convenience method that remove all instances of the given value from the given map @param mm a multimap @param value a value that needs to be removed
[ "Convenience", "method", "that", "remove", "all", "instances", "of", "the", "given", "value", "from", "the", "given", "map" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L187-L195
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ModulesInner.java
ModulesInner.getAsync
public Observable<ModuleInner> getAsync(String resourceGroupName, String automationAccountName, String moduleName) { """ Retrieve the module identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param moduleName T...
java
public Observable<ModuleInner> getAsync(String resourceGroupName, String automationAccountName, String moduleName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, moduleName).map(new Func1<ServiceResponse<ModuleInner>, ModuleInner>() { @Override public Modu...
[ "public", "Observable", "<", "ModuleInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "moduleName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName",...
Retrieve the module identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param moduleName The module name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ModuleInne...
[ "Retrieve", "the", "module", "identified", "by", "module", "name", "." ]
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/ModulesInner.java#L221-L228
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java
UCharacter.toLowerCase
public static String toLowerCase(Locale locale, String str) { """ Returns the lowercase version of the argument string. Casing is dependent on the argument locale and context-sensitive @param locale which string is to be converted in @param str source string to be performed on @return lowercase version of the ...
java
public static String toLowerCase(Locale locale, String str) { return toLowerCase(getCaseLocale(locale), str); }
[ "public", "static", "String", "toLowerCase", "(", "Locale", "locale", ",", "String", "str", ")", "{", "return", "toLowerCase", "(", "getCaseLocale", "(", "locale", ")", ",", "str", ")", ";", "}" ]
Returns the lowercase version of the argument string. Casing is dependent on the argument locale and context-sensitive @param locale which string is to be converted in @param str source string to be performed on @return lowercase version of the argument string
[ "Returns", "the", "lowercase", "version", "of", "the", "argument", "string", ".", "Casing", "is", "dependent", "on", "the", "argument", "locale", "and", "context", "-", "sensitive" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java#L4432-L4435
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.cosineFormulaDeg
public static double cosineFormulaDeg(double lat1, double lon1, double lat2, double lon2) { """ Compute the approximate great-circle distance of two points using the Haversine formula <p> Complexity: 6 trigonometric functions. <p> Reference: <p> R. W. Sinnott,<br> Virtues of the Haversine<br> Sky and Tele...
java
public static double cosineFormulaDeg(double lat1, double lon1, double lat2, double lon2) { return cosineFormulaRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2)); }
[ "public", "static", "double", "cosineFormulaDeg", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ")", "{", "return", "cosineFormulaRad", "(", "deg2rad", "(", "lat1", ")", ",", "deg2rad", "(", "lon1", ")", ",", ...
Compute the approximate great-circle distance of two points using the Haversine formula <p> Complexity: 6 trigonometric functions. <p> Reference: <p> R. W. Sinnott,<br> Virtues of the Haversine<br> Sky and Telescope 68(2) @param lat1 Latitude of first point in degree @param lon1 Longitude of first point in degree @par...
[ "Compute", "the", "approximate", "great", "-", "circle", "distance", "of", "two", "points", "using", "the", "Haversine", "formula", "<p", ">", "Complexity", ":", "6", "trigonometric", "functions", ".", "<p", ">", "Reference", ":", "<p", ">", "R", ".", "W",...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L100-L102
Commonjava/webdav-handler
common/src/main/java/net/sf/webdav/util/XMLWriter.java
XMLWriter.writeElement
public void writeElement(String name, int type) { """ Write an element. @param name Element name @param type Element type """ StringBuffer nsdecl = new StringBuffer(); if (_isRootElement) { for (Iterator<String> iter = _namespaces.keySet().iterator(); iter ...
java
public void writeElement(String name, int type) { StringBuffer nsdecl = new StringBuffer(); if (_isRootElement) { for (Iterator<String> iter = _namespaces.keySet().iterator(); iter .hasNext();) { String fullName = (String) iter.next(); Str...
[ "public", "void", "writeElement", "(", "String", "name", ",", "int", "type", ")", "{", "StringBuffer", "nsdecl", "=", "new", "StringBuffer", "(", ")", ";", "if", "(", "_isRootElement", ")", "{", "for", "(", "Iterator", "<", "String", ">", "iter", "=", ...
Write an element. @param name Element name @param type Element type
[ "Write", "an", "element", "." ]
train
https://github.com/Commonjava/webdav-handler/blob/39bb7032fc75c1b67d3f2440dd1c234ead96cb9d/common/src/main/java/net/sf/webdav/util/XMLWriter.java#L130-L182
apereo/cas
support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/token/GoogleAuthenticatorTokenCouchDbRepository.java
GoogleAuthenticatorTokenCouchDbRepository.findByToken
@View(name = "by_token", map = "function(doc) { """ Find by token. @param otp token to search for @return token for the otp """ if(doc.token && doc.userId) { emit(doc.token, doc) } }") public List<CouchDbGoogleAuthenticatorToken> findByToken(final Integer otp) { return queryView("by_token", otp...
java
@View(name = "by_token", map = "function(doc) { if(doc.token && doc.userId) { emit(doc.token, doc) } }") public List<CouchDbGoogleAuthenticatorToken> findByToken(final Integer otp) { return queryView("by_token", otp); }
[ "@", "View", "(", "name", "=", "\"by_token\"", ",", "map", "=", "\"function(doc) { if(doc.token && doc.userId) { emit(doc.token, doc) } }\"", ")", "public", "List", "<", "CouchDbGoogleAuthenticatorToken", ">", "findByToken", "(", "final", "Integer", "otp", ")", "{", "re...
Find by token. @param otp token to search for @return token for the otp
[ "Find", "by", "token", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-gauth-couchdb/src/main/java/org/apereo/cas/couchdb/gauth/token/GoogleAuthenticatorTokenCouchDbRepository.java#L122-L125
wildfly/wildfly-core
domain-management/src/main/java/org/jboss/as/domain/management/security/UserPropertiesFileLoader.java
UserPropertiesFileLoader.addLineContent
@Override protected void addLineContent(BufferedReader bufferedFileReader, List<String> content, String line) throws IOException { """ Remove the realm name block. @see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String) """ // Is the line an empty comment "#" ? ...
java
@Override protected void addLineContent(BufferedReader bufferedFileReader, List<String> content, String line) throws IOException { // Is the line an empty comment "#" ? if (line.startsWith(COMMENT_PREFIX) && line.length() == 1) { String nextLine = bufferedFileReader.readLine(); ...
[ "@", "Override", "protected", "void", "addLineContent", "(", "BufferedReader", "bufferedFileReader", ",", "List", "<", "String", ">", "content", ",", "String", "line", ")", "throws", "IOException", "{", "// Is the line an empty comment \"#\" ?", "if", "(", "line", "...
Remove the realm name block. @see PropertiesFileLoader#addLineContent(java.io.BufferedReader, java.util.List, String)
[ "Remove", "the", "realm", "name", "block", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/domain-management/src/main/java/org/jboss/as/domain/management/security/UserPropertiesFileLoader.java#L170-L193
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/property/PropertyUtil.java
PropertyUtil.saveValues
public static void saveValues(String propertyName, String instanceName, boolean asGlobal, List<String> value) { """ Saves a value list to the underlying property store. @param propertyName Name of the property to be saved. @param instanceName An optional instance name. Specify null to indicate the default inst...
java
public static void saveValues(String propertyName, String instanceName, boolean asGlobal, List<String> value) { getPropertyService().saveValues(propertyName, instanceName, asGlobal, value); }
[ "public", "static", "void", "saveValues", "(", "String", "propertyName", ",", "String", "instanceName", ",", "boolean", "asGlobal", ",", "List", "<", "String", ">", "value", ")", "{", "getPropertyService", "(", ")", ".", "saveValues", "(", "propertyName", ",",...
Saves a value list to the underlying property store. @param propertyName Name of the property to be saved. @param instanceName An optional instance name. Specify null to indicate the default instance. @param asGlobal If true, save as a global property. If false, save as a user property. @param value Value to be saved....
[ "Saves", "a", "value", "list", "to", "the", "underlying", "property", "store", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/property/PropertyUtil.java#L132-L134
Azure/azure-sdk-for-java
policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicySetDefinitionsInner.java
PolicySetDefinitionsInner.createOrUpdateAsync
public Observable<PolicySetDefinitionInner> createOrUpdateAsync(String policySetDefinitionName, PolicySetDefinitionInner parameters) { """ Creates or updates a policy set definition. This operation creates or updates a policy set definition in the given subscription with the given name. @param policySetDefinit...
java
public Observable<PolicySetDefinitionInner> createOrUpdateAsync(String policySetDefinitionName, PolicySetDefinitionInner parameters) { return createOrUpdateWithServiceResponseAsync(policySetDefinitionName, parameters).map(new Func1<ServiceResponse<PolicySetDefinitionInner>, PolicySetDefinitionInner>() { ...
[ "public", "Observable", "<", "PolicySetDefinitionInner", ">", "createOrUpdateAsync", "(", "String", "policySetDefinitionName", ",", "PolicySetDefinitionInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "policySetDefinitionName", ",", "para...
Creates or updates a policy set definition. This operation creates or updates a policy set definition in the given subscription with the given name. @param policySetDefinitionName The name of the policy set definition to create. @param parameters The policy set definition properties. @throws IllegalArgumentException t...
[ "Creates", "or", "updates", "a", "policy", "set", "definition", ".", "This", "operation", "creates", "or", "updates", "a", "policy", "set", "definition", "in", "the", "given", "subscription", "with", "the", "given", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policy/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicySetDefinitionsInner.java#L156-L163
ksclarke/vertx-pairtree
src/main/java/info/freelibrary/pairtree/s3/S3Client.java
S3Client.createHeadRequest
public S3ClientRequest createHeadRequest(final String aBucket, final String aKey, final Handler<HttpClientResponse> aHandler) { """ Creates an S3 HEAD request. <p> <code>create HEAD -&gt; request Object</code> </p> @param aBucket An S3 bucket @param aKey An S3 key @param aHandler A response han...
java
public S3ClientRequest createHeadRequest(final String aBucket, final String aKey, final Handler<HttpClientResponse> aHandler) { final HttpClientRequest httpRequest = myHTTPClient.head(PATH_SEP + aBucket + PATH_SEP + aKey, aHandler); return new S3ClientRequest("HEAD", aBucket, aKey, httpReque...
[ "public", "S3ClientRequest", "createHeadRequest", "(", "final", "String", "aBucket", ",", "final", "String", "aKey", ",", "final", "Handler", "<", "HttpClientResponse", ">", "aHandler", ")", "{", "final", "HttpClientRequest", "httpRequest", "=", "myHTTPClient", ".",...
Creates an S3 HEAD request. <p> <code>create HEAD -&gt; request Object</code> </p> @param aBucket An S3 bucket @param aKey An S3 key @param aHandler A response handler @return A S3 client HEAD request
[ "Creates", "an", "S3", "HEAD", "request", ".", "<p", ">", "<code", ">", "create", "HEAD", "-", "&gt", ";", "request", "Object<", "/", "code", ">", "<", "/", "p", ">" ]
train
https://github.com/ksclarke/vertx-pairtree/blob/b2ea1e32057e5df262e9265540d346a732b718df/src/main/java/info/freelibrary/pairtree/s3/S3Client.java#L268-L272
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/api/impl/AnnotatedExtensions.java
AnnotatedExtensions.exec
public static Object exec(Method method, String[] paramNames, Map<String,?> params, Object instance) throws Throwable { """ Invokes the given method mapping named parameters to positions based on a given list of parameter names. @param method Method to invoke @param paramNames Positioned list of parameter nam...
java
public static Object exec(Method method, String[] paramNames, Map<String,?> params, Object instance) throws Throwable { Object[] paramValues = new Object[paramNames.length]; for(int c=0; c < paramNames.length; ++c) { paramValues[c] = params.get(paramNames[c]); } try { return metho...
[ "public", "static", "Object", "exec", "(", "Method", "method", ",", "String", "[", "]", "paramNames", ",", "Map", "<", "String", ",", "?", ">", "params", ",", "Object", "instance", ")", "throws", "Throwable", "{", "Object", "[", "]", "paramValues", "=", ...
Invokes the given method mapping named parameters to positions based on a given list of parameter names. @param method Method to invoke @param paramNames Positioned list of parameter names to map direct mapping @param params Named parameters to use @param instance Instance to invoke method on @return Result of method ...
[ "Invokes", "the", "given", "method", "mapping", "named", "parameters", "to", "positions", "based", "on", "a", "given", "list", "of", "parameter", "names", "." ]
train
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/api/impl/AnnotatedExtensions.java#L79-L101
xebia/Xebium
src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java
SeleniumDriverFixture.isOn
public String isOn(final String command, final String target) { """ <p><code> | <i>$pageName=</i> | is | <i>getText</i> | on | <i>//span</i> | </code></p> @param command @param target @return """ LOG.info("Obtain result from | " + command + " | " + target + " |"); return is(command, new String[] { u...
java
public String isOn(final String command, final String target) { LOG.info("Obtain result from | " + command + " | " + target + " |"); return is(command, new String[] { unalias(target) }); }
[ "public", "String", "isOn", "(", "final", "String", "command", ",", "final", "String", "target", ")", "{", "LOG", ".", "info", "(", "\"Obtain result from | \"", "+", "command", "+", "\" | \"", "+", "target", "+", "\" |\"", ")", ";", "return", "is", "(", ...
<p><code> | <i>$pageName=</i> | is | <i>getText</i> | on | <i>//span</i> | </code></p> @param command @param target @return
[ "<p", ">", "<code", ">", "|", "<i", ">", "$pageName", "=", "<", "/", "i", ">", "|", "is", "|", "<i", ">", "getText<", "/", "i", ">", "|", "on", "|", "<i", ">", "//", "span<", "/", "i", ">", "|", "<", "/", "code", ">", "<", "/", "p", ">"...
train
https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java#L407-L410