repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
j256/simplejmx
src/main/java/com/j256/simplejmx/client/JmxClient.java
JmxClient.invokeOperation
public Object invokeOperation(ObjectName objectName, String operName, Object... params) throws Exception { """ Invoke a JMX method as an array of objects. @return The value returned by the method or null if none. """ String[] paramTypes = lookupParamTypes(objectName, operName, params); return invokeOper...
java
public Object invokeOperation(ObjectName objectName, String operName, Object... params) throws Exception { String[] paramTypes = lookupParamTypes(objectName, operName, params); return invokeOperation(objectName, operName, paramTypes, params); }
[ "public", "Object", "invokeOperation", "(", "ObjectName", "objectName", ",", "String", "operName", ",", "Object", "...", "params", ")", "throws", "Exception", "{", "String", "[", "]", "paramTypes", "=", "lookupParamTypes", "(", "objectName", ",", "operName", ","...
Invoke a JMX method as an array of objects. @return The value returned by the method or null if none.
[ "Invoke", "a", "JMX", "method", "as", "an", "array", "of", "objects", "." ]
train
https://github.com/j256/simplejmx/blob/1a04f52512dfa0a711ba0cc7023c604dbc82a352/src/main/java/com/j256/simplejmx/client/JmxClient.java#L458-L461
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java
Serializer.writeObject
public <T> BufferOutput<?> writeObject(T object, BufferOutput<?> buffer) { """ Writes an object to the given buffer. <p> Serialized bytes will be written to the given {@link Buffer} starting at its current {@link Buffer#position()}. If the bytes {@link Buffer#remaining()} in the buffer are not great enough to ...
java
public <T> BufferOutput<?> writeObject(T object, BufferOutput<?> buffer) { if (object == null) { return buffer.writeByte(Identifier.NULL.code()); } Class<?> type = object.getClass(); // get the enclosing class from a cache. Class<?> enclosingClass = enclosingClasses.computeIfAbsent(type, claz...
[ "public", "<", "T", ">", "BufferOutput", "<", "?", ">", "writeObject", "(", "T", "object", ",", "BufferOutput", "<", "?", ">", "buffer", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "buffer", ".", "writeByte", "(", "Identifier", "...
Writes an object to the given buffer. <p> Serialized bytes will be written to the given {@link Buffer} starting at its current {@link Buffer#position()}. If the bytes {@link Buffer#remaining()} in the buffer are not great enough to hold the serialized bytes, the buffer will be automatically expanded up to the buffer's ...
[ "Writes", "an", "object", "to", "the", "given", "buffer", ".", "<p", ">", "Serialized", "bytes", "will", "be", "written", "to", "the", "given", "{", "@link", "Buffer", "}", "starting", "at", "its", "current", "{", "@link", "Buffer#position", "()", "}", "...
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java#L845-L878
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { """ Returns the value associated with the given key as a boolean. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (def...
java
public boolean getBoolean(String key, boolean defaultValue) { Object o = getRawValue(key); if (o == null) { return defaultValue; } return convertToBoolean(o); }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "Object", "o", "=", "getRawValue", "(", "key", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "return", "convertToBo...
Returns the value associated with the given key as a boolean. @param key the key pointing to the associated value @param defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "a", "boolean", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L352-L359
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/Environment.java
Environment.doHttpGet
public HttpResponse doHttpGet(String url, Map<String, Object> headers, boolean followRedirect) { """ GETs content from URL. @param url url to get from. @param headers headers to add @return response. """ HttpResponse response = new HttpResponse(); doGet(url, response, headers, followRedirect...
java
public HttpResponse doHttpGet(String url, Map<String, Object> headers, boolean followRedirect) { HttpResponse response = new HttpResponse(); doGet(url, response, headers, followRedirect); return response; }
[ "public", "HttpResponse", "doHttpGet", "(", "String", "url", ",", "Map", "<", "String", ",", "Object", ">", "headers", ",", "boolean", "followRedirect", ")", "{", "HttpResponse", "response", "=", "new", "HttpResponse", "(", ")", ";", "doGet", "(", "url", "...
GETs content from URL. @param url url to get from. @param headers headers to add @return response.
[ "GETs", "content", "from", "URL", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/Environment.java#L354-L358
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapCircle.java
MapCircle.getDistance
@Override @Pure public double getDistance(Point2D<?, ?> point) { """ Replies the distance between this MapCircle and point. @param point the point to compute the distance to. @return the distance. Should be negative if the point is inside the circle. """ double dist = super.getDistance(point); dist ...
java
@Override @Pure public double getDistance(Point2D<?, ?> point) { double dist = super.getDistance(point); dist -= this.radius; return dist; }
[ "@", "Override", "@", "Pure", "public", "double", "getDistance", "(", "Point2D", "<", "?", ",", "?", ">", "point", ")", "{", "double", "dist", "=", "super", ".", "getDistance", "(", "point", ")", ";", "dist", "-=", "this", ".", "radius", ";", "return...
Replies the distance between this MapCircle and point. @param point the point to compute the distance to. @return the distance. Should be negative if the point is inside the circle.
[ "Replies", "the", "distance", "between", "this", "MapCircle", "and", "point", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapCircle.java#L309-L315
mozilla/rhino
src/org/mozilla/javascript/optimizer/Block.java
Block.initLiveOnEntrySets
private void initLiveOnEntrySets(OptFunctionNode fn, Node[] statementNodes) { """ /* build the live on entry/exit sets. Then walk the trees looking for defs/uses of variables and build the def and useBeforeDef sets. """ int listLength = fn.getVarCount(); itsUseBeforeDefSet = new BitSet(listL...
java
private void initLiveOnEntrySets(OptFunctionNode fn, Node[] statementNodes) { int listLength = fn.getVarCount(); itsUseBeforeDefSet = new BitSet(listLength); itsNotDefSet = new BitSet(listLength); itsLiveOnEntrySet = new BitSet(listLength); itsLiveOnExitSet = new BitSet(listL...
[ "private", "void", "initLiveOnEntrySets", "(", "OptFunctionNode", "fn", ",", "Node", "[", "]", "statementNodes", ")", "{", "int", "listLength", "=", "fn", ".", "getVarCount", "(", ")", ";", "itsUseBeforeDefSet", "=", "new", "BitSet", "(", "listLength", ")", ...
/* build the live on entry/exit sets. Then walk the trees looking for defs/uses of variables and build the def and useBeforeDef sets.
[ "/", "*", "build", "the", "live", "on", "entry", "/", "exit", "sets", ".", "Then", "walk", "the", "trees", "looking", "for", "defs", "/", "uses", "of", "variables", "and", "build", "the", "def", "and", "useBeforeDef", "sets", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/optimizer/Block.java#L414-L426
tvesalainen/util
util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java
LevenbergMarquardt.computeNumericalJacobian
protected void computeNumericalJacobian( DenseMatrix64F param , DenseMatrix64F pt , DenseMatrix64F deriv ) { """ Computes a simple numerical Jacobian. @param param The set of parameters that the Jacobian is to be compute...
java
protected void computeNumericalJacobian( DenseMatrix64F param , DenseMatrix64F pt , DenseMatrix64F deriv ) { double invDelta = 1.0/DELTA; func.compute(param,pt, temp0); // compute the jacobian...
[ "protected", "void", "computeNumericalJacobian", "(", "DenseMatrix64F", "param", ",", "DenseMatrix64F", "pt", ",", "DenseMatrix64F", "deriv", ")", "{", "double", "invDelta", "=", "1.0", "/", "DELTA", ";", "func", ".", "compute", "(", "param", ",", "pt", ",", ...
Computes a simple numerical Jacobian. @param param The set of parameters that the Jacobian is to be computed at. @param pt The point around which the Jacobian is to be computed. @param deriv Where the jacobian will be stored
[ "Computes", "a", "simple", "numerical", "Jacobian", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/LevenbergMarquardt.java#L309-L329
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.lookAlong
public Matrix4x3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) { """ Apply a rotation transformation to this matrix to make <code>-z</code> point along <code>dir</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> th...
java
public Matrix4x3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) { return lookAlong(dirX, dirY, dirZ, upX, upY, upZ, this); }
[ "public", "Matrix4x3d", "lookAlong", "(", "double", "dirX", ",", "double", "dirY", ",", "double", "dirZ", ",", "double", "upX", ",", "double", "upY", ",", "double", "upZ", ")", "{", "return", "lookAlong", "(", "dirX", ",", "dirY", ",", "dirZ", ",", "up...
Apply a rotation transformation to this matrix to make <code>-z</code> point along <code>dir</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>L</code> the lookalong rotation matrix, then the new matrix will be <code>M * L</code>. So when transforming a vector <code>v</code> with the new matrix by usi...
[ "Apply", "a", "rotation", "transformation", "to", "this", "matrix", "to", "make", "<code", ">", "-", "z<", "/", "code", ">", "point", "along", "<code", ">", "dir<", "/", "code", ">", ".", "<p", ">", "If", "<code", ">", "M<", "/", "code", ">", "is",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L7960-L7963
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.createProject
public GitlabProject createProject(String name) throws IOException { """ Creates a private Project @param name The name of the project @return The GitLab Project @throws IOException on gitlab api call error """ return createProject(name, null, null, null, null, null, null, null, null, null, null);...
java
public GitlabProject createProject(String name) throws IOException { return createProject(name, null, null, null, null, null, null, null, null, null, null); }
[ "public", "GitlabProject", "createProject", "(", "String", "name", ")", "throws", "IOException", "{", "return", "createProject", "(", "name", ",", "null", ",", "null", ",", "null", ",", "null", ",", "null", ",", "null", ",", "null", ",", "null", ",", "nu...
Creates a private Project @param name The name of the project @return The GitLab Project @throws IOException on gitlab api call error
[ "Creates", "a", "private", "Project" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L1190-L1192
jenkinsci/jenkins
core/src/main/java/hudson/model/Descriptor.java
Descriptor.getPropertyTypeOrDie
public @Nonnull PropertyType getPropertyTypeOrDie(@Nonnull Object instance, @Nonnull String field) { """ Akin to {@link #getPropertyType(Object,String)} but never returns null. @throws AssertionError in case the field cannot be found @since 1.492 """ PropertyType propertyType = getPropertyType(instan...
java
public @Nonnull PropertyType getPropertyTypeOrDie(@Nonnull Object instance, @Nonnull String field) { PropertyType propertyType = getPropertyType(instance, field); if (propertyType != null) { return propertyType; } else if (instance == this) { throw new AssertionError(getC...
[ "public", "@", "Nonnull", "PropertyType", "getPropertyTypeOrDie", "(", "@", "Nonnull", "Object", "instance", ",", "@", "Nonnull", "String", "field", ")", "{", "PropertyType", "propertyType", "=", "getPropertyType", "(", "instance", ",", "field", ")", ";", "if", ...
Akin to {@link #getPropertyType(Object,String)} but never returns null. @throws AssertionError in case the field cannot be found @since 1.492
[ "Akin", "to", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Descriptor.java#L476-L485
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.beginUpdateTagsAsync
public Observable<VirtualNetworkInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { """ Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param tags Resou...
java
public Observable<VirtualNetworkInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1<ServiceResponse<VirtualNetworkInner>, VirtualNetworkInner>() { ...
[ "public", "Observable", "<", "VirtualNetworkInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync"...
Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualNetworkInner object
[ "Updates", "a", "virtual", "network", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L874-L881
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/TopicsMessagesBroadcaster.java
TopicsMessagesBroadcaster.sendMessageToTopicForSessions
int sendMessageToTopicForSessions(Collection<Session> sessions, MessageToClient mtc, Object payload) { """ send message to sessions apply msgControl to topic @param sessions @param mtc @param payload @return """ int sended = 0; JsTopicMessageController msgControl = messageControllerManager.getJsTopi...
java
int sendMessageToTopicForSessions(Collection<Session> sessions, MessageToClient mtc, Object payload) { int sended = 0; JsTopicMessageController msgControl = messageControllerManager.getJsTopicMessageController(mtc.getId()); Collection<Session> sessionsClosed = new ArrayList<>(); for (Session session : sessi...
[ "int", "sendMessageToTopicForSessions", "(", "Collection", "<", "Session", ">", "sessions", ",", "MessageToClient", "mtc", ",", "Object", "payload", ")", "{", "int", "sended", "=", "0", ";", "JsTopicMessageController", "msgControl", "=", "messageControllerManager", ...
send message to sessions apply msgControl to topic @param sessions @param mtc @param payload @return
[ "send", "message", "to", "sessions", "apply", "msgControl", "to", "topic" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/TopicsMessagesBroadcaster.java#L86-L102
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
@SuppressWarnings("static-method") protected XExpression _generate(SarlBreakExpression breakStatement, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param breakStatement the break statement. @param it the target for the generated content. @param context the context...
java
@SuppressWarnings("static-method") protected XExpression _generate(SarlBreakExpression breakStatement, IAppendable it, IExtraLanguageGeneratorContext context) { if (context.getExpectedExpressionType() == null) { it.append("break"); //$NON-NLS-1$ } else { it.append("return ").append(toDefaultValue(context.get...
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "protected", "XExpression", "_generate", "(", "SarlBreakExpression", "breakStatement", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "if", "(", "context", ".", "getExpectedEx...
Generate the given object. @param breakStatement the break statement. @param it the target for the generated content. @param context the context. @return the statement.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L365-L373
Waikato/moa
moa/src/main/java/moa/clusterers/clustree/ClusKernel.java
ClusKernel.makeOlder
protected void makeOlder(long timeDifference, double negLambda) { """ Make this cluster older. This means multiplying weighted N, LS and SS with a weight factor given by the time difference and the parameter negLambda. @param timeDifference The time elapsed between this current update and the last one. @param...
java
protected void makeOlder(long timeDifference, double negLambda) { if (timeDifference == 0) { return; } //double weightFactor = AuxiliaryFunctions.weight(negLambda, timeDifference); assert (negLambda < 0); assert (timeDifference > 0); double weightFactor = Mat...
[ "protected", "void", "makeOlder", "(", "long", "timeDifference", ",", "double", "negLambda", ")", "{", "if", "(", "timeDifference", "==", "0", ")", "{", "return", ";", "}", "//double weightFactor = AuxiliaryFunctions.weight(negLambda, timeDifference);", "assert", "(", ...
Make this cluster older. This means multiplying weighted N, LS and SS with a weight factor given by the time difference and the parameter negLambda. @param timeDifference The time elapsed between this current update and the last one. @param negLambda
[ "Make", "this", "cluster", "older", ".", "This", "means", "multiplying", "weighted", "N", "LS", "and", "SS", "with", "a", "weight", "factor", "given", "by", "the", "time", "difference", "and", "the", "parameter", "negLambda", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/clustree/ClusKernel.java#L114-L129
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/FoldersApi.java
FoldersApi.listItems
public FolderItemsResponse listItems(String accountId, String folderId) throws ApiException { """ Gets a list of the envelopes in the specified folder. Retrieves a list of the envelopes in the specified folder. You can narrow the query by specifying search criteria in the query string parameters. @param accountI...
java
public FolderItemsResponse listItems(String accountId, String folderId) throws ApiException { return listItems(accountId, folderId, null); }
[ "public", "FolderItemsResponse", "listItems", "(", "String", "accountId", ",", "String", "folderId", ")", "throws", "ApiException", "{", "return", "listItems", "(", "accountId", ",", "folderId", ",", "null", ")", ";", "}" ]
Gets a list of the envelopes in the specified folder. Retrieves a list of the envelopes in the specified folder. You can narrow the query by specifying search criteria in the query string parameters. @param accountId The external account number (int) or account ID Guid. (required) @param folderId The ID of the folder b...
[ "Gets", "a", "list", "of", "the", "envelopes", "in", "the", "specified", "folder", ".", "Retrieves", "a", "list", "of", "the", "envelopes", "in", "the", "specified", "folder", ".", "You", "can", "narrow", "the", "query", "by", "specifying", "search", "crit...
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/FoldersApi.java#L238-L240
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java
QueryAtomContainer.addBond
@Override public void addBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo) { """ Adds a bond to this container. @param atom1 Id of the first atom of the Bond in [0,..] @param atom2 Id of the second atom of the Bond in [0,..] @param order Bondorder @param stereo Stereochemical ...
java
@Override public void addBond(int atom1, int atom2, IBond.Order order, IBond.Stereo stereo) { IBond bond = getBuilder().newInstance(IBond.class, getAtom(atom1), getAtom(atom2), order, stereo); if (contains(bond)) { return; } if (bondCount >= bonds.length) { ...
[ "@", "Override", "public", "void", "addBond", "(", "int", "atom1", ",", "int", "atom2", ",", "IBond", ".", "Order", "order", ",", "IBond", ".", "Stereo", "stereo", ")", "{", "IBond", "bond", "=", "getBuilder", "(", ")", ".", "newInstance", "(", "IBond"...
Adds a bond to this container. @param atom1 Id of the first atom of the Bond in [0,..] @param atom2 Id of the second atom of the Bond in [0,..] @param order Bondorder @param stereo Stereochemical orientation
[ "Adds", "a", "bond", "to", "this", "container", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/QueryAtomContainer.java#L1371-L1386
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/LocalFileSystem.java
LocalFileSystem.reportChecksumFailure
public boolean reportChecksumFailure(Path p, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos) { """ Moves files to a bad file directory on the same device, so that their storage will not be reused. """ try...
java
public boolean reportChecksumFailure(Path p, FSDataInputStream in, long inPos, FSDataInputStream sums, long sumsPos) { try { // canonicalize f File f = ((RawLocalFileSystem)fs).pathToFile(p).getCanonicalFile(); //...
[ "public", "boolean", "reportChecksumFailure", "(", "Path", "p", ",", "FSDataInputStream", "in", ",", "long", "inPos", ",", "FSDataInputStream", "sums", ",", "long", "sumsPos", ")", "{", "try", "{", "// canonicalize f", "File", "f", "=", "(", "(", "RawLocalFile...
Moves files to a bad file directory on the same device, so that their storage will not be reused.
[ "Moves", "files", "to", "a", "bad", "file", "directory", "on", "the", "same", "device", "so", "that", "their", "storage", "will", "not", "be", "reused", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/LocalFileSystem.java#L68-L110
protegeproject/jpaul
src/main/java/jpaul/Constraints/SetConstraints/SetConstraints.java
SetConstraints.addEquality
public void addEquality(SVar<T> s1, SVar<T> s2) { """ Adds two mutual inclusion constraints to reflect the fact that the sets <code>s1</code> and <code>s2</code> should be equal. """ this.addInclusion(s1, s2); this.addInclusion(s2, s1); }
java
public void addEquality(SVar<T> s1, SVar<T> s2) { this.addInclusion(s1, s2); this.addInclusion(s2, s1); }
[ "public", "void", "addEquality", "(", "SVar", "<", "T", ">", "s1", ",", "SVar", "<", "T", ">", "s2", ")", "{", "this", ".", "addInclusion", "(", "s1", ",", "s2", ")", ";", "this", ".", "addInclusion", "(", "s2", ",", "s1", ")", ";", "}" ]
Adds two mutual inclusion constraints to reflect the fact that the sets <code>s1</code> and <code>s2</code> should be equal.
[ "Adds", "two", "mutual", "inclusion", "constraints", "to", "reflect", "the", "fact", "that", "the", "sets", "<code", ">", "s1<", "/", "code", ">", "and", "<code", ">", "s2<", "/", "code", ">", "should", "be", "equal", "." ]
train
https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/Constraints/SetConstraints/SetConstraints.java#L39-L42
orhanobut/logger
logger/src/main/java/com/orhanobut/logger/Logger.java
Logger.wtf
public static void wtf(@NonNull String message, @Nullable Object... args) { """ Tip: Use this for exceptional situations to log ie: Unexpected errors etc """ printer.wtf(message, args); }
java
public static void wtf(@NonNull String message, @Nullable Object... args) { printer.wtf(message, args); }
[ "public", "static", "void", "wtf", "(", "@", "NonNull", "String", "message", ",", "@", "Nullable", "Object", "...", "args", ")", "{", "printer", ".", "wtf", "(", "message", ",", "args", ")", ";", "}" ]
Tip: Use this for exceptional situations to log ie: Unexpected errors etc
[ "Tip", ":", "Use", "this", "for", "exceptional", "situations", "to", "log", "ie", ":", "Unexpected", "errors", "etc" ]
train
https://github.com/orhanobut/logger/blob/4a85b788a09b166e0953db09d582e9cc51b396e9/logger/src/main/java/com/orhanobut/logger/Logger.java#L142-L144
sagiegurari/fax4j
src/main/java/org/fax4j/util/ProcessExecutorHelper.java
ProcessExecutorHelper.executeProcess
public static ProcessOutput executeProcess(ConfigurationHolder configurationHolder,String command) { """ This function executes the given command and returns the process output. @param configurationHolder The configuration holder used when invoking the process @param command The command to execute @retu...
java
public static ProcessOutput executeProcess(ConfigurationHolder configurationHolder,String command) { //get process executer class name String className=configurationHolder.getConfigurationValue(ProcessExecutor.PROCESS_EXECUTER_CLASS_NAME_PROPERTY_KEY); if(className==null) { ...
[ "public", "static", "ProcessOutput", "executeProcess", "(", "ConfigurationHolder", "configurationHolder", ",", "String", "command", ")", "{", "//get process executer class name", "String", "className", "=", "configurationHolder", ".", "getConfigurationValue", "(", "ProcessExe...
This function executes the given command and returns the process output. @param configurationHolder The configuration holder used when invoking the process @param command The command to execute @return The process output
[ "This", "function", "executes", "the", "given", "command", "and", "returns", "the", "process", "output", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ProcessExecutorHelper.java#L37-L74
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.forwardContent
@ObjectiveCName("forwardContentContentWithPeer:withContent:") public void forwardContent(Peer peer, AbsContent content) { """ Send DocumentContent - used for forwarding @param peer destination peer @param content content to forward """ modules.getMessagesModule().forwardContent(peer, content...
java
@ObjectiveCName("forwardContentContentWithPeer:withContent:") public void forwardContent(Peer peer, AbsContent content) { modules.getMessagesModule().forwardContent(peer, content); }
[ "@", "ObjectiveCName", "(", "\"forwardContentContentWithPeer:withContent:\"", ")", "public", "void", "forwardContent", "(", "Peer", "peer", ",", "AbsContent", "content", ")", "{", "modules", ".", "getMessagesModule", "(", ")", ".", "forwardContent", "(", "peer", ","...
Send DocumentContent - used for forwarding @param peer destination peer @param content content to forward
[ "Send", "DocumentContent", "-", "used", "for", "forwarding" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L969-L972
arquillian/arquillian-algeron
common/configuration/src/main/java/org/arquillian/algeron/configuration/Reflection.java
Reflection.newInstance
public static <T> T newInstance(final Class<T> implClass, final Class<?>[] argumentTypes, final Object[] arguments) { """ Create a new instance by finding a constructor that matches the argumentTypes signature using the arguments for instantiation. @param implClass Full classname of class to create @param ar...
java
public static <T> T newInstance(final Class<T> implClass, final Class<?>[] argumentTypes, final Object[] arguments) { if (implClass == null) { throw new IllegalArgumentException("ImplClass must be specified"); } if (argumentTypes == null) { throw new IllegalArgumentExcept...
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "final", "Class", "<", "T", ">", "implClass", ",", "final", "Class", "<", "?", ">", "[", "]", "argumentTypes", ",", "final", "Object", "[", "]", "arguments", ")", "{", "if", "(", "implClass"...
Create a new instance by finding a constructor that matches the argumentTypes signature using the arguments for instantiation. @param implClass Full classname of class to create @param argumentTypes The constructor argument types @param arguments The constructor arguments @return a new instance @throws IllegalArgume...
[ "Create", "a", "new", "instance", "by", "finding", "a", "constructor", "that", "matches", "the", "argumentTypes", "signature", "using", "the", "arguments", "for", "instantiation", "." ]
train
https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/configuration/src/main/java/org/arquillian/algeron/configuration/Reflection.java#L47-L74
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/FunctionPattern.java
FunctionPattern.execute
public XObject execute(XPathContext xctxt, int context) throws javax.xml.transform.TransformerException { """ Test a node to see if it matches the given node test. @param xctxt XPath runtime context. @return {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, {@link org.apache.xpath.pattern...
java
public XObject execute(XPathContext xctxt, int context) throws javax.xml.transform.TransformerException { DTMIterator nl = m_functionExpr.asIterator(xctxt, context); XNumber score = SCORE_NONE; if (null != nl) { int n; while (DTM.NULL != (n = nl.nextNode())) { sc...
[ "public", "XObject", "execute", "(", "XPathContext", "xctxt", ",", "int", "context", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "DTMIterator", "nl", "=", "m_functionExpr", ".", "asIterator", "(", "xctxt", ",", "cont...
Test a node to see if it matches the given node test. @param xctxt XPath runtime context. @return {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NONE}, {@link org.apache.xpath.patterns.NodeTest#SCORE_NSWILD}, {@link org.apache.xpath.patterns.NodeTest#SCORE_Q...
[ "Test", "a", "node", "to", "see", "if", "it", "matches", "the", "given", "node", "test", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/FunctionPattern.java#L102-L130
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.getOffset
public static long getOffset(IntBuffer shapeInformation, int dim0, int dim1, int dim2) { """ Get the offset of the specified [dim0,dim1,dim2] for the 3d array @param shapeInformation Shape information @param dim0 Row index to get the offset for @param dim1 Column index to get ...
java
public static long getOffset(IntBuffer shapeInformation, int dim0, int dim1, int dim2) { int rank = rank(shapeInformation); if (rank != 3) throw new IllegalArgumentException( "Cannot use this getOffset method on arrays of rank != 3 (rank is: " + rank + ")"); long ...
[ "public", "static", "long", "getOffset", "(", "IntBuffer", "shapeInformation", ",", "int", "dim0", ",", "int", "dim1", ",", "int", "dim2", ")", "{", "int", "rank", "=", "rank", "(", "shapeInformation", ")", ";", "if", "(", "rank", "!=", "3", ")", "thro...
Get the offset of the specified [dim0,dim1,dim2] for the 3d array @param shapeInformation Shape information @param dim0 Row index to get the offset for @param dim1 Column index to get the offset for @param dim2 dimension 2 index to get the offset for @return ...
[ "Get", "the", "offset", "of", "the", "specified", "[", "dim0", "dim1", "dim2", "]", "for", "the", "3d", "array" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L1086-L1107
GoogleCloudPlatform/app-maven-plugin
src/main/java/com/google/cloud/tools/maven/cloudsdk/ConfigReader.java
ConfigReader.getProjectId
public String getProjectId() { """ Return gcloud config property for project, or error out if not found. """ try { String gcloudProject = gcloud.getConfig().getProject(); if (gcloudProject == null || gcloudProject.trim().isEmpty()) { throw new RuntimeException("Project was not found in ...
java
public String getProjectId() { try { String gcloudProject = gcloud.getConfig().getProject(); if (gcloudProject == null || gcloudProject.trim().isEmpty()) { throw new RuntimeException("Project was not found in gcloud config"); } return gcloudProject; } catch (CloudSdkNotFoundExcep...
[ "public", "String", "getProjectId", "(", ")", "{", "try", "{", "String", "gcloudProject", "=", "gcloud", ".", "getConfig", "(", ")", ".", "getProject", "(", ")", ";", "if", "(", "gcloudProject", "==", "null", "||", "gcloudProject", ".", "trim", "(", ")",...
Return gcloud config property for project, or error out if not found.
[ "Return", "gcloud", "config", "property", "for", "project", "or", "error", "out", "if", "not", "found", "." ]
train
https://github.com/GoogleCloudPlatform/app-maven-plugin/blob/1f31bb8e963ce189e9ed6b88923a1853533485ff/src/main/java/com/google/cloud/tools/maven/cloudsdk/ConfigReader.java#L38-L52
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/ConstraintTypeUtility.java
ConstraintTypeUtility.getInstance
public static ConstraintType getInstance(Locale locale, String type) { """ This method takes the textual version of a constraint name and returns an appropriate class instance. Note that unrecognised values are treated as "As Soon As Possible" constraints. @param locale target locale @param type text version...
java
public static ConstraintType getInstance(Locale locale, String type) { int index = 0; String[] constraintTypes = LocaleData.getStringArray(locale, LocaleData.CONSTRAINT_TYPES); for (int loop = 0; loop < constraintTypes.length; loop++) { if (constraintTypes[loop].equalsIgnoreCase(typ...
[ "public", "static", "ConstraintType", "getInstance", "(", "Locale", "locale", ",", "String", "type", ")", "{", "int", "index", "=", "0", ";", "String", "[", "]", "constraintTypes", "=", "LocaleData", ".", "getStringArray", "(", "locale", ",", "LocaleData", "...
This method takes the textual version of a constraint name and returns an appropriate class instance. Note that unrecognised values are treated as "As Soon As Possible" constraints. @param locale target locale @param type text version of the constraint type @return ConstraintType instance
[ "This", "method", "takes", "the", "textual", "version", "of", "a", "constraint", "name", "and", "returns", "an", "appropriate", "class", "instance", ".", "Note", "that", "unrecognised", "values", "are", "treated", "as", "As", "Soon", "As", "Possible", "constra...
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/ConstraintTypeUtility.java#L53-L68
Azure/azure-sdk-for-java
postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/ServerSecurityAlertPoliciesInner.java
ServerSecurityAlertPoliciesInner.createOrUpdate
public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, ServerSecurityAlertPolicyInner parameters) { """ Creates or updates a threat detection policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the ...
java
public ServerSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, ServerSecurityAlertPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().last().body(); }
[ "public", "ServerSecurityAlertPolicyInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "ServerSecurityAlertPolicyInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "serv...
Creates or updates a threat detection policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param parameters The server security alert policy. @throws IllegalArg...
[ "Creates", "or", "updates", "a", "threat", "detection", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/ServerSecurityAlertPoliciesInner.java#L169-L171
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java
AlternativeAlignment.calcScores
public void calcScores(Atom[] ca1, Atom[] ca2) { """ calculates scores for this alignment ( %id ) @param ca1 set of Atoms for molecule 1 @param ca2 set of Atoms for molecule 2 """ eqr0 = idx1.length; gaps0 = count_gaps(idx1,idx2); percId = 0; // calc the % id for (int i=0 ; i< idx1.length; i++){ ...
java
public void calcScores(Atom[] ca1, Atom[] ca2){ eqr0 = idx1.length; gaps0 = count_gaps(idx1,idx2); percId = 0; // calc the % id for (int i=0 ; i< idx1.length; i++){ Atom a1 = ca1[idx1[i]]; Atom a2 = ca2[idx2[i]]; Group g1 = a1.getGroup(); Group g2 = a2.getGroup(); if ( g1.getPDBName().equals(...
[ "public", "void", "calcScores", "(", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ")", "{", "eqr0", "=", "idx1", ".", "length", ";", "gaps0", "=", "count_gaps", "(", "idx1", ",", "idx2", ")", ";", "percId", "=", "0", ";", "// calc the % i...
calculates scores for this alignment ( %id ) @param ca1 set of Atoms for molecule 1 @param ca2 set of Atoms for molecule 2
[ "calculates", "scores", "for", "this", "alignment", "(", "%id", ")", "@param", "ca1", "set", "of", "Atoms", "for", "molecule", "1", "@param", "ca2", "set", "of", "Atoms", "for", "molecule", "2" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/pairwise/AlternativeAlignment.java#L820-L837
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/ReflectionUtils.java
ReflectionUtils.newInstance
@SuppressWarnings("unchecked") public static <T> T newInstance(Class<T> theClass, Configuration conf) { """ Create an object for the given class and initialize it from conf @param theClass class of which an object is created @param conf Configuration @return a new object """ return newInstance(theCl...
java
@SuppressWarnings("unchecked") public static <T> T newInstance(Class<T> theClass, Configuration conf) { return newInstance(theClass, conf, true); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "newInstance", "(", "Class", "<", "T", ">", "theClass", ",", "Configuration", "conf", ")", "{", "return", "newInstance", "(", "theClass", ",", "conf", ",", "true", ...
Create an object for the given class and initialize it from conf @param theClass class of which an object is created @param conf Configuration @return a new object
[ "Create", "an", "object", "for", "the", "given", "class", "and", "initialize", "it", "from", "conf" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/ReflectionUtils.java#L117-L120
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java
MutateRowsAttemptCallable.handleAttemptSuccess
private void handleAttemptSuccess(List<MutateRowsResponse> responses) { """ Handle entry level failures. All new response entries are inspected for failure. If any transient failures are found, their corresponding mutations are scheduled for the next RPC. The caller is notified of both new found errors and pre-e...
java
private void handleAttemptSuccess(List<MutateRowsResponse> responses) { List<FailedMutation> allFailures = Lists.newArrayList(permanentFailures); MutateRowsRequest lastRequest = currentRequest; Builder builder = lastRequest.toBuilder().clearEntries(); List<Integer> newOriginalIndexes = Lists.newArrayLi...
[ "private", "void", "handleAttemptSuccess", "(", "List", "<", "MutateRowsResponse", ">", "responses", ")", "{", "List", "<", "FailedMutation", ">", "allFailures", "=", "Lists", ".", "newArrayList", "(", "permanentFailures", ")", ";", "MutateRowsRequest", "lastRequest...
Handle entry level failures. All new response entries are inspected for failure. If any transient failures are found, their corresponding mutations are scheduled for the next RPC. The caller is notified of both new found errors and pre-existing permanent errors in the thrown {@link MutateRowsException}. If no errors ex...
[ "Handle", "entry", "level", "failures", ".", "All", "new", "response", "entries", "are", "inspected", "for", "failure", ".", "If", "any", "transient", "failures", "are", "found", "their", "corresponding", "mutations", "are", "scheduled", "for", "the", "next", ...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java#L254-L292
uber/rides-java-sdk
uber-rides/src/main/java/com/uber/sdk/rides/client/error/ErrorParser.java
ErrorParser.parseError
@Nullable public static ApiError parseError(@Nonnull Response<?> response) { """ Parses a {@link Response} into an {@link ApiError}. @param response the {@link Response} to parse. @return an {@link ApiError} if parsable, or {@code null} if the response is not in error. """ if (response.isSucces...
java
@Nullable public static ApiError parseError(@Nonnull Response<?> response) { if (response.isSuccessful()) { return null; } try { return parseError(response.errorBody().string(), response.code(), response.message()); } catch (IOException e) { retur...
[ "@", "Nullable", "public", "static", "ApiError", "parseError", "(", "@", "Nonnull", "Response", "<", "?", ">", "response", ")", "{", "if", "(", "response", ".", "isSuccessful", "(", ")", ")", "{", "return", "null", ";", "}", "try", "{", "return", "pars...
Parses a {@link Response} into an {@link ApiError}. @param response the {@link Response} to parse. @return an {@link ApiError} if parsable, or {@code null} if the response is not in error.
[ "Parses", "a", "{", "@link", "Response", "}", "into", "an", "{", "@link", "ApiError", "}", "." ]
train
https://github.com/uber/rides-java-sdk/blob/6c75570ab7884f8ecafaad312ef471dd33f64c42/uber-rides/src/main/java/com/uber/sdk/rides/client/error/ErrorParser.java#L47-L58
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3d.java
Sphere3d.setProperties
public void setProperties(DoubleProperty x, DoubleProperty y, DoubleProperty z, DoubleProperty radius1) { """ Change the frame of the sphere. @param x @param y @param z @param radius1 """ this.cxProperty = x; this.cyProperty = y; this.czProperty = z; this.radiusProperty = radius1; this.radiusPr...
java
public void setProperties(DoubleProperty x, DoubleProperty y, DoubleProperty z, DoubleProperty radius1) { this.cxProperty = x; this.cyProperty = y; this.czProperty = z; this.radiusProperty = radius1; this.radiusProperty.set(Math.abs(this.radiusProperty.get())); }
[ "public", "void", "setProperties", "(", "DoubleProperty", "x", ",", "DoubleProperty", "y", ",", "DoubleProperty", "z", ",", "DoubleProperty", "radius1", ")", "{", "this", ".", "cxProperty", "=", "x", ";", "this", ".", "cyProperty", "=", "y", ";", "this", "...
Change the frame of the sphere. @param x @param y @param z @param radius1
[ "Change", "the", "frame", "of", "the", "sphere", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3d.java#L119-L125
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java
StyleCache.setFeatureStyle
public boolean setFeatureStyle(PolylineOptions polylineOptions, FeatureStyle featureStyle) { """ Set the feature style into the polyline options @param polylineOptions polyline options @param featureStyle feature style @return true if style was set into the polyline options """ return StyleUtil...
java
public boolean setFeatureStyle(PolylineOptions polylineOptions, FeatureStyle featureStyle) { return StyleUtils.setFeatureStyle(polylineOptions, featureStyle, density); }
[ "public", "boolean", "setFeatureStyle", "(", "PolylineOptions", "polylineOptions", ",", "FeatureStyle", "featureStyle", ")", "{", "return", "StyleUtils", ".", "setFeatureStyle", "(", "polylineOptions", ",", "featureStyle", ",", "density", ")", ";", "}" ]
Set the feature style into the polyline options @param polylineOptions polyline options @param featureStyle feature style @return true if style was set into the polyline options
[ "Set", "the", "feature", "style", "into", "the", "polyline", "options" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java#L250-L252
lawloretienne/ImageGallery
library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java
TouchImageView.transformCoordTouchToBitmap
private PointF transformCoordTouchToBitmap(float x, float y, boolean clipToBitmap) { """ This function will transform the coordinates in the touch event to the coordinate system of the drawable that the imageview contain @param x x-coordinate of touch event @param y y-coordinate of touch...
java
private PointF transformCoordTouchToBitmap(float x, float y, boolean clipToBitmap) { matrix.getValues(m); float origW = getDrawable().getIntrinsicWidth(); float origH = getDrawable().getIntrinsicHeight(); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y]; ...
[ "private", "PointF", "transformCoordTouchToBitmap", "(", "float", "x", ",", "float", "y", ",", "boolean", "clipToBitmap", ")", "{", "matrix", ".", "getValues", "(", "m", ")", ";", "float", "origW", "=", "getDrawable", "(", ")", ".", "getIntrinsicWidth", "(",...
This function will transform the coordinates in the touch event to the coordinate system of the drawable that the imageview contain @param x x-coordinate of touch event @param y y-coordinate of touch event @param clipToBitmap Touch event may occur within view, but outside image content. True, to ...
[ "This", "function", "will", "transform", "the", "coordinates", "in", "the", "touch", "event", "to", "the", "coordinate", "system", "of", "the", "drawable", "that", "the", "imageview", "contain" ]
train
https://github.com/lawloretienne/ImageGallery/blob/960d68dfb2b81d05322a576723ac4f090e10eda7/library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java#L1077-L1092
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java
TreeUtil.findNode
public static Treenode findNode(Treeview tree, String path, boolean create) { """ Returns the tree item associated with the specified \-delimited path. @param tree Tree to search. Search is not case sensitive. @param path \-delimited path to search. @param create If true, tree nodes are created if they do not...
java
public static Treenode findNode(Treeview tree, String path, boolean create) { return findNode(tree, path, create, Treenode.class); }
[ "public", "static", "Treenode", "findNode", "(", "Treeview", "tree", ",", "String", "path", ",", "boolean", "create", ")", "{", "return", "findNode", "(", "tree", ",", "path", ",", "create", ",", "Treenode", ".", "class", ")", ";", "}" ]
Returns the tree item associated with the specified \-delimited path. @param tree Tree to search. Search is not case sensitive. @param path \-delimited path to search. @param create If true, tree nodes are created if they do not already exist. @return The tree item corresponding to the specified path, or null if not f...
[ "Returns", "the", "tree", "item", "associated", "with", "the", "specified", "\\", "-", "delimited", "path", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java#L107-L109
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/AbstractUserTokenService.java
AbstractUserTokenService.getValidTokenForUser
protected E getValidTokenForUser(User user, Integer expirationTimeInMinutes) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { """ Returns a valid (i.e. non-expired) {@link UserToken} for the given ...
java
protected E getValidTokenForUser(User user, Integer expirationTimeInMinutes) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { // check if the user has an open reset request / not used token ...
[ "protected", "E", "getValidTokenForUser", "(", "User", "user", ",", "Integer", "expirationTimeInMinutes", ")", "throws", "NoSuchMethodException", ",", "SecurityException", ",", "InstantiationException", ",", "IllegalAccessException", ",", "IllegalArgumentException", ",", "I...
Returns a valid (i.e. non-expired) {@link UserToken} for the given user. If the user already owns a valid token, it will be returned. If the user has an invalid/expired token, it will be deleted and a new one will be generated and returned by this method. <p> An expiration time in minutes can also be passed. If this va...
[ "Returns", "a", "valid", "(", "i", ".", "e", ".", "non", "-", "expired", ")", "{", "@link", "UserToken", "}", "for", "the", "given", "user", ".", "If", "the", "user", "already", "owns", "a", "valid", "token", "it", "will", "be", "returned", ".", "I...
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/service/AbstractUserTokenService.java#L112-L149
JodaOrg/joda-time
src/main/java/org/joda/time/DateTime.java
DateTime.withPeriodAdded
public DateTime withPeriodAdded(ReadablePeriod period, int scalar) { """ Returns a copy of this datetime with the specified period added. <p> If the addition is zero, then <code>this</code> is returned. <p> This method is typically used to add multiple copies of complex period instances. Adding one field is b...
java
public DateTime withPeriodAdded(ReadablePeriod period, int scalar) { if (period == null || scalar == 0) { return this; } long instant = getChronology().add(period, getMillis(), scalar); return withMillis(instant); }
[ "public", "DateTime", "withPeriodAdded", "(", "ReadablePeriod", "period", ",", "int", "scalar", ")", "{", "if", "(", "period", "==", "null", "||", "scalar", "==", "0", ")", "{", "return", "this", ";", "}", "long", "instant", "=", "getChronology", "(", ")...
Returns a copy of this datetime with the specified period added. <p> If the addition is zero, then <code>this</code> is returned. <p> This method is typically used to add multiple copies of complex period instances. Adding one field is best achieved using methods like {@link #withFieldAdded(DurationFieldType, int)} or ...
[ "Returns", "a", "copy", "of", "this", "datetime", "with", "the", "specified", "period", "added", ".", "<p", ">", "If", "the", "addition", "is", "zero", "then", "<code", ">", "this<", "/", "code", ">", "is", "returned", ".", "<p", ">", "This", "method",...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateTime.java#L937-L943
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java
VimGenerator2.appendMatch
protected IStyleAppendable appendMatch(IStyleAppendable it, String name, String pattern, String... contains) { """ Append a Vim pattern. @param it the receiver of the generated elements. @param name the name of the pattern. @param pattern the regular expression. @param contains the elements inside the matche...
java
protected IStyleAppendable appendMatch(IStyleAppendable it, String name, String pattern, String... contains) { return appendMatch(it, true, name, pattern, false, contains); }
[ "protected", "IStyleAppendable", "appendMatch", "(", "IStyleAppendable", "it", ",", "String", "name", ",", "String", "pattern", ",", "String", "...", "contains", ")", "{", "return", "appendMatch", "(", "it", ",", "true", ",", "name", ",", "pattern", ",", "fa...
Append a Vim pattern. @param it the receiver of the generated elements. @param name the name of the pattern. @param pattern the regular expression. @param contains the elements inside the matched region. @return {@code it}.
[ "Append", "a", "Vim", "pattern", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/vim/VimGenerator2.java#L444-L446
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/stats/impl/StatValueFactory.java
StatValueFactory.createStatValue
public static final StatValue createStatValue(Object aPattern, String aName, Interval[] aIntervals) { """ This method creates a new StatValue instance. The new object will be from the same type as the given template object. @param aPattern the template object @param aName the name of the value @param aInterv...
java
public static final StatValue createStatValue(Object aPattern, String aName, Interval[] aIntervals) { return createStatValue(StatValueTypeUtility.object2type(aPattern),aName, aIntervals); }
[ "public", "static", "final", "StatValue", "createStatValue", "(", "Object", "aPattern", ",", "String", "aName", ",", "Interval", "[", "]", "aIntervals", ")", "{", "return", "createStatValue", "(", "StatValueTypeUtility", ".", "object2type", "(", "aPattern", ")", ...
This method creates a new StatValue instance. The new object will be from the same type as the given template object. @param aPattern the template object @param aName the name of the value @param aIntervals the list of Intervals to be used @return the StatValue instance
[ "This", "method", "creates", "a", "new", "StatValue", "instance", ".", "The", "new", "object", "will", "be", "from", "the", "same", "type", "as", "the", "given", "template", "object", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/stats/impl/StatValueFactory.java#L61-L63
kiegroup/drools
drools-model/drools-constraint-parser/src/main/javacc-support/org/drools/constraint/parser/GeneratedDrlConstraintParserBase.java
GeneratedDrlConstraintParserBase.recover
TokenRange recover(int recoveryTokenType, ParseException p) { """ /* Called from within a catch block to skip forward to a known token, and report the occurred exception as a problem. """ JavaToken begin = null; if (p.currentToken != null) { begin = token(); } Token...
java
TokenRange recover(int recoveryTokenType, ParseException p) { JavaToken begin = null; if (p.currentToken != null) { begin = token(); } Token t; do { t = getNextToken(); } while (t.kind != recoveryTokenType && t.kind != EOF); JavaToken end ...
[ "TokenRange", "recover", "(", "int", "recoveryTokenType", ",", "ParseException", "p", ")", "{", "JavaToken", "begin", "=", "null", ";", "if", "(", "p", ".", "currentToken", "!=", "null", ")", "{", "begin", "=", "token", "(", ")", ";", "}", "Token", "t"...
/* Called from within a catch block to skip forward to a known token, and report the occurred exception as a problem.
[ "/", "*", "Called", "from", "within", "a", "catch", "block", "to", "skip", "forward", "to", "a", "known", "token", "and", "report", "the", "occurred", "exception", "as", "a", "problem", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-model/drools-constraint-parser/src/main/javacc-support/org/drools/constraint/parser/GeneratedDrlConstraintParserBase.java#L187-L206
twitter/scalding
scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java
ScroogeReadSupport.getSchemaForRead
public static MessageType getSchemaForRead(MessageType fileMessageType, MessageType projectedMessageType) { """ Updated method from ReadSupport which checks if the projection's compatible instead of a stricter check to see if the file's schema contains the projection @param fileMessageType @param projectedMes...
java
public static MessageType getSchemaForRead(MessageType fileMessageType, MessageType projectedMessageType) { assertGroupsAreCompatible(fileMessageType, projectedMessageType); return projectedMessageType; }
[ "public", "static", "MessageType", "getSchemaForRead", "(", "MessageType", "fileMessageType", ",", "MessageType", "projectedMessageType", ")", "{", "assertGroupsAreCompatible", "(", "fileMessageType", ",", "projectedMessageType", ")", ";", "return", "projectedMessageType", ...
Updated method from ReadSupport which checks if the projection's compatible instead of a stricter check to see if the file's schema contains the projection @param fileMessageType @param projectedMessageType @return
[ "Updated", "method", "from", "ReadSupport", "which", "checks", "if", "the", "projection", "s", "compatible", "instead", "of", "a", "stricter", "check", "to", "see", "if", "the", "file", "s", "schema", "contains", "the", "projection" ]
train
https://github.com/twitter/scalding/blob/428b5507279655676e507d52c669c3cbc7812dc0/scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java#L133-L136
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java
SwaptionDataLattice.convertTenor
private double convertTenor(int maturityInMonths, int tenorInMonths) { """ Convert tenor given as offset in months to year fraction. @param maturityInMonths The maturity as offset in months. @param tenorInMonths The tenor as offset in months. @return THe tenor as year fraction. """ Schedule schedule = ...
java
private double convertTenor(int maturityInMonths, int tenorInMonths) { Schedule schedule = fixMetaSchedule.generateSchedule(referenceDate, maturityInMonths, tenorInMonths); return schedule.getPayment(schedule.getNumberOfPeriods()-1); }
[ "private", "double", "convertTenor", "(", "int", "maturityInMonths", ",", "int", "tenorInMonths", ")", "{", "Schedule", "schedule", "=", "fixMetaSchedule", ".", "generateSchedule", "(", "referenceDate", ",", "maturityInMonths", ",", "tenorInMonths", ")", ";", "retur...
Convert tenor given as offset in months to year fraction. @param maturityInMonths The maturity as offset in months. @param tenorInMonths The tenor as offset in months. @return THe tenor as year fraction.
[ "Convert", "tenor", "given", "as", "offset", "in", "months", "to", "year", "fraction", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java#L534-L537
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java
CPOptionCategoryPersistenceImpl.removeByUUID_G
@Override public CPOptionCategory removeByUUID_G(String uuid, long groupId) throws NoSuchCPOptionCategoryException { """ Removes the cp option category where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp option category that was removed ...
java
@Override public CPOptionCategory removeByUUID_G(String uuid, long groupId) throws NoSuchCPOptionCategoryException { CPOptionCategory cpOptionCategory = findByUUID_G(uuid, groupId); return remove(cpOptionCategory); }
[ "@", "Override", "public", "CPOptionCategory", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPOptionCategoryException", "{", "CPOptionCategory", "cpOptionCategory", "=", "findByUUID_G", "(", "uuid", ",", "groupId", ")", ";", ...
Removes the cp option category where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp option category that was removed
[ "Removes", "the", "cp", "option", "category", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java#L813-L819
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/LoggingHelper.java
LoggingHelper.formatConnectionEstablishmentMessage
public static String formatConnectionEstablishmentMessage(final String connectionName, final String host, final String connectionReason) { """ Helper method for formatting connection establishment messages. @param connectionName The name of the connection @param host The remote host @param connectionReason ...
java
public static String formatConnectionEstablishmentMessage(final String connectionName, final String host, final String connectionReason) { return CON_ESTABLISHMENT_FORMAT.format(new Object[] { connectionName, host, connectionReason }); }
[ "public", "static", "String", "formatConnectionEstablishmentMessage", "(", "final", "String", "connectionName", ",", "final", "String", "host", ",", "final", "String", "connectionReason", ")", "{", "return", "CON_ESTABLISHMENT_FORMAT", ".", "format", "(", "new", "Obje...
Helper method for formatting connection establishment messages. @param connectionName The name of the connection @param host The remote host @param connectionReason The reason for establishing the connection @return A formatted message in the format: "[&lt;connectionName&gt;] remote host[&lt;host&gt;] &lt;connectionRe...
[ "Helper", "method", "for", "formatting", "connection", "establishment", "messages", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/LoggingHelper.java#L465-L467
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/CacheUtil.java
CacheUtil.getDistributedObjectName
public static String getDistributedObjectName(String cacheName, URI uri, ClassLoader classLoader) { """ Convenience method to obtain the name of Hazelcast distributed object corresponding to the cache identified by the given arguments. The distributed object name returned by this method can be used to obtain the ...
java
public static String getDistributedObjectName(String cacheName, URI uri, ClassLoader classLoader) { return HazelcastCacheManager.CACHE_MANAGER_PREFIX + getPrefixedCacheName(cacheName, uri, classLoader); }
[ "public", "static", "String", "getDistributedObjectName", "(", "String", "cacheName", ",", "URI", "uri", ",", "ClassLoader", "classLoader", ")", "{", "return", "HazelcastCacheManager", ".", "CACHE_MANAGER_PREFIX", "+", "getPrefixedCacheName", "(", "cacheName", ",", "u...
Convenience method to obtain the name of Hazelcast distributed object corresponding to the cache identified by the given arguments. The distributed object name returned by this method can be used to obtain the cache as a Hazelcast {@link ICache} as shown in this example: <pre> HazelcastInstance hz = Hazelcast.newHazelc...
[ "Convenience", "method", "to", "obtain", "the", "name", "of", "Hazelcast", "distributed", "object", "corresponding", "to", "the", "cache", "identified", "by", "the", "given", "arguments", ".", "The", "distributed", "object", "name", "returned", "by", "this", "me...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/CacheUtil.java#L131-L133
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToStream.java
ToStream.outputEntityDecl
void outputEntityDecl(String name, String value) throws IOException { """ Output the doc type declaration. @param name non-null reference to document type name. NEEDSDOC @param value @throws org.xml.sax.SAXException """ final java.io.Writer writer = m_writer; writer.write("<!ENTITY "); ...
java
void outputEntityDecl(String name, String value) throws IOException { final java.io.Writer writer = m_writer; writer.write("<!ENTITY "); writer.write(name); writer.write(" \""); writer.write(value); writer.write("\">"); writer.write(m_lineSep, 0, m_lineSepLen)...
[ "void", "outputEntityDecl", "(", "String", "name", ",", "String", "value", ")", "throws", "IOException", "{", "final", "java", ".", "io", ".", "Writer", "writer", "=", "m_writer", ";", "writer", ".", "write", "(", "\"<!ENTITY \"", ")", ";", "writer", ".", ...
Output the doc type declaration. @param name non-null reference to document type name. NEEDSDOC @param value @throws org.xml.sax.SAXException
[ "Output", "the", "doc", "type", "declaration", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToStream.java#L363-L372
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/Utils.java
Utils.getParameterValueFromQuery
public static String getParameterValueFromQuery(String query, String paramName) { """ Obtains a parameter with specified name from from query string. The query should be in format param=value&param=value ... @param query Queery in "url" format. @param paramName Parameter name. @return Parameter value, or...
java
public static String getParameterValueFromQuery(String query, String paramName) { String[] components = query.split("&"); for (String keyValuePair : components) { String[] pairComponents = keyValuePair.split("="); if (pairComponents.length == 2) { try { ...
[ "public", "static", "String", "getParameterValueFromQuery", "(", "String", "query", ",", "String", "paramName", ")", "{", "String", "[", "]", "components", "=", "query", ".", "split", "(", "\"&\"", ")", ";", "for", "(", "String", "keyValuePair", ":", "compon...
Obtains a parameter with specified name from from query string. The query should be in format param=value&param=value ... @param query Queery in "url" format. @param paramName Parameter name. @return Parameter value, or null.
[ "Obtains", "a", "parameter", "with", "specified", "name", "from", "from", "query", "string", ".", "The", "query", "should", "be", "in", "format", "param", "=", "value&param", "=", "value", "..." ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/Utils.java#L48-L68
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java
PropertyBuilder.buildPropertyDoc
public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) throws DocletException { """ Build the property documentation. @param node the XML element that specifies which components to document @param memberDetailsTree the content tree to which the documentation will be added @throws DocletExceptio...
java
public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) throws DocletException { if (writer == null) { return; } if (hasMembersToDocument()) { Content propertyDetailsTree = writer.getPropertyDetailsTreeHeader(typeElement, memberDetailsTre...
[ "public", "void", "buildPropertyDoc", "(", "XMLNode", "node", ",", "Content", "memberDetailsTree", ")", "throws", "DocletException", "{", "if", "(", "writer", "==", "null", ")", "{", "return", ";", "}", "if", "(", "hasMembersToDocument", "(", ")", ")", "{", ...
Build the property documentation. @param node the XML element that specifies which components to document @param memberDetailsTree the content tree to which the documentation will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "property", "documentation", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java#L137-L156
jenkinsci/jenkins
core/src/main/java/jenkins/model/Jenkins.java
Jenkins.doEval
@RequirePOST public void doEval(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { """ Evaluates the Jelly script submitted by the client. This is useful for system administration as well as unit testing. """ checkPermission(RUN_SCRIPTS); try { M...
java
@RequirePOST public void doEval(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { checkPermission(RUN_SCRIPTS); try { MetaClass mc = WebApp.getCurrent().getMetaClass(getClass()); Script script = mc.classLoader.loadTearOff(JellyClassLoaderTearOff...
[ "@", "RequirePOST", "public", "void", "doEval", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", "{", "checkPermission", "(", "RUN_SCRIPTS", ")", ";", "try", "{", "MetaClass", "mc", "=", "WebApp"...
Evaluates the Jelly script submitted by the client. This is useful for system administration as well as unit testing.
[ "Evaluates", "the", "Jelly", "script", "submitted", "by", "the", "client", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Jenkins.java#L4452-L4463
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/translator/VariableTranslator.java
VariableTranslator.isXmlDocumentTranslator
public static boolean isXmlDocumentTranslator(Package pkg, String type) { """ If pkg is null then will use any available bundle to provide the translator. """ com.centurylink.mdw.variable.VariableTranslator trans = getTranslator(pkg, type); return (trans instanceof XmlDocumentTranslator); }
java
public static boolean isXmlDocumentTranslator(Package pkg, String type) { com.centurylink.mdw.variable.VariableTranslator trans = getTranslator(pkg, type); return (trans instanceof XmlDocumentTranslator); }
[ "public", "static", "boolean", "isXmlDocumentTranslator", "(", "Package", "pkg", ",", "String", "type", ")", "{", "com", ".", "centurylink", ".", "mdw", ".", "variable", ".", "VariableTranslator", "trans", "=", "getTranslator", "(", "pkg", ",", "type", ")", ...
If pkg is null then will use any available bundle to provide the translator.
[ "If", "pkg", "is", "null", "then", "will", "use", "any", "available", "bundle", "to", "provide", "the", "translator", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/translator/VariableTranslator.java#L178-L181
fcrepo4-labs/fcrepo4-client
fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java
HttpHelper.queryString
private static String queryString( final Map<String, List<String>> params ) { """ Encode URL parameters as a query string. @param params Query parameters """ final StringBuilder builder = new StringBuilder(); if (params != null && params.size() > 0) { for (final Iterator<String> it...
java
private static String queryString( final Map<String, List<String>> params ) { final StringBuilder builder = new StringBuilder(); if (params != null && params.size() > 0) { for (final Iterator<String> it = params.keySet().iterator(); it.hasNext(); ) { final String key = it.nex...
[ "private", "static", "String", "queryString", "(", "final", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "params", ")", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "params", "!=", "null"...
Encode URL parameters as a query string. @param params Query parameters
[ "Encode", "URL", "parameters", "as", "a", "query", "string", "." ]
train
https://github.com/fcrepo4-labs/fcrepo4-client/blob/21eaf27200c5b2542095f6ebb9dd8ec865b95bbd/fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java#L190-L207
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/Record.java
Record.getRate
public Rate getRate(int field) throws MPXJException { """ Accessor method used to retrieve an Rate object representing the contents of an individual field. If the field does not exist in the record, null is returned. @param field the index number of the field to be retrieved @return the value of the required...
java
public Rate getRate(int field) throws MPXJException { Rate result; if ((field < m_fields.length) && (m_fields[field].length() != 0)) { try { String rate = m_fields[field]; int index = rate.indexOf('/'); double amount; TimeUnit units...
[ "public", "Rate", "getRate", "(", "int", "field", ")", "throws", "MPXJException", "{", "Rate", "result", ";", "if", "(", "(", "field", "<", "m_fields", ".", "length", ")", "&&", "(", "m_fields", "[", "field", "]", ".", "length", "(", ")", "!=", "0", ...
Accessor method used to retrieve an Rate object representing the contents of an individual field. If the field does not exist in the record, null is returned. @param field the index number of the field to be retrieved @return the value of the required field @throws MPXJException normally thrown when parsing fails
[ "Accessor", "method", "used", "to", "retrieve", "an", "Rate", "object", "representing", "the", "contents", "of", "an", "individual", "field", ".", "If", "the", "field", "does", "not", "exist", "in", "the", "record", "null", "is", "returned", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/Record.java#L369-L407
jmeter-maven-plugin/jmeter-maven-plugin
src/main/java/com/lazerycode/jmeter/properties/PropertiesFile.java
PropertiesFile.addAndOverwriteProperties
public void addAndOverwriteProperties(Map<String, String> additionalProperties) { """ Merge a Map of properties into our Properties object The additions will overwrite any existing properties @param additionalProperties Map to merge into our Properties object """ additionalProperties.values().remov...
java
public void addAndOverwriteProperties(Map<String, String> additionalProperties) { additionalProperties.values().removeAll(Collections.singleton(null)); for (Map.Entry<String, String> additionalPropertiesMap : additionalProperties.entrySet()) { if (!additionalPropertiesMap.getValue().trim().i...
[ "public", "void", "addAndOverwriteProperties", "(", "Map", "<", "String", ",", "String", ">", "additionalProperties", ")", "{", "additionalProperties", ".", "values", "(", ")", ".", "removeAll", "(", "Collections", ".", "singleton", "(", "null", ")", ")", ";",...
Merge a Map of properties into our Properties object The additions will overwrite any existing properties @param additionalProperties Map to merge into our Properties object
[ "Merge", "a", "Map", "of", "properties", "into", "our", "Properties", "object", "The", "additions", "will", "overwrite", "any", "existing", "properties" ]
train
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/63dc8b49cc6b9542deb681e25a2ada6025ddbf6b/src/main/java/com/lazerycode/jmeter/properties/PropertiesFile.java#L99-L107
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java
Uris.toRawString
public static String toRawString(final URI uri, final boolean strict) throws NormalizationException { """ Returns the entire URL as a string with its raw components normalized @param uri the URI to convert @param strict whether or not to do strict escaping @return the raw string representation of the URI @th...
java
public static String toRawString(final URI uri, final boolean strict) throws NormalizationException { final StringBuffer sb = new StringBuffer(getScheme(uri)).append("://"); if (hasUserInfo(uri)) { sb.append(getRawUserInfo(uri)).append('@'); } sb.append(getHost(uri)).append('...
[ "public", "static", "String", "toRawString", "(", "final", "URI", "uri", ",", "final", "boolean", "strict", ")", "throws", "NormalizationException", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "getScheme", "(", "uri", ")", ")", ".", ...
Returns the entire URL as a string with its raw components normalized @param uri the URI to convert @param strict whether or not to do strict escaping @return the raw string representation of the URI @throws NormalizationException if the given URI doesn't meet our stricter restrictions
[ "Returns", "the", "entire", "URL", "as", "a", "string", "with", "its", "raw", "components", "normalized" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L285-L298
alkacon/opencms-core
src/org/opencms/workplace/explorer/CmsResourceUtil.java
CmsResourceUtil.getNoEditReason
public String getNoEditReason(Locale locale, boolean ignoreExpiration) throws CmsException { """ Checks is the current resource can be edited by the current user.<p> @param locale the locale to use for the messages @param ignoreExpiration <code>true</code> to ignore resource release and expiration date @ret...
java
public String getNoEditReason(Locale locale, boolean ignoreExpiration) throws CmsException { String reason = ""; if (m_resource instanceof I_CmsHistoryResource) { reason = Messages.get().getBundle(locale).key(Messages.GUI_NO_EDIT_REASON_HISTORY_0); } else if (!m_cms.hasPermissions( ...
[ "public", "String", "getNoEditReason", "(", "Locale", "locale", ",", "boolean", "ignoreExpiration", ")", "throws", "CmsException", "{", "String", "reason", "=", "\"\"", ";", "if", "(", "m_resource", "instanceof", "I_CmsHistoryResource", ")", "{", "reason", "=", ...
Checks is the current resource can be edited by the current user.<p> @param locale the locale to use for the messages @param ignoreExpiration <code>true</code> to ignore resource release and expiration date @return an empty string if editable, or a localized string with the reason @throws CmsException if something g...
[ "Checks", "is", "the", "current", "resource", "can", "be", "edited", "by", "the", "current", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/explorer/CmsResourceUtil.java#L751-L770
otto-de/edison-microservice
edison-mongo/src/main/java/de/otto/edison/mongo/AbstractMongoRepository.java
AbstractMongoRepository.findOne
public Optional<V> findOne(final K key) { """ Find a single value with the specified key, if existing. @param key the key to search for @return an Optional containing the requested value, or {@code Optional.empty()} if no value with this key exists """ return findOne(key, mongoProperties.getDefault...
java
public Optional<V> findOne(final K key) { return findOne(key, mongoProperties.getDefaultReadTimeout(), TimeUnit.MILLISECONDS); }
[ "public", "Optional", "<", "V", ">", "findOne", "(", "final", "K", "key", ")", "{", "return", "findOne", "(", "key", ",", "mongoProperties", ".", "getDefaultReadTimeout", "(", ")", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";", "}" ]
Find a single value with the specified key, if existing. @param key the key to search for @return an Optional containing the requested value, or {@code Optional.empty()} if no value with this key exists
[ "Find", "a", "single", "value", "with", "the", "specified", "key", "if", "existing", "." ]
train
https://github.com/otto-de/edison-microservice/blob/89ecf0a0dee40977f004370b0b474a36c699e8a2/edison-mongo/src/main/java/de/otto/edison/mongo/AbstractMongoRepository.java#L60-L62
dspinellis/UMLGraph
src/main/java/org/umlgraph/doclet/ClassGraph.java
ClassGraph.qualifiedName
private static String qualifiedName(Options opt, String r) { """ Return the class's name, possibly by stripping the leading path """ if (opt.hideGenerics) r = removeTemplate(r); // Fast path - nothing to do: if (opt.showQualified && (opt.showQualifiedGenerics || r.indexOf('<') < 0)) return r; Str...
java
private static String qualifiedName(Options opt, String r) { if (opt.hideGenerics) r = removeTemplate(r); // Fast path - nothing to do: if (opt.showQualified && (opt.showQualifiedGenerics || r.indexOf('<') < 0)) return r; StringBuilder buf = new StringBuilder(r.length()); qualifiedNameInner(opt, r, buf, ...
[ "private", "static", "String", "qualifiedName", "(", "Options", "opt", ",", "String", "r", ")", "{", "if", "(", "opt", ".", "hideGenerics", ")", "r", "=", "removeTemplate", "(", "r", ")", ";", "// Fast path - nothing to do:", "if", "(", "opt", ".", "showQu...
Return the class's name, possibly by stripping the leading path
[ "Return", "the", "class", "s", "name", "possibly", "by", "stripping", "the", "leading", "path" ]
train
https://github.com/dspinellis/UMLGraph/blob/09576db5ae0ea63bfe30ef9fce88a513f9a8d843/src/main/java/org/umlgraph/doclet/ClassGraph.java#L136-L145
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.formatDateTime
public static String formatDateTime(final int dateStyle, final int timeStyle, final Date value) { """ <p> Formats the given date/time with the specified styles. </p> @param dateStyle Date style @param timeStyle Time style @param value Date to be formatted @return String representation of the date ""...
java
public static String formatDateTime(final int dateStyle, final int timeStyle, final Date value) { return context.get().formatDateTime(dateStyle, timeStyle, value); }
[ "public", "static", "String", "formatDateTime", "(", "final", "int", "dateStyle", ",", "final", "int", "timeStyle", ",", "final", "Date", "value", ")", "{", "return", "context", ".", "get", "(", ")", ".", "formatDateTime", "(", "dateStyle", ",", "timeStyle",...
<p> Formats the given date/time with the specified styles. </p> @param dateStyle Date style @param timeStyle Time style @param value Date to be formatted @return String representation of the date
[ "<p", ">", "Formats", "the", "given", "date", "/", "time", "with", "the", "specified", "styles", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L829-L832
jsurfer/JsonSurfer
jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java
JsonSurfer.collectOne
@SuppressWarnings("unchecked") public <T> T collectOne(InputStream inputStream, Class<T> tClass, JsonPath... paths) { """ Collect the first matched value and stop parsing immediately @param inputStream Json inpustream @param tClass type @param paths JsonPath @param <T> type @return ty...
java
@SuppressWarnings("unchecked") public <T> T collectOne(InputStream inputStream, Class<T> tClass, JsonPath... paths) { CollectOneListener listener = new CollectOneListener(true); SurfingConfiguration.Builder builder = configBuilder().skipOverlappedPath(); for (JsonPath jsonPath : paths) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "collectOne", "(", "InputStream", "inputStream", ",", "Class", "<", "T", ">", "tClass", ",", "JsonPath", "...", "paths", ")", "{", "CollectOneListener", "listener", "=", "new",...
Collect the first matched value and stop parsing immediately @param inputStream Json inpustream @param tClass type @param paths JsonPath @param <T> type @return typed value
[ "Collect", "the", "first", "matched", "value", "and", "stop", "parsing", "immediately" ]
train
https://github.com/jsurfer/JsonSurfer/blob/52bd75a453338b86e115092803da140bf99cee62/jsurfer-core/src/main/java/org/jsfr/json/JsonSurfer.java#L501-L511
JCTools/JCTools
jctools-experimental/src/main/java/org/jctools/sets/IdentityOpenHashSet.java
IdentityOpenHashSet.compactAndRemove
private void compactAndRemove(final E[] buffer, final int mask, int removeHashIndex) { """ /* implemented as per wiki suggested algo with minor adjustments. """ // remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,9c,10a,10b,null,11a,null] removeHashIndex = removeHashIndex & mask; int j =...
java
private void compactAndRemove(final E[] buffer, final int mask, int removeHashIndex) { // remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,9c,10a,10b,null,11a,null] removeHashIndex = removeHashIndex & mask; int j = removeHashIndex; while(true) { int k; // skip eleme...
[ "private", "void", "compactAndRemove", "(", "final", "E", "[", "]", "buffer", ",", "final", "int", "mask", ",", "int", "removeHashIndex", ")", "{", "// remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,9c,10a,10b,null,11a,null]", "removeHashIndex", "=", "removeHashIndex", "&...
/* implemented as per wiki suggested algo with minor adjustments.
[ "/", "*", "implemented", "as", "per", "wiki", "suggested", "algo", "with", "minor", "adjustments", "." ]
train
https://github.com/JCTools/JCTools/blob/9250fe316ec84209cbba0a41682f341256df781e/jctools-experimental/src/main/java/org/jctools/sets/IdentityOpenHashSet.java#L148-L179
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.readLines
public static <T extends Collection<String>> T readLines(InputStream in, Charset charset, T collection) throws IORuntimeException { """ 从流中读取内容 @param <T> 集合类型 @param in 输入流 @param charset 字符集 @param collection 返回集合 @return 内容 @throws IORuntimeException IO异常 """ return readLines(getReader(in, charse...
java
public static <T extends Collection<String>> T readLines(InputStream in, Charset charset, T collection) throws IORuntimeException { return readLines(getReader(in, charset), collection); }
[ "public", "static", "<", "T", "extends", "Collection", "<", "String", ">", ">", "T", "readLines", "(", "InputStream", "in", ",", "Charset", "charset", ",", "T", "collection", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "getReader", ...
从流中读取内容 @param <T> 集合类型 @param in 输入流 @param charset 字符集 @param collection 返回集合 @return 内容 @throws IORuntimeException IO异常
[ "从流中读取内容" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L658-L660
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/groups/pools/PoolsInterface.java
PoolsInterface.getPhotos
public PhotoList<Photo> getPhotos(String groupId, String[] tags, Set<String> extras, int perPage, int page) throws FlickrException { """ Convenience/Compatibility method. This method does not require authentication. @see com.flickr4java.flickr.photos.Extras @param groupId The group ID @param tags The opt...
java
public PhotoList<Photo> getPhotos(String groupId, String[] tags, Set<String> extras, int perPage, int page) throws FlickrException { return getPhotos(groupId, null, tags, extras, perPage, page); }
[ "public", "PhotoList", "<", "Photo", ">", "getPhotos", "(", "String", "groupId", ",", "String", "[", "]", "tags", ",", "Set", "<", "String", ">", "extras", ",", "int", "perPage", ",", "int", "page", ")", "throws", "FlickrException", "{", "return", "getPh...
Convenience/Compatibility method. This method does not require authentication. @see com.flickr4java.flickr.photos.Extras @param groupId The group ID @param tags The optional tags (may be null) @param extras Set of extra-attributes to include (may be null) @param perPage The number of photos per page (0 to ignore) @pa...
[ "Convenience", "/", "Compatibility", "method", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/groups/pools/PoolsInterface.java#L247-L249
alkacon/opencms-core
src/org/opencms/security/CmsPrincipal.java
CmsPrincipal.readPrefixedPrincipal
public static I_CmsPrincipal readPrefixedPrincipal(CmsObject cms, String name) throws CmsException { """ Utility function to read a prefixed principal from the OpenCms database using the provided OpenCms user context.<p> The principal must be either prefixed with <code>{@link I_CmsPrincipal#PRINCIPAL_GROUP}.</...
java
public static I_CmsPrincipal readPrefixedPrincipal(CmsObject cms, String name) throws CmsException { if (CmsGroup.hasPrefix(name)) { // this principal is a group return cms.readGroup(CmsGroup.removePrefix(name)); } else if (CmsUser.hasPrefix(name)) { // this principa...
[ "public", "static", "I_CmsPrincipal", "readPrefixedPrincipal", "(", "CmsObject", "cms", ",", "String", "name", ")", "throws", "CmsException", "{", "if", "(", "CmsGroup", ".", "hasPrefix", "(", "name", ")", ")", "{", "// this principal is a group", "return", "cms",...
Utility function to read a prefixed principal from the OpenCms database using the provided OpenCms user context.<p> The principal must be either prefixed with <code>{@link I_CmsPrincipal#PRINCIPAL_GROUP}.</code> or <code>{@link I_CmsPrincipal#PRINCIPAL_USER}.</code>.<p> @param cms the OpenCms user context to use when...
[ "Utility", "function", "to", "read", "a", "prefixed", "principal", "from", "the", "OpenCms", "database", "using", "the", "provided", "OpenCms", "user", "context", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsPrincipal.java#L224-L235
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listWebWorkerMetricDefinitionsAsync
public Observable<Page<ResourceMetricDefinitionInner>> listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName) { """ Get metric definitions for a worker pool of an App Service Environment. Get metric definitions for a worker pool of an App Service Enviro...
java
public Observable<Page<ResourceMetricDefinitionInner>> listWebWorkerMetricDefinitionsAsync(final String resourceGroupName, final String name, final String workerPoolName) { return listWebWorkerMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, workerPoolName) .map(new Func1<ServiceRe...
[ "public", "Observable", "<", "Page", "<", "ResourceMetricDefinitionInner", ">", ">", "listWebWorkerMetricDefinitionsAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "workerPoolName", ")", "{", "return", "list...
Get metric definitions for a worker pool of an App Service Environment. Get metric definitions for a worker pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param workerPoolName Name of the worker po...
[ "Get", "metric", "definitions", "for", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "metric", "definitions", "for", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L5975-L5983
OpenLiberty/open-liberty
dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThroughputDistribution.java
ThroughputDistribution.addDataPoint
synchronized void addDataPoint(double value, int updated) { """ Add a throughput observation to the distribution, setting lastUpdate @param value the observed throughput """ // 8/10/2012: Force the standard deviation to 1/3 of the first data point // 8/11:2012: Force it to 1/6th of the first...
java
synchronized void addDataPoint(double value, int updated) { // 8/10/2012: Force the standard deviation to 1/3 of the first data point // 8/11:2012: Force it to 1/6th of the first data point (more accurate) if (ewmaVariance == Double.NEGATIVE_INFINITY) { reset(value, updated); ...
[ "synchronized", "void", "addDataPoint", "(", "double", "value", ",", "int", "updated", ")", "{", "// 8/10/2012: Force the standard deviation to 1/3 of the first data point", "// 8/11:2012: Force it to 1/6th of the first data point (more accurate)", "if", "(", "ewmaVariance", "==", ...
Add a throughput observation to the distribution, setting lastUpdate @param value the observed throughput
[ "Add", "a", "throughput", "observation", "to", "the", "distribution", "setting", "lastUpdate" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThroughputDistribution.java#L143-L159
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java
WriteFileExtensions.writeByteArrayToFile
public static void writeByteArrayToFile(final String filename, final byte[] byteArray) throws IOException { """ Writes the given byte array to a file. @param filename The filename from the file. @param byteArray The byte array. @throws IOException Signals that an I/O exception has occurred. """ fin...
java
public static void writeByteArrayToFile(final String filename, final byte[] byteArray) throws IOException { final File file = new File(filename); writeByteArrayToFile(file, byteArray); }
[ "public", "static", "void", "writeByteArrayToFile", "(", "final", "String", "filename", ",", "final", "byte", "[", "]", "byteArray", ")", "throws", "IOException", "{", "final", "File", "file", "=", "new", "File", "(", "filename", ")", ";", "writeByteArrayToFil...
Writes the given byte array to a file. @param filename The filename from the file. @param byteArray The byte array. @throws IOException Signals that an I/O exception has occurred.
[ "Writes", "the", "given", "byte", "array", "to", "a", "file", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java#L465-L470
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MMCIFFileTools.java
MMCIFFileTools.toMMCIF
public static String toMMCIF(String categoryName, Object o) { """ Converts a mmCIF bean (see {@link org.biojava.nbio.structure.io.mmcif.model} to a String representing it in mmCIF (single-record) format. @param categoryName @param o @return """ StringBuilder sb = new StringBuilder(); Class<?> c = o.g...
java
public static String toMMCIF(String categoryName, Object o) { StringBuilder sb = new StringBuilder(); Class<?> c = o.getClass(); Field[] fields = getFields(c); String[] names = getFieldNames(fields); int maxFieldNameLength = getMaxStringLength(names); for (int i=0;i<fields.length;i++) { Field f = f...
[ "public", "static", "String", "toMMCIF", "(", "String", "categoryName", ",", "Object", "o", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "Class", "<", "?", ">", "c", "=", "o", ".", "getClass", "(", ")", ";", "Field", "...
Converts a mmCIF bean (see {@link org.biojava.nbio.structure.io.mmcif.model} to a String representing it in mmCIF (single-record) format. @param categoryName @param o @return
[ "Converts", "a", "mmCIF", "bean", "(", "see", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MMCIFFileTools.java#L108-L154
jenkinsci/jenkins
core/src/main/java/hudson/MarkupText.java
MarkupText.subText
public SubText subText(int start, int end) { """ Returns a subtext. @param end If negative, -N means "trim the last N-1 chars". That is, (s,-1) is the same as (s,length) """ return new SubText(start, end<0 ? text.length()+1+end : end); }
java
public SubText subText(int start, int end) { return new SubText(start, end<0 ? text.length()+1+end : end); }
[ "public", "SubText", "subText", "(", "int", "start", ",", "int", "end", ")", "{", "return", "new", "SubText", "(", "start", ",", "end", "<", "0", "?", "text", ".", "length", "(", ")", "+", "1", "+", "end", ":", "end", ")", ";", "}" ]
Returns a subtext. @param end If negative, -N means "trim the last N-1 chars". That is, (s,-1) is the same as (s,length)
[ "Returns", "a", "subtext", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/MarkupText.java#L252-L254
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyEventsInner.java
PolicyEventsInner.listQueryResultsForPolicySetDefinition
public PolicyEventsQueryResultsInner listQueryResultsForPolicySetDefinition(String subscriptionId, String policySetDefinitionName) { """ Queries policy events for the subscription level policy set definition. @param subscriptionId Microsoft Azure subscription ID. @param policySetDefinitionName Policy set defin...
java
public PolicyEventsQueryResultsInner listQueryResultsForPolicySetDefinition(String subscriptionId, String policySetDefinitionName) { return listQueryResultsForPolicySetDefinitionWithServiceResponseAsync(subscriptionId, policySetDefinitionName).toBlocking().single().body(); }
[ "public", "PolicyEventsQueryResultsInner", "listQueryResultsForPolicySetDefinition", "(", "String", "subscriptionId", ",", "String", "policySetDefinitionName", ")", "{", "return", "listQueryResultsForPolicySetDefinitionWithServiceResponseAsync", "(", "subscriptionId", ",", "policySet...
Queries policy events for the subscription level policy set definition. @param subscriptionId Microsoft Azure subscription ID. @param policySetDefinitionName Policy set definition name. @throws IllegalArgumentException thrown if parameters fail the validation @throws QueryFailureException thrown if the request is reje...
[ "Queries", "policy", "events", "for", "the", "subscription", "level", "policy", "set", "definition", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyEventsInner.java#L874-L876
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InboundNatRulesInner.java
InboundNatRulesInner.beginCreateOrUpdateAsync
public Observable<InboundNatRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { """ Creates or updates a load balancer inbound nat rule. @param resourceGroupName The name of the resource group. @param ...
java
public Observable<InboundNatRuleInner> beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, InboundNatRuleInner inboundNatRuleParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRule...
[ "public", "Observable", "<", "InboundNatRuleInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "String", "inboundNatRuleName", ",", "InboundNatRuleInner", "inboundNatRuleParameters", ")", "{", "return", "begi...
Creates or updates a load balancer inbound nat rule. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param inboundNatRuleName The name of the inbound nat rule. @param inboundNatRuleParameters Parameters supplied to the create or update inbound nat rule o...
[ "Creates", "or", "updates", "a", "load", "balancer", "inbound", "nat", "rule", "." ]
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/InboundNatRulesInner.java#L683-L690
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/ClasspathPath.java
ClasspathPath.fsWalk
public PathImpl fsWalk(String userPath, Map<String,Object> attributes, String path) { """ Lookup the actual path relative to the filesystem root. @param userPath the user's path to lookup() @param attributes the user's attributes to lookup() @param path the norm...
java
public PathImpl fsWalk(String userPath, Map<String,Object> attributes, String path) { return new ClasspathPath(_root, userPath, path); }
[ "public", "PathImpl", "fsWalk", "(", "String", "userPath", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ",", "String", "path", ")", "{", "return", "new", "ClasspathPath", "(", "_root", ",", "userPath", ",", "path", ")", ";", "}" ]
Lookup the actual path relative to the filesystem root. @param userPath the user's path to lookup() @param attributes the user's attributes to lookup() @param path the normalized path @return the selected path
[ "Lookup", "the", "actual", "path", "relative", "to", "the", "filesystem", "root", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/ClasspathPath.java#L76-L81
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ArrayList.java
ArrayList.subList
public List<E> subList(int fromIndex, int toIndex) { """ Returns a view of the portion of this list between the specified {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the returned list is empty.) The returned list is backed by this list, so...
java
public List<E> subList(int fromIndex, int toIndex) { subListRangeCheck(fromIndex, toIndex, size); return new SubList(this, 0, fromIndex, toIndex); }
[ "public", "List", "<", "E", ">", "subList", "(", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "subListRangeCheck", "(", "fromIndex", ",", "toIndex", ",", "size", ")", ";", "return", "new", "SubList", "(", "this", ",", "0", ",", "fromIndex", ","...
Returns a view of the portion of this list between the specified {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in thi...
[ "Returns", "a", "view", "of", "the", "portion", "of", "this", "list", "between", "the", "specified", "{", "@code", "fromIndex", "}", "inclusive", "and", "{", "@code", "toIndex", "}", "exclusive", ".", "(", "If", "{", "@code", "fromIndex", "}", "and", "{"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ArrayList.java#L1005-L1008
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/json/JsonArray.java
JsonArray.set
public JsonArray set(int index, int value) { """ Replaces the element at the specified position in this array with the JSON representation of the specified <code>int</code> value. @param index the index of the array element to replace @param value the value to be stored at the specified array position @ret...
java
public JsonArray set(int index, int value) { values.set(index, Json.value(value)); return this; }
[ "public", "JsonArray", "set", "(", "int", "index", ",", "int", "value", ")", "{", "values", ".", "set", "(", "index", ",", "Json", ".", "value", "(", "value", ")", ")", ";", "return", "this", ";", "}" ]
Replaces the element at the specified position in this array with the JSON representation of the specified <code>int</code> value. @param index the index of the array element to replace @param value the value to be stored at the specified array position @return the array itself, to enable method chaining @throws Index...
[ "Replaces", "the", "element", "at", "the", "specified", "position", "in", "this", "array", "with", "the", "JSON", "representation", "of", "the", "specified", "<code", ">", "int<", "/", "code", ">", "value", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/json/JsonArray.java#L259-L262
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy2.java
Hierarchy2.findExactMethod
public static XMethod findExactMethod(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser chooser) { """ Look up the method referenced by given InvokeInstruction. This method does <em>not</em> look for implementations in super or subclasses according to the virtual dispatch rules. @param inv...
java
public static XMethod findExactMethod(InvokeInstruction inv, ConstantPoolGen cpg, JavaClassAndMethodChooser chooser) { String className = inv.getClassName(cpg); String methodName = inv.getName(cpg); String methodSig = inv.getSignature(cpg); XMethod result = findMethod(DescriptorFact...
[ "public", "static", "XMethod", "findExactMethod", "(", "InvokeInstruction", "inv", ",", "ConstantPoolGen", "cpg", ",", "JavaClassAndMethodChooser", "chooser", ")", "{", "String", "className", "=", "inv", ".", "getClassName", "(", "cpg", ")", ";", "String", "method...
Look up the method referenced by given InvokeInstruction. This method does <em>not</em> look for implementations in super or subclasses according to the virtual dispatch rules. @param inv the InvokeInstruction @param cpg the ConstantPoolGen used by the class the InvokeInstruction belongs to @param chooser JavaClassAnd...
[ "Look", "up", "the", "method", "referenced", "by", "given", "InvokeInstruction", ".", "This", "method", "does", "<em", ">", "not<", "/", "em", ">", "look", "for", "implementations", "in", "super", "or", "subclasses", "according", "to", "the", "virtual", "dis...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy2.java#L85-L95
google/closure-compiler
src/com/google/javascript/jscomp/ControlFlowAnalysis.java
ControlFlowAnalysis.isBreakStructure
static boolean isBreakStructure(Node n, boolean labeled) { """ Determines whether the given node can be terminated with a BREAK node. """ switch (n.getToken()) { case FOR: case FOR_IN: case FOR_OF: case FOR_AWAIT_OF: case DO: case WHILE: case SWITCH: return...
java
static boolean isBreakStructure(Node n, boolean labeled) { switch (n.getToken()) { case FOR: case FOR_IN: case FOR_OF: case FOR_AWAIT_OF: case DO: case WHILE: case SWITCH: return true; case BLOCK: case ROOT: case IF: case TRY: return ...
[ "static", "boolean", "isBreakStructure", "(", "Node", "n", ",", "boolean", "labeled", ")", "{", "switch", "(", "n", ".", "getToken", "(", ")", ")", "{", "case", "FOR", ":", "case", "FOR_IN", ":", "case", "FOR_OF", ":", "case", "FOR_AWAIT_OF", ":", "cas...
Determines whether the given node can be terminated with a BREAK node.
[ "Determines", "whether", "the", "given", "node", "can", "be", "terminated", "with", "a", "BREAK", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ControlFlowAnalysis.java#L994-L1012
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/jamp/InJamp.java
InJamp.readMessage
public MessageType readMessage(Reader is) throws IOException { """ Reads the next HMTP packet from the stream, returning false on end of file. """ JsonReaderImpl jIn = new JsonReaderImpl(is, _jsonFactory); return readMessage(jIn); }
java
public MessageType readMessage(Reader is) throws IOException { JsonReaderImpl jIn = new JsonReaderImpl(is, _jsonFactory); return readMessage(jIn); }
[ "public", "MessageType", "readMessage", "(", "Reader", "is", ")", "throws", "IOException", "{", "JsonReaderImpl", "jIn", "=", "new", "JsonReaderImpl", "(", "is", ",", "_jsonFactory", ")", ";", "return", "readMessage", "(", "jIn", ")", ";", "}" ]
Reads the next HMTP packet from the stream, returning false on end of file.
[ "Reads", "the", "next", "HMTP", "packet", "from", "the", "stream", "returning", "false", "on", "end", "of", "file", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/jamp/InJamp.java#L187-L193
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java
JBBPUtils.reverseByteOrder
public static long reverseByteOrder(long value, int numOfLowerBytesToInvert) { """ Revert order for defined number of bytes in a value. @param value the value which bytes should be reordered @param numOfLowerBytesToInvert number of lower bytes to be reverted in their order, must be 1..8 @re...
java
public static long reverseByteOrder(long value, int numOfLowerBytesToInvert) { if (numOfLowerBytesToInvert < 1 || numOfLowerBytesToInvert > 8) { throw new IllegalArgumentException("Wrong number of bytes [" + numOfLowerBytesToInvert + ']'); } long result = 0; int offsetInResult = (numOfLowerBytes...
[ "public", "static", "long", "reverseByteOrder", "(", "long", "value", ",", "int", "numOfLowerBytesToInvert", ")", "{", "if", "(", "numOfLowerBytesToInvert", "<", "1", "||", "numOfLowerBytesToInvert", ">", "8", ")", "{", "throw", "new", "IllegalArgumentException", ...
Revert order for defined number of bytes in a value. @param value the value which bytes should be reordered @param numOfLowerBytesToInvert number of lower bytes to be reverted in their order, must be 1..8 @return new value which has reverted order for defined number of lower bytes @since 1.1
[ "Revert", "order", "for", "defined", "number", "of", "bytes", "in", "a", "value", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java#L676-L693
alkacon/opencms-core
src/org/opencms/ui/apps/lists/CmsResultFacets.java
CmsResultFacets.displayFacetResult
public void displayFacetResult(CmsSolrResultList solrResultList, CmsSearchResultWrapper resultWrapper) { """ Displays the result facets.<p> @param solrResultList the search result @param resultWrapper the result wrapper """ removeAllComponents(); Component categories = prepareCategoryFacet...
java
public void displayFacetResult(CmsSolrResultList solrResultList, CmsSearchResultWrapper resultWrapper) { removeAllComponents(); Component categories = prepareCategoryFacets(solrResultList, resultWrapper); if (categories != null) { addComponent(categories); } Componen...
[ "public", "void", "displayFacetResult", "(", "CmsSolrResultList", "solrResultList", ",", "CmsSearchResultWrapper", "resultWrapper", ")", "{", "removeAllComponents", "(", ")", ";", "Component", "categories", "=", "prepareCategoryFacets", "(", "solrResultList", ",", "result...
Displays the result facets.<p> @param solrResultList the search result @param resultWrapper the result wrapper
[ "Displays", "the", "result", "facets", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/lists/CmsResultFacets.java#L120-L135
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/JSONValue.java
JSONValue.writeJSONString
@SuppressWarnings("unchecked") public static void writeJSONString(Object value, Appendable out, JSONStyle compression) throws IOException { """ Encode an object into JSON text and write it to out. <p> If this object is a Map or a List, and it's also a JSONStreamAware or a JSONAware, JSONStreamAware or JSONAwar...
java
@SuppressWarnings("unchecked") public static void writeJSONString(Object value, Appendable out, JSONStyle compression) throws IOException { if (value == null) { out.append("null"); return; } Class<?> clz = value.getClass(); @SuppressWarnings("rawtypes") JsonWriterI w = defaultWriter.getWrite(clz); if...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "void", "writeJSONString", "(", "Object", "value", ",", "Appendable", "out", ",", "JSONStyle", "compression", ")", "throws", "IOException", "{", "if", "(", "value", "==", "null", ")", "{",...
Encode an object into JSON text and write it to out. <p> If this object is a Map or a List, and it's also a JSONStreamAware or a JSONAware, JSONStreamAware or JSONAware will be considered firstly. <p> @see JSONObject#writeJSON(Map, Appendable) @see JSONArray#writeJSONString(List, Appendable)
[ "Encode", "an", "object", "into", "JSON", "text", "and", "write", "it", "to", "out", ".", "<p", ">", "If", "this", "object", "is", "a", "Map", "or", "a", "List", "and", "it", "s", "also", "a", "JSONStreamAware", "or", "a", "JSONAware", "JSONStreamAware...
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/JSONValue.java#L566-L587
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/SOS.java
SOS.nominateNeighbors
public static void nominateNeighbors(DBIDIter ignore, DBIDArrayIter di, double[] p, double norm, WritableDoubleDataStore scores) { """ Vote for neighbors not being outliers. The key method of SOS. @param ignore Object to ignore @param di Neighbor object IDs. @param p Probabilities @param norm Normalization f...
java
public static void nominateNeighbors(DBIDIter ignore, DBIDArrayIter di, double[] p, double norm, WritableDoubleDataStore scores) { for(di.seek(0); di.valid(); di.advance()) { if(DBIDUtil.equal(ignore, di)) { continue; } double v = p[di.getOffset()] * norm; // Normalize if(!(v > 0)) {...
[ "public", "static", "void", "nominateNeighbors", "(", "DBIDIter", "ignore", ",", "DBIDArrayIter", "di", ",", "double", "[", "]", "p", ",", "double", "norm", ",", "WritableDoubleDataStore", "scores", ")", "{", "for", "(", "di", ".", "seek", "(", "0", ")", ...
Vote for neighbors not being outliers. The key method of SOS. @param ignore Object to ignore @param di Neighbor object IDs. @param p Probabilities @param norm Normalization factor (1/sum) @param scores Output score storage
[ "Vote", "for", "neighbors", "not", "being", "outliers", ".", "The", "key", "method", "of", "SOS", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/SOS.java#L188-L199
jboss/jboss-common-beans
src/main/java/org/jboss/common/beans/property/LongEditor.java
LongEditor.setAsText
@Override public void setAsText(final String text) { """ Map the argument text into and Integer using Integer.valueOf. """ if (BeanUtils.isNull(text)) { setValue(null); return; } try { Object newValue = Long.valueOf(text); setValue(new...
java
@Override public void setAsText(final String text) { if (BeanUtils.isNull(text)) { setValue(null); return; } try { Object newValue = Long.valueOf(text); setValue(newValue); } catch (NumberFormatException e) { throw new Illeg...
[ "@", "Override", "public", "void", "setAsText", "(", "final", "String", "text", ")", "{", "if", "(", "BeanUtils", ".", "isNull", "(", "text", ")", ")", "{", "setValue", "(", "null", ")", ";", "return", ";", "}", "try", "{", "Object", "newValue", "=",...
Map the argument text into and Integer using Integer.valueOf.
[ "Map", "the", "argument", "text", "into", "and", "Integer", "using", "Integer", ".", "valueOf", "." ]
train
https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/LongEditor.java#L38-L50
graknlabs/grakn
server/src/graql/util/Partition.java
Partition.sameComponent
public boolean sameComponent(V a, V b) { """ Determines whether the two items are in the same component or not """ return componentOf(a).equals(componentOf(b)); }
java
public boolean sameComponent(V a, V b) { return componentOf(a).equals(componentOf(b)); }
[ "public", "boolean", "sameComponent", "(", "V", "a", ",", "V", "b", ")", "{", "return", "componentOf", "(", "a", ")", ".", "equals", "(", "componentOf", "(", "b", ")", ")", ";", "}" ]
Determines whether the two items are in the same component or not
[ "Determines", "whether", "the", "two", "items", "are", "in", "the", "same", "component", "or", "not" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/util/Partition.java#L95-L97
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/internal/DatabaseURIHelper.java
DatabaseURIHelper.changesUri
public URI changesUri(Map<String, Object> query) { """ Returns URI for {@code _changes} endpoint using passed {@code query}. """ //lets find the since parameter if(query.containsKey("since")){ Object since = query.get("since"); if(!(since instanceof String)){ ...
java
public URI changesUri(Map<String, Object> query) { //lets find the since parameter if(query.containsKey("since")){ Object since = query.get("since"); if(!(since instanceof String)){ //json encode the seq number since it isn't a string Gson gson = ...
[ "public", "URI", "changesUri", "(", "Map", "<", "String", ",", "Object", ">", "query", ")", "{", "//lets find the since parameter", "if", "(", "query", ".", "containsKey", "(", "\"since\"", ")", ")", "{", "Object", "since", "=", "query", ".", "get", "(", ...
Returns URI for {@code _changes} endpoint using passed {@code query}.
[ "Returns", "URI", "for", "{" ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/internal/DatabaseURIHelper.java#L73-L85
apiman/apiman
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/AbstractMappedPolicy.java
AbstractMappedPolicy.doApply
protected void doApply(ApiResponse response, IPolicyContext context, C config, IPolicyChain<ApiResponse> chain) { """ Apply the policy to the response. @param response @param context @param config @param chain """ chain.doApply(response); }
java
protected void doApply(ApiResponse response, IPolicyContext context, C config, IPolicyChain<ApiResponse> chain) { chain.doApply(response); }
[ "protected", "void", "doApply", "(", "ApiResponse", "response", ",", "IPolicyContext", "context", ",", "C", "config", ",", "IPolicyChain", "<", "ApiResponse", ">", "chain", ")", "{", "chain", ".", "doApply", "(", "response", ")", ";", "}" ]
Apply the policy to the response. @param response @param context @param config @param chain
[ "Apply", "the", "policy", "to", "the", "response", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/AbstractMappedPolicy.java#L101-L103
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.writeOrganizationalUnit
public void writeOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit) throws CmsException { """ Writes an already existing organizational unit.<p> The organizational unit id has to be a valid OpenCms organizational unit id.<br> The organizational unit with the given id will be c...
java
public void writeOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit) throws CmsException { m_monitor.uncacheOrgUnit(organizationalUnit); getUserDriver(dbc).writeOrganizationalUnit(dbc, organizationalUnit); // create a publish list for the 'virtual' publish event ...
[ "public", "void", "writeOrganizationalUnit", "(", "CmsDbContext", "dbc", ",", "CmsOrganizationalUnit", "organizationalUnit", ")", "throws", "CmsException", "{", "m_monitor", ".", "uncacheOrgUnit", "(", "organizationalUnit", ")", ";", "getUserDriver", "(", "dbc", ")", ...
Writes an already existing organizational unit.<p> The organizational unit id has to be a valid OpenCms organizational unit id.<br> The organizational unit with the given id will be completely overridden by the given data.<p> @param dbc the current db context @param organizationalUnit the organizational unit that sh...
[ "Writes", "an", "already", "existing", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L9905-L9930
phax/ph-web
ph-web/src/main/java/com/helger/web/multipart/MultipartStream.java
MultipartStream.findByte
@CheckForSigned protected int findByte (final byte nValue, final int nPos) { """ Searches for a byte of specified value in the <code>buffer</code>, starting at the specified <code>position</code>. @param nValue The value to find. @param nPos The starting position for searching. @return The position of by...
java
@CheckForSigned protected int findByte (final byte nValue, final int nPos) { for (int i = nPos; i < m_nTail; i++) if (m_aBuffer[i] == nValue) return i; return -1; }
[ "@", "CheckForSigned", "protected", "int", "findByte", "(", "final", "byte", "nValue", ",", "final", "int", "nPos", ")", "{", "for", "(", "int", "i", "=", "nPos", ";", "i", "<", "m_nTail", ";", "i", "++", ")", "if", "(", "m_aBuffer", "[", "i", "]",...
Searches for a byte of specified value in the <code>buffer</code>, starting at the specified <code>position</code>. @param nValue The value to find. @param nPos The starting position for searching. @return The position of byte found, counting from beginning of the <code>buffer</code>, or <code>-1</code> if not found.
[ "Searches", "for", "a", "byte", "of", "specified", "value", "in", "the", "<code", ">", "buffer<", "/", "code", ">", "starting", "at", "the", "specified", "<code", ">", "position<", "/", "code", ">", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/multipart/MultipartStream.java#L546-L553
james-hu/jabb-core
src/main/java/net/sf/jabb/spring/rest/AbstractRestClient.java
AbstractRestClient.buildBasicAuthValue
protected String buildBasicAuthValue(String key) { """ Build the value to be used in HTTP Basic Authentication header @param key the API key @return the value to be used for header 'Authorization' """ String base64Creds; try { base64Creds = key == null ? "" : Base64.encodeBase64String(key.getBytes("...
java
protected String buildBasicAuthValue(String key){ String base64Creds; try { base64Creds = key == null ? "" : Base64.encodeBase64String(key.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new IllegalStateException("Failed to encode", e); } return "Basic " + base64Creds; }
[ "protected", "String", "buildBasicAuthValue", "(", "String", "key", ")", "{", "String", "base64Creds", ";", "try", "{", "base64Creds", "=", "key", "==", "null", "?", "\"\"", ":", "Base64", ".", "encodeBase64String", "(", "key", ".", "getBytes", "(", "\"UTF-8...
Build the value to be used in HTTP Basic Authentication header @param key the API key @return the value to be used for header 'Authorization'
[ "Build", "the", "value", "to", "be", "used", "in", "HTTP", "Basic", "Authentication", "header" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/spring/rest/AbstractRestClient.java#L561-L569
leadware/jpersistence-tools
jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java
JPAGenericDAORulesBasedImpl.addProperties
protected void addProperties(Root<T> root, CriteriaQuery<T> query, Set<String> properties) { """ Methode d'ajout des Proprietes a charger a la requete de recherche @param root Entités objet du from @param query Requete sur l'entité @param properties Conteneur de propriétés """ // Ajout des ppt add...
java
protected void addProperties(Root<T> root, CriteriaQuery<T> query, Set<String> properties) { // Ajout des ppt addProperties(root, properties); // On positionne le distict query.distinct(true); }
[ "protected", "void", "addProperties", "(", "Root", "<", "T", ">", "root", ",", "CriteriaQuery", "<", "T", ">", "query", ",", "Set", "<", "String", ">", "properties", ")", "{", "// Ajout des ppt\r", "addProperties", "(", "root", ",", "properties", ")", ";",...
Methode d'ajout des Proprietes a charger a la requete de recherche @param root Entités objet du from @param query Requete sur l'entité @param properties Conteneur de propriétés
[ "Methode", "d", "ajout", "des", "Proprietes", "a", "charger", "a", "la", "requete", "de", "recherche" ]
train
https://github.com/leadware/jpersistence-tools/blob/4c15372993584579d7dbb9b23dd4c0c0fdc9e789/jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/core/dao/impl/JPAGenericDAORulesBasedImpl.java#L776-L783
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressPersistenceImpl.java
CommerceAddressPersistenceImpl.findByG_C_C
@Override public List<CommerceAddress> findByG_C_C(long groupId, long classNameId, long classPK, int start, int end) { """ Returns a range of all the commerce addresses where groupId = &#63; and classNameId = &#63; and classPK = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - sta...
java
@Override public List<CommerceAddress> findByG_C_C(long groupId, long classNameId, long classPK, int start, int end) { return findByG_C_C(groupId, classNameId, classPK, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAddress", ">", "findByG_C_C", "(", "long", "groupId", ",", "long", "classNameId", ",", "long", "classPK", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_C_C", "(", "groupId", ",", "clas...
Returns a range of all the commerce addresses where groupId = &#63; and classNameId = &#63; and classPK = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "addresses", "where", "groupId", "=", "&#63", ";", "and", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressPersistenceImpl.java#L1738-L1742
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/AbstractKMeans.java
AbstractKMeans.plusMinusEquals
public static void plusMinusEquals(double[] add, double[] sub, NumberVector vec) { """ Add to one, remove from another. @param add Array to add to @param sub Array to remove from @param vec Vector to subtract """ for(int d = 0; d < add.length; d++) { final double v = vec.doubleValue(d); ad...
java
public static void plusMinusEquals(double[] add, double[] sub, NumberVector vec) { for(int d = 0; d < add.length; d++) { final double v = vec.doubleValue(d); add[d] += v; sub[d] -= v; } }
[ "public", "static", "void", "plusMinusEquals", "(", "double", "[", "]", "add", ",", "double", "[", "]", "sub", ",", "NumberVector", "vec", ")", "{", "for", "(", "int", "d", "=", "0", ";", "d", "<", "add", ".", "length", ";", "d", "++", ")", "{", ...
Add to one, remove from another. @param add Array to add to @param sub Array to remove from @param vec Vector to subtract
[ "Add", "to", "one", "remove", "from", "another", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/AbstractKMeans.java#L208-L214
dadoonet/fscrawler
framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/FsCrawlerUtil.java
FsCrawlerUtil.copyDirs
public static void copyDirs(Path source, Path target, CopyOption... options) throws IOException { """ Copy files from a source to a target under a _default sub directory. @param source The source dir @param target The target dir @param options Potential options @throws IOException If copying does not work ...
java
public static void copyDirs(Path source, Path target, CopyOption... options) throws IOException { if (Files.notExists(target)) { Files.createDirectory(target); } logger.debug(" --> Copying resources from [{}]", source); if (Files.notExists(source)) { throw new R...
[ "public", "static", "void", "copyDirs", "(", "Path", "source", ",", "Path", "target", ",", "CopyOption", "...", "options", ")", "throws", "IOException", "{", "if", "(", "Files", ".", "notExists", "(", "target", ")", ")", "{", "Files", ".", "createDirectory...
Copy files from a source to a target under a _default sub directory. @param source The source dir @param target The target dir @param options Potential options @throws IOException If copying does not work
[ "Copy", "files", "from", "a", "source", "to", "a", "target", "under", "a", "_default", "sub", "directory", "." ]
train
https://github.com/dadoonet/fscrawler/blob/cca00a14e21ef9986aa30e19b160463aed6bf921/framework/src/main/java/fr/pilato/elasticsearch/crawler/fs/framework/FsCrawlerUtil.java#L488-L502
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/cloud/storage/StorageObjectSummary.java
StorageObjectSummary.createFromAzureListBlobItem
public static StorageObjectSummary createFromAzureListBlobItem(ListBlobItem listBlobItem) throws StorageProviderException { """ Contructs a StorageObjectSummary object from Azure BLOB properties Using factory methods to create these objects since Azure can throw, while retrieving the BLOB properties @param ...
java
public static StorageObjectSummary createFromAzureListBlobItem(ListBlobItem listBlobItem) throws StorageProviderException { String location, key, md5; long size; // Retrieve the BLOB properties that we need for the Summary // Azure Storage stores metadata inside each BLOB, therefore the listBlobIte...
[ "public", "static", "StorageObjectSummary", "createFromAzureListBlobItem", "(", "ListBlobItem", "listBlobItem", ")", "throws", "StorageProviderException", "{", "String", "location", ",", "key", ",", "md5", ";", "long", "size", ";", "// Retrieve the BLOB properties that we n...
Contructs a StorageObjectSummary object from Azure BLOB properties Using factory methods to create these objects since Azure can throw, while retrieving the BLOB properties @param listBlobItem an Azure ListBlobItem object @return the ObjectSummary object created
[ "Contructs", "a", "StorageObjectSummary", "object", "from", "Azure", "BLOB", "properties", "Using", "factory", "methods", "to", "create", "these", "objects", "since", "Azure", "can", "throw", "while", "retrieving", "the", "BLOB", "properties" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/StorageObjectSummary.java#L69-L102
alkacon/opencms-core
src/org/opencms/report/CmsClassicJavascriptReportUpdateFormatter.java
CmsClassicJavascriptReportUpdateFormatter.formatException
private String formatException(Throwable throwable) { """ Generates the formatted output for an exception.<P> @param throwable the exception @return the formatted output """ StringBuffer buf = new StringBuffer(); buf.append("aT('"); buf.append(Messages.get().getBundle(m_locale).k...
java
private String formatException(Throwable throwable) { StringBuffer buf = new StringBuffer(); buf.append("aT('"); buf.append(Messages.get().getBundle(m_locale).key(Messages.RPT_EXCEPTION_0)); String exception = CmsEncoder.escapeXml(CmsException.getStackTraceAsString(throwable)); ...
[ "private", "String", "formatException", "(", "Throwable", "throwable", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "\"aT('\"", ")", ";", "buf", ".", "append", "(", "Messages", ".", "get", "(", ")...
Generates the formatted output for an exception.<P> @param throwable the exception @return the formatted output
[ "Generates", "the", "formatted", "output", "for", "an", "exception", ".", "<P", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/report/CmsClassicJavascriptReportUpdateFormatter.java#L84-L99
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java
DateFormatSymbols.setLeapMonthPattern
@Deprecated public void setLeapMonthPattern(String leapMonthPattern, int context, int width) { """ Sets a leapMonthPattern, for example: "{0}bis" @param leapMonthPattern The new leapMonthPattern. @param context The usage context: FORMAT, STANDALONE, NUMERIC. @param width The name width: WIDE, ABBREVI...
java
@Deprecated public void setLeapMonthPattern(String leapMonthPattern, int context, int width) { if (leapMonthPatterns != null) { int leapMonthPatternIndex = -1; switch (context) { case FORMAT : switch(width) { case WIDE : ...
[ "@", "Deprecated", "public", "void", "setLeapMonthPattern", "(", "String", "leapMonthPattern", ",", "int", "context", ",", "int", "width", ")", "{", "if", "(", "leapMonthPatterns", "!=", "null", ")", "{", "int", "leapMonthPatternIndex", "=", "-", "1", ";", "...
Sets a leapMonthPattern, for example: "{0}bis" @param leapMonthPattern The new leapMonthPattern. @param context The usage context: FORMAT, STANDALONE, NUMERIC. @param width The name width: WIDE, ABBREVIATED, NARROW. @deprecated This API is ICU internal only. @hide original deprecated declaration @hide draft / pr...
[ "Sets", "a", "leapMonthPattern", "for", "example", ":", "{", "0", "}", "bis" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L1219-L1264
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/FileUtils.java
FileUtils.listFiles
public static File[] listFiles(final File aDir, final FilenameFilter aFilter) throws FileNotFoundException { """ An array of all the files in the supplied directory that match the supplied <code>FilenameFilter</code>. @param aDir A directory from which a file listing should be returned @param aFilter A file na...
java
public static File[] listFiles(final File aDir, final FilenameFilter aFilter) throws FileNotFoundException { return listFiles(aDir, aFilter, false, (String[]) null); }
[ "public", "static", "File", "[", "]", "listFiles", "(", "final", "File", "aDir", ",", "final", "FilenameFilter", "aFilter", ")", "throws", "FileNotFoundException", "{", "return", "listFiles", "(", "aDir", ",", "aFilter", ",", "false", ",", "(", "String", "["...
An array of all the files in the supplied directory that match the supplied <code>FilenameFilter</code>. @param aDir A directory from which a file listing should be returned @param aFilter A file name filter which returned files should match @return An array of matching files @throws FileNotFoundException If the suppl...
[ "An", "array", "of", "all", "the", "files", "in", "the", "supplied", "directory", "that", "match", "the", "supplied", "<code", ">", "FilenameFilter<", "/", "code", ">", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/FileUtils.java#L342-L344
OpenLiberty/open-liberty
dev/com.ibm.ws.app.manager/src/com/ibm/ws/app/manager/internal/monitor/DropinMonitor.java
DropinMonitor.tidyUpMonitoredDirectory
private void tidyUpMonitoredDirectory(boolean createdDir, File dirToCleanup) { """ Clean up the monitored directory if we built it and it is empty. (i.e. clean up after ourselves if we can) """ if (createdDir && dirToCleanup != null) { File[] fileListing = dirToCleanup.listFiles(); ...
java
private void tidyUpMonitoredDirectory(boolean createdDir, File dirToCleanup) { if (createdDir && dirToCleanup != null) { File[] fileListing = dirToCleanup.listFiles(); if (fileListing == null || fileListing.length == 0) { if (!!!dirToCleanup.delete()) { ...
[ "private", "void", "tidyUpMonitoredDirectory", "(", "boolean", "createdDir", ",", "File", "dirToCleanup", ")", "{", "if", "(", "createdDir", "&&", "dirToCleanup", "!=", "null", ")", "{", "File", "[", "]", "fileListing", "=", "dirToCleanup", ".", "listFiles", "...
Clean up the monitored directory if we built it and it is empty. (i.e. clean up after ourselves if we can)
[ "Clean", "up", "the", "monitored", "directory", "if", "we", "built", "it", "and", "it", "is", "empty", ".", "(", "i", ".", "e", ".", "clean", "up", "after", "ourselves", "if", "we", "can", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.app.manager/src/com/ibm/ws/app/manager/internal/monitor/DropinMonitor.java#L295-L307
deeplearning4j/deeplearning4j
nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java
TensorflowConversion.loadSavedModel
public TF_Session loadSavedModel(SavedModelConfig savedModelConfig, TF_SessionOptions options, TF_Buffer runOptions, TF_Graph graph, Map<String, String> inputsMap, Map<String, String> outputsMap, TF_Status status) { """ Load a session based on the saved model @param savedModelConfig the configuration for the save...
java
public TF_Session loadSavedModel(SavedModelConfig savedModelConfig, TF_SessionOptions options, TF_Buffer runOptions, TF_Graph graph, Map<String, String> inputsMap, Map<String, String> outputsMap, TF_Status status) { TF_Buffer metaGraph = TF_Buffer.newBuffer(); TF_Session session = TF_LoadSessionFromSave...
[ "public", "TF_Session", "loadSavedModel", "(", "SavedModelConfig", "savedModelConfig", ",", "TF_SessionOptions", "options", ",", "TF_Buffer", "runOptions", ",", "TF_Graph", "graph", ",", "Map", "<", "String", ",", "String", ">", "inputsMap", ",", "Map", "<", "Stri...
Load a session based on the saved model @param savedModelConfig the configuration for the saved model @param options the session options to use @param runOptions the run configuration to use @param graph the tf graph to use @param inputsMap the input map @param outputsMap the output names @param status the status obje...
[ "Load", "a", "session", "based", "on", "the", "saved", "model" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-tensorflow/src/main/java/org/nd4j/tensorflow/conversion/TensorflowConversion.java#L357-L385
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.getValidSkusAsync
public Observable<Page<IotHubSkuDescriptionInner>> getValidSkusAsync(final String resourceGroupName, final String resourceName) { """ Get the list of valid SKUs for an IoT hub. Get the list of valid SKUs for an IoT hub. @param resourceGroupName The name of the resource group that contains the IoT hub. @param ...
java
public Observable<Page<IotHubSkuDescriptionInner>> getValidSkusAsync(final String resourceGroupName, final String resourceName) { return getValidSkusWithServiceResponseAsync(resourceGroupName, resourceName) .map(new Func1<ServiceResponse<Page<IotHubSkuDescriptionInner>>, Page<IotHubSkuDescriptionInn...
[ "public", "Observable", "<", "Page", "<", "IotHubSkuDescriptionInner", ">", ">", "getValidSkusAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "resourceName", ")", "{", "return", "getValidSkusWithServiceResponseAsync", "(", "resourceGroupName",...
Get the list of valid SKUs for an IoT hub. Get the list of valid SKUs for an IoT hub. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of the IoT hub. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the P...
[ "Get", "the", "list", "of", "valid", "SKUs", "for", "an", "IoT", "hub", ".", "Get", "the", "list", "of", "valid", "SKUs", "for", "an", "IoT", "hub", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L1545-L1553
EdwardRaff/JSAT
JSAT/src/jsat/text/tokenizer/NaiveTokenizer.java
NaiveTokenizer.setMinTokenLength
public void setMinTokenLength(int minTokenLength) { """ Sets the minimum allowed token length. Any token discovered shorter than the minimum length will not be accepted and skipped over. The default is 0. @param minTokenLength the minimum length for a token to be used """ if(minTokenLength < 0) ...
java
public void setMinTokenLength(int minTokenLength) { if(minTokenLength < 0) throw new IllegalArgumentException("Minimum token length must be non negative, not " + minTokenLength); if(minTokenLength > maxTokenLength) throw new IllegalArgumentException("Minimum token length can ...
[ "public", "void", "setMinTokenLength", "(", "int", "minTokenLength", ")", "{", "if", "(", "minTokenLength", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"Minimum token length must be non negative, not \"", "+", "minTokenLength", ")", ";", "if", "(...
Sets the minimum allowed token length. Any token discovered shorter than the minimum length will not be accepted and skipped over. The default is 0. @param minTokenLength the minimum length for a token to be used
[ "Sets", "the", "minimum", "allowed", "token", "length", ".", "Any", "token", "discovered", "shorter", "than", "the", "minimum", "length", "will", "not", "be", "accepted", "and", "skipped", "over", ".", "The", "default", "is", "0", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/text/tokenizer/NaiveTokenizer.java#L161-L168
awin/rabbiteasy
rabbiteasy-cdi/src/main/java/com/zanox/rabbiteasy/cdi/EventPublisher.java
EventPublisher.providePublisher
MessagePublisher providePublisher(PublisherReliability reliability, Class<?> eventType) { """ Provides a publisher with the specified reliability. Within the same thread, the same producer instance is provided for the given event type. @param reliability The desired publisher reliability @param eventType The ...
java
MessagePublisher providePublisher(PublisherReliability reliability, Class<?> eventType) { Map<Class<?>, MessagePublisher> localPublishers = publishers.get(); if (localPublishers == null) { localPublishers = new HashMap<Class<?>, MessagePublisher>(); publishers.set(localPublis...
[ "MessagePublisher", "providePublisher", "(", "PublisherReliability", "reliability", ",", "Class", "<", "?", ">", "eventType", ")", "{", "Map", "<", "Class", "<", "?", ">", ",", "MessagePublisher", ">", "localPublishers", "=", "publishers", ".", "get", "(", ")"...
Provides a publisher with the specified reliability. Within the same thread, the same producer instance is provided for the given event type. @param reliability The desired publisher reliability @param eventType The event type @return The provided publisher
[ "Provides", "a", "publisher", "with", "the", "specified", "reliability", ".", "Within", "the", "same", "thread", "the", "same", "producer", "instance", "is", "provided", "for", "the", "given", "event", "type", "." ]
train
https://github.com/awin/rabbiteasy/blob/c161efda6c0f7ef319aedf09dfe40a4a90165510/rabbiteasy-cdi/src/main/java/com/zanox/rabbiteasy/cdi/EventPublisher.java#L89-L101