repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.deleteFromTask
public void deleteFromTask(String jobId, String taskId, String filePath, Boolean recursive, FileDeleteFromTaskOptions fileDeleteFromTaskOptions) { deleteFromTaskWithServiceResponseAsync(jobId, taskId, filePath, recursive, fileDeleteFromTaskOptions).toBlocking().single().body(); }
java
public void deleteFromTask(String jobId, String taskId, String filePath, Boolean recursive, FileDeleteFromTaskOptions fileDeleteFromTaskOptions) { deleteFromTaskWithServiceResponseAsync(jobId, taskId, filePath, recursive, fileDeleteFromTaskOptions).toBlocking().single().body(); }
[ "public", "void", "deleteFromTask", "(", "String", "jobId", ",", "String", "taskId", ",", "String", "filePath", ",", "Boolean", "recursive", ",", "FileDeleteFromTaskOptions", "fileDeleteFromTaskOptions", ")", "{", "deleteFromTaskWithServiceResponseAsync", "(", "jobId", ...
Deletes the specified task file from the compute node where the task ran. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose file you want to delete. @param filePath The path to the task file or directory that you want to delete. @param recursive Whether to delete children of...
[ "Deletes", "the", "specified", "task", "file", "from", "the", "compute", "node", "where", "the", "task", "ran", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L243-L245
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/AlternateSizeValidator.java
AlternateSizeValidator.isValid
@Override public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) { String valueAsString = Objects.toString(pvalue, StringUtils.EMPTY); if (StringUtils.isEmpty(valueAsString)) { return true; } if (ignoreWhiteSpaces) { valueAsString = valueAsString.repla...
java
@Override public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) { String valueAsString = Objects.toString(pvalue, StringUtils.EMPTY); if (StringUtils.isEmpty(valueAsString)) { return true; } if (ignoreWhiteSpaces) { valueAsString = valueAsString.repla...
[ "@", "Override", "public", "final", "boolean", "isValid", "(", "final", "Object", "pvalue", ",", "final", "ConstraintValidatorContext", "pcontext", ")", "{", "String", "valueAsString", "=", "Objects", ".", "toString", "(", "pvalue", ",", "StringUtils", ".", "EMP...
{@inheritDoc} check if given object is valid. @see javax.validation.ConstraintValidator#isValid(Object, javax.validation.ConstraintValidatorContext)
[ "{", "@inheritDoc", "}", "check", "if", "given", "object", "is", "valid", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/AlternateSizeValidator.java#L79-L95
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java
ManagedClustersInner.listClusterAdminCredentialsAsync
public Observable<CredentialResultsInner> listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName) { return listClusterAdminCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<CredentialResultsInner>, CredentialResultsInner>() { @...
java
public Observable<CredentialResultsInner> listClusterAdminCredentialsAsync(String resourceGroupName, String resourceName) { return listClusterAdminCredentialsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<CredentialResultsInner>, CredentialResultsInner>() { @...
[ "public", "Observable", "<", "CredentialResultsInner", ">", "listClusterAdminCredentialsAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "listClusterAdminCredentialsWithServiceResponseAsync", "(", "resourceGroupName", ",", "resource...
Gets cluster admin credential of a managed cluster. Gets cluster admin credential of the managed cluster with a specified resource group and name. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @throws IllegalArgumentException thrown if parameters...
[ "Gets", "cluster", "admin", "credential", "of", "a", "managed", "cluster", ".", "Gets", "cluster", "admin", "credential", "of", "the", "managed", "cluster", "with", "a", "specified", "resource", "group", "and", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L600-L607
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.getVpnProfilePackageUrlAsync
public Observable<String> getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1<ServiceResponse<String>, String>() { @Override public St...
java
public Observable<String> getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1<ServiceResponse<String>, String>() { @Override public St...
[ "public", "Observable", "<", "String", ">", "getVpnProfilePackageUrlAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "getVpnProfilePackageUrlWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatew...
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws Ille...
[ "Gets", "pre", "-", "generated", "VPN", "profile", "for", "P2S", "client", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", ".", "The", "profile", "needs", "to", "be", "generated", "first", "using", "generateVpnProfi...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L1824-L1831
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyRep.java
KeyRep.readResolve
protected Object readResolve() throws ObjectStreamException { try { if (type == Type.SECRET && RAW.equals(format)) { return new SecretKeySpec(encoded, algorithm); } else if (type == Type.PUBLIC && X509.equals(format)) { KeyFactory f = KeyFactory.getInstanc...
java
protected Object readResolve() throws ObjectStreamException { try { if (type == Type.SECRET && RAW.equals(format)) { return new SecretKeySpec(encoded, algorithm); } else if (type == Type.PUBLIC && X509.equals(format)) { KeyFactory f = KeyFactory.getInstanc...
[ "protected", "Object", "readResolve", "(", ")", "throws", "ObjectStreamException", "{", "try", "{", "if", "(", "type", "==", "Type", ".", "SECRET", "&&", "RAW", ".", "equals", "(", "format", ")", ")", "{", "return", "new", "SecretKeySpec", "(", "encoded", ...
Resolve the Key object. <p> This method supports three Type/format combinations: <ul> <li> Type.SECRET/"RAW" - returns a SecretKeySpec object constructed using encoded key bytes and algorithm <li> Type.PUBLIC/"X.509" - gets a KeyFactory instance for the key algorithm, constructs an X509EncodedKeySpec with the encoded ...
[ "Resolve", "the", "Key", "object", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyRep.java#L169-L195
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/learning/NesterovsUpdater.java
NesterovsUpdater.applyUpdater
@Override public void applyUpdater(INDArray gradient, int iteration, int epoch) { if (v == null) throw new IllegalStateException("Updater has not been initialized with view state"); double momentum = config.currentMomentum(iteration, epoch); double learningRate = config.getLearn...
java
@Override public void applyUpdater(INDArray gradient, int iteration, int epoch) { if (v == null) throw new IllegalStateException("Updater has not been initialized with view state"); double momentum = config.currentMomentum(iteration, epoch); double learningRate = config.getLearn...
[ "@", "Override", "public", "void", "applyUpdater", "(", "INDArray", "gradient", ",", "int", "iteration", ",", "int", "epoch", ")", "{", "if", "(", "v", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"Updater has not been initialized with view s...
Get the nesterov update @param gradient the gradient to get the update for @param iteration @return
[ "Get", "the", "nesterov", "update" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/learning/NesterovsUpdater.java#L68-L91
apiman/apiman
common/plugin/src/main/java/io/apiman/common/plugin/PluginClassLoader.java
PluginClassLoader.extractResource
private URL extractResource(ZipEntry zipEntry) throws IOException { File resourceWorkDir = new File(workDir, "resources"); if (!resourceWorkDir.exists()) { resourceWorkDir.mkdirs(); } File resourceFile = new File(resourceWorkDir, zipEntry.getName()); if (!resourceFile...
java
private URL extractResource(ZipEntry zipEntry) throws IOException { File resourceWorkDir = new File(workDir, "resources"); if (!resourceWorkDir.exists()) { resourceWorkDir.mkdirs(); } File resourceFile = new File(resourceWorkDir, zipEntry.getName()); if (!resourceFile...
[ "private", "URL", "extractResource", "(", "ZipEntry", "zipEntry", ")", "throws", "IOException", "{", "File", "resourceWorkDir", "=", "new", "File", "(", "workDir", ",", "\"resources\"", ")", ";", "if", "(", "!", "resourceWorkDir", ".", "exists", "(", ")", ")...
Extracts a resource from the plugin artifact ZIP and saves it to the work directory. If the resource has already been extracted (we're re-using the work directory) then this simply returns what is already there. @param zipEntry a ZIP file entry @throws IOException if an I/O error has occurred
[ "Extracts", "a", "resource", "from", "the", "plugin", "artifact", "ZIP", "and", "saves", "it", "to", "the", "work", "directory", ".", "If", "the", "resource", "has", "already", "been", "extracted", "(", "we", "re", "re", "-", "using", "the", "work", "dir...
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/common/plugin/src/main/java/io/apiman/common/plugin/PluginClassLoader.java#L150-L176
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/AbstractTreeNode.java
AbstractTreeNode.firePropertyParentChanged
protected final void firePropertyParentChanged(N oldParent, N newParent) { firePropertyParentChanged(new TreeNodeParentChangedEvent(toN(), oldParent, newParent)); }
java
protected final void firePropertyParentChanged(N oldParent, N newParent) { firePropertyParentChanged(new TreeNodeParentChangedEvent(toN(), oldParent, newParent)); }
[ "protected", "final", "void", "firePropertyParentChanged", "(", "N", "oldParent", ",", "N", "newParent", ")", "{", "firePropertyParentChanged", "(", "new", "TreeNodeParentChangedEvent", "(", "toN", "(", ")", ",", "oldParent", ",", "newParent", ")", ")", ";", "}"...
Fire the event for the changes node parents. @param oldParent is the previous parent node @param newParent is the current parent node
[ "Fire", "the", "event", "for", "the", "changes", "node", "parents", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/AbstractTreeNode.java#L233-L235
landawn/AbacusUtil
src/com/landawn/abacus/util/FloatList.java
FloatList.allMatch
public <E extends Exception> boolean allMatch(Try.FloatPredicate<E> filter) throws E { return allMatch(0, size(), filter); }
java
public <E extends Exception> boolean allMatch(Try.FloatPredicate<E> filter) throws E { return allMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "allMatch", "(", "Try", ".", "FloatPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "allMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether all elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "all", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FloatList.java#L905-L907
nmdp-bioinformatics/ngs
range/src/main/java/org/nmdp/ngs/range/rtree/RangeGeometries.java
RangeGeometries.closedOpen
public static <N extends Number & Comparable<? super N>> Rectangle closedOpen(final N lower, final N upper) { checkNotNull(lower); checkNotNull(upper); return range(Range.closedOpen(lower, upper)); }
java
public static <N extends Number & Comparable<? super N>> Rectangle closedOpen(final N lower, final N upper) { checkNotNull(lower); checkNotNull(upper); return range(Range.closedOpen(lower, upper)); }
[ "public", "static", "<", "N", "extends", "Number", "&", "Comparable", "<", "?", "super", "N", ">", ">", "Rectangle", "closedOpen", "(", "final", "N", "lower", ",", "final", "N", "upper", ")", "{", "checkNotNull", "(", "lower", ")", ";", "checkNotNull", ...
Create and return a new rectangle geometry from the specified closed open range <code>[lower..upper)</code>. @param lower lower endpoint, must not be null @param upper upper endpoint, must not be null @return a new rectangle geometry from the specified closed range
[ "Create", "and", "return", "a", "new", "rectangle", "geometry", "from", "the", "specified", "closed", "open", "range", "<code", ">", "[", "lower", "..", "upper", ")", "<", "/", "code", ">", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/rtree/RangeGeometries.java#L91-L95
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClasspathUtility.java
ClasspathUtility.checkResource
private static void checkResource(final List<String> resources, final Pattern searchPattern, final String resourceName) { if (searchPattern.matcher(resourceName).matches()) { resources.add(resourceName); } }
java
private static void checkResource(final List<String> resources, final Pattern searchPattern, final String resourceName) { if (searchPattern.matcher(resourceName).matches()) { resources.add(resourceName); } }
[ "private", "static", "void", "checkResource", "(", "final", "List", "<", "String", ">", "resources", ",", "final", "Pattern", "searchPattern", ",", "final", "String", "resourceName", ")", "{", "if", "(", "searchPattern", ".", "matcher", "(", "resourceName", ")...
Check if the resource match the regex. @param resources the list of found resources @param searchPattern the regex pattern @param resourceName the resource to check and to add
[ "Check", "if", "the", "resource", "match", "the", "regex", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClasspathUtility.java#L226-L230
inkstand-io/scribble
scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java
JCRAssert.assertNodeExistById
public static void assertNodeExistById(final Session session, final String itemId) throws RepositoryException { try { session.getNodeByIdentifier(itemId); } catch (final ItemNotFoundException e) { LOG.debug("Item with id {} does not exist", itemId, e); fail(e.getMessa...
java
public static void assertNodeExistById(final Session session, final String itemId) throws RepositoryException { try { session.getNodeByIdentifier(itemId); } catch (final ItemNotFoundException e) { LOG.debug("Item with id {} does not exist", itemId, e); fail(e.getMessa...
[ "public", "static", "void", "assertNodeExistById", "(", "final", "Session", "session", ",", "final", "String", "itemId", ")", "throws", "RepositoryException", "{", "try", "{", "session", ".", "getNodeByIdentifier", "(", "itemId", ")", ";", "}", "catch", "(", "...
Asserts that an item, identified by it's unique id, is found in the repository session. @param session the session to be searched @param itemId the item expected to be found @throws RepositoryException
[ "Asserts", "that", "an", "item", "identified", "by", "it", "s", "unique", "id", "is", "found", "in", "the", "repository", "session", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java#L117-L124
cdk/cdk
base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java
SmilesValencyChecker.couldMatchAtomType
public boolean couldMatchAtomType(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder, IAtomType type) { logger.debug("couldMatchAtomType: ... matching atom ", atom, " vs ", type); int hcount = atom.getImplicitHydrogenCount(); int charge = atom.getFormalCharge(); if (charge == ty...
java
public boolean couldMatchAtomType(IAtom atom, double bondOrderSum, IBond.Order maxBondOrder, IAtomType type) { logger.debug("couldMatchAtomType: ... matching atom ", atom, " vs ", type); int hcount = atom.getImplicitHydrogenCount(); int charge = atom.getFormalCharge(); if (charge == ty...
[ "public", "boolean", "couldMatchAtomType", "(", "IAtom", "atom", ",", "double", "bondOrderSum", ",", "IBond", ".", "Order", "maxBondOrder", ",", "IAtomType", "type", ")", "{", "logger", ".", "debug", "(", "\"couldMatchAtomType: ... matching atom \"", ",", "atom", ...
Determines if the atom can be of type AtomType. That is, it sees if this AtomType only differs in bond orders, or implicit hydrogen count.
[ "Determines", "if", "the", "atom", "can", "be", "of", "type", "AtomType", ".", "That", "is", "it", "sees", "if", "this", "AtomType", "only", "differs", "in", "bond", "orders", "or", "implicit", "hydrogen", "count", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SmilesValencyChecker.java#L232-L256
groupon/odo
client/src/main/java/com/groupon/odo/client/PathValueClient.java
PathValueClient.setCustomResponse
public boolean setCustomResponse(String pathValue, String requestType, String customData) { try { JSONObject path = getPathFromEndpoint(pathValue, requestType); if (path == null) { String pathName = pathValue; createPath(pathName, pathValue, requestType); ...
java
public boolean setCustomResponse(String pathValue, String requestType, String customData) { try { JSONObject path = getPathFromEndpoint(pathValue, requestType); if (path == null) { String pathName = pathValue; createPath(pathName, pathValue, requestType); ...
[ "public", "boolean", "setCustomResponse", "(", "String", "pathValue", ",", "String", "requestType", ",", "String", "customData", ")", "{", "try", "{", "JSONObject", "path", "=", "getPathFromEndpoint", "(", "pathValue", ",", "requestType", ")", ";", "if", "(", ...
Sets a custom response on an endpoint @param pathValue path (endpoint) value @param requestType path request type. "GET", "POST", etc @param customData custom response data @return true if success, false otherwise
[ "Sets", "a", "custom", "response", "on", "an", "endpoint" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/PathValueClient.java#L125-L141
javalite/activejdbc
javalite-common/src/main/java/org/javalite/common/Templator.java
Templator.mergeFromTemplate
public static String mergeFromTemplate(String template, Map<String, ?> values) { for (String param : values.keySet()) { template = template.replace("{{" + param + "}}", values.get(param) == null ? "" : values.get(param).toString()); } return template.replaceAll("\n|\r| ", ""); }
java
public static String mergeFromTemplate(String template, Map<String, ?> values) { for (String param : values.keySet()) { template = template.replace("{{" + param + "}}", values.get(param) == null ? "" : values.get(param).toString()); } return template.replaceAll("\n|\r| ", ""); }
[ "public", "static", "String", "mergeFromTemplate", "(", "String", "template", ",", "Map", "<", "String", ",", "?", ">", "values", ")", "{", "for", "(", "String", "param", ":", "values", ".", "keySet", "(", ")", ")", "{", "template", "=", "template", "....
Merges from string as template. @param template template content, with placeholders like: {{name}} @param values map with values to merge
[ "Merges", "from", "string", "as", "template", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/javalite-common/src/main/java/org/javalite/common/Templator.java#L91-L96
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/runtime/NaaccrStreamContext.java
NaaccrStreamContext.extractTag
public String extractTag(String tag) throws NaaccrIOException { if (tag == null) throw new NaaccrIOException("missing tag"); int idx = tag.indexOf(':'); if (idx != -1) { String namespace = tag.substring(0, idx), cleanTag = tag.substring(idx + 1); // check for ...
java
public String extractTag(String tag) throws NaaccrIOException { if (tag == null) throw new NaaccrIOException("missing tag"); int idx = tag.indexOf(':'); if (idx != -1) { String namespace = tag.substring(0, idx), cleanTag = tag.substring(idx + 1); // check for ...
[ "public", "String", "extractTag", "(", "String", "tag", ")", "throws", "NaaccrIOException", "{", "if", "(", "tag", "==", "null", ")", "throw", "new", "NaaccrIOException", "(", "\"missing tag\"", ")", ";", "int", "idx", "=", "tag", ".", "indexOf", "(", "'",...
Extracts the tag from the given raw tag (which might contain a namespace). @param tag tag without any namespace @return the tag without any namespace @throws NaaccrIOException if anything goes wrong
[ "Extracts", "the", "tag", "from", "the", "given", "raw", "tag", "(", "which", "might", "contain", "a", "namespace", ")", "." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/runtime/NaaccrStreamContext.java#L57-L76
ModeShape/modeshape
web/modeshape-web-explorer/src/main/java/org/modeshape/web/server/JcrServiceImpl.java
JcrServiceImpl.values
private String values( PropertyDefinition pd, Property p ) throws RepositoryException { if (p == null) { return "N/A"; } if (pd.getRequiredType() == PropertyType.BINARY) { return "BINARY"; } if (!p.isMultiple()) { return p.get...
java
private String values( PropertyDefinition pd, Property p ) throws RepositoryException { if (p == null) { return "N/A"; } if (pd.getRequiredType() == PropertyType.BINARY) { return "BINARY"; } if (!p.isMultiple()) { return p.get...
[ "private", "String", "values", "(", "PropertyDefinition", "pd", ",", "Property", "p", ")", "throws", "RepositoryException", "{", "if", "(", "p", "==", "null", ")", "{", "return", "\"N/A\"", ";", "}", "if", "(", "pd", ".", "getRequiredType", "(", ")", "==...
Displays property value as string @param pd the property definition @param p the property to display @return property value as text string @throws RepositoryException
[ "Displays", "property", "value", "as", "string" ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/web/modeshape-web-explorer/src/main/java/org/modeshape/web/server/JcrServiceImpl.java#L440-L454
aws/aws-sdk-java
aws-java-sdk-servicecatalog/src/main/java/com/amazonaws/services/servicecatalog/model/SearchProductsResult.java
SearchProductsResult.setProductViewAggregations
public void setProductViewAggregations(java.util.Map<String, java.util.List<ProductViewAggregationValue>> productViewAggregations) { this.productViewAggregations = productViewAggregations; }
java
public void setProductViewAggregations(java.util.Map<String, java.util.List<ProductViewAggregationValue>> productViewAggregations) { this.productViewAggregations = productViewAggregations; }
[ "public", "void", "setProductViewAggregations", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "ProductViewAggregationValue", ">", ">", "productViewAggregations", ")", "{", "this", ".", "productViewAggregations", ...
<p> The product view aggregations. </p> @param productViewAggregations The product view aggregations.
[ "<p", ">", "The", "product", "view", "aggregations", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-servicecatalog/src/main/java/com/amazonaws/services/servicecatalog/model/SearchProductsResult.java#L137-L139
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java
SnapToEllipseEdge.change
protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) { double total = 0; total += Math.abs(a.center.x - b.center.x); total += Math.abs(a.center.y - b.center.y); total += Math.abs(a.a - b.a); total += Math.abs(a.b - b.b); // only care about the change of angle when it is not a circ...
java
protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) { double total = 0; total += Math.abs(a.center.x - b.center.x); total += Math.abs(a.center.y - b.center.y); total += Math.abs(a.a - b.a); total += Math.abs(a.b - b.b); // only care about the change of angle when it is not a circ...
[ "protected", "static", "double", "change", "(", "EllipseRotated_F64", "a", ",", "EllipseRotated_F64", "b", ")", "{", "double", "total", "=", "0", ";", "total", "+=", "Math", ".", "abs", "(", "a", ".", "center", ".", "x", "-", "b", ".", "center", ".", ...
Computes a numerical value for the difference in parameters between the two ellipses
[ "Computes", "a", "numerical", "value", "for", "the", "difference", "in", "parameters", "between", "the", "two", "ellipses" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/SnapToEllipseEdge.java#L116-L129
hibernate/hibernate-ogm
infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedStoredProceduresManager.java
InfinispanEmbeddedStoredProceduresManager.callStoredProcedure
public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) { validate( queryParameters ); Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CA...
java
public ClosableIterator<Tuple> callStoredProcedure(EmbeddedCacheManager embeddedCacheManager, String storedProcedureName, ProcedureQueryParameters queryParameters, ClassLoaderService classLoaderService ) { validate( queryParameters ); Cache<String, String> cache = embeddedCacheManager.getCache( STORED_PROCEDURES_CA...
[ "public", "ClosableIterator", "<", "Tuple", ">", "callStoredProcedure", "(", "EmbeddedCacheManager", "embeddedCacheManager", ",", "String", "storedProcedureName", ",", "ProcedureQueryParameters", "queryParameters", ",", "ClassLoaderService", "classLoaderService", ")", "{", "v...
Returns the result of a stored procedure executed on the backend. @param embeddedCacheManager embedded cache manager @param storedProcedureName name of stored procedure @param queryParameters parameters passed for this query @param classLoaderService the class loader service @return a {@link ClosableIterator} with th...
[ "Returns", "the", "result", "of", "a", "stored", "procedure", "executed", "on", "the", "backend", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedStoredProceduresManager.java#L51-L59
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/BufferedImageFactory.java
BufferedImageFactory.setSourceSubsampling
public void setSourceSubsampling(int pXSub, int pYSub) { // Re-fetch everything, if subsampling changed if (xSub != pXSub || ySub != pYSub) { dispose(); } if (pXSub > 1) { xSub = pXSub; } if (pYSub > 1) { ySub = pYSub; } }
java
public void setSourceSubsampling(int pXSub, int pYSub) { // Re-fetch everything, if subsampling changed if (xSub != pXSub || ySub != pYSub) { dispose(); } if (pXSub > 1) { xSub = pXSub; } if (pYSub > 1) { ySub = pYSub; } }
[ "public", "void", "setSourceSubsampling", "(", "int", "pXSub", ",", "int", "pYSub", ")", "{", "// Re-fetch everything, if subsampling changed", "if", "(", "xSub", "!=", "pXSub", "||", "ySub", "!=", "pYSub", ")", "{", "dispose", "(", ")", ";", "}", "if", "(",...
Sets the source subsampling for the new image. @param pXSub horizontal subsampling factor @param pYSub vertical subsampling factor
[ "Sets", "the", "source", "subsampling", "for", "the", "new", "image", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/BufferedImageFactory.java#L176-L188
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiBookmark.java
BoxApiBookmark.getCopyRequest
public BoxRequestsBookmark.CopyBookmark getCopyRequest(String id, String parentId) { BoxRequestsBookmark.CopyBookmark request = new BoxRequestsBookmark.CopyBookmark(id, parentId, getBookmarkCopyUrl(id), mSession); return request; }
java
public BoxRequestsBookmark.CopyBookmark getCopyRequest(String id, String parentId) { BoxRequestsBookmark.CopyBookmark request = new BoxRequestsBookmark.CopyBookmark(id, parentId, getBookmarkCopyUrl(id), mSession); return request; }
[ "public", "BoxRequestsBookmark", ".", "CopyBookmark", "getCopyRequest", "(", "String", "id", ",", "String", "parentId", ")", "{", "BoxRequestsBookmark", ".", "CopyBookmark", "request", "=", "new", "BoxRequestsBookmark", ".", "CopyBookmark", "(", "id", ",", "parentId...
Gets a request that copies a bookmark @param id id of the bookmark to copy @param parentId id of the parent folder to copy the bookmark into @return request to copy a bookmark
[ "Gets", "a", "request", "that", "copies", "a", "bookmark" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiBookmark.java#L108-L111
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java
FormLayout.setHonorsVisibility
public void setHonorsVisibility(Component component, Boolean b) { CellConstraints constraints = getConstraints0(component); if (Objects.equals(b, constraints.honorsVisibility)) { return; } constraints.honorsVisibility = b; invalidateAndRepaint(component.getParent()); ...
java
public void setHonorsVisibility(Component component, Boolean b) { CellConstraints constraints = getConstraints0(component); if (Objects.equals(b, constraints.honorsVisibility)) { return; } constraints.honorsVisibility = b; invalidateAndRepaint(component.getParent()); ...
[ "public", "void", "setHonorsVisibility", "(", "Component", "component", ",", "Boolean", "b", ")", "{", "CellConstraints", "constraints", "=", "getConstraints0", "(", "component", ")", ";", "if", "(", "Objects", ".", "equals", "(", "b", ",", "constraints", ".",...
Specifies whether the given component shall be taken into account for sizing and positioning. This setting overrides the container-wide default. See {@link #setHonorsVisibility(boolean)} for details. @param component the component that shall get an individual setting @param b {@code Boolean.TRUE} to override the conta...
[ "Specifies", "whether", "the", "given", "component", "shall", "be", "taken", "into", "account", "for", "sizing", "and", "positioning", ".", "This", "setting", "overrides", "the", "container", "-", "wide", "default", ".", "See", "{", "@link", "#setHonorsVisibilit...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L985-L992
arquillian/arquillian-core
container/impl-base/src/main/java/org/jboss/arquillian/container/impl/client/container/DeploymentExceptionHandler.java
DeploymentExceptionHandler.containsType
private boolean containsType(Throwable exception, Class<? extends Exception> expectedType) { Throwable transformedException = transform(exception); if (transformedException == null) { return false; } if (expectedType.isAssignableFrom(transformedException.getClass())) { ...
java
private boolean containsType(Throwable exception, Class<? extends Exception> expectedType) { Throwable transformedException = transform(exception); if (transformedException == null) { return false; } if (expectedType.isAssignableFrom(transformedException.getClass())) { ...
[ "private", "boolean", "containsType", "(", "Throwable", "exception", ",", "Class", "<", "?", "extends", "Exception", ">", "expectedType", ")", "{", "Throwable", "transformedException", "=", "transform", "(", "exception", ")", ";", "if", "(", "transformedException"...
/* public void verifyExpectedExceptionDuringUnDeploy(@Observes EventContext<UnDeployDeployment> context) throws Exception { DeploymentDescription deployment = context.getEvent().getDeployment(); try { context.proceed(); } catch (Exception e) { if(deployment.getExpectedException() == null) { throw e; } } }
[ "/", "*", "public", "void", "verifyExpectedExceptionDuringUnDeploy", "(" ]
train
https://github.com/arquillian/arquillian-core/blob/a85b91789b80cc77e0f0c2e2abac65c2255c0a81/container/impl-base/src/main/java/org/jboss/arquillian/container/impl/client/container/DeploymentExceptionHandler.java#L91-L102
meltmedia/cadmium
servlets/src/main/java/com/meltmedia/cadmium/servlets/shiro/PersistablePropertiesRealm.java
PersistablePropertiesRealm.loadProperties
public void loadProperties(File contentDir) { String resourceFile = null; if(contentDir.exists() && contentDir.isDirectory()) { File propFile = new File(contentDir, REALM_FILE_NAME); if(propFile.exists() && propFile.canRead()) { resourceFile = propFile.getAbsoluteFile().getAbsolutePath(); ...
java
public void loadProperties(File contentDir) { String resourceFile = null; if(contentDir.exists() && contentDir.isDirectory()) { File propFile = new File(contentDir, REALM_FILE_NAME); if(propFile.exists() && propFile.canRead()) { resourceFile = propFile.getAbsoluteFile().getAbsolutePath(); ...
[ "public", "void", "loadProperties", "(", "File", "contentDir", ")", "{", "String", "resourceFile", "=", "null", ";", "if", "(", "contentDir", ".", "exists", "(", ")", "&&", "contentDir", ".", "isDirectory", "(", ")", ")", "{", "File", "propFile", "=", "n...
loads a properties file named {@link REALM_FILE_NAME} in the directory passed in.
[ "loads", "a", "properties", "file", "named", "{" ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/servlets/src/main/java/com/meltmedia/cadmium/servlets/shiro/PersistablePropertiesRealm.java#L88-L103
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.addProjectMember
public GitlabProjectMember addProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel) throws IOException { Query query = new Query() .appendIf("id", projectId) .appendIf("user_id", userId) .appendIf("access_level", accessLevel); Str...
java
public GitlabProjectMember addProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel) throws IOException { Query query = new Query() .appendIf("id", projectId) .appendIf("user_id", userId) .appendIf("access_level", accessLevel); Str...
[ "public", "GitlabProjectMember", "addProjectMember", "(", "Integer", "projectId", ",", "Integer", "userId", ",", "GitlabAccessLevel", "accessLevel", ")", "throws", "IOException", "{", "Query", "query", "=", "new", "Query", "(", ")", ".", "appendIf", "(", "\"id\"",...
Add a project member. @param projectId the project id @param userId the user id @param accessLevel the GitlabAccessLevel @return the GitlabProjectMember @throws IOException on gitlab api call error
[ "Add", "a", "project", "member", "." ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3041-L3048
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/BlockMetadataManager.java
BlockMetadataManager.resizeTempBlockMeta
public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) throws InvalidWorkerStateException { StorageDir dir = tempBlockMeta.getParentDir(); dir.resizeTempBlockMeta(tempBlockMeta, newSize); }
java
public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) throws InvalidWorkerStateException { StorageDir dir = tempBlockMeta.getParentDir(); dir.resizeTempBlockMeta(tempBlockMeta, newSize); }
[ "public", "void", "resizeTempBlockMeta", "(", "TempBlockMeta", "tempBlockMeta", ",", "long", "newSize", ")", "throws", "InvalidWorkerStateException", "{", "StorageDir", "dir", "=", "tempBlockMeta", ".", "getParentDir", "(", ")", ";", "dir", ".", "resizeTempBlockMeta",...
Modifies the size of a temp block. @param tempBlockMeta the temp block to modify @param newSize new size in bytes @throws InvalidWorkerStateException when newSize is smaller than current size
[ "Modifies", "the", "size", "of", "a", "temp", "block", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/BlockMetadataManager.java#L459-L463
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.registerJsonBeanProcessor
public void registerJsonBeanProcessor( Class target, JsonBeanProcessor jsonBeanProcessor ) { if( target != null && jsonBeanProcessor != null ) { beanProcessorMap.put( target, jsonBeanProcessor ); } }
java
public void registerJsonBeanProcessor( Class target, JsonBeanProcessor jsonBeanProcessor ) { if( target != null && jsonBeanProcessor != null ) { beanProcessorMap.put( target, jsonBeanProcessor ); } }
[ "public", "void", "registerJsonBeanProcessor", "(", "Class", "target", ",", "JsonBeanProcessor", "jsonBeanProcessor", ")", "{", "if", "(", "target", "!=", "null", "&&", "jsonBeanProcessor", "!=", "null", ")", "{", "beanProcessorMap", ".", "put", "(", "target", "...
Registers a JsonBeanProcessor.<br> [Java -&gt; JSON] @param target the class to use as key @param jsonBeanProcessor the processor to register
[ "Registers", "a", "JsonBeanProcessor", ".", "<br", ">", "[", "Java", "-", "&gt", ";", "JSON", "]" ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L786-L790
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/bayesian/ConditionalProbabilityTable.java
ConditionalProbabilityTable.query
public double query(int targetClass, int targetValue, int[] cord) { double sumVal = 0; double targetVal = 0; int realTargetIndex = catIndexToRealIndex[targetClass]; CategoricalData queryData = valid.get(targetClass); //Now do all other target class posibilt...
java
public double query(int targetClass, int targetValue, int[] cord) { double sumVal = 0; double targetVal = 0; int realTargetIndex = catIndexToRealIndex[targetClass]; CategoricalData queryData = valid.get(targetClass); //Now do all other target class posibilt...
[ "public", "double", "query", "(", "int", "targetClass", ",", "int", "targetValue", ",", "int", "[", "]", "cord", ")", "{", "double", "sumVal", "=", "0", ";", "double", "targetVal", "=", "0", ";", "int", "realTargetIndex", "=", "catIndexToRealIndex", "[", ...
Queries the CPT for the probability of the target class occurring with the specified value given the class values of the other attributes @param targetClass the index in the original data set of the class that we want to probability of @param targetValue the value of the <tt>targetClass</tt> that we want to probabilit...
[ "Queries", "the", "CPT", "for", "the", "probability", "of", "the", "target", "class", "occurring", "with", "the", "specified", "value", "given", "the", "class", "values", "of", "the", "other", "attributes" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/bayesian/ConditionalProbabilityTable.java#L225-L248
leancloud/java-sdk-all
core/src/main/java/cn/leancloud/AVQuery.java
AVQuery.whereMatchesKeyInQuery
public AVQuery<T> whereMatchesKeyInQuery(String key, String keyInQuery, AVQuery<?> query) { Map<String, Object> inner = new HashMap<String, Object>(); inner.put("className", query.getClassName()); inner.put("where", query.conditions.compileWhereOperationMap()); if (query.conditions.getSkip() > 0) inner....
java
public AVQuery<T> whereMatchesKeyInQuery(String key, String keyInQuery, AVQuery<?> query) { Map<String, Object> inner = new HashMap<String, Object>(); inner.put("className", query.getClassName()); inner.put("where", query.conditions.compileWhereOperationMap()); if (query.conditions.getSkip() > 0) inner....
[ "public", "AVQuery", "<", "T", ">", "whereMatchesKeyInQuery", "(", "String", "key", ",", "String", "keyInQuery", ",", "AVQuery", "<", "?", ">", "query", ")", "{", "Map", "<", "String", ",", "Object", ">", "inner", "=", "new", "HashMap", "<", "String", ...
Add a constraint to the query that requires a particular key's value matches a value for a key in the results of another AVQuery @param key The key whose value is being checked @param keyInQuery The key in the objects from the sub query to look in @param query The sub query to run @return Returns the query so you can ...
[ "Add", "a", "constraint", "to", "the", "query", "that", "requires", "a", "particular", "key", "s", "value", "matches", "a", "value", "for", "a", "key", "in", "the", "results", "of", "another", "AVQuery" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/core/src/main/java/cn/leancloud/AVQuery.java#L737-L749
mockito/mockito
src/main/java/org/mockito/internal/matchers/apachecommons/EqualsBuilder.java
EqualsBuilder.reflectionEquals
public static boolean reflectionEquals(Object lhs, Object rhs) { return reflectionEquals(lhs, rhs, false, null, null); }
java
public static boolean reflectionEquals(Object lhs, Object rhs) { return reflectionEquals(lhs, rhs, false, null, null); }
[ "public", "static", "boolean", "reflectionEquals", "(", "Object", "lhs", ",", "Object", "rhs", ")", "{", "return", "reflectionEquals", "(", "lhs", ",", "rhs", ",", "false", ",", "null", ",", "null", ")", ";", "}" ]
<p>This method uses reflection to determine if the two <code>Object</code>s are equal.</p> <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private fields. This means that it will throw a security exception if run under a security manager, if the permissions are not set up correctly. It is also...
[ "<p", ">", "This", "method", "uses", "reflection", "to", "determine", "if", "the", "two", "<code", ">", "Object<", "/", "code", ">", "s", "are", "equal", ".", "<", "/", "p", ">" ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/matchers/apachecommons/EqualsBuilder.java#L115-L117
google/closure-templates
java/src/com/google/template/soy/shared/internal/Sanitizers.java
Sanitizers.cleanHtml
public static SanitizedContent cleanHtml( String value, Collection<? extends OptionalSafeTag> optionalSafeTags) { return cleanHtml(value, null, optionalSafeTags); }
java
public static SanitizedContent cleanHtml( String value, Collection<? extends OptionalSafeTag> optionalSafeTags) { return cleanHtml(value, null, optionalSafeTags); }
[ "public", "static", "SanitizedContent", "cleanHtml", "(", "String", "value", ",", "Collection", "<", "?", "extends", "OptionalSafeTag", ">", "optionalSafeTags", ")", "{", "return", "cleanHtml", "(", "value", ",", "null", ",", "optionalSafeTags", ")", ";", "}" ]
Normalizes the input HTML while preserving "safe" tags. The content directionality is unknown. @param optionalSafeTags to add to the basic whitelist of formatting safe tags @return the normalized input, in the form of {@link SanitizedContent} of {@link ContentKind#HTML}
[ "Normalizes", "the", "input", "HTML", "while", "preserving", "safe", "tags", ".", "The", "content", "directionality", "is", "unknown", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/shared/internal/Sanitizers.java#L211-L214
jMotif/SAX
src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java
SAXRecords.addAll
public void addAll(HashMap<Integer, char[]> records) { for (Entry<Integer, char[]> e : records.entrySet()) { this.add(e.getValue(), e.getKey()); } }
java
public void addAll(HashMap<Integer, char[]> records) { for (Entry<Integer, char[]> e : records.entrySet()) { this.add(e.getValue(), e.getKey()); } }
[ "public", "void", "addAll", "(", "HashMap", "<", "Integer", ",", "char", "[", "]", ">", "records", ")", "{", "for", "(", "Entry", "<", "Integer", ",", "char", "[", "]", ">", "e", ":", "records", ".", "entrySet", "(", ")", ")", "{", "this", ".", ...
This adds all to the internal store. Used by the parallel SAX conversion engine. @param records the data to add.
[ "This", "adds", "all", "to", "the", "internal", "store", ".", "Used", "by", "the", "parallel", "SAX", "conversion", "engine", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java#L149-L153
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.initTemplates
protected void initTemplates(Element root, CmsXmlContentDefinition contentDefinition) { String strEnabledByDefault = root.attributeValue(ATTR_ENABLED_BY_DEFAULT); m_allowedTemplates.setDefaultMembership(safeParseBoolean(strEnabledByDefault, true)); List<Node> elements = root.selectNodes(APPINFO...
java
protected void initTemplates(Element root, CmsXmlContentDefinition contentDefinition) { String strEnabledByDefault = root.attributeValue(ATTR_ENABLED_BY_DEFAULT); m_allowedTemplates.setDefaultMembership(safeParseBoolean(strEnabledByDefault, true)); List<Node> elements = root.selectNodes(APPINFO...
[ "protected", "void", "initTemplates", "(", "Element", "root", ",", "CmsXmlContentDefinition", "contentDefinition", ")", "{", "String", "strEnabledByDefault", "=", "root", ".", "attributeValue", "(", "ATTR_ENABLED_BY_DEFAULT", ")", ";", "m_allowedTemplates", ".", "setDef...
Initializes the forbidden template contexts.<p> @param root the root XML element @param contentDefinition the content definition
[ "Initializes", "the", "forbidden", "template", "contexts", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L3169-L3180
zxing/zxing
core/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java
Encoder.recommendVersion
private static Version recommendVersion(ErrorCorrectionLevel ecLevel, Mode mode, BitArray headerBits, BitArray dataBits) throws WriterException { // Hard part: need to know version to know h...
java
private static Version recommendVersion(ErrorCorrectionLevel ecLevel, Mode mode, BitArray headerBits, BitArray dataBits) throws WriterException { // Hard part: need to know version to know h...
[ "private", "static", "Version", "recommendVersion", "(", "ErrorCorrectionLevel", "ecLevel", ",", "Mode", "mode", ",", "BitArray", "headerBits", ",", "BitArray", "dataBits", ")", "throws", "WriterException", "{", "// Hard part: need to know version to know how many bits length...
Decides the smallest version of QR code that will contain all of the provided data. @throws WriterException if the data cannot fit in any version
[ "Decides", "the", "smallest", "version", "of", "QR", "code", "that", "will", "contain", "all", "of", "the", "provided", "data", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java#L173-L186
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.registerTemplateTypeNamesInScope
public void registerTemplateTypeNamesInScope(Iterable<TemplateType> keys, Node scopeRoot) { for (TemplateType key : keys) { scopedNameTable.put(scopeRoot, key.getReferenceName(), key); } }
java
public void registerTemplateTypeNamesInScope(Iterable<TemplateType> keys, Node scopeRoot) { for (TemplateType key : keys) { scopedNameTable.put(scopeRoot, key.getReferenceName(), key); } }
[ "public", "void", "registerTemplateTypeNamesInScope", "(", "Iterable", "<", "TemplateType", ">", "keys", ",", "Node", "scopeRoot", ")", "{", "for", "(", "TemplateType", "key", ":", "keys", ")", "{", "scopedNameTable", ".", "put", "(", "scopeRoot", ",", "key", ...
Registers template types on the given scope root. This takes a Node rather than a StaticScope because at the time it is called, the scope has not yet been created.
[ "Registers", "template", "types", "on", "the", "given", "scope", "root", ".", "This", "takes", "a", "Node", "rather", "than", "a", "StaticScope", "because", "at", "the", "time", "it", "is", "called", "the", "scope", "has", "not", "yet", "been", "created", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L2257-L2261
auth0/auth0-spring-security-api
lib/src/main/java/com/auth0/spring/security/api/JwtWebSecurityConfigurer.java
JwtWebSecurityConfigurer.forHS256
@SuppressWarnings({"WeakerAccess", "SameParameterValue"}) public static JwtWebSecurityConfigurer forHS256(String audience, String issuer, byte[] secret) { return new JwtWebSecurityConfigurer(audience, issuer, new JwtAuthenticationProvider(secret, issuer, audience)); }
java
@SuppressWarnings({"WeakerAccess", "SameParameterValue"}) public static JwtWebSecurityConfigurer forHS256(String audience, String issuer, byte[] secret) { return new JwtWebSecurityConfigurer(audience, issuer, new JwtAuthenticationProvider(secret, issuer, audience)); }
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"SameParameterValue\"", "}", ")", "public", "static", "JwtWebSecurityConfigurer", "forHS256", "(", "String", "audience", ",", "String", "issuer", ",", "byte", "[", "]", "secret", ")", "{", "return", "...
Configures application authorization for JWT signed with HS256 @param audience identifier of the API and must match the {@code aud} value in the token @param issuer of the token for this API and must match the {@code iss} value in the token @param secret used to sign and verify tokens @return JwtWebSecurityConfigurer f...
[ "Configures", "application", "authorization", "for", "JWT", "signed", "with", "HS256" ]
train
https://github.com/auth0/auth0-spring-security-api/blob/cebd4daa0125efd4da9e651cf29aa5ebdb147e2b/lib/src/main/java/com/auth0/spring/security/api/JwtWebSecurityConfigurer.java#L73-L76
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java
ProfilerTimerFilter.sessionCreated
@Override public void sessionCreated(NextFilter nextFilter, IoSession session) throws Exception { if (profileSessionCreated) { long start = timeNow(); nextFilter.sessionCreated(session); long end = timeNow(); sessionCreatedTimerWorker.addNewDuratio...
java
@Override public void sessionCreated(NextFilter nextFilter, IoSession session) throws Exception { if (profileSessionCreated) { long start = timeNow(); nextFilter.sessionCreated(session); long end = timeNow(); sessionCreatedTimerWorker.addNewDuratio...
[ "@", "Override", "public", "void", "sessionCreated", "(", "NextFilter", "nextFilter", ",", "IoSession", "session", ")", "throws", "Exception", "{", "if", "(", "profileSessionCreated", ")", "{", "long", "start", "=", "timeNow", "(", ")", ";", "nextFilter", ".",...
Profile a SessionCreated event. This method will gather the following informations : - the method duration - the shortest execution time - the slowest execution time - the average execution time - the global number of calls @param nextFilter The filter to call next @param session The associated session
[ "Profile", "a", "SessionCreated", "event", ".", "This", "method", "will", "gather", "the", "following", "informations", ":", "-", "the", "method", "duration", "-", "the", "shortest", "execution", "time", "-", "the", "slowest", "execution", "time", "-", "the", ...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java#L389-L400
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java
FormatCache.getDateInstance
F getDateInstance(final int dateStyle, final TimeZone timeZone, final Locale locale) { return getDateTimeInstance(Integer.valueOf(dateStyle), null, timeZone, locale); }
java
F getDateInstance(final int dateStyle, final TimeZone timeZone, final Locale locale) { return getDateTimeInstance(Integer.valueOf(dateStyle), null, timeZone, locale); }
[ "F", "getDateInstance", "(", "final", "int", "dateStyle", ",", "final", "TimeZone", "timeZone", ",", "final", "Locale", "locale", ")", "{", "return", "getDateTimeInstance", "(", "Integer", ".", "valueOf", "(", "dateStyle", ")", ",", "null", ",", "timeZone", ...
package protected, for access from FastDateFormat; do not make public or protected
[ "package", "protected", "for", "access", "from", "FastDateFormat", ";", "do", "not", "make", "public", "or", "protected" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java#L131-L133
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/core/UIResults.java
UIResults.getFormatter
public StringFormatter getFormatter() { if (formatter == null) { ResourceBundle b = ResourceBundle.getBundle(UI_RESOURCE_BUNDLE_NAME, new UTF8Control()); formatter = new StringFormatter(b, getLocale()); } return formatter; }
java
public StringFormatter getFormatter() { if (formatter == null) { ResourceBundle b = ResourceBundle.getBundle(UI_RESOURCE_BUNDLE_NAME, new UTF8Control()); formatter = new StringFormatter(b, getLocale()); } return formatter; }
[ "public", "StringFormatter", "getFormatter", "(", ")", "{", "if", "(", "formatter", "==", "null", ")", "{", "ResourceBundle", "b", "=", "ResourceBundle", ".", "getBundle", "(", "UI_RESOURCE_BUNDLE_NAME", ",", "new", "UTF8Control", "(", ")", ")", ";", "formatte...
return StringFormatter set-up for locale of request being processed. <p>deprecation recalled 2014-05-06.</p> @return StringFormatter localized to user request
[ "return", "StringFormatter", "set", "-", "up", "for", "locale", "of", "request", "being", "processed", ".", "<p", ">", "deprecation", "recalled", "2014", "-", "05", "-", "06", ".", "<", "/", "p", ">" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java#L692-L698
gwt-maven-plugin/gwt-maven-plugin
src/main/java/org/codehaus/mojo/gwt/shell/RunMojo.java
RunMojo.copyDirectoryStructureIfModified
private void copyDirectoryStructureIfModified(File sourceDir, File destDir) throws IOException { DirectoryScanner scanner = new DirectoryScanner(); scanner.setBasedir( sourceDir ); scanner.addDefaultExcludes(); scanner.scan(); /* * NOTE: Make sure t...
java
private void copyDirectoryStructureIfModified(File sourceDir, File destDir) throws IOException { DirectoryScanner scanner = new DirectoryScanner(); scanner.setBasedir( sourceDir ); scanner.addDefaultExcludes(); scanner.scan(); /* * NOTE: Make sure t...
[ "private", "void", "copyDirectoryStructureIfModified", "(", "File", "sourceDir", ",", "File", "destDir", ")", "throws", "IOException", "{", "DirectoryScanner", "scanner", "=", "new", "DirectoryScanner", "(", ")", ";", "scanner", ".", "setBasedir", "(", "sourceDir", ...
Copied a directory structure with deafault exclusions (.svn, CVS, etc) @param sourceDir The source directory to copy, must not be <code>null</code>. @param destDir The target directory to copy to, must not be <code>null</code>. @throws java.io.IOException If the directory structure could not be copied.
[ "Copied", "a", "directory", "structure", "with", "deafault", "exclusions", "(", ".", "svn", "CVS", "etc", ")" ]
train
https://github.com/gwt-maven-plugin/gwt-maven-plugin/blob/0cdd5054b43f182cc22a8acf61ec79ac42b0dfdc/src/main/java/org/codehaus/mojo/gwt/shell/RunMojo.java#L542-L566
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/comparator/JSONCompareUtil.java
JSONCompareUtil.isUsableAsUniqueKey
public static boolean isUsableAsUniqueKey(String candidate, JSONArray array) throws JSONException { Set<Object> seenValues = new HashSet<Object>(); for (int i = 0; i < array.length(); i++) { Object item = array.get(i); if (item instanceof JSONObject) { JSONObject ...
java
public static boolean isUsableAsUniqueKey(String candidate, JSONArray array) throws JSONException { Set<Object> seenValues = new HashSet<Object>(); for (int i = 0; i < array.length(); i++) { Object item = array.get(i); if (item instanceof JSONObject) { JSONObject ...
[ "public", "static", "boolean", "isUsableAsUniqueKey", "(", "String", "candidate", ",", "JSONArray", "array", ")", "throws", "JSONException", "{", "Set", "<", "Object", ">", "seenValues", "=", "new", "HashSet", "<", "Object", ">", "(", ")", ";", "for", "(", ...
<p>Looks to see if candidate field is a possible unique key across a array of objects. Returns true IFF:</p> <ol> <li>array is an array of JSONObject <li>candidate is a top-level field in each of of the objects in the array <li>candidate is a simple value (not JSONObject or JSONArray) <li>candidate is unique across all...
[ "<p", ">", "Looks", "to", "see", "if", "candidate", "field", "is", "a", "possible", "unique", "key", "across", "a", "array", "of", "objects", ".", "Returns", "true", "IFF", ":", "<", "/", "p", ">", "<ol", ">", "<li", ">", "array", "is", "an", "arra...
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/comparator/JSONCompareUtil.java#L91-L112
kiegroup/jbpm
jbpm-flow-builder/src/main/java/org/jbpm/compiler/xml/processes/RuleFlowMigrator.java
RuleFlowMigrator.portToCurrentVersion
private static String portToCurrentVersion(String xml, String xsl) throws Exception { // convert it. String version5XML = XSLTransformation.transform(xsl, xml, null); // Add the namespace attribute to the process element as it is not added by the XSL transformation. version5XML = version5XML.re...
java
private static String portToCurrentVersion(String xml, String xsl) throws Exception { // convert it. String version5XML = XSLTransformation.transform(xsl, xml, null); // Add the namespace attribute to the process element as it is not added by the XSL transformation. version5XML = version5XML.re...
[ "private", "static", "String", "portToCurrentVersion", "(", "String", "xml", ",", "String", "xsl", ")", "throws", "Exception", "{", "// convert it.", "String", "version5XML", "=", "XSLTransformation", ".", "transform", "(", "xsl", ",", "xml", ",", "null", ")", ...
*********************************************************************** Utility method that applies a given xsl transform to the given xml to transform a drools 4 ruleflow to version 5. @param xml the ruleflow to be transformed @param xsl the xsl transform to apply to the ruleflow xml @return the ruleflow xml transform...
[ "***********************************************************************", "Utility", "method", "that", "applies", "a", "given", "xsl", "transform", "to", "the", "given", "xml", "to", "transform", "a", "drools", "4", "ruleflow", "to", "version", "5", "." ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-flow-builder/src/main/java/org/jbpm/compiler/xml/processes/RuleFlowMigrator.java#L142-L149
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java
LinkedPE.enrichWithCM
protected void enrichWithCM(Set<BioPAXElement> seed, Set<BioPAXElement> all) { Set addition = access(type == Type.TO_GENERAL ? complexAcc : memberAcc, seed, all); if (blacklist != null) addition = blacklist.getNonUbiqueObjects(addition); if (!addition.isEmpty()) { all.addAll(addition); enrichWithGeneri...
java
protected void enrichWithCM(Set<BioPAXElement> seed, Set<BioPAXElement> all) { Set addition = access(type == Type.TO_GENERAL ? complexAcc : memberAcc, seed, all); if (blacklist != null) addition = blacklist.getNonUbiqueObjects(addition); if (!addition.isEmpty()) { all.addAll(addition); enrichWithGeneri...
[ "protected", "void", "enrichWithCM", "(", "Set", "<", "BioPAXElement", ">", "seed", ",", "Set", "<", "BioPAXElement", ">", "all", ")", "{", "Set", "addition", "=", "access", "(", "type", "==", "Type", ".", "TO_GENERAL", "?", "complexAcc", ":", "memberAcc",...
Gets parent complexes or complex members recursively according to the type of the linkage. @param seed elements to link @param all already found links
[ "Gets", "parent", "complexes", "or", "complex", "members", "recursively", "according", "to", "the", "type", "of", "the", "linkage", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/LinkedPE.java#L134-L145
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ConnectionMonitorsInner.java
ConnectionMonitorsInner.beginCreateOrUpdate
public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking(...
java
public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking(...
[ "public", "ConnectionMonitorResultInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "String", "connectionMonitorName", ",", "ConnectionMonitorInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceRespon...
Create or update a connection monitor. @param resourceGroupName The name of the resource group containing Network Watcher. @param networkWatcherName The name of the Network Watcher resource. @param connectionMonitorName The name of the connection monitor. @param parameters Parameters that define the operation to creat...
[ "Create", "or", "update", "a", "connection", "monitor", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ConnectionMonitorsInner.java#L204-L206
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java
BingImagesImpl.detailsAsync
public Observable<ImageInsights> detailsAsync(String query, DetailsOptionalParameter detailsOptionalParameter) { return detailsWithServiceResponseAsync(query, detailsOptionalParameter).map(new Func1<ServiceResponse<ImageInsights>, ImageInsights>() { @Override public ImageInsights call(Se...
java
public Observable<ImageInsights> detailsAsync(String query, DetailsOptionalParameter detailsOptionalParameter) { return detailsWithServiceResponseAsync(query, detailsOptionalParameter).map(new Func1<ServiceResponse<ImageInsights>, ImageInsights>() { @Override public ImageInsights call(Se...
[ "public", "Observable", "<", "ImageInsights", ">", "detailsAsync", "(", "String", "query", ",", "DetailsOptionalParameter", "detailsOptionalParameter", ")", "{", "return", "detailsWithServiceResponseAsync", "(", "query", ",", "detailsOptionalParameter", ")", ".", "map", ...
The Image Detail Search API lets you search on Bing and get back insights about an image, such as webpages that include the image. This section provides technical details about the query parameters and headers that you use to request insights of images and the JSON response objects that contain them. For examples that ...
[ "The", "Image", "Detail", "Search", "API", "lets", "you", "search", "on", "Bing", "and", "get", "back", "insights", "about", "an", "image", "such", "as", "webpages", "that", "include", "the", "image", ".", "This", "section", "provides", "technical", "details...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java#L502-L509
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildHeadRequest
public HttpRequest buildHeadRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.HEAD, url, null); }
java
public HttpRequest buildHeadRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.HEAD, url, null); }
[ "public", "HttpRequest", "buildHeadRequest", "(", "GenericUrl", "url", ")", "throws", "IOException", "{", "return", "buildRequest", "(", "HttpMethods", ".", "HEAD", ",", "url", ",", "null", ")", ";", "}" ]
Builds a {@code HEAD} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request
[ "Builds", "a", "{", "@code", "HEAD", "}", "request", "for", "the", "given", "URL", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L159-L161
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/ConnectionPool.java
ConnectionPool.getTableCreatingConnection
public TableCreatingConnection getTableCreatingConnection() throws SQLException { if (ddlConverter == null) { return null; } else { Connection c = getReadWriteConnection(); return new TableCreatingConnection(c, ddlConverter); } }
java
public TableCreatingConnection getTableCreatingConnection() throws SQLException { if (ddlConverter == null) { return null; } else { Connection c = getReadWriteConnection(); return new TableCreatingConnection(c, ddlConverter); } }
[ "public", "TableCreatingConnection", "getTableCreatingConnection", "(", ")", "throws", "SQLException", "{", "if", "(", "ddlConverter", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "Connection", "c", "=", "getReadWriteConnection", "(", ")", ";...
Gets a TableCreatingConnection. <p> </p> This derives from the same pool, but wraps the Connection in an appropriate TableCreatingConnection before returning it. @return The next available Connection from the pool, wrapped as a TableCreatingException, or null if this ConnectionPool hasn't been configured with a DDLCon...
[ "Gets", "a", "TableCreatingConnection", ".", "<p", ">", "<", "/", "p", ">", "This", "derives", "from", "the", "same", "pool", "but", "wraps", "the", "Connection", "in", "an", "appropriate", "TableCreatingConnection", "before", "returning", "it", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/ConnectionPool.java#L269-L277
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/JMSServices.java
JMSServices.getQueue
public Queue getQueue(String contextUrl, String queueName) throws ServiceLocatorException { try { String jndiName = null; if (contextUrl == null) { jndiName = namingProvider.qualifyJmsQueueName(queueName); } else { jndiName = queueN...
java
public Queue getQueue(String contextUrl, String queueName) throws ServiceLocatorException { try { String jndiName = null; if (contextUrl == null) { jndiName = namingProvider.qualifyJmsQueueName(queueName); } else { jndiName = queueN...
[ "public", "Queue", "getQueue", "(", "String", "contextUrl", ",", "String", "queueName", ")", "throws", "ServiceLocatorException", "{", "try", "{", "String", "jndiName", "=", "null", ";", "if", "(", "contextUrl", "==", "null", ")", "{", "jndiName", "=", "nami...
Looks up and returns a JMS queue. @param queueName remote queue name @param contextUrl the context url (or null for local) @return javax.jms.Queue
[ "Looks", "up", "and", "returns", "a", "JMS", "queue", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/JMSServices.java#L246-L260
OpenLiberty/open-liberty
dev/com.ibm.ws.jndi/src/com/ibm/ws/jndi/internal/JNDIEntry.java
JNDIEntry.activate
protected synchronized void activate(BundleContext context, Map<String, Object> props) { String jndiName = (String) props.get("jndiName"); String originalValue = (String) props.get("value"); //Since we declare a default value of false in the metatype, if decode isn't specified, props should ret...
java
protected synchronized void activate(BundleContext context, Map<String, Object> props) { String jndiName = (String) props.get("jndiName"); String originalValue = (String) props.get("value"); //Since we declare a default value of false in the metatype, if decode isn't specified, props should ret...
[ "protected", "synchronized", "void", "activate", "(", "BundleContext", "context", ",", "Map", "<", "String", ",", "Object", ">", "props", ")", "{", "String", "jndiName", "=", "(", "String", ")", "props", ".", "get", "(", "\"jndiName\"", ")", ";", "String",...
Registers the JNDI service for the supplied properties as long as the jndiName and value are set @param context @param props The properties containing values for <code>"jndiName"</code> and <code>"value"</code>
[ "Registers", "the", "JNDI", "service", "for", "the", "supplied", "properties", "as", "long", "as", "the", "jndiName", "and", "value", "are", "set" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jndi/src/com/ibm/ws/jndi/internal/JNDIEntry.java#L57-L87
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
ConfigClient.updateSink
public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = UpdateSinkRequest.newBuilder() .setSinkName(sinkName) .setSink(sink) .setUpdateMask(updateMask) .build(); return updateSink(request); }
java
public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { UpdateSinkRequest request = UpdateSinkRequest.newBuilder() .setSinkName(sinkName) .setSink(sink) .setUpdateMask(updateMask) .build(); return updateSink(request); }
[ "public", "final", "LogSink", "updateSink", "(", "String", "sinkName", ",", "LogSink", "sink", ",", "FieldMask", "updateMask", ")", "{", "UpdateSinkRequest", "request", "=", "UpdateSinkRequest", ".", "newBuilder", "(", ")", ".", "setSinkName", "(", "sinkName", "...
Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: `destination`, and `filter`. The updated sink might also have a new `writer_identity`; see the `unique_writer_identity` field. <p>Sample code: <pre><code> try (ConfigClient configClient = ConfigClient.create(...
[ "Updates", "a", "sink", ".", "This", "method", "replaces", "the", "following", "fields", "in", "the", "existing", "sink", "with", "values", "from", "the", "new", "sink", ":", "destination", "and", "filter", ".", "The", "updated", "sink", "might", "also", "...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java#L613-L622
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/MinecraftTypeHelper.java
MinecraftTypeHelper.applyColour
static IBlockState applyColour(IBlockState state, Colour colour) { for (IProperty prop : state.getProperties().keySet()) { if (prop.getName().equals("color") && prop.getValueClass() == net.minecraft.item.EnumDyeColor.class) { net.minecraft.item.EnumDyeColor current = (net.minec...
java
static IBlockState applyColour(IBlockState state, Colour colour) { for (IProperty prop : state.getProperties().keySet()) { if (prop.getName().equals("color") && prop.getValueClass() == net.minecraft.item.EnumDyeColor.class) { net.minecraft.item.EnumDyeColor current = (net.minec...
[ "static", "IBlockState", "applyColour", "(", "IBlockState", "state", ",", "Colour", "colour", ")", "{", "for", "(", "IProperty", "prop", ":", "state", ".", "getProperties", "(", ")", ".", "keySet", "(", ")", ")", "{", "if", "(", "prop", ".", "getName", ...
Recolour the Minecraft block @param state The block to be recoloured @param colour The new colour @return A new blockstate which is a recoloured version of the original
[ "Recolour", "the", "Minecraft", "block" ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/MinecraftTypeHelper.java#L560-L574
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/impl/edir/NmasCrFactory.java
NmasCrFactory.readAssignedChallengeSet
public static ChallengeSet readAssignedChallengeSet( final ChaiUser theUser ) throws ChaiUnavailableException, ChaiOperationException, ChaiValidationException { return readAssignedChallengeSet( theUser, Locale.getDefault() ); }
java
public static ChallengeSet readAssignedChallengeSet( final ChaiUser theUser ) throws ChaiUnavailableException, ChaiOperationException, ChaiValidationException { return readAssignedChallengeSet( theUser, Locale.getDefault() ); }
[ "public", "static", "ChallengeSet", "readAssignedChallengeSet", "(", "final", "ChaiUser", "theUser", ")", "throws", "ChaiUnavailableException", ",", "ChaiOperationException", ",", "ChaiValidationException", "{", "return", "readAssignedChallengeSet", "(", "theUser", ",", "Lo...
This method will first read the user's assigned password challenge set policy. @param theUser ChaiUser to read policy for @return A valid ChallengeSet if found, otherwise null. @throws ChaiOperationException If there is an error during the operation @throws ChaiUnavailableException If the directory server(s) are una...
[ "This", "method", "will", "first", "read", "the", "user", "s", "assigned", "password", "challenge", "set", "policy", "." ]
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/impl/edir/NmasCrFactory.java#L188-L192
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java
SegmentsUtil.setByte
public static void setByte(MemorySegment[] segments, int offset, byte value) { if (inFirstSegment(segments, offset, 1)) { segments[0].put(offset, value); } else { setByteMultiSegments(segments, offset, value); } }
java
public static void setByte(MemorySegment[] segments, int offset, byte value) { if (inFirstSegment(segments, offset, 1)) { segments[0].put(offset, value); } else { setByteMultiSegments(segments, offset, value); } }
[ "public", "static", "void", "setByte", "(", "MemorySegment", "[", "]", "segments", ",", "int", "offset", ",", "byte", "value", ")", "{", "if", "(", "inFirstSegment", "(", "segments", ",", "offset", ",", "1", ")", ")", "{", "segments", "[", "0", "]", ...
set byte from segments. @param segments target segments. @param offset value offset.
[ "set", "byte", "from", "segments", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/util/SegmentsUtil.java#L597-L603
amaembo/streamex
src/main/java/one/util/streamex/AbstractStreamEx.java
AbstractStreamEx.toListAndThen
public <R> R toListAndThen(Function<? super List<T>, R> finisher) { if (context.fjp != null) return context.terminate(() -> finisher.apply(toList())); return finisher.apply(toList()); }
java
public <R> R toListAndThen(Function<? super List<T>, R> finisher) { if (context.fjp != null) return context.terminate(() -> finisher.apply(toList())); return finisher.apply(toList()); }
[ "public", "<", "R", ">", "R", "toListAndThen", "(", "Function", "<", "?", "super", "List", "<", "T", ">", ",", "R", ">", "finisher", ")", "{", "if", "(", "context", ".", "fjp", "!=", "null", ")", "return", "context", ".", "terminate", "(", "(", "...
Creates a {@link List} containing the elements of this stream, then performs finishing transformation and returns its result. There are no guarantees on the type, serializability or thread-safety of the {@code List} created. <p> This is a terminal operation. @param <R> the type of the result @param finisher a functio...
[ "Creates", "a", "{", "@link", "List", "}", "containing", "the", "elements", "of", "this", "stream", "then", "performs", "finishing", "transformation", "and", "returns", "its", "result", ".", "There", "are", "no", "guarantees", "on", "the", "type", "serializabi...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/AbstractStreamEx.java#L1231-L1235
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.isDirectory
public static boolean isDirectory(Path path, boolean isFollowLinks) { if (null == path) { return false; } final LinkOption[] options = isFollowLinks ? new LinkOption[0] : new LinkOption[] { LinkOption.NOFOLLOW_LINKS }; return Files.isDirectory(path, options); }
java
public static boolean isDirectory(Path path, boolean isFollowLinks) { if (null == path) { return false; } final LinkOption[] options = isFollowLinks ? new LinkOption[0] : new LinkOption[] { LinkOption.NOFOLLOW_LINKS }; return Files.isDirectory(path, options); }
[ "public", "static", "boolean", "isDirectory", "(", "Path", "path", ",", "boolean", "isFollowLinks", ")", "{", "if", "(", "null", "==", "path", ")", "{", "return", "false", ";", "}", "final", "LinkOption", "[", "]", "options", "=", "isFollowLinks", "?", "...
判断是否为目录,如果file为null,则返回false @param path {@link Path} @param isFollowLinks 是否追踪到软链对应的真实地址 @return 如果为目录true @since 3.1.0
[ "判断是否为目录,如果file为null,则返回false" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L1257-L1263
hal/core
gui/src/main/java/org/jboss/as/console/mbui/behaviour/LoadResourceProcedure.java
LoadResourceProcedure.assignKeyFromAddressNode
private static void assignKeyFromAddressNode(ModelNode payload, ModelNode address) { List<Property> props = address.asPropertyList(); Property lastToken = props.get(props.size()-1); payload.get("entity.key").set(lastToken.getValue().asString()); }
java
private static void assignKeyFromAddressNode(ModelNode payload, ModelNode address) { List<Property> props = address.asPropertyList(); Property lastToken = props.get(props.size()-1); payload.get("entity.key").set(lastToken.getValue().asString()); }
[ "private", "static", "void", "assignKeyFromAddressNode", "(", "ModelNode", "payload", ",", "ModelNode", "address", ")", "{", "List", "<", "Property", ">", "props", "=", "address", ".", "asPropertyList", "(", ")", ";", "Property", "lastToken", "=", "props", "."...
the model representations we use internally carry along the entity keys. these are derived from the resource address, but will be available as synthetic resource attributes. @param payload @param address
[ "the", "model", "representations", "we", "use", "internally", "carry", "along", "the", "entity", "keys", ".", "these", "are", "derived", "from", "the", "resource", "address", "but", "will", "be", "available", "as", "synthetic", "resource", "attributes", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/mbui/behaviour/LoadResourceProcedure.java#L179-L183
recommenders/rival
rival-evaluate/src/main/java/net/recommenders/rival/evaluation/statistics/ConfidenceInterval.java
ConfidenceInterval.getConfidenceInterval
public double[] getConfidenceInterval(final double alpha, final Map<?, Double> metricValuesPerDimension) { SummaryStatistics differences = new SummaryStatistics(); for (Double d : metricValuesPerDimension.values()) { differences.addValue(d); } return getConfidenceInterval(alp...
java
public double[] getConfidenceInterval(final double alpha, final Map<?, Double> metricValuesPerDimension) { SummaryStatistics differences = new SummaryStatistics(); for (Double d : metricValuesPerDimension.values()) { differences.addValue(d); } return getConfidenceInterval(alp...
[ "public", "double", "[", "]", "getConfidenceInterval", "(", "final", "double", "alpha", ",", "final", "Map", "<", "?", ",", "Double", ">", "metricValuesPerDimension", ")", "{", "SummaryStatistics", "differences", "=", "new", "SummaryStatistics", "(", ")", ";", ...
Method that takes only one metric as parameter. It is useful when comparing more than two metrics (so that a confidence interval is computed for each of them), as suggested in [Sakai, 2014] @param alpha probability of incorrectly rejecting the null hypothesis (1 - confidence_level) @param metricValuesPerDimension one ...
[ "Method", "that", "takes", "only", "one", "metric", "as", "parameter", ".", "It", "is", "useful", "when", "comparing", "more", "than", "two", "metrics", "(", "so", "that", "a", "confidence", "interval", "is", "computed", "for", "each", "of", "them", ")", ...
train
https://github.com/recommenders/rival/blob/6ee8223e91810ae1c6052899595af3906e0c34c6/rival-evaluate/src/main/java/net/recommenders/rival/evaluation/statistics/ConfidenceInterval.java#L169-L175
Axway/Grapes
utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java
GrapesClient.approveLicense
public void approveLicense(final String licenseId, final Boolean approve, final String user, final String password) throws GrapesCommunicationException, AuthenticationException{ final Client client = getClient(user, password); final WebResource resource = client.resource(serverURL).path(RequestUtils.get...
java
public void approveLicense(final String licenseId, final Boolean approve, final String user, final String password) throws GrapesCommunicationException, AuthenticationException{ final Client client = getClient(user, password); final WebResource resource = client.resource(serverURL).path(RequestUtils.get...
[ "public", "void", "approveLicense", "(", "final", "String", "licenseId", ",", "final", "Boolean", "approve", ",", "final", "String", "user", ",", "final", "String", "password", ")", "throws", "GrapesCommunicationException", ",", "AuthenticationException", "{", "fina...
Approve or reject a license @param licenseId @param approve @throws GrapesCommunicationException @throws javax.naming.AuthenticationException
[ "Approve", "or", "reject", "a", "license" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java#L737-L750
hypercube1024/firefly
firefly-db/src/main/java/com/firefly/db/jdbc/helper/DefaultBeanProcessor.java
DefaultBeanProcessor.createBean
private <T> T createBean(ResultSet rs, Class<T> type, PropertyDescriptor[] props, int[] columnToProperty) throws SQLException { T bean = this.newInstance(type); return populateBean(rs, bean, props, columnToProperty); }
java
private <T> T createBean(ResultSet rs, Class<T> type, PropertyDescriptor[] props, int[] columnToProperty) throws SQLException { T bean = this.newInstance(type); return populateBean(rs, bean, props, columnToProperty); }
[ "private", "<", "T", ">", "T", "createBean", "(", "ResultSet", "rs", ",", "Class", "<", "T", ">", "type", ",", "PropertyDescriptor", "[", "]", "props", ",", "int", "[", "]", "columnToProperty", ")", "throws", "SQLException", "{", "T", "bean", "=", "thi...
Creates a new object and initializes its fields from the ResultSet. @param <T> The type of bean to create @param rs The result set. @param type The bean type (the return type of the object). @param props The property descriptors. @param columnToProperty The column indi...
[ "Creates", "a", "new", "object", "and", "initializes", "its", "fields", "from", "the", "ResultSet", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/jdbc/helper/DefaultBeanProcessor.java#L93-L99
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/NumberInRange.java
NumberInRange.isInRange
@ArgumentsChecked @Throws(IllegalNullArgumentException.class) public static boolean isInRange(@Nonnull final Number number, @Nonnull final BigInteger min, @Nonnull final BigInteger max) { Check.notNull(number, "number"); Check.notNull(min, "min"); Check.notNull(max, "max"); BigInteger bigInteger = null; if...
java
@ArgumentsChecked @Throws(IllegalNullArgumentException.class) public static boolean isInRange(@Nonnull final Number number, @Nonnull final BigInteger min, @Nonnull final BigInteger max) { Check.notNull(number, "number"); Check.notNull(min, "min"); Check.notNull(max, "max"); BigInteger bigInteger = null; if...
[ "@", "ArgumentsChecked", "@", "Throws", "(", "IllegalNullArgumentException", ".", "class", ")", "public", "static", "boolean", "isInRange", "(", "@", "Nonnull", "final", "Number", "number", ",", "@", "Nonnull", "final", "BigInteger", "min", ",", "@", "Nonnull", ...
Test if a number is in an arbitrary range. @param number a number @param min lower boundary of the range @param max upper boundary of the range @return true if the given number is within the range
[ "Test", "if", "a", "number", "is", "in", "an", "arbitrary", "range", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/NumberInRange.java#L285-L306
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGroupVertex.java
ExecutionGroupVertex.calculateConnectionID
int calculateConnectionID(int currentConnectionID, final Set<ExecutionGroupVertex> alreadyVisited) { if (!alreadyVisited.add(this)) { return currentConnectionID; } for (final ExecutionGroupEdge backwardLink : this.backwardLinks) { backwardLink.setConnectionID(currentConnectionID); ++currentCon...
java
int calculateConnectionID(int currentConnectionID, final Set<ExecutionGroupVertex> alreadyVisited) { if (!alreadyVisited.add(this)) { return currentConnectionID; } for (final ExecutionGroupEdge backwardLink : this.backwardLinks) { backwardLink.setConnectionID(currentConnectionID); ++currentCon...
[ "int", "calculateConnectionID", "(", "int", "currentConnectionID", ",", "final", "Set", "<", "ExecutionGroupVertex", ">", "alreadyVisited", ")", "{", "if", "(", "!", "alreadyVisited", ".", "add", "(", "this", ")", ")", "{", "return", "currentConnectionID", ";", ...
Recursive method to calculate the connection IDs of the {@link ExecutionGraph}. @param currentConnectionID the current connection ID @param alreadyVisited the set of already visited group vertices @return maximum assigned connectionID
[ "Recursive", "method", "to", "calculate", "the", "connection", "IDs", "of", "the", "{", "@link", "ExecutionGraph", "}", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionGroupVertex.java#L919-L936
geomajas/geomajas-project-graphics
graphics/src/main/java/org/geomajas/graphics/client/widget/SliderBar.java
SliderBar.startSliding
private void startSliding(boolean highlight, boolean fireEvent) { if (highlight) { DOM.setElementProperty(lineElement, "className", SLIDER_LINE + " " + SLIDER_LINE_SLIDING); DOM.setElementProperty(knobImage.getElement(), "className", SLIDER_KNOB + " " + SLIDER_KNOB_SLIDING); } }
java
private void startSliding(boolean highlight, boolean fireEvent) { if (highlight) { DOM.setElementProperty(lineElement, "className", SLIDER_LINE + " " + SLIDER_LINE_SLIDING); DOM.setElementProperty(knobImage.getElement(), "className", SLIDER_KNOB + " " + SLIDER_KNOB_SLIDING); } }
[ "private", "void", "startSliding", "(", "boolean", "highlight", ",", "boolean", "fireEvent", ")", "{", "if", "(", "highlight", ")", "{", "DOM", ".", "setElementProperty", "(", "lineElement", ",", "\"className\"", ",", "SLIDER_LINE", "+", "\" \"", "+", "SLIDER_...
Start sliding the knob. @param highlight true to change the style @param fireEvent true to fire the event
[ "Start", "sliding", "the", "knob", "." ]
train
https://github.com/geomajas/geomajas-project-graphics/blob/1104196640e0ba455b8a619e774352a8e1e319ba/graphics/src/main/java/org/geomajas/graphics/client/widget/SliderBar.java#L928-L935
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java
MethodAnnotation.fromVisitedMethod
public static MethodAnnotation fromVisitedMethod(PreorderVisitor visitor) { String className = visitor.getDottedClassName(); MethodAnnotation result = new MethodAnnotation(className, visitor.getMethodName(), visitor.getMethodSig(), visitor .getMethod().isStatic()); // Try to fin...
java
public static MethodAnnotation fromVisitedMethod(PreorderVisitor visitor) { String className = visitor.getDottedClassName(); MethodAnnotation result = new MethodAnnotation(className, visitor.getMethodName(), visitor.getMethodSig(), visitor .getMethod().isStatic()); // Try to fin...
[ "public", "static", "MethodAnnotation", "fromVisitedMethod", "(", "PreorderVisitor", "visitor", ")", "{", "String", "className", "=", "visitor", ".", "getDottedClassName", "(", ")", ";", "MethodAnnotation", "result", "=", "new", "MethodAnnotation", "(", "className", ...
Factory method to create a MethodAnnotation from the method the given visitor is currently visiting. @param visitor the BetterVisitor currently visiting the method
[ "Factory", "method", "to", "create", "a", "MethodAnnotation", "from", "the", "method", "the", "given", "visitor", "is", "currently", "visiting", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/MethodAnnotation.java#L124-L134
raphw/byte-buddy
byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ClassLoaderResolver.java
ClassLoaderResolver.doResolve
private ClassLoader doResolve(MavenCoordinate mavenCoordinate) throws MojoExecutionException, MojoFailureException { List<URL> urls = new ArrayList<URL>(); log.info("Resolving transformer dependency: " + mavenCoordinate); try { DependencyNode root = repositorySystem.collectDependenci...
java
private ClassLoader doResolve(MavenCoordinate mavenCoordinate) throws MojoExecutionException, MojoFailureException { List<URL> urls = new ArrayList<URL>(); log.info("Resolving transformer dependency: " + mavenCoordinate); try { DependencyNode root = repositorySystem.collectDependenci...
[ "private", "ClassLoader", "doResolve", "(", "MavenCoordinate", "mavenCoordinate", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "List", "<", "URL", ">", "urls", "=", "new", "ArrayList", "<", "URL", ">", "(", ")", ";", "log", ".", "...
Resolves a Maven coordinate to a class loader that can load all of the coordinates classes. @param mavenCoordinate The Maven coordinate to resolve. @return A class loader that references all of the class loader's dependencies and which is a child of this class's class loader. @throws MojoExecutionException If the user...
[ "Resolves", "a", "Maven", "coordinate", "to", "a", "class", "loader", "that", "can", "load", "all", "of", "the", "coordinates", "classes", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ClassLoaderResolver.java#L117-L136
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/xml/XMLViewer.java
XMLViewer.showXML
public static Window showXML(Document document, BaseUIComponent parent) { Map<String, Object> args = Collections.singletonMap("document", document); boolean modal = parent == null; Window dialog = PopupDialog.show(XMLConstants.VIEW_DIALOG, args, modal, modal, modal, null); if (p...
java
public static Window showXML(Document document, BaseUIComponent parent) { Map<String, Object> args = Collections.singletonMap("document", document); boolean modal = parent == null; Window dialog = PopupDialog.show(XMLConstants.VIEW_DIALOG, args, modal, modal, modal, null); if (p...
[ "public", "static", "Window", "showXML", "(", "Document", "document", ",", "BaseUIComponent", "parent", ")", "{", "Map", "<", "String", ",", "Object", ">", "args", "=", "Collections", ".", "singletonMap", "(", "\"document\"", ",", "document", ")", ";", "bool...
Show the dialog, loading the specified document. @param document The XML document. @param parent If specified, show viewer in embedded mode. Otherwise, show as modal dialog. @return The dialog.
[ "Show", "the", "dialog", "loading", "the", "specified", "document", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/xml/XMLViewer.java#L59-L69
operasoftware/operaprestodriver
src/com/opera/core/systems/OperaProfile.java
OperaProfile.getPreferenceFile
private static File getPreferenceFile(final File directory) { List<File> candidates = ImmutableList.of( new File(directory, "operaprefs.ini"), new File(directory, "opera.ini")); for (File candidate : candidates) { if (candidate.exists()) { return candidate; } } return c...
java
private static File getPreferenceFile(final File directory) { List<File> candidates = ImmutableList.of( new File(directory, "operaprefs.ini"), new File(directory, "opera.ini")); for (File candidate : candidates) { if (candidate.exists()) { return candidate; } } return c...
[ "private", "static", "File", "getPreferenceFile", "(", "final", "File", "directory", ")", "{", "List", "<", "File", ">", "candidates", "=", "ImmutableList", ".", "of", "(", "new", "File", "(", "directory", ",", "\"operaprefs.ini\"", ")", ",", "new", "File", ...
Opera preference files can be named either <code>opera.ini</code> or <code>operaprefs.ini</code> depending on the product. This method will look in the specified directory for either of the files and return the one that exists. <code>operaprefs.ini</code> has priority. @param directory the directory to look for a pr...
[ "Opera", "preference", "files", "can", "be", "named", "either", "<code", ">", "opera", ".", "ini<", "/", "code", ">", "or", "<code", ">", "operaprefs", ".", "ini<", "/", "code", ">", "depending", "on", "the", "product", ".", "This", "method", "will", "...
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/OperaProfile.java#L221-L233
vincentk/joptimizer
src/main/java/com/joptimizer/util/ColtUtils.java
ColtUtils.diagonalMatrixMult
public static final DoubleMatrix2D diagonalMatrixMult(final DoubleMatrix1D diagonalU, DoubleMatrix2D A, final DoubleMatrix1D diagonalV){ int r = A.rows(); int c = A.columns(); final DoubleMatrix2D ret; if (A instanceof SparseDoubleMatrix2D) { ret = DoubleFactory2D.sparse.make(r, c); A.forEachNonZero...
java
public static final DoubleMatrix2D diagonalMatrixMult(final DoubleMatrix1D diagonalU, DoubleMatrix2D A, final DoubleMatrix1D diagonalV){ int r = A.rows(); int c = A.columns(); final DoubleMatrix2D ret; if (A instanceof SparseDoubleMatrix2D) { ret = DoubleFactory2D.sparse.make(r, c); A.forEachNonZero...
[ "public", "static", "final", "DoubleMatrix2D", "diagonalMatrixMult", "(", "final", "DoubleMatrix1D", "diagonalU", ",", "DoubleMatrix2D", "A", ",", "final", "DoubleMatrix1D", "diagonalV", ")", "{", "int", "r", "=", "A", ".", "rows", "(", ")", ";", "int", "c", ...
Return diagonalU.A.diagonalV with diagonalU and diagonalV diagonal. @param diagonalU diagonal matrix U, in the form of a vector of its diagonal elements @param diagonalV diagonal matrix V, in the form of a vector of its diagonal elements @return U.A.V
[ "Return", "diagonalU", ".", "A", ".", "diagonalV", "with", "diagonalU", "and", "diagonalV", "diagonal", "." ]
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/util/ColtUtils.java#L122-L145
VoltDB/voltdb
src/frontend/org/voltdb/jni/ExecutionEngineJNI.java
ExecutionEngineJNI.coreLoadCatalog
@Override protected void coreLoadCatalog(long timestamp, final byte[] catalogBytes) throws EEException { LOG.trace("Loading Application Catalog..."); int errorCode = 0; errorCode = nativeLoadCatalog(pointer, timestamp, catalogBytes); checkErrorCode(errorCode); //LOG.info("Loa...
java
@Override protected void coreLoadCatalog(long timestamp, final byte[] catalogBytes) throws EEException { LOG.trace("Loading Application Catalog..."); int errorCode = 0; errorCode = nativeLoadCatalog(pointer, timestamp, catalogBytes); checkErrorCode(errorCode); //LOG.info("Loa...
[ "@", "Override", "protected", "void", "coreLoadCatalog", "(", "long", "timestamp", ",", "final", "byte", "[", "]", "catalogBytes", ")", "throws", "EEException", "{", "LOG", ".", "trace", "(", "\"Loading Application Catalog...\"", ")", ";", "int", "errorCode", "=...
Provide a serialized catalog and initialize version 0 of the engine's catalog.
[ "Provide", "a", "serialized", "catalog", "and", "initialize", "version", "0", "of", "the", "engine", "s", "catalog", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jni/ExecutionEngineJNI.java#L335-L342
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.archiveEquals
public static boolean archiveEquals(File f1, File f2) { try { // Check the files byte-by-byte if (FileUtils.contentEquals(f1, f2)) { return true; } log.debug("Comparing archives '{}' and '{}'...", f1, f2); long start = System.currentTimeMillis(); boolean result = archiv...
java
public static boolean archiveEquals(File f1, File f2) { try { // Check the files byte-by-byte if (FileUtils.contentEquals(f1, f2)) { return true; } log.debug("Comparing archives '{}' and '{}'...", f1, f2); long start = System.currentTimeMillis(); boolean result = archiv...
[ "public", "static", "boolean", "archiveEquals", "(", "File", "f1", ",", "File", "f2", ")", "{", "try", "{", "// Check the files byte-by-byte", "if", "(", "FileUtils", ".", "contentEquals", "(", "f1", ",", "f2", ")", ")", "{", "return", "true", ";", "}", ...
Compares two ZIP files and returns <code>true</code> if they contain same entries. <p> First the two files are compared byte-by-byte. If a difference is found the corresponding entries of both ZIP files are compared. Thus if same contents is packed differently the two archives may still be the same. </p> <p> Two archiv...
[ "Compares", "two", "ZIP", "files", "and", "returns", "<code", ">", "true<", "/", "code", ">", "if", "they", "contain", "same", "entries", ".", "<p", ">", "First", "the", "two", "files", "are", "compared", "byte", "-", "by", "-", "byte", ".", "If", "a...
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L3048-L3069
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/exception/fault/FaultException.java
FaultException.formatMessage
protected void formatMessage(String aID, Map<Object,Object> aBindValues) { Presenter presenter = Presenter.getPresenter(this.getClass()); message = presenter.getText(aID,aBindValues); }
java
protected void formatMessage(String aID, Map<Object,Object> aBindValues) { Presenter presenter = Presenter.getPresenter(this.getClass()); message = presenter.getText(aID,aBindValues); }
[ "protected", "void", "formatMessage", "(", "String", "aID", ",", "Map", "<", "Object", ",", "Object", ">", "aBindValues", ")", "{", "Presenter", "presenter", "=", "Presenter", ".", "getPresenter", "(", "this", ".", "getClass", "(", ")", ")", ";", "message"...
Format the exception message using the presenter getText method @param aID the key of the message @param aBindValues the values to plug into the message.
[ "Format", "the", "exception", "message", "using", "the", "presenter", "getText", "method" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/exception/fault/FaultException.java#L215-L220
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.updateInt
public void updateInt(int columnIndex, int x) throws SQLException { startUpdate(columnIndex); preparedStatement.setIntParameter(columnIndex, x); }
java
public void updateInt(int columnIndex, int x) throws SQLException { startUpdate(columnIndex); preparedStatement.setIntParameter(columnIndex, x); }
[ "public", "void", "updateInt", "(", "int", "columnIndex", ",", "int", "x", ")", "throws", "SQLException", "{", "startUpdate", "(", "columnIndex", ")", ";", "preparedStatement", ".", "setIntParameter", "(", "columnIndex", ",", "x", ")", ";", "}" ]
<!-- start generic documentation --> Updates the designated column with an <code>int</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods a...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Updates", "the", "designated", "column", "with", "an", "<code", ">", "int<", "/", "code", ">", "value", ".", "The", "updater", "methods", "are", "used", "to", "update", "column", "values", "in", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L2749-L2752
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hylafax/HylaFaxJob.java
HylaFaxJob.getSenderName
public String getSenderName() { String value=null; try { value=this.JOB.getFromUser(); } catch(Exception exception) { throw new FaxException("Error while extracting job sender name.",exception); } return value; }
java
public String getSenderName() { String value=null; try { value=this.JOB.getFromUser(); } catch(Exception exception) { throw new FaxException("Error while extracting job sender name.",exception); } return value; }
[ "public", "String", "getSenderName", "(", ")", "{", "String", "value", "=", "null", ";", "try", "{", "value", "=", "this", ".", "JOB", ".", "getFromUser", "(", ")", ";", "}", "catch", "(", "Exception", "exception", ")", "{", "throw", "new", "FaxExcepti...
This function returns the fax job sender name. @return The fax job sender name
[ "This", "function", "returns", "the", "fax", "job", "sender", "name", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hylafax/HylaFaxJob.java#L225-L238
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.createInstance
public CreateInstanceResponse createInstance(CreateInstanceRequest request) throws BceClientException { checkNotNull(request, "request should not be null."); if (Strings.isNullOrEmpty(request.getClientToken())) { request.setClientToken(this.generateClientToken()); } ...
java
public CreateInstanceResponse createInstance(CreateInstanceRequest request) throws BceClientException { checkNotNull(request, "request should not be null."); if (Strings.isNullOrEmpty(request.getClientToken())) { request.setClientToken(this.generateClientToken()); } ...
[ "public", "CreateInstanceResponse", "createInstance", "(", "CreateInstanceRequest", "request", ")", "throws", "BceClientException", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "r...
Create a bcc Instance with the specified options, see all the supported instance in {@link com.baidubce.services.bcc.model.instance.InstanceType} You must fill the field of clientToken,which is especially for keeping idempotent. This is an asynchronous interface, you can get the latest status by invoke {@link #getInst...
[ "Create", "a", "bcc", "Instance", "with", "the", "specified", "options", "see", "all", "the", "supported", "instance", "in", "{", "@link", "com", ".", "baidubce", ".", "services", ".", "bcc", ".", "model", ".", "instance", ".", "InstanceType", "}", "You", ...
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L272-L297
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java
RpcWrapper.callRpcChecked
public void callRpcChecked(S request, RpcResponseHandler<? extends T> responseHandler) throws IOException { callRpcChecked(request, responseHandler, chooseIP(request.getIpKey())); }
java
public void callRpcChecked(S request, RpcResponseHandler<? extends T> responseHandler) throws IOException { callRpcChecked(request, responseHandler, chooseIP(request.getIpKey())); }
[ "public", "void", "callRpcChecked", "(", "S", "request", ",", "RpcResponseHandler", "<", "?", "extends", "T", ">", "responseHandler", ")", "throws", "IOException", "{", "callRpcChecked", "(", "request", ",", "responseHandler", ",", "chooseIP", "(", "request", "....
Convenience wrapper for NFS RPC calls where the IP is determined by a byte[] key. This method just determines the IP address and calls the basic method. @param request The request to send. @param responseHandler A response handler. @throws IOException
[ "Convenience", "wrapper", "for", "NFS", "RPC", "calls", "where", "the", "IP", "is", "determined", "by", "a", "byte", "[]", "key", ".", "This", "method", "just", "determines", "the", "IP", "address", "and", "calls", "the", "basic", "method", "." ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java#L175-L177
grails/grails-gdoc-engine
src/main/java/org/radeox/macro/Preserved.java
Preserved.addSpecial
protected void addSpecial(String c, String replacement) { specialString += c; special.put(c, replacement); }
java
protected void addSpecial(String c, String replacement) { specialString += c; special.put(c, replacement); }
[ "protected", "void", "addSpecial", "(", "String", "c", ",", "String", "replacement", ")", "{", "specialString", "+=", "c", ";", "special", ".", "put", "(", "c", ",", "replacement", ")", ";", "}" ]
Add a replacement for the special character c which may be a string @param c the character to replace @param replacement the new string
[ "Add", "a", "replacement", "for", "the", "special", "character", "c", "which", "may", "be", "a", "string" ]
train
https://github.com/grails/grails-gdoc-engine/blob/e52aa09eaa61510dc48b27603bd9ea116cd6531a/src/main/java/org/radeox/macro/Preserved.java#L53-L56
thymeleaf/thymeleaf-spring
thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/util/SpringValueFormatter.java
SpringValueFormatter.getDisplayString
public static String getDisplayString(final Object value, final boolean htmlEscape) { final String displayValue = ObjectUtils.getDisplayString(value); return (htmlEscape ? HtmlUtils.htmlEscape(displayValue) : displayValue); }
java
public static String getDisplayString(final Object value, final boolean htmlEscape) { final String displayValue = ObjectUtils.getDisplayString(value); return (htmlEscape ? HtmlUtils.htmlEscape(displayValue) : displayValue); }
[ "public", "static", "String", "getDisplayString", "(", "final", "Object", "value", ",", "final", "boolean", "htmlEscape", ")", "{", "final", "String", "displayValue", "=", "ObjectUtils", ".", "getDisplayString", "(", "value", ")", ";", "return", "(", "htmlEscape...
/* NOTE This code is based on org.springframework.web.servlet.tags.form.ValueFormatter as of Spring 5.0.0 Original license is Apache License 2.0, which is the same as the license for this file. Original copyright notice is "Copyright 2002-2012 the original author or authors". Original authors are Rob Harrop and Juergen...
[ "/", "*", "NOTE", "This", "code", "is", "based", "on", "org", ".", "springframework", ".", "web", ".", "servlet", ".", "tags", ".", "form", ".", "ValueFormatter", "as", "of", "Spring", "5", ".", "0", ".", "0", "Original", "license", "is", "Apache", "...
train
https://github.com/thymeleaf/thymeleaf-spring/blob/9aa15a19017a0938e57646e3deefb8a90ab78dcb/thymeleaf-spring5/src/main/java/org/thymeleaf/spring5/util/SpringValueFormatter.java#L50-L53
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.beginOnlineRegionAsync
public Observable<Void> beginOnlineRegionAsync(String resourceGroupName, String accountName, String region) { return beginOnlineRegionWithServiceResponseAsync(resourceGroupName, accountName, region).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse...
java
public Observable<Void> beginOnlineRegionAsync(String resourceGroupName, String accountName, String region) { return beginOnlineRegionWithServiceResponseAsync(resourceGroupName, accountName, region).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse...
[ "public", "Observable", "<", "Void", ">", "beginOnlineRegionAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "region", ")", "{", "return", "beginOnlineRegionWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ...
Online the specified region for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param region Cosmos DB region, with spaces between words and each word capitalized. @throws IllegalArgumentException thrown if p...
[ "Online", "the", "specified", "region", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1560-L1567
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.getBuildVariable
public GitlabBuildVariable getBuildVariable(Integer projectId, String key) throws IOException { String tailUrl = GitlabProject.URL + "/" + projectId + GitlabBuildVariable.URL + "/" + key; return retrieve().to(tailUrl, GitlabBuildVariable.class)...
java
public GitlabBuildVariable getBuildVariable(Integer projectId, String key) throws IOException { String tailUrl = GitlabProject.URL + "/" + projectId + GitlabBuildVariable.URL + "/" + key; return retrieve().to(tailUrl, GitlabBuildVariable.class)...
[ "public", "GitlabBuildVariable", "getBuildVariable", "(", "Integer", "projectId", ",", "String", "key", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabProject", ".", "URL", "+", "\"/\"", "+", "projectId", "+", "GitlabBuildVariable", ".", "URL"...
Gets build variable associated with a project and key. @param projectId The ID of the project. @param key The key of the variable. @return A variable. @throws IOException on gitlab api call error
[ "Gets", "build", "variable", "associated", "with", "a", "project", "and", "key", "." ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3645-L3652
infinispan/infinispan
extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java
CacheStatisticManager.beginTransaction
public final void beginTransaction(GlobalTransaction globalTransaction, boolean local) { if (local) { //Not overriding the InitialValue method leads me to have "null" at the first invocation of get() TransactionStatistics lts = createTransactionStatisticIfAbsent(globalTransaction, true); ...
java
public final void beginTransaction(GlobalTransaction globalTransaction, boolean local) { if (local) { //Not overriding the InitialValue method leads me to have "null" at the first invocation of get() TransactionStatistics lts = createTransactionStatisticIfAbsent(globalTransaction, true); ...
[ "public", "final", "void", "beginTransaction", "(", "GlobalTransaction", "globalTransaction", ",", "boolean", "local", ")", "{", "if", "(", "local", ")", "{", "//Not overriding the InitialValue method leads me to have \"null\" at the first invocation of get()", "TransactionStatis...
Signals the start of a transaction. @param local {@code true} if the transaction is local.
[ "Signals", "the", "start", "of", "a", "transaction", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java#L170-L183
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java
HylaFaxClientSpi.suspendFaxJobImpl
@Override protected void suspendFaxJobImpl(FaxJob faxJob) { //get fax job HylaFaxJob hylaFaxJob=(HylaFaxJob)faxJob; //get client HylaFAXClient client=this.getHylaFAXClient(); try { this.suspendFaxJob(hylaFaxJob,client); } catc...
java
@Override protected void suspendFaxJobImpl(FaxJob faxJob) { //get fax job HylaFaxJob hylaFaxJob=(HylaFaxJob)faxJob; //get client HylaFAXClient client=this.getHylaFAXClient(); try { this.suspendFaxJob(hylaFaxJob,client); } catc...
[ "@", "Override", "protected", "void", "suspendFaxJobImpl", "(", "FaxJob", "faxJob", ")", "{", "//get fax job", "HylaFaxJob", "hylaFaxJob", "=", "(", "HylaFaxJob", ")", "faxJob", ";", "//get client", "HylaFAXClient", "client", "=", "this", ".", "getHylaFAXClient", ...
This function will suspend an existing fax job. @param faxJob The fax job object containing the needed information
[ "This", "function", "will", "suspend", "an", "existing", "fax", "job", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java#L334-L355
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/tools/BTools.java
BTools.getSDbl
public static String getSDbl( double Value, int DecPrec ) { // String Result = ""; // if ( Double.isNaN( Value ) ) return "NaN"; // if ( DecPrec < 0 ) DecPrec = 0; // String DFS = "###,###,##0"; // if ( DecPrec > 0 ) { int idx = 0; DFS += "."; while ( idx < DecPrec ) { DFS = DFS + "0"; ...
java
public static String getSDbl( double Value, int DecPrec ) { // String Result = ""; // if ( Double.isNaN( Value ) ) return "NaN"; // if ( DecPrec < 0 ) DecPrec = 0; // String DFS = "###,###,##0"; // if ( DecPrec > 0 ) { int idx = 0; DFS += "."; while ( idx < DecPrec ) { DFS = DFS + "0"; ...
[ "public", "static", "String", "getSDbl", "(", "double", "Value", ",", "int", "DecPrec", ")", "{", "//", "String", "Result", "=", "\"\"", ";", "//", "if", "(", "Double", ".", "isNaN", "(", "Value", ")", ")", "return", "\"NaN\"", ";", "//", "if", "(", ...
<b>getSDbl</b><br> public static String getSDbl( double Value, int DecPrec )<br> Returns double converted to string.<br> If Value is Double.NaN returns "NaN".<br> If DecPrec is < 0 is DecPrec set 0.<br> @param Value - value @param DecPrec - decimal precision @return double as string
[ "<b", ">", "getSDbl<", "/", "b", ">", "<br", ">", "public", "static", "String", "getSDbl", "(", "double", "Value", "int", "DecPrec", ")", "<br", ">", "Returns", "double", "converted", "to", "string", ".", "<br", ">", "If", "Value", "is", "Double", ".",...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/tools/BTools.java#L142-L177
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/patterns/Match.java
Match.createState
public MatchState createState(Synthesizer synthesizer, AnalyzedTokenReadings[] tokens, int index, int next) { MatchState state = new MatchState(this, synthesizer); state.setToken(tokens, index, next); return state; }
java
public MatchState createState(Synthesizer synthesizer, AnalyzedTokenReadings[] tokens, int index, int next) { MatchState state = new MatchState(this, synthesizer); state.setToken(tokens, index, next); return state; }
[ "public", "MatchState", "createState", "(", "Synthesizer", "synthesizer", ",", "AnalyzedTokenReadings", "[", "]", "tokens", ",", "int", "index", ",", "int", "next", ")", "{", "MatchState", "state", "=", "new", "MatchState", "(", "this", ",", "synthesizer", ")"...
Creates a state used for actually matching a token. @since 2.3
[ "Creates", "a", "state", "used", "for", "actually", "matching", "a", "token", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/patterns/Match.java#L102-L106
lightblueseas/vintage-time
src/main/java/de/alpharogroup/date/ParseDateExtensions.java
ParseDateExtensions.parseDate
public static Date parseDate(final String date, final List<String> patterns) { for (final String pattern : patterns) { final SimpleDateFormat formatter = new SimpleDateFormat(pattern); try { return formatter.parse(date); } catch (final ParseException e) { // Do nothing... } } retur...
java
public static Date parseDate(final String date, final List<String> patterns) { for (final String pattern : patterns) { final SimpleDateFormat formatter = new SimpleDateFormat(pattern); try { return formatter.parse(date); } catch (final ParseException e) { // Do nothing... } } retur...
[ "public", "static", "Date", "parseDate", "(", "final", "String", "date", ",", "final", "List", "<", "String", ">", "patterns", ")", "{", "for", "(", "final", "String", "pattern", ":", "patterns", ")", "{", "final", "SimpleDateFormat", "formatter", "=", "ne...
Tries to convert the given String to a Date. @param date The date to convert as String. @param patterns The date patterns to convert the String to a date-object. @return Gives a Date if the convertion was successfull otherwise null.
[ "Tries", "to", "convert", "the", "given", "String", "to", "a", "Date", "." ]
train
https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/ParseDateExtensions.java#L56-L71
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressPersistenceImpl.java
CommerceAddressPersistenceImpl.removeByC_C
@Override public void removeByC_C(long classNameId, long classPK) { for (CommerceAddress commerceAddress : findByC_C(classNameId, classPK, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceAddress); } }
java
@Override public void removeByC_C(long classNameId, long classPK) { for (CommerceAddress commerceAddress : findByC_C(classNameId, classPK, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceAddress); } }
[ "@", "Override", "public", "void", "removeByC_C", "(", "long", "classNameId", ",", "long", "classPK", ")", "{", "for", "(", "CommerceAddress", "commerceAddress", ":", "findByC_C", "(", "classNameId", ",", "classPK", ",", "QueryUtil", ".", "ALL_POS", ",", "Quer...
Removes all the commerce addresses where classNameId = &#63; and classPK = &#63; from the database. @param classNameId the class name ID @param classPK the class pk
[ "Removes", "all", "the", "commerce", "addresses", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressPersistenceImpl.java#L1615-L1621
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java
GVRPointLight.setAttenuation
public void setAttenuation(float constant, float linear, float quadratic) { setFloat("attenuation_constant", constant); setFloat("attenuation_linear", linear); setFloat("attenuation_quadratic", quadratic); }
java
public void setAttenuation(float constant, float linear, float quadratic) { setFloat("attenuation_constant", constant); setFloat("attenuation_linear", linear); setFloat("attenuation_quadratic", quadratic); }
[ "public", "void", "setAttenuation", "(", "float", "constant", ",", "float", "linear", ",", "float", "quadratic", ")", "{", "setFloat", "(", "\"attenuation_constant\"", ",", "constant", ")", ";", "setFloat", "(", "\"attenuation_linear\"", ",", "linear", ")", ";",...
Set the three attenuation constants to control how light falls off based on distance from the light source. {@code 1 / (attenuation_constant + attenuation_linear * D * attenuation_quadratic * D ** 2)} @param constant constant attenuation factor @param linear linear attenuation factor @param quadratic quadratic atte...
[ "Set", "the", "three", "attenuation", "constants", "to", "control", "how", "light", "falls", "off", "based", "on", "distance", "from", "the", "light", "source", ".", "{" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPointLight.java#L253-L257
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java
AbstractRegionPainter.createGradient
protected final LinearGradientPaint createGradient(float x1, float y1, float x2, float y2, float[] midpoints, Color[] colors) { if (x1 == x2 && y1 == y2) { y2 += .00001f; } return new LinearGradientPaint(x1, y1, x2, y2, midpoints, colors); }
java
protected final LinearGradientPaint createGradient(float x1, float y1, float x2, float y2, float[] midpoints, Color[] colors) { if (x1 == x2 && y1 == y2) { y2 += .00001f; } return new LinearGradientPaint(x1, y1, x2, y2, midpoints, colors); }
[ "protected", "final", "LinearGradientPaint", "createGradient", "(", "float", "x1", ",", "float", "y1", ",", "float", "x2", ",", "float", "y2", ",", "float", "[", "]", "midpoints", ",", "Color", "[", "]", "colors", ")", "{", "if", "(", "x1", "==", "x2",...
Given parameters for creating a LinearGradientPaint, this method will create and return a linear gradient paint. One primary purpose for this method is to avoid creating a LinearGradientPaint where the start and end points are equal. In such a case, the end y point is slightly increased to avoid the overlap. @param x...
[ "Given", "parameters", "for", "creating", "a", "LinearGradientPaint", "this", "method", "will", "create", "and", "return", "a", "linear", "gradient", "paint", ".", "One", "primary", "purpose", "for", "this", "method", "is", "to", "avoid", "creating", "a", "Lin...
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java#L336-L342
phax/ph-commons
ph-jaxb/src/main/java/com/helger/jaxb/JAXBContextCache.java
JAXBContextCache.getFromCache
@Nullable public JAXBContext getFromCache (@Nonnull final Package aPackage, @Nullable final ClassLoader aClassLoader) { return getFromCache (new JAXBContextCacheKey (aPackage, aClassLoader)); }
java
@Nullable public JAXBContext getFromCache (@Nonnull final Package aPackage, @Nullable final ClassLoader aClassLoader) { return getFromCache (new JAXBContextCacheKey (aPackage, aClassLoader)); }
[ "@", "Nullable", "public", "JAXBContext", "getFromCache", "(", "@", "Nonnull", "final", "Package", "aPackage", ",", "@", "Nullable", "final", "ClassLoader", "aClassLoader", ")", "{", "return", "getFromCache", "(", "new", "JAXBContextCacheKey", "(", "aPackage", ","...
Special overload with package and {@link ClassLoader}. In this case the resulting value is NOT cached! @param aPackage Package to load. May not be <code>null</code>. @param aClassLoader Class loader to use. May be <code>null</code> in which case the default class loader is used. @return <code>null</code> if package is...
[ "Special", "overload", "with", "package", "and", "{", "@link", "ClassLoader", "}", ".", "In", "this", "case", "the", "resulting", "value", "is", "NOT", "cached!" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/JAXBContextCache.java#L132-L136
google/closure-compiler
src/com/google/javascript/jscomp/PeepholeFoldConstants.java
PeepholeFoldConstants.tryFoldGetProp
private Node tryFoldGetProp(Node n, Node left, Node right) { checkArgument(n.isGetProp()); if (left.isObjectLit()) { return tryFoldObjectPropAccess(n, left, right); } if (right.isString() && right.getString().equals("length")) { int knownLength = -1; switch (left.getToken()) ...
java
private Node tryFoldGetProp(Node n, Node left, Node right) { checkArgument(n.isGetProp()); if (left.isObjectLit()) { return tryFoldObjectPropAccess(n, left, right); } if (right.isString() && right.getString().equals("length")) { int knownLength = -1; switch (left.getToken()) ...
[ "private", "Node", "tryFoldGetProp", "(", "Node", "n", ",", "Node", "left", ",", "Node", "right", ")", "{", "checkArgument", "(", "n", ".", "isGetProp", "(", ")", ")", ";", "if", "(", "left", ".", "isObjectLit", "(", ")", ")", "{", "return", "tryFold...
Try to fold array-length. e.g [1, 2, 3].length ==> 3, [x, y].length ==> 2
[ "Try", "to", "fold", "array", "-", "length", ".", "e", ".", "g", "[", "1", "2", "3", "]", ".", "length", "==", ">", "3", "[", "x", "y", "]", ".", "length", "==", ">", "2" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PeepholeFoldConstants.java#L1321-L1356
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java
UCharacter.toUpperCase
public static String toUpperCase(Locale locale, String str) { return toUpperCase(getCaseLocale(locale), str); }
java
public static String toUpperCase(Locale locale, String str) { return toUpperCase(getCaseLocale(locale), str); }
[ "public", "static", "String", "toUpperCase", "(", "Locale", "locale", ",", "String", "str", ")", "{", "return", "toUpperCase", "(", "getCaseLocale", "(", "locale", ")", ",", "str", ")", ";", "}" ]
Returns the uppercase 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 uppercase version of the argument string
[ "Returns", "the", "uppercase", "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#L4409-L4412
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/OrganizationResourceImpl.java
OrganizationResourceImpl.parseDate
private static DateTime parseDate(String dateStr, DateTime defaultDate, boolean floor) { if ("now".equals(dateStr)) { //$NON-NLS-1$ return new DateTime(); } if (dateStr.length() == 10) { DateTime parsed = ISODateTimeFormat.date().withZone(DateTimeZone.UTC).parseDateTime(d...
java
private static DateTime parseDate(String dateStr, DateTime defaultDate, boolean floor) { if ("now".equals(dateStr)) { //$NON-NLS-1$ return new DateTime(); } if (dateStr.length() == 10) { DateTime parsed = ISODateTimeFormat.date().withZone(DateTimeZone.UTC).parseDateTime(d...
[ "private", "static", "DateTime", "parseDate", "(", "String", "dateStr", ",", "DateTime", "defaultDate", ",", "boolean", "floor", ")", "{", "if", "(", "\"now\"", ".", "equals", "(", "dateStr", ")", ")", "{", "//$NON-NLS-1$", "return", "new", "DateTime", "(", ...
Parses a query param representing a date into an actual date object.
[ "Parses", "a", "query", "param", "representing", "a", "date", "into", "an", "actual", "date", "object", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/OrganizationResourceImpl.java#L3669-L3689
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.standardDeviation
public SDVariable standardDeviation(String name, SDVariable x, boolean biasCorrected, int... dimensions) { return standardDeviation(name, x, biasCorrected, false, dimensions); }
java
public SDVariable standardDeviation(String name, SDVariable x, boolean biasCorrected, int... dimensions) { return standardDeviation(name, x, biasCorrected, false, dimensions); }
[ "public", "SDVariable", "standardDeviation", "(", "String", "name", ",", "SDVariable", "x", ",", "boolean", "biasCorrected", ",", "int", "...", "dimensions", ")", "{", "return", "standardDeviation", "(", "name", ",", "x", ",", "biasCorrected", ",", "false", ",...
Stardard deviation array reduction operation, optionally along specified dimensions @param name Output variable name @param x Input variable @param biasCorrected If true: divide by (N-1) (i.e., sample stdev). If false: divide by N (population stdev) @param dimensions Dimensions to reduce over. ...
[ "Stardard", "deviation", "array", "reduction", "operation", "optionally", "along", "specified", "dimensions" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L2581-L2583
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java
MethodFinder.typesEquivalent
private static boolean typesEquivalent(Type typeToMatch, GenericArrayType type, ResolutionContext ctx) { if (typeToMatch instanceof GenericArrayType) { GenericArrayType aGat = (GenericArrayType) typeToMatch; return typesEquivalent(aGat.getGenericComponentType(), ...
java
private static boolean typesEquivalent(Type typeToMatch, GenericArrayType type, ResolutionContext ctx) { if (typeToMatch instanceof GenericArrayType) { GenericArrayType aGat = (GenericArrayType) typeToMatch; return typesEquivalent(aGat.getGenericComponentType(), ...
[ "private", "static", "boolean", "typesEquivalent", "(", "Type", "typeToMatch", ",", "GenericArrayType", "type", ",", "ResolutionContext", "ctx", ")", "{", "if", "(", "typeToMatch", "instanceof", "GenericArrayType", ")", "{", "GenericArrayType", "aGat", "=", "(", "...
Computes whether a type is equivalent to a GenericArrayType. <p> This method will check that {@code typeToMatch} is either a {@link GenericArrayType} or an array and then recursively compare the component types of both arguments using {@link #typesEquivalent(Type, Type, ResolutionContext)}. @param typeToMatch the type...
[ "Computes", "whether", "a", "type", "is", "equivalent", "to", "a", "GenericArrayType", ".", "<p", ">", "This", "method", "will", "check", "that", "{", "@code", "typeToMatch", "}", "is", "either", "a", "{", "@link", "GenericArrayType", "}", "or", "an", "arr...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java#L235-L251
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/spoiler/element/SpoilerElement.java
SpoilerElement.addSpoiler
public static void addSpoiler(Message message, String lang, String hint) { message.addExtension(new SpoilerElement(lang, hint)); }
java
public static void addSpoiler(Message message, String lang, String hint) { message.addExtension(new SpoilerElement(lang, hint)); }
[ "public", "static", "void", "addSpoiler", "(", "Message", "message", ",", "String", "lang", ",", "String", "hint", ")", "{", "message", ".", "addExtension", "(", "new", "SpoilerElement", "(", "lang", ",", "hint", ")", ")", ";", "}" ]
Add a SpoilerElement with a hint in a certain language to a message. @param message Message to add the Spoiler to. @param lang language of the Spoiler hint. @param hint hint.
[ "Add", "a", "SpoilerElement", "with", "a", "hint", "in", "a", "certain", "language", "to", "a", "message", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/spoiler/element/SpoilerElement.java#L90-L92
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/Util.java
Util.checkLatLong
public static void checkLatLong(double lat, double lon) { checkArgument(lon <= 181.0, "longitude out of range " + lon); checkArgument(lon > -180.0, "longitude out of range " + lon); checkArgument(lat <= 91.0, "latitude out of range " + lat); checkArgument(lat > -90.0, "latitude out of range " + lat); }
java
public static void checkLatLong(double lat, double lon) { checkArgument(lon <= 181.0, "longitude out of range " + lon); checkArgument(lon > -180.0, "longitude out of range " + lon); checkArgument(lat <= 91.0, "latitude out of range " + lat); checkArgument(lat > -90.0, "latitude out of range " + lat); }
[ "public", "static", "void", "checkLatLong", "(", "double", "lat", ",", "double", "lon", ")", "{", "checkArgument", "(", "lon", "<=", "181.0", ",", "\"longitude out of range \"", "+", "lon", ")", ";", "checkArgument", "(", "lon", ">", "-", "180.0", ",", "\"...
Check lat lon are withing allowable range as per 1371-4.pdf. Note that values of long=181, lat=91 have special meaning. @param lat @param lon
[ "Check", "lat", "lon", "are", "withing", "allowable", "range", "as", "per", "1371", "-", "4", ".", "pdf", ".", "Note", "that", "values", "of", "long", "=", "181", "lat", "=", "91", "have", "special", "meaning", "." ]
train
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/Util.java#L197-L202
jcuda/jcuda
JCudaJava/src/main/java/jcuda/cuDoubleComplex.java
cuDoubleComplex.cuCmul
public static cuDoubleComplex cuCmul (cuDoubleComplex x, cuDoubleComplex y) { cuDoubleComplex prod; prod = cuCmplx ((cuCreal(x) * cuCreal(y)) - (cuCimag(x) * cuCimag(y)), (cuCreal(x) * cuCimag(y)) + (cuCimag(x) * cuCreal(y))); return prod; }
java
public static cuDoubleComplex cuCmul (cuDoubleComplex x, cuDoubleComplex y) { cuDoubleComplex prod; prod = cuCmplx ((cuCreal(x) * cuCreal(y)) - (cuCimag(x) * cuCimag(y)), (cuCreal(x) * cuCimag(y)) + (cuCimag(x) * cuCreal(y))); return prod; }
[ "public", "static", "cuDoubleComplex", "cuCmul", "(", "cuDoubleComplex", "x", ",", "cuDoubleComplex", "y", ")", "{", "cuDoubleComplex", "prod", ";", "prod", "=", "cuCmplx", "(", "(", "cuCreal", "(", "x", ")", "*", "cuCreal", "(", "y", ")", ")", "-", "(",...
Returns the product of the given complex numbers.<br /> <br /> Original comment:<br /> <br /> This implementation could suffer from intermediate overflow even though the final result would be in range. However, various implementations do not guard against this (presumably to avoid losing performance), so we don't do it...
[ "Returns", "the", "product", "of", "the", "given", "complex", "numbers", ".", "<br", "/", ">", "<br", "/", ">", "Original", "comment", ":", "<br", "/", ">", "<br", "/", ">", "This", "implementation", "could", "suffer", "from", "intermediate", "overflow", ...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/cuDoubleComplex.java#L123-L129
apache/incubator-gobblin
gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/hdfs/SimpleHadoopFilesystemConfigStore.java
SimpleHadoopFilesystemConfigStore.getChildren
@Override public Collection<ConfigKeyPath> getChildren(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException { Preconditions.checkNotNull(configKey, "configKey cannot be null!"); Preconditions.checkArgument(!Strings.isNullOrEmpty(version), "version cannot be null or empty!"); ...
java
@Override public Collection<ConfigKeyPath> getChildren(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException { Preconditions.checkNotNull(configKey, "configKey cannot be null!"); Preconditions.checkArgument(!Strings.isNullOrEmpty(version), "version cannot be null or empty!"); ...
[ "@", "Override", "public", "Collection", "<", "ConfigKeyPath", ">", "getChildren", "(", "ConfigKeyPath", "configKey", ",", "String", "version", ")", "throws", "VersionDoesNotExistException", "{", "Preconditions", ".", "checkNotNull", "(", "configKey", ",", "\"configKe...
Retrieves all the children of the given {@link ConfigKeyPath} by doing a {@code ls} on the {@link Path} specified by the {@link ConfigKeyPath}. If the {@link Path} described by the {@link ConfigKeyPath} does not exist, an empty {@link Collection} is returned. @param configKey the config key path whose children a...
[ "Retrieves", "all", "the", "children", "of", "the", "given", "{", "@link", "ConfigKeyPath", "}", "by", "doing", "a", "{", "@code", "ls", "}", "on", "the", "{", "@link", "Path", "}", "specified", "by", "the", "{", "@link", "ConfigKeyPath", "}", ".", "If...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/hdfs/SimpleHadoopFilesystemConfigStore.java#L207-L230
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/mr/security/TokenUtil.java
TokenUtil.getEsAuthToken
private static EsToken getEsAuthToken(ClusterName clusterName, User user) { return user.getEsToken(clusterName.getName()); }
java
private static EsToken getEsAuthToken(ClusterName clusterName, User user) { return user.getEsToken(clusterName.getName()); }
[ "private", "static", "EsToken", "getEsAuthToken", "(", "ClusterName", "clusterName", ",", "User", "user", ")", "{", "return", "user", ".", "getEsToken", "(", "clusterName", ".", "getName", "(", ")", ")", ";", "}" ]
Get the authentication token of the user for the provided cluster name in its ES-Hadoop specific form. @return null if the user does not have the token, otherwise the auth token for the cluster.
[ "Get", "the", "authentication", "token", "of", "the", "user", "for", "the", "provided", "cluster", "name", "in", "its", "ES", "-", "Hadoop", "specific", "form", "." ]
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/mr/security/TokenUtil.java#L213-L215
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload/FineUploaderBasic.java
FineUploaderBasic.addParam
@Nonnull public FineUploaderBasic addParam (@Nonnull @Nonempty final String sKey, @Nonnull final String sValue) { ValueEnforcer.notEmpty (sKey, "Key"); ValueEnforcer.notNull (sValue, "Value"); m_aRequestParams.put (sKey, sValue); return this; }
java
@Nonnull public FineUploaderBasic addParam (@Nonnull @Nonempty final String sKey, @Nonnull final String sValue) { ValueEnforcer.notEmpty (sKey, "Key"); ValueEnforcer.notNull (sValue, "Value"); m_aRequestParams.put (sKey, sValue); return this; }
[ "@", "Nonnull", "public", "FineUploaderBasic", "addParam", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sKey", ",", "@", "Nonnull", "final", "String", "sValue", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sKey", ",", "\"Key\"", ")", ";", ...
These parameters are sent with the request to the endpoint specified in the action option. @param sKey Parameter name @param sValue Parameter value @return this
[ "These", "parameters", "are", "sent", "with", "the", "request", "to", "the", "endpoint", "specified", "in", "the", "action", "option", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload/FineUploaderBasic.java#L199-L207
alibaba/transmittable-thread-local
src/main/java/com/alibaba/ttl/TtlCallable.java
TtlCallable.get
@Nullable public static <T> TtlCallable<T> get(@Nullable Callable<T> callable, boolean releaseTtlValueReferenceAfterCall) { return get(callable, releaseTtlValueReferenceAfterCall, false); }
java
@Nullable public static <T> TtlCallable<T> get(@Nullable Callable<T> callable, boolean releaseTtlValueReferenceAfterCall) { return get(callable, releaseTtlValueReferenceAfterCall, false); }
[ "@", "Nullable", "public", "static", "<", "T", ">", "TtlCallable", "<", "T", ">", "get", "(", "@", "Nullable", "Callable", "<", "T", ">", "callable", ",", "boolean", "releaseTtlValueReferenceAfterCall", ")", "{", "return", "get", "(", "callable", ",", "rel...
Factory method, wrap input {@link Callable} to {@link TtlCallable}. <p> This method is idempotent. @param callable input {@link Callable} @param releaseTtlValueReferenceAfterCall release TTL value reference after run, avoid memory leak even if {@link TtlRunnable} is referred. @return Wrapped {...
[ "Factory", "method", "wrap", "input", "{", "@link", "Callable", "}", "to", "{", "@link", "TtlCallable", "}", ".", "<p", ">", "This", "method", "is", "idempotent", "." ]
train
https://github.com/alibaba/transmittable-thread-local/blob/30b4d99cdb7064b4c1797d2e40bfa07adce8e7f9/src/main/java/com/alibaba/ttl/TtlCallable.java#L107-L110