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
RKumsher/utils
src/main/java/com/github/rkumsher/date/RandomDateUtils.java
RandomDateUtils.randomYear
public static Year randomYear(Year startInclusive, Year endExclusive) { """ Returns a random {@link Year} within the specified range. @param startInclusive the earliest {@link Year} that can be returned @param endExclusive the upper bound (not included) @return the random {@link Year} @throws IllegalArgument...
java
public static Year randomYear(Year startInclusive, Year endExclusive) { checkArgument(startInclusive != null, "Start must be non-null"); checkArgument(endExclusive != null, "End must be non-null"); return randomYear(startInclusive.getValue(), endExclusive.getValue()); }
[ "public", "static", "Year", "randomYear", "(", "Year", "startInclusive", ",", "Year", "endExclusive", ")", "{", "checkArgument", "(", "startInclusive", "!=", "null", ",", "\"Start must be non-null\"", ")", ";", "checkArgument", "(", "endExclusive", "!=", "null", "...
Returns a random {@link Year} within the specified range. @param startInclusive the earliest {@link Year} that can be returned @param endExclusive the upper bound (not included) @return the random {@link Year} @throws IllegalArgumentException if startInclusive or endExclusive are null, if endExclusive is earlier than ...
[ "Returns", "a", "random", "{", "@link", "Year", "}", "within", "the", "specified", "range", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/date/RandomDateUtils.java#L879-L883
MTDdk/jawn
jawn-core-new/src/main/java/net/javapla/jawn/core/util/ConvertUtil.java
ConvertUtil.toInteger
public static Integer toInteger(Object value) throws ConversionException { """ Converts value to Integer if it can. If value is an Integer, it is returned, if it is a Number, it is promoted to Integer and then returned, in all other cases, it converts the value to String, then tries to parse Integer from it. ...
java
public static Integer toInteger(Object value) throws ConversionException { if (value == null) { return null; } else if (value instanceof Number) { return ((Number)value).intValue(); } else { NumberFormat nf = new DecimalFormat(); try { ...
[ "public", "static", "Integer", "toInteger", "(", "Object", "value", ")", "throws", "ConversionException", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "value", "instanceof", "Number", ")", "{", "return", ...
Converts value to Integer if it can. If value is an Integer, it is returned, if it is a Number, it is promoted to Integer and then returned, in all other cases, it converts the value to String, then tries to parse Integer from it. @param value value to be converted to Integer. @return value converted to Integer. @thro...
[ "Converts", "value", "to", "Integer", "if", "it", "can", ".", "If", "value", "is", "an", "Integer", "it", "is", "returned", "if", "it", "is", "a", "Number", "it", "is", "promoted", "to", "Integer", "and", "then", "returned", "in", "all", "other", "case...
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core-new/src/main/java/net/javapla/jawn/core/util/ConvertUtil.java#L31-L44
Twitter4J/Twitter4J
twitter4j-core/src/main/java/twitter4j/conf/PropertyConfiguration.java
PropertyConfiguration.setFieldsWithTreePath
private void setFieldsWithTreePath(Properties props, String treePath) { """ passing "/foo/bar" as treePath will result:<br> 1. load [twitter4j.]restBaseURL<br> 2. override the value with foo.[twitter4j.]restBaseURL<br> 3. override the value with foo.bar.[twitter4j.]restBaseURL<br> @param props properties ...
java
private void setFieldsWithTreePath(Properties props, String treePath) { setFieldsWithPrefix(props, ""); String[] splitArray = treePath.split("/"); String prefix = null; for (String split : splitArray) { if (!"".equals(split)) { if (null == prefix) { ...
[ "private", "void", "setFieldsWithTreePath", "(", "Properties", "props", ",", "String", "treePath", ")", "{", "setFieldsWithPrefix", "(", "props", ",", "\"\"", ")", ";", "String", "[", "]", "splitArray", "=", "treePath", ".", "split", "(", "\"/\"", ")", ";", ...
passing "/foo/bar" as treePath will result:<br> 1. load [twitter4j.]restBaseURL<br> 2. override the value with foo.[twitter4j.]restBaseURL<br> 3. override the value with foo.bar.[twitter4j.]restBaseURL<br> @param props properties to be loaded @param treePath the path
[ "passing", "/", "foo", "/", "bar", "as", "treePath", "will", "result", ":", "<br", ">", "1", ".", "load", "[", "twitter4j", ".", "]", "restBaseURL<br", ">", "2", ".", "override", "the", "value", "with", "foo", ".", "[", "twitter4j", ".", "]", "restBa...
train
https://github.com/Twitter4J/Twitter4J/blob/8376fade8d557896bb9319fb46e39a55b134b166/twitter4j-core/src/main/java/twitter4j/conf/PropertyConfiguration.java#L215-L229
sebastiangraf/treetank
interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/Filelistener.java
Filelistener.addSubDirectory
private void addSubDirectory(Path root, Path filePath) throws IOException { """ In this method a subdirectory is being added to the system and watched. This is necessary since the {@link WatchService} doesn't support watching a folder with higher depths than 1. @param root @param filePath @throws IOExcept...
java
private void addSubDirectory(Path root, Path filePath) throws IOException { String listener = getListenerRootPath(root); List<String> listeners = mSubDirectories.get(listener); if (listeners != null) { if (mSubDirectories.get(listener).contains(filePath.toAbsolutePath())) { ...
[ "private", "void", "addSubDirectory", "(", "Path", "root", ",", "Path", "filePath", ")", "throws", "IOException", "{", "String", "listener", "=", "getListenerRootPath", "(", "root", ")", ";", "List", "<", "String", ">", "listeners", "=", "mSubDirectories", "."...
In this method a subdirectory is being added to the system and watched. This is necessary since the {@link WatchService} doesn't support watching a folder with higher depths than 1. @param root @param filePath @throws IOException
[ "In", "this", "method", "a", "subdirectory", "is", "being", "added", "to", "the", "system", "and", "watched", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/Filelistener.java#L413-L431
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.createFundamental
public static DMatrixRMaj createFundamental(DMatrixRMaj E, CameraPinhole intrinsic ) { """ Computes a Fundamental matrix given an Essential matrix and the camera's intrinsic parameters. @see #createFundamental(DMatrixRMaj, DMatrixRMaj) @param E Essential matrix @param intrinsic Intrinsic camera calibration...
java
public static DMatrixRMaj createFundamental(DMatrixRMaj E, CameraPinhole intrinsic ) { DMatrixRMaj K = PerspectiveOps.pinholeToMatrix(intrinsic,(DMatrixRMaj)null); return createFundamental(E,K); }
[ "public", "static", "DMatrixRMaj", "createFundamental", "(", "DMatrixRMaj", "E", ",", "CameraPinhole", "intrinsic", ")", "{", "DMatrixRMaj", "K", "=", "PerspectiveOps", ".", "pinholeToMatrix", "(", "intrinsic", ",", "(", "DMatrixRMaj", ")", "null", ")", ";", "re...
Computes a Fundamental matrix given an Essential matrix and the camera's intrinsic parameters. @see #createFundamental(DMatrixRMaj, DMatrixRMaj) @param E Essential matrix @param intrinsic Intrinsic camera calibration @return Fundamental matrix
[ "Computes", "a", "Fundamental", "matrix", "given", "an", "Essential", "matrix", "and", "the", "camera", "s", "intrinsic", "parameters", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L707-L710
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.addTransitionPath
private void addTransitionPath(MDAGNode originNode, String str) { """ 给节点添加一个转移路径<br> Adds a _transition path starting from a specific node in the MDAG. @param originNode the MDAGNode which will serve as the start point of the to-be-created _transition path @param str the String to be used to create a ...
java
private void addTransitionPath(MDAGNode originNode, String str) { if (!str.isEmpty()) { MDAGNode currentNode = originNode; int charCount = str.length(); //Loop through the characters in str, iteratevely adding // a _transition path corresponding to it...
[ "private", "void", "addTransitionPath", "(", "MDAGNode", "originNode", ",", "String", "str", ")", "{", "if", "(", "!", "str", ".", "isEmpty", "(", ")", ")", "{", "MDAGNode", "currentNode", "=", "originNode", ";", "int", "charCount", "=", "str", ".", "len...
给节点添加一个转移路径<br> Adds a _transition path starting from a specific node in the MDAG. @param originNode the MDAGNode which will serve as the start point of the to-be-created _transition path @param str the String to be used to create a new _transition path from {@code originNode}
[ "给节点添加一个转移路径<br", ">", "Adds", "a", "_transition", "path", "starting", "from", "a", "specific", "node", "in", "the", "MDAG", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L574-L595
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.summarizeForPolicyDefinitionAsync
public Observable<SummarizeResultsInner> summarizeForPolicyDefinitionAsync(String subscriptionId, String policyDefinitionName, QueryOptions queryOptions) { """ Summarizes policy states for the subscription level policy definition. @param subscriptionId Microsoft Azure subscription ID. @param policyDefinitionNa...
java
public Observable<SummarizeResultsInner> summarizeForPolicyDefinitionAsync(String subscriptionId, String policyDefinitionName, QueryOptions queryOptions) { return summarizeForPolicyDefinitionWithServiceResponseAsync(subscriptionId, policyDefinitionName, queryOptions).map(new Func1<ServiceResponse<SummarizeResul...
[ "public", "Observable", "<", "SummarizeResultsInner", ">", "summarizeForPolicyDefinitionAsync", "(", "String", "subscriptionId", ",", "String", "policyDefinitionName", ",", "QueryOptions", "queryOptions", ")", "{", "return", "summarizeForPolicyDefinitionWithServiceResponseAsync",...
Summarizes policy states for the subscription level policy definition. @param subscriptionId Microsoft Azure subscription ID. @param policyDefinitionName Policy definition name. @param queryOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @return...
[ "Summarizes", "policy", "states", "for", "the", "subscription", "level", "policy", "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/PolicyStatesInner.java#L2395-L2402
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.splitEachLine
public static <T> T splitEachLine(CharSequence self, CharSequence regex, @ClosureParams(value=FromString.class,options="List<String>") Closure<T> closure) throws IOException { """ Iterates through the given CharSequence line by line, splitting each line using the given regex delimiter. The list of tokens for eac...
java
public static <T> T splitEachLine(CharSequence self, CharSequence regex, @ClosureParams(value=FromString.class,options="List<String>") Closure<T> closure) throws IOException { return splitEachLine(self, Pattern.compile(regex.toString()), closure); }
[ "public", "static", "<", "T", ">", "T", "splitEachLine", "(", "CharSequence", "self", ",", "CharSequence", "regex", ",", "@", "ClosureParams", "(", "value", "=", "FromString", ".", "class", ",", "options", "=", "\"List<String>\"", ")", "Closure", "<", "T", ...
Iterates through the given CharSequence line by line, splitting each line using the given regex delimiter. The list of tokens for each line is then passed to the given closure. @param self a CharSequence @param regex the delimiting regular expression @param closure a closure @return the last value returned by th...
[ "Iterates", "through", "the", "given", "CharSequence", "line", "by", "line", "splitting", "each", "line", "using", "the", "given", "regex", "delimiter", ".", "The", "list", "of", "tokens", "for", "each", "line", "is", "then", "passed", "to", "the", "given", ...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L2885-L2887
ansell/csvstream
src/main/java/com/github/ansell/csv/stream/CSVStream.java
CSVStream.newCSVWriter
public static SequenceWriter newCSVWriter(final OutputStream outputStream, CsvSchema schema) throws IOException { """ Returns a Jackson {@link SequenceWriter} which will write CSV lines to the given {@link OutputStream} using the {@link CsvSchema}. @param outputStream The writer which will receive the CSV fil...
java
public static SequenceWriter newCSVWriter(final OutputStream outputStream, CsvSchema schema) throws IOException { return defaultMapper().writerWithDefaultPrettyPrinter().with(schema).forType(List.class) .writeValues(outputStream); }
[ "public", "static", "SequenceWriter", "newCSVWriter", "(", "final", "OutputStream", "outputStream", ",", "CsvSchema", "schema", ")", "throws", "IOException", "{", "return", "defaultMapper", "(", ")", ".", "writerWithDefaultPrettyPrinter", "(", ")", ".", "with", "(",...
Returns a Jackson {@link SequenceWriter} which will write CSV lines to the given {@link OutputStream} using the {@link CsvSchema}. @param outputStream The writer which will receive the CSV file. @param schema The {@link CsvSchema} that will be used by the returned Jackson {@link SequenceWriter}. @return A Jackson {@li...
[ "Returns", "a", "Jackson", "{", "@link", "SequenceWriter", "}", "which", "will", "write", "CSV", "lines", "to", "the", "given", "{", "@link", "OutputStream", "}", "using", "the", "{", "@link", "CsvSchema", "}", "." ]
train
https://github.com/ansell/csvstream/blob/9468bfbd6997fbc4237eafc990ba811cd5905dc1/src/main/java/com/github/ansell/csv/stream/CSVStream.java#L497-L500
apache/incubator-gobblin
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/metrics/kafka/KafkaAvroSchemaRegistry.java
KafkaAvroSchemaRegistry.getSchemaByKey
@Override public Schema getSchemaByKey(String key) throws SchemaRegistryException { """ Get schema from schema registry by key @param key Schema key @return Schema with the corresponding key @throws SchemaRegistryException if failed to retrieve schema. """ try { return cachedSchemasByKeys.get(...
java
@Override public Schema getSchemaByKey(String key) throws SchemaRegistryException { try { return cachedSchemasByKeys.get(key); } catch (ExecutionException e) { throw new SchemaRegistryException(String.format("Schema with key %s cannot be retrieved", key), e); } }
[ "@", "Override", "public", "Schema", "getSchemaByKey", "(", "String", "key", ")", "throws", "SchemaRegistryException", "{", "try", "{", "return", "cachedSchemasByKeys", ".", "get", "(", "key", ")", ";", "}", "catch", "(", "ExecutionException", "e", ")", "{", ...
Get schema from schema registry by key @param key Schema key @return Schema with the corresponding key @throws SchemaRegistryException if failed to retrieve schema.
[ "Get", "schema", "from", "schema", "registry", "by", "key" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/metrics/kafka/KafkaAvroSchemaRegistry.java#L121-L128
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/portmap/Portmapper.java
Portmapper.handleRpcException
private static void handleRpcException(RpcException e, int attemptNumber, String server) throws IOException { """ Decide whether to retry or throw exception. @param e The exception. @param attemptNumber The number of attempts so far. @throws IOException """ String messageStart; if (!(e.g...
java
private static void handleRpcException(RpcException e, int attemptNumber, String server) throws IOException { String messageStart; if (!(e.getStatus().equals(RpcStatus.NETWORK_ERROR))) { messageStart = "network"; } else { // check whether to retry if (attemptN...
[ "private", "static", "void", "handleRpcException", "(", "RpcException", "e", ",", "int", "attemptNumber", ",", "String", "server", ")", "throws", "IOException", "{", "String", "messageStart", ";", "if", "(", "!", "(", "e", ".", "getStatus", "(", ")", ".", ...
Decide whether to retry or throw exception. @param e The exception. @param attemptNumber The number of attempts so far. @throws IOException
[ "Decide", "whether", "to", "retry", "or", "throw", "exception", "." ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/portmap/Portmapper.java#L113-L126
morimekta/utils
io-util/src/main/java/net/morimekta/util/Binary.java
Binary.toUUID
public UUID toUUID() { """ Get a UUID from the binary data.The UUID binary representation is equivalent to the hexadecimal representation of the UUID (sans dashes). See {@link UUID#toString()} and {@link UUID#fromString(String)}. @return The UUID representation of the 16 bytes. @throws IllegalStateException ...
java
public UUID toUUID() { if (length() != 16) { throw new IllegalStateException("Length not compatible with UUID: " + length() + " != 16"); } try (BinaryReader reader = new BigEndianBinaryReader(getInputStream())) { long mostSig = reader.expectLong(); long leastS...
[ "public", "UUID", "toUUID", "(", ")", "{", "if", "(", "length", "(", ")", "!=", "16", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Length not compatible with UUID: \"", "+", "length", "(", ")", "+", "\" != 16\"", ")", ";", "}", "try", "(", ...
Get a UUID from the binary data.The UUID binary representation is equivalent to the hexadecimal representation of the UUID (sans dashes). See {@link UUID#toString()} and {@link UUID#fromString(String)}. @return The UUID representation of the 16 bytes. @throws IllegalStateException If the binary does not have the corre...
[ "Get", "a", "UUID", "from", "the", "binary", "data", ".", "The", "UUID", "binary", "representation", "is", "equivalent", "to", "the", "hexadecimal", "representation", "of", "the", "UUID", "(", "sans", "dashes", ")", ".", "See", "{", "@link", "UUID#toString",...
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/Binary.java#L188-L200
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/impl/Indexes.java
Indexes.putEntry
public void putEntry(QueryableEntry queryableEntry, Object oldValue, Index.OperationSource operationSource) { """ Inserts a new queryable entry into this indexes instance or updates the existing one. @param queryableEntry the queryable entry to insert or update. @param oldValue the old entry value to ...
java
public void putEntry(QueryableEntry queryableEntry, Object oldValue, Index.OperationSource operationSource) { InternalIndex[] indexes = getIndexes(); for (InternalIndex index : indexes) { index.putEntry(queryableEntry, oldValue, operationSource); } }
[ "public", "void", "putEntry", "(", "QueryableEntry", "queryableEntry", ",", "Object", "oldValue", ",", "Index", ".", "OperationSource", "operationSource", ")", "{", "InternalIndex", "[", "]", "indexes", "=", "getIndexes", "(", ")", ";", "for", "(", "InternalInde...
Inserts a new queryable entry into this indexes instance or updates the existing one. @param queryableEntry the queryable entry to insert or update. @param oldValue the old entry value to update, {@code null} if inserting the new entry. @param operationSource the operation source.
[ "Inserts", "a", "new", "queryable", "entry", "into", "this", "indexes", "instance", "or", "updates", "the", "existing", "one", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/Indexes.java#L217-L222
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.beginSetSharedKey
public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { """ The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway con...
java
public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, ConnectionSharedKeyInner parameters) { return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); }
[ "public", "ConnectionSharedKeyInner", "beginSetSharedKey", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "ConnectionSharedKeyInner", "parameters", ")", "{", "return", "beginSetSharedKeyWithServiceResponseAsync", "(", "resourceGroupNa...
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnect...
[ "The", "Put", "VirtualNetworkGatewayConnectionSharedKey", "operation", "sets", "the", "virtual", "network", "gateway", "connection", "shared", "key", "for", "passed", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "through"...
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/VirtualNetworkGatewayConnectionsInner.java#L931-L933
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_quota_zone_PUT
public void serviceName_quota_zone_PUT(String serviceName, String zone, OvhQuota body) throws IOException { """ Alter this object properties REST: PUT /ipLoadbalancing/{serviceName}/quota/{zone} @param body [required] New object properties @param serviceName [required] The internal name of your IP load balanc...
java
public void serviceName_quota_zone_PUT(String serviceName, String zone, OvhQuota body) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/quota/{zone}"; StringBuilder sb = path(qPath, serviceName, zone); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_quota_zone_PUT", "(", "String", "serviceName", ",", "String", "zone", ",", "OvhQuota", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/quota/{zone}\"", ";", "StringBuilder", "sb", "=", ...
Alter this object properties REST: PUT /ipLoadbalancing/{serviceName}/quota/{zone} @param body [required] New object properties @param serviceName [required] The internal name of your IP load balancing @param zone [required] Zone of your quota
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1845-L1849
meltmedia/cadmium
cli/src/main/java/com/meltmedia/cadmium/cli/UpdateCommand.java
UpdateCommand.sendUpdateMessage
public static boolean sendUpdateMessage(String site2, String repo, String branch, String revision, String comment, String token) throws Exception { """ Sends a update message to a Cadmium site. This method will block until the update is complete. @param site2 The uri to a Cadmium site. @param repo The git repo...
java
public static boolean sendUpdateMessage(String site2, String repo, String branch, String revision, String comment, String token) throws Exception { return sendUpdateMessage(site2, repo, branch, revision, comment, token, UPDATE_ENDPOINT); }
[ "public", "static", "boolean", "sendUpdateMessage", "(", "String", "site2", ",", "String", "repo", ",", "String", "branch", ",", "String", "revision", ",", "String", "comment", ",", "String", "token", ")", "throws", "Exception", "{", "return", "sendUpdateMessage...
Sends a update message to a Cadmium site. This method will block until the update is complete. @param site2 The uri to a Cadmium site. @param repo The git repository to tell the site to change to. @param branch The branch to switch to. @param revision The revision to reset to. @param comment The message to record with...
[ "Sends", "a", "update", "message", "to", "a", "Cadmium", "site", ".", "This", "method", "will", "block", "until", "the", "update", "is", "complete", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/cli/src/main/java/com/meltmedia/cadmium/cli/UpdateCommand.java#L166-L168
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/utils/HashCodeUtil.java
HashCodeUtil.hash
public static int hash(int aSeed, Object aObject) { """ <code>aObject</code> is a possibly-null object field, and possibly an array. If <code>aObject</code> is an array, then each element may be a primitive or a possibly-null object. """ int result = aSeed; if (aObject == null) { ...
java
public static int hash(int aSeed, Object aObject) { int result = aSeed; if (aObject == null) { result = org.jboss.ws.common.utils.HashCodeUtil.hash(result, 0); } else if (!org.jboss.ws.common.utils.HashCodeUtil.isArray(aObject)) { result = org.jboss.ws.common.uti...
[ "public", "static", "int", "hash", "(", "int", "aSeed", ",", "Object", "aObject", ")", "{", "int", "result", "=", "aSeed", ";", "if", "(", "aObject", "==", "null", ")", "{", "result", "=", "org", ".", "jboss", ".", "ws", ".", "common", ".", "utils"...
<code>aObject</code> is a possibly-null object field, and possibly an array. If <code>aObject</code> is an array, then each element may be a primitive or a possibly-null object.
[ "<code", ">", "aObject<", "/", "code", ">", "is", "a", "possibly", "-", "null", "object", "field", "and", "possibly", "an", "array", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/utils/HashCodeUtil.java#L110-L132
Jasig/resource-server
resource-server-core/src/main/java/org/jasig/resource/aggr/RelativePath.java
RelativePath.matchPathLists
private static String matchPathLists(List<String> basePath, List<String> filePath) { """ figure out a string representing the relative path of 'f' with respect to 'r' @param basePath home path @param filePath path of file """ // start at the beginning of the lists // iterate while both lists...
java
private static String matchPathLists(List<String> basePath, List<String> filePath) { // start at the beginning of the lists // iterate while both lists are equal final StringBuilder relativePath = new StringBuilder(); final ListIterator<String> basePathItr = basePath.listIterator(basePat...
[ "private", "static", "String", "matchPathLists", "(", "List", "<", "String", ">", "basePath", ",", "List", "<", "String", ">", "filePath", ")", "{", "// start at the beginning of the lists", "// iterate while both lists are equal", "final", "StringBuilder", "relativePath"...
figure out a string representing the relative path of 'f' with respect to 'r' @param basePath home path @param filePath path of file
[ "figure", "out", "a", "string", "representing", "the", "relative", "path", "of", "f", "with", "respect", "to", "r" ]
train
https://github.com/Jasig/resource-server/blob/13375f716777ec3c99ae9917f672881d4aa32df3/resource-server-core/src/main/java/org/jasig/resource/aggr/RelativePath.java#L60-L90
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createStrictPartialMock
public static <T> T createStrictPartialMock(Class<T> type, String methodName, Class<?>[] methodParameterTypes, Object... constructorArguments) { """ A utility method that may be used to strictly mock several methods in an easy way (by just passing in the method name...
java
public static <T> T createStrictPartialMock(Class<T> type, String methodName, Class<?>[] methodParameterTypes, Object... constructorArguments) { Constructor<?> constructor = WhiteboxImpl.findUniqueConstructorOrThrowException(type, constructorArguments); Co...
[ "public", "static", "<", "T", ">", "T", "createStrictPartialMock", "(", "Class", "<", "T", ">", "type", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "methodParameterTypes", ",", "Object", "...", "constructorArguments", ")", "{", "Con...
A utility method that may be used to strictly mock several methods in an easy way (by just passing in the method names of the method you wish to mock). Use this to handle overloaded methods. The mock object created will support mocking of final and native methods and invokes a specific constructor based on the supplied...
[ "A", "utility", "method", "that", "may", "be", "used", "to", "strictly", "mock", "several", "methods", "in", "an", "easy", "way", "(", "by", "just", "passing", "in", "the", "method", "names", "of", "the", "method", "you", "wish", "to", "mock", ")", "."...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L1005-L1011
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/ObjectReader.java
ObjectReader.readObject
public Object readObject(Object pId, Class pObjClass, Hashtable pMapping) throws SQLException { """ Reads the object with the given id from the database, using the given mapping. @param id An object uniquely identifying the object to read @param objClass The clas @return The Object read, or null in ...
java
public Object readObject(Object pId, Class pObjClass, Hashtable pMapping) throws SQLException { return readObject(pId, pObjClass, pMapping, null); }
[ "public", "Object", "readObject", "(", "Object", "pId", ",", "Class", "pObjClass", ",", "Hashtable", "pMapping", ")", "throws", "SQLException", "{", "return", "readObject", "(", "pId", ",", "pObjClass", ",", "pMapping", ",", "null", ")", ";", "}" ]
Reads the object with the given id from the database, using the given mapping. @param id An object uniquely identifying the object to read @param objClass The clas @return The Object read, or null in no object is found
[ "Reads", "the", "object", "with", "the", "given", "id", "from", "the", "database", "using", "the", "given", "mapping", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/ObjectReader.java#L303-L306
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/KeyValueSources.java
KeyValueSources.fromZip
@Nonnull public static ImmutableKeyValueSource<Symbol, ByteSource> fromZip(final ZipFile zipFile) { """ Creates a new source using a zip file where each value is located at an entry with the same name as the key. The caller must ensure that the zip file is not closed or modified, otherwise all behavior is unde...
java
@Nonnull public static ImmutableKeyValueSource<Symbol, ByteSource> fromZip(final ZipFile zipFile) { return fromZip(zipFile, SymbolUtils.symbolizeFunction()); }
[ "@", "Nonnull", "public", "static", "ImmutableKeyValueSource", "<", "Symbol", ",", "ByteSource", ">", "fromZip", "(", "final", "ZipFile", "zipFile", ")", "{", "return", "fromZip", "(", "zipFile", ",", "SymbolUtils", ".", "symbolizeFunction", "(", ")", ")", ";"...
Creates a new source using a zip file where each value is located at an entry with the same name as the key. The caller must ensure that the zip file is not closed or modified, otherwise all behavior is undefined. All files in the zip file will be used; there is currently no way to exclude specific files. To specify a ...
[ "Creates", "a", "new", "source", "using", "a", "zip", "file", "where", "each", "value", "is", "located", "at", "an", "entry", "with", "the", "same", "name", "as", "the", "key", ".", "The", "caller", "must", "ensure", "that", "the", "zip", "file", "is",...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/KeyValueSources.java#L65-L68
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/LongStream.java
LongStream.takeUntil
@NotNull public LongStream takeUntil(@NotNull final LongPredicate stopPredicate) { """ Takes elements while the predicate returns {@code false}. Once predicate condition is satisfied by an element, the stream finishes with this element. <p>This is an intermediate operation. <p>Example: <pre> stopPred...
java
@NotNull public LongStream takeUntil(@NotNull final LongPredicate stopPredicate) { return new LongStream(params, new LongTakeUntil(iterator, stopPredicate)); }
[ "@", "NotNull", "public", "LongStream", "takeUntil", "(", "@", "NotNull", "final", "LongPredicate", "stopPredicate", ")", "{", "return", "new", "LongStream", "(", "params", ",", "new", "LongTakeUntil", "(", "iterator", ",", "stopPredicate", ")", ")", ";", "}" ...
Takes elements while the predicate returns {@code false}. Once predicate condition is satisfied by an element, the stream finishes with this element. <p>This is an intermediate operation. <p>Example: <pre> stopPredicate: (a) -&gt; a &gt; 2 stream: [1, 2, 3, 4, 1, 2, 3, 4] result: [1, 2, 3] </pre> @param stopPredicat...
[ "Takes", "elements", "while", "the", "predicate", "returns", "{", "@code", "false", "}", ".", "Once", "predicate", "condition", "is", "satisfied", "by", "an", "element", "the", "stream", "finishes", "with", "this", "element", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/LongStream.java#L755-L758
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/A_CmsSelectCell.java
A_CmsSelectCell.registerDomHandler
public <H extends EventHandler> HandlerRegistration registerDomHandler(final H handler, DomEvent.Type<H> type) { """ Adds a new event handler to the widget.<p> This method is used because we want the select box to register some event handlers on this widget, but we can't use {@link com.google.gwt.user.client.u...
java
public <H extends EventHandler> HandlerRegistration registerDomHandler(final H handler, DomEvent.Type<H> type) { return addDomHandler(handler, type); }
[ "public", "<", "H", "extends", "EventHandler", ">", "HandlerRegistration", "registerDomHandler", "(", "final", "H", "handler", ",", "DomEvent", ".", "Type", "<", "H", ">", "type", ")", "{", "return", "addDomHandler", "(", "handler", ",", "type", ")", ";", ...
Adds a new event handler to the widget.<p> This method is used because we want the select box to register some event handlers on this widget, but we can't use {@link com.google.gwt.user.client.ui.Widget#addDomHandler} directly, since it's both protected and final. @param <H> the event type @param handler the new even...
[ "Adds", "a", "new", "event", "handler", "to", "the", "widget", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/A_CmsSelectCell.java#L83-L86
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/CategoryGraph.java
CategoryGraph.getNumberOfNeighborConnections
private int getNumberOfNeighborConnections(int node) { """ Get the number of connections that exist between the neighbors of a node. @param node The node under consideration. @return The number of connections that exist between the neighbors of node. """ int numberOfConnections = 0; // get t...
java
private int getNumberOfNeighborConnections(int node) { int numberOfConnections = 0; // get the set of neighbors Set<Integer> neighbors = getNeighbors(node); if (neighbors.size() > 0) { // for each pair of neighbors, test if there is a connection Object[] nodeArr...
[ "private", "int", "getNumberOfNeighborConnections", "(", "int", "node", ")", "{", "int", "numberOfConnections", "=", "0", ";", "// get the set of neighbors", "Set", "<", "Integer", ">", "neighbors", "=", "getNeighbors", "(", "node", ")", ";", "if", "(", "neighbo...
Get the number of connections that exist between the neighbors of a node. @param node The node under consideration. @return The number of connections that exist between the neighbors of node.
[ "Get", "the", "number", "of", "connections", "that", "exist", "between", "the", "neighbors", "of", "a", "node", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/CategoryGraph.java#L1267-L1295
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java
UnicodeSet._appendToPat
private static <T extends Appendable> T _appendToPat(T buf, String s, boolean escapeUnprintable) { """ Append the <code>toPattern()</code> representation of a string to the given <code>Appendable</code>. """ int cp; for (int i = 0; i < s.length(); i += Character.charCount(cp)) { cp...
java
private static <T extends Appendable> T _appendToPat(T buf, String s, boolean escapeUnprintable) { int cp; for (int i = 0; i < s.length(); i += Character.charCount(cp)) { cp = s.codePointAt(i); _appendToPat(buf, cp, escapeUnprintable); } return buf; }
[ "private", "static", "<", "T", "extends", "Appendable", ">", "T", "_appendToPat", "(", "T", "buf", ",", "String", "s", ",", "boolean", "escapeUnprintable", ")", "{", "int", "cp", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s", ".", "leng...
Append the <code>toPattern()</code> representation of a string to the given <code>Appendable</code>.
[ "Append", "the", "<code", ">", "toPattern", "()", "<", "/", "code", ">", "representation", "of", "a", "string", "to", "the", "given", "<code", ">", "Appendable<", "/", "code", ">", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L623-L630
census-instrumentation/opencensus-java
contrib/http_util/src/main/java/io/opencensus/contrib/http/HttpClientHandler.java
HttpClientHandler.handleStart
public HttpRequestContext handleStart(@Nullable Span parent, C carrier, Q request) { """ Instrument a request for tracing and stats before it is sent. <p>This method will create a span in current context to represent the HTTP call. The created span will be serialized and propagated to the server. <p>The gen...
java
public HttpRequestContext handleStart(@Nullable Span parent, C carrier, Q request) { checkNotNull(carrier, "carrier"); checkNotNull(request, "request"); if (parent == null) { parent = tracer.getCurrentSpan(); } String spanName = getSpanName(request, extractor); SpanBuilder builder = tracer...
[ "public", "HttpRequestContext", "handleStart", "(", "@", "Nullable", "Span", "parent", ",", "C", "carrier", ",", "Q", "request", ")", "{", "checkNotNull", "(", "carrier", ",", "\"carrier\"", ")", ";", "checkNotNull", "(", "request", ",", "\"request\"", ")", ...
Instrument a request for tracing and stats before it is sent. <p>This method will create a span in current context to represent the HTTP call. The created span will be serialized and propagated to the server. <p>The generated span will NOT be set as current context. User can control when to enter the scope of this sp...
[ "Instrument", "a", "request", "for", "tracing", "and", "stats", "before", "it", "is", "sent", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/http_util/src/main/java/io/opencensus/contrib/http/HttpClientHandler.java#L109-L129
h2oai/h2o-2
hadoop/src/main/java/water/hadoop/h2omapper.java
h2omapper.emitLogHeader
private void emitLogHeader(Context context, String mapredTaskId) throws IOException, InterruptedException { """ Emit a bunch of logging output at the beginning of the map task. @throws IOException @throws InterruptedException """ Configuration conf = context.getConfiguration(); Text textId = new Text...
java
private void emitLogHeader(Context context, String mapredTaskId) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); Text textId = new Text(mapredTaskId); for (Map.Entry<String, String> entry: conf) { StringBuilder sb = new StringBuilder(); sb.append(entr...
[ "private", "void", "emitLogHeader", "(", "Context", "context", ",", "String", "mapredTaskId", ")", "throws", "IOException", ",", "InterruptedException", "{", "Configuration", "conf", "=", "context", ".", "getConfiguration", "(", ")", ";", "Text", "textId", "=", ...
Emit a bunch of logging output at the beginning of the map task. @throws IOException @throws InterruptedException
[ "Emit", "a", "bunch", "of", "logging", "output", "at", "the", "beginning", "of", "the", "map", "task", "." ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/hadoop/src/main/java/water/hadoop/h2omapper.java#L270-L304
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/utils/TargetHelpers.java
TargetHelpers.findTargetHandlerName
public static String findTargetHandlerName( Map<String,String> props ) { """ Finds the target handler name in properties. <p> This methods checks for the presence of the {@value Constants.TARGET_PROPERTY_HANDLER} property, or for the old {@value LEGACY_HANDLER_PROPERTY} one. </p> @param props non-null map ...
java
public static String findTargetHandlerName( Map<String,String> props ) { return props.get( Constants.TARGET_PROPERTY_HANDLER ); }
[ "public", "static", "String", "findTargetHandlerName", "(", "Map", "<", "String", ",", "String", ">", "props", ")", "{", "return", "props", ".", "get", "(", "Constants", ".", "TARGET_PROPERTY_HANDLER", ")", ";", "}" ]
Finds the target handler name in properties. <p> This methods checks for the presence of the {@value Constants.TARGET_PROPERTY_HANDLER} property, or for the old {@value LEGACY_HANDLER_PROPERTY} one. </p> @param props non-null map @return a handler name, or null if none was specified
[ "Finds", "the", "target", "handler", "name", "in", "properties", ".", "<p", ">", "This", "methods", "checks", "for", "the", "presence", "of", "the", "{", "@value", "Constants", ".", "TARGET_PROPERTY_HANDLER", "}", "property", "or", "for", "the", "old", "{", ...
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/utils/TargetHelpers.java#L147-L149
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_orderFollowup_GET
public ArrayList<OvhStep> serviceName_orderFollowup_GET(String serviceName) throws IOException { """ Get the status of the order REST: GET /xdsl/{serviceName}/orderFollowup @param serviceName [required] The internal name of your XDSL offer """ String qPath = "/xdsl/{serviceName}/orderFollowup"; StringB...
java
public ArrayList<OvhStep> serviceName_orderFollowup_GET(String serviceName) throws IOException { String qPath = "/xdsl/{serviceName}/orderFollowup"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t18); }
[ "public", "ArrayList", "<", "OvhStep", ">", "serviceName_orderFollowup_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/orderFollowup\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", ...
Get the status of the order REST: GET /xdsl/{serviceName}/orderFollowup @param serviceName [required] The internal name of your XDSL offer
[ "Get", "the", "status", "of", "the", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1843-L1848
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/version/DependsFileParser.java
DependsFileParser.createDependencyInfoMap
public static SortedMap<String, DependencyInfo> createDependencyInfoMap( final SortedMap<String, String> versionMap) { """ Converts a SortedMap received from a {@code getVersionMap} call to hold DependencyInfo values, and keys on the form {@code groupId/artifactId}. @param versionMap A non-null Map...
java
public static SortedMap<String, DependencyInfo> createDependencyInfoMap( final SortedMap<String, String> versionMap) { // Check sanity Validate.notNull(versionMap, "anURL"); final SortedMap<String, DependencyInfo> toReturn = new TreeMap<String, DependencyInfo>(); // First,...
[ "public", "static", "SortedMap", "<", "String", ",", "DependencyInfo", ">", "createDependencyInfoMap", "(", "final", "SortedMap", "<", "String", ",", "String", ">", "versionMap", ")", "{", "// Check sanity", "Validate", ".", "notNull", "(", "versionMap", ",", "\...
Converts a SortedMap received from a {@code getVersionMap} call to hold DependencyInfo values, and keys on the form {@code groupId/artifactId}. @param versionMap A non-null Map, as received from a call to {@code getVersionMap}. @return a SortedMap received from a {@code getVersionMap} call to hold DependencyInfo value...
[ "Converts", "a", "SortedMap", "received", "from", "a", "{", "@code", "getVersionMap", "}", "call", "to", "hold", "DependencyInfo", "values", "and", "keys", "on", "the", "form", "{", "@code", "groupId", "/", "artifactId", "}", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/version/DependsFileParser.java#L196-L241
box/box-java-sdk
src/main/java/com/box/sdk/BoxMetadataCascadePolicy.java
BoxMetadataCascadePolicy.getAll
public static Iterable<BoxMetadataCascadePolicy.Info> getAll(final BoxAPIConnection api, String folderID, String ownerEnterpriseID, int limit, String... fields) { """ Retrieves list of ...
java
public static Iterable<BoxMetadataCascadePolicy.Info> getAll(final BoxAPIConnection api, String folderID, String ownerEnterpriseID, int limit, String... fields) { QueryStringBuilder...
[ "public", "static", "Iterable", "<", "BoxMetadataCascadePolicy", ".", "Info", ">", "getAll", "(", "final", "BoxAPIConnection", "api", ",", "String", "folderID", ",", "String", "ownerEnterpriseID", ",", "int", "limit", ",", "String", "...", "fields", ")", "{", ...
Retrieves list of Box Metadata Cascade Policies that belong to your Enterprise as an Iterable. @param api the API connection to be used by the resource. @param folderID the ID of the folder to retrieve cascade policies for. @param ownerEnterpriseID the ID of the enterprise to retrieve Metadata C...
[ "Retrieves", "list", "of", "Box", "Metadata", "Cascade", "Policies", "that", "belong", "to", "your", "Enterprise", "as", "an", "Iterable", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxMetadataCascadePolicy.java#L67-L89
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java
ChessboardCornerClusterFinder.removeReferences
void removeReferences( Vertex remove , EdgeType type ) { """ Go through all the vertexes that 'remove' is connected to and remove that link. if it is in the connected list swap it with 'replaceWith'. """ EdgeSet removeSet = remove.getEdgeSet(type); for (int i = removeSet.size()-1; i >= 0; i--) { Vertex...
java
void removeReferences( Vertex remove , EdgeType type ) { EdgeSet removeSet = remove.getEdgeSet(type); for (int i = removeSet.size()-1; i >= 0; i--) { Vertex v = removeSet.get(i).dst; EdgeSet setV = v.getEdgeSet(type); // remove the connection from v to 'remove'. Be careful since the connection isn't always...
[ "void", "removeReferences", "(", "Vertex", "remove", ",", "EdgeType", "type", ")", "{", "EdgeSet", "removeSet", "=", "remove", ".", "getEdgeSet", "(", "type", ")", ";", "for", "(", "int", "i", "=", "removeSet", ".", "size", "(", ")", "-", "1", ";", "...
Go through all the vertexes that 'remove' is connected to and remove that link. if it is in the connected list swap it with 'replaceWith'.
[ "Go", "through", "all", "the", "vertexes", "that", "remove", "is", "connected", "to", "and", "remove", "that", "link", ".", "if", "it", "is", "in", "the", "connected", "list", "swap", "it", "with", "replaceWith", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/chess/ChessboardCornerClusterFinder.java#L439-L451
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.writeMap
public File writeMap(Map<?, ?> map, LineSeparator lineSeparator, String kvSeparator, boolean isAppend) throws IORuntimeException { """ 将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔 @param map Map @param lineSeparator 换行符枚举(Windows、Mac或Linux换行符) @param kvSeparator 键和值之间的分隔符,如果传入null使用默认分隔符" = " @param isAppend 是否...
java
public File writeMap(Map<?, ?> map, LineSeparator lineSeparator, String kvSeparator, boolean isAppend) throws IORuntimeException { if(null == kvSeparator) { kvSeparator = " = "; } try(PrintWriter writer = getPrintWriter(isAppend)) { for (Entry<?, ?> entry : map.entrySet()) { if (null != entry) { ...
[ "public", "File", "writeMap", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "LineSeparator", "lineSeparator", ",", "String", "kvSeparator", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "if", "(", "null", "==", "kvSeparator", ")", ...
将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔 @param map Map @param lineSeparator 换行符枚举(Windows、Mac或Linux换行符) @param kvSeparator 键和值之间的分隔符,如果传入null使用默认分隔符" = " @param isAppend 是否追加 @return 目标文件 @throws IORuntimeException IO异常 @since 4.0.5
[ "将Map写入文件,每个键值对为一行,一行中键与值之间使用kvSeparator分隔" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L235-L249
eiichiro/gig
gig-appengine/src/main/java/org/eiichiro/gig/appengine/TextConverter.java
TextConverter.convertToType
@SuppressWarnings("rawtypes") @Override protected Object convertToType(Class type, Object value) throws Throwable { """ Converts the specified value to {@code com.google.appengine.api.datastore.Text}. @see org.apache.commons.beanutils.converters.AbstractConverter#convertToType(java.lang.Class, java.lang.Obje...
java
@SuppressWarnings("rawtypes") @Override protected Object convertToType(Class type, Object value) throws Throwable { return new Text(value.toString()); }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "@", "Override", "protected", "Object", "convertToType", "(", "Class", "type", ",", "Object", "value", ")", "throws", "Throwable", "{", "return", "new", "Text", "(", "value", ".", "toString", "(", ")", ")", ...
Converts the specified value to {@code com.google.appengine.api.datastore.Text}. @see org.apache.commons.beanutils.converters.AbstractConverter#convertToType(java.lang.Class, java.lang.Object)
[ "Converts", "the", "specified", "value", "to", "{", "@code", "com", ".", "google", ".", "appengine", ".", "api", ".", "datastore", ".", "Text", "}", "." ]
train
https://github.com/eiichiro/gig/blob/21181fb36a17d2154f989e5e8c6edbb39fc81900/gig-appengine/src/main/java/org/eiichiro/gig/appengine/TextConverter.java#L38-L42
mangstadt/biweekly
src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java
TimeUtils.toDateTimeValue
public static DateTimeValue toDateTimeValue(long millisFromEpoch, TimeZone zone) { """ Builds a {@link DateTimeValue} object from the given data. @param millisFromEpoch the number of milliseconds from the epoch @param zone the timezone the number of milliseconds is in @return the {@link DateTimeValue} object ...
java
public static DateTimeValue toDateTimeValue(long millisFromEpoch, TimeZone zone) { GregorianCalendar c = new GregorianCalendar(zone); c.clear(); c.setTimeInMillis(millisFromEpoch); //@formatter:off return new DateTimeValueImpl ( c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c.get(Calendar.DAY_OF_M...
[ "public", "static", "DateTimeValue", "toDateTimeValue", "(", "long", "millisFromEpoch", ",", "TimeZone", "zone", ")", "{", "GregorianCalendar", "c", "=", "new", "GregorianCalendar", "(", "zone", ")", ";", "c", ".", "clear", "(", ")", ";", "c", ".", "setTimeI...
Builds a {@link DateTimeValue} object from the given data. @param millisFromEpoch the number of milliseconds from the epoch @param zone the timezone the number of milliseconds is in @return the {@link DateTimeValue} object
[ "Builds", "a", "{" ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java#L414-L428
arquillian/arquillian-algeron
common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java
GitOperations.pushToRepository
public Iterable<PushResult> pushToRepository(Git git, String remote, String passphrase, Path privateKey) { """ Push all changes and tags to given remote. @param git instance. @param remote to be used. @param passphrase to access private key. @param privateKey file location. @return List of all results...
java
public Iterable<PushResult> pushToRepository(Git git, String remote, String passphrase, Path privateKey) { SshSessionFactory sshSessionFactory = new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host host, Session session) { session.setUser...
[ "public", "Iterable", "<", "PushResult", ">", "pushToRepository", "(", "Git", "git", ",", "String", "remote", ",", "String", "passphrase", ",", "Path", "privateKey", ")", "{", "SshSessionFactory", "sshSessionFactory", "=", "new", "JschConfigSessionFactory", "(", "...
Push all changes and tags to given remote. @param git instance. @param remote to be used. @param passphrase to access private key. @param privateKey file location. @return List of all results of given push.
[ "Push", "all", "changes", "and", "tags", "to", "given", "remote", "." ]
train
https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L353-L385
bazaarvoice/emodb
mapreduce/sor-hive/src/main/java/com/bazaarvoice/emodb/hive/EmoSerDe.java
EmoSerDe.getRawValueOrNullIfAbsent
private Object getRawValueOrNullIfAbsent(String columnName, Map<String, Object> content) throws SerDeException { """ Like {@link #getRawValue(String, java.util.Map)} except it returns null if the value is not present. """ try { return getRawValue(columnName, content); } ...
java
private Object getRawValueOrNullIfAbsent(String columnName, Map<String, Object> content) throws SerDeException { try { return getRawValue(columnName, content); } catch (ColumnNotFoundException e) { return null; } }
[ "private", "Object", "getRawValueOrNullIfAbsent", "(", "String", "columnName", ",", "Map", "<", "String", ",", "Object", ">", "content", ")", "throws", "SerDeException", "{", "try", "{", "return", "getRawValue", "(", "columnName", ",", "content", ")", ";", "}"...
Like {@link #getRawValue(String, java.util.Map)} except it returns null if the value is not present.
[ "Like", "{" ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hive/src/main/java/com/bazaarvoice/emodb/hive/EmoSerDe.java#L278-L285
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.invokeStatic
public static <T> T invokeStatic(Method method, Object... args) throws UtilException { """ 执行静态方法 @param <T> 对象类型 @param method 方法(对象方法或static方法都可) @param args 参数对象 @return 结果 @throws UtilException 多种异常包装 """ return invoke(null, method, args); }
java
public static <T> T invokeStatic(Method method, Object... args) throws UtilException { return invoke(null, method, args); }
[ "public", "static", "<", "T", ">", "T", "invokeStatic", "(", "Method", "method", ",", "Object", "...", "args", ")", "throws", "UtilException", "{", "return", "invoke", "(", "null", ",", "method", ",", "args", ")", ";", "}" ]
执行静态方法 @param <T> 对象类型 @param method 方法(对象方法或static方法都可) @param args 参数对象 @return 结果 @throws UtilException 多种异常包装
[ "执行静态方法" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L735-L737
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java
JPAPxmlInfo.addPU
JPAPUnitInfo addPU(String puName, JPAPUnitInfo puInfo) { """ Adds the puInfo to the collection maintained in this xml info object. @param puName @param puInfo @return JPAUnitInfo just added. """ synchronized (ivPuList) { return ivPuList.put(puName, puInfo); } }
java
JPAPUnitInfo addPU(String puName, JPAPUnitInfo puInfo) { synchronized (ivPuList) { return ivPuList.put(puName, puInfo); } }
[ "JPAPUnitInfo", "addPU", "(", "String", "puName", ",", "JPAPUnitInfo", "puInfo", ")", "{", "synchronized", "(", "ivPuList", ")", "{", "return", "ivPuList", ".", "put", "(", "puName", ",", "puInfo", ")", ";", "}", "}" ]
Adds the puInfo to the collection maintained in this xml info object. @param puName @param puInfo @return JPAUnitInfo just added.
[ "Adds", "the", "puInfo", "to", "the", "collection", "maintained", "in", "this", "xml", "info", "object", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAPxmlInfo.java#L222-L226
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_lan_lanName_PUT
public void serviceName_modem_lan_lanName_PUT(String serviceName, String lanName, OvhLAN body) throws IOException { """ Alter this object properties REST: PUT /xdsl/{serviceName}/modem/lan/{lanName} @param body [required] New object properties @param serviceName [required] The internal name of your XDSL offer...
java
public void serviceName_modem_lan_lanName_PUT(String serviceName, String lanName, OvhLAN body) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}"; StringBuilder sb = path(qPath, serviceName, lanName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_modem_lan_lanName_PUT", "(", "String", "serviceName", ",", "String", "lanName", ",", "OvhLAN", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/lan/{lanName}\"", ";", "StringBuilder", "sb", "=...
Alter this object properties REST: PUT /xdsl/{serviceName}/modem/lan/{lanName} @param body [required] New object properties @param serviceName [required] The internal name of your XDSL offer @param lanName [required] Name of the LAN
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L994-L998
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java
PersistentExecutorImpl.setTaskStore
@Reference(target = "(id=unbound)") protected void setTaskStore(DatabaseStore svc, Map<String, Object> props) { """ Declarative Services method for setting the database store @param svc the service @param props service properties """ persistentStore = svc; persistentStoreDisplayId = (St...
java
@Reference(target = "(id=unbound)") protected void setTaskStore(DatabaseStore svc, Map<String, Object> props) { persistentStore = svc; persistentStoreDisplayId = (String) props.get("config.displayId"); }
[ "@", "Reference", "(", "target", "=", "\"(id=unbound)\"", ")", "protected", "void", "setTaskStore", "(", "DatabaseStore", "svc", ",", "Map", "<", "String", ",", "Object", ">", "props", ")", "{", "persistentStore", "=", "svc", ";", "persistentStoreDisplayId", "...
Declarative Services method for setting the database store @param svc the service @param props service properties
[ "Declarative", "Services", "method", "for", "setting", "the", "database", "store" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.persistent/src/com/ibm/ws/concurrent/persistent/internal/PersistentExecutorImpl.java#L1643-L1647
weld/core
impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
ObserverMethodImpl.sendEvent
protected void sendEvent(T event, Object receiver, CreationalContext<?> creationalContext) { """ Note that {@link CreationalContext#release()} is not invoked within this method. @param event @param receiver @param creationalContext """ try { preNotify(event, receiver); // A...
java
protected void sendEvent(T event, Object receiver, CreationalContext<?> creationalContext) { try { preNotify(event, receiver); // As we are working with the contextual instance, we may not have the // actual object, but a container proxy (e.g. EJB) notificationStr...
[ "protected", "void", "sendEvent", "(", "T", "event", ",", "Object", "receiver", ",", "CreationalContext", "<", "?", ">", "creationalContext", ")", "{", "try", "{", "preNotify", "(", "event", ",", "receiver", ")", ";", "// As we are working with the contextual inst...
Note that {@link CreationalContext#release()} is not invoked within this method. @param event @param receiver @param creationalContext
[ "Note", "that", "{", "@link", "CreationalContext#release", "()", "}", "is", "not", "invoked", "within", "this", "method", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java#L325-L334
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.getTVAccountState
public MediaState getTVAccountState(int tvID, String sessionID) throws MovieDbException { """ This method lets users get the status of whether or not the TV show has been rated or added to their favourite or watch lists. A valid session id is required. @param tvID tvID @param sessionID sessionID @return ...
java
public MediaState getTVAccountState(int tvID, String sessionID) throws MovieDbException { return tmdbTv.getTVAccountState(tvID, sessionID); }
[ "public", "MediaState", "getTVAccountState", "(", "int", "tvID", ",", "String", "sessionID", ")", "throws", "MovieDbException", "{", "return", "tmdbTv", ".", "getTVAccountState", "(", "tvID", ",", "sessionID", ")", ";", "}" ]
This method lets users get the status of whether or not the TV show has been rated or added to their favourite or watch lists. A valid session id is required. @param tvID tvID @param sessionID sessionID @return @throws com.omertron.themoviedbapi.MovieDbException
[ "This", "method", "lets", "users", "get", "the", "status", "of", "whether", "or", "not", "the", "TV", "show", "has", "been", "rated", "or", "added", "to", "their", "favourite", "or", "watch", "lists", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L1450-L1452
osmdroid/osmdroid
osmdroid-geopackage/src/main/java/org/osmdroid/gpkg/overlay/OsmMapShapeConverter.java
OsmMapShapeConverter.addLatLngsToMap
public static MultiMarker addLatLngsToMap(MapView map, MultiLatLng latLngs) { """ Add a list of LatLngs to the map @param map @param latLngs @return """ MultiMarker multiMarker = new MultiMarker(); for (GeoPoint latLng : latLngs.getLatLngs()) { Marker marker = addLatLngToMap(ma...
java
public static MultiMarker addLatLngsToMap(MapView map, MultiLatLng latLngs) { MultiMarker multiMarker = new MultiMarker(); for (GeoPoint latLng : latLngs.getLatLngs()) { Marker marker = addLatLngToMap(map, latLng, latLngs.getMarkerOptions()); multiMarker.add(marker); } ...
[ "public", "static", "MultiMarker", "addLatLngsToMap", "(", "MapView", "map", ",", "MultiLatLng", "latLngs", ")", "{", "MultiMarker", "multiMarker", "=", "new", "MultiMarker", "(", ")", ";", "for", "(", "GeoPoint", "latLng", ":", "latLngs", ".", "getLatLngs", "...
Add a list of LatLngs to the map @param map @param latLngs @return
[ "Add", "a", "list", "of", "LatLngs", "to", "the", "map" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-geopackage/src/main/java/org/osmdroid/gpkg/overlay/OsmMapShapeConverter.java#L778-L785
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/IntSerializer.java
IntSerializer.writeInt64
public static void writeInt64(final long value, final byte[] buffer, int offset) { """ Writes the 64-bit int into the buffer starting with the most significant byte. """ buffer[offset++] = (byte) (value >>> 56); buffer[offset++] = (byte) (value >>> 48); buffer[offset++] = (byte) (val...
java
public static void writeInt64(final long value, final byte[] buffer, int offset) { buffer[offset++] = (byte) (value >>> 56); buffer[offset++] = (byte) (value >>> 48); buffer[offset++] = (byte) (value >>> 40); buffer[offset++] = (byte) (value >>> 32); buffer[offset++] = ...
[ "public", "static", "void", "writeInt64", "(", "final", "long", "value", ",", "final", "byte", "[", "]", "buffer", ",", "int", "offset", ")", "{", "buffer", "[", "offset", "++", "]", "=", "(", "byte", ")", "(", "value", ">>>", "56", ")", ";", "buff...
Writes the 64-bit int into the buffer starting with the most significant byte.
[ "Writes", "the", "64", "-", "bit", "int", "into", "the", "buffer", "starting", "with", "the", "most", "significant", "byte", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/IntSerializer.java#L89-L99
WiQuery/wiquery
wiquery-core/src/main/java/org/odlabs/wiquery/core/options/Options.java
Options.putLong
public Options putLong(String key, IModel<Long> value) { """ <p> Puts a {@link Long} value for the given option name. </p> @param key the option name. @param value the {@link Long} value. """ putOption(key, new LongOption(value)); return this; }
java
public Options putLong(String key, IModel<Long> value) { putOption(key, new LongOption(value)); return this; }
[ "public", "Options", "putLong", "(", "String", "key", ",", "IModel", "<", "Long", ">", "value", ")", "{", "putOption", "(", "key", ",", "new", "LongOption", "(", "value", ")", ")", ";", "return", "this", ";", "}" ]
<p> Puts a {@link Long} value for the given option name. </p> @param key the option name. @param value the {@link Long} value.
[ "<p", ">", "Puts", "a", "{", "@link", "Long", "}", "value", "for", "the", "given", "option", "name", ".", "<", "/", "p", ">" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-core/src/main/java/org/odlabs/wiquery/core/options/Options.java#L596-L600
alkacon/opencms-core
src/org/opencms/ui/apps/A_CmsWorkplaceApp.java
A_CmsWorkplaceApp.updateBreadCrumb
protected void updateBreadCrumb(Map<String, String> breadCrumbEntries) { """ Updates the bread crumb navigation.<p> @param breadCrumbEntries the bread crumb entries """ LinkedHashMap<String, String> entries = new LinkedHashMap<String, String>(); I_CmsWorkplaceAppConfiguration launchpadConfi...
java
protected void updateBreadCrumb(Map<String, String> breadCrumbEntries) { LinkedHashMap<String, String> entries = new LinkedHashMap<String, String>(); I_CmsWorkplaceAppConfiguration launchpadConfig = OpenCms.getWorkplaceAppManager().getAppConfiguration( CmsAppHierarchyConfiguration.APP_ID); ...
[ "protected", "void", "updateBreadCrumb", "(", "Map", "<", "String", ",", "String", ">", "breadCrumbEntries", ")", "{", "LinkedHashMap", "<", "String", ",", "String", ">", "entries", "=", "new", "LinkedHashMap", "<", "String", ",", "String", ">", "(", ")", ...
Updates the bread crumb navigation.<p> @param breadCrumbEntries the bread crumb entries
[ "Updates", "the", "bread", "crumb", "navigation", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/A_CmsWorkplaceApp.java#L388-L405
jingwei/krati
krati-main/src/main/java/krati/core/array/AddressArrayFactory.java
AddressArrayFactory.createDynamicAddressArray
public AddressArray createDynamicAddressArray(File homeDir, int initialLength, int batchSize, int numSyncBatches) throws Exception { """ Creates a dynamic {@link Add...
java
public AddressArray createDynamicAddressArray(File homeDir, int initialLength, int batchSize, int numSyncBatches) throws Exception { AddressArray addrArray; ...
[ "public", "AddressArray", "createDynamicAddressArray", "(", "File", "homeDir", ",", "int", "initialLength", ",", "int", "batchSize", ",", "int", "numSyncBatches", ")", "throws", "Exception", "{", "AddressArray", "addrArray", ";", "if", "(", "_indexesCached", ")", ...
Creates a dynamic {@link AddressArray} which grows its capacity as needed. @param homeDir - the home directory where the <code>indexes.dat</code> is located. @param initialLength - the initial length of the created {@link AddressArray}. @param batchSize - the number of updates per update batch. @param num...
[ "Creates", "a", "dynamic", "{", "@link", "AddressArray", "}", "which", "grows", "its", "capacity", "as", "needed", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/AddressArrayFactory.java#L104-L123
alkacon/opencms-core
src/org/opencms/ade/containerpage/inherited/CmsContainerConfigurationCacheState.java
CmsContainerConfigurationCacheState.getContainerConfiguration
public synchronized CmsContainerConfiguration getContainerConfiguration(String rootPath, String name) { """ Gets the container configuration for a given root path, name and locale.<p> @param rootPath the root path @param name the configuration name @return the container configuration for the given combinati...
java
public synchronized CmsContainerConfiguration getContainerConfiguration(String rootPath, String name) { String key = getCacheKey(rootPath); if (m_configurationsByPath.containsKey(key)) { CmsContainerConfigurationGroup group = m_configurationsByPath.get(key); CmsContainerCon...
[ "public", "synchronized", "CmsContainerConfiguration", "getContainerConfiguration", "(", "String", "rootPath", ",", "String", "name", ")", "{", "String", "key", "=", "getCacheKey", "(", "rootPath", ")", ";", "if", "(", "m_configurationsByPath", ".", "containsKey", "...
Gets the container configuration for a given root path, name and locale.<p> @param rootPath the root path @param name the configuration name @return the container configuration for the given combination of parameters
[ "Gets", "the", "container", "configuration", "for", "a", "given", "root", "path", "name", "and", "locale", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/inherited/CmsContainerConfigurationCacheState.java#L85-L94
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java
RoadNetworkLayerConstants.getPreferredRoadColor
@Pure public static int getPreferredRoadColor(RoadType roadType, boolean useSystemValue) { """ Replies the preferred color to draw the content of the roads of the given type. @param roadType is the type of road for which the color should be replied. @param useSystemValue indicates if the <code>null</code> va...
java
@Pure public static int getPreferredRoadColor(RoadType roadType, boolean useSystemValue) { final RoadType rt = roadType == null ? RoadType.OTHER : roadType; final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class); if (prefs != null) { final String str = prefs.get("ROAD_COLOR...
[ "@", "Pure", "public", "static", "int", "getPreferredRoadColor", "(", "RoadType", "roadType", ",", "boolean", "useSystemValue", ")", "{", "final", "RoadType", "rt", "=", "roadType", "==", "null", "?", "RoadType", ".", "OTHER", ":", "roadType", ";", "final", ...
Replies the preferred color to draw the content of the roads of the given type. @param roadType is the type of road for which the color should be replied. @param useSystemValue indicates if the <code>null</code> value must be replaced by the default system value in {@link #DEFAULT_ROAD_COLORS} (if <code>true</code>). ...
[ "Replies", "the", "preferred", "color", "to", "draw", "the", "content", "of", "the", "roads", "of", "the", "given", "type", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/layer/RoadNetworkLayerConstants.java#L170-L188
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAction.java
PdfAction.javaScript
public static PdfAction javaScript(String code, PdfWriter writer) { """ Creates a JavaScript action. If the JavaScript is smaller than 50 characters it will be place as a string, otherwise it will be placed as a compressed stream. @param code the JavaScript code @param writer the writer for this action @retur...
java
public static PdfAction javaScript(String code, PdfWriter writer) { return javaScript(code, writer, false); }
[ "public", "static", "PdfAction", "javaScript", "(", "String", "code", ",", "PdfWriter", "writer", ")", "{", "return", "javaScript", "(", "code", ",", "writer", ",", "false", ")", ";", "}" ]
Creates a JavaScript action. If the JavaScript is smaller than 50 characters it will be place as a string, otherwise it will be placed as a compressed stream. @param code the JavaScript code @param writer the writer for this action @return the JavaScript action
[ "Creates", "a", "JavaScript", "action", ".", "If", "the", "JavaScript", "is", "smaller", "than", "50", "characters", "it", "will", "be", "place", "as", "a", "string", "otherwise", "it", "will", "be", "placed", "as", "a", "compressed", "stream", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAction.java#L322-L324
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/util/Sort.java
Sort.quicksort
private static <T extends Comparable<? super T>> void quicksort( T[] arr, int left, int right ) { """ internal method to sort the array with quick sort algorithm @param arr an array of Comparable Items @param left the left-most index of the subarray @param right the right-most index of the subarray "...
java
private static <T extends Comparable<? super T>> void quicksort( T[] arr, int left, int right ) { if ( left + CUTOFF <= right ) { //find the pivot T pivot = median( arr, left, right ); //start partitioning int i = left, j = right - 1; ...
[ "private", "static", "<", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "void", "quicksort", "(", "T", "[", "]", "arr", ",", "int", "left", ",", "int", "right", ")", "{", "if", "(", "left", "+", "CUTOFF", "<=", "right", ")", "{"...
internal method to sort the array with quick sort algorithm @param arr an array of Comparable Items @param left the left-most index of the subarray @param right the right-most index of the subarray
[ "internal", "method", "to", "sort", "the", "array", "with", "quick", "sort", "algorithm" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/Sort.java#L266-L295
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConBox.java
ConBox.inSamePathway
public static Constraint inSamePathway() { """ Makes sure that the two interactions are members of the same pathway. @return non-generative constraint """ String s1 = "Interaction/stepProcessOf/pathwayOrderOf"; String s2 = "Interaction/pathwayComponentOf"; return new OR(new MappedConst(new Field(s1, s1,...
java
public static Constraint inSamePathway() { String s1 = "Interaction/stepProcessOf/pathwayOrderOf"; String s2 = "Interaction/pathwayComponentOf"; return new OR(new MappedConst(new Field(s1, s1, Field.Operation.INTERSECT), 0, 1), new MappedConst(new Field(s2, s2, Field.Operation.INTERSECT), 0, 1)); }
[ "public", "static", "Constraint", "inSamePathway", "(", ")", "{", "String", "s1", "=", "\"Interaction/stepProcessOf/pathwayOrderOf\"", ";", "String", "s2", "=", "\"Interaction/pathwayComponentOf\"", ";", "return", "new", "OR", "(", "new", "MappedConst", "(", "new", ...
Makes sure that the two interactions are members of the same pathway. @return non-generative constraint
[ "Makes", "sure", "that", "the", "two", "interactions", "are", "members", "of", "the", "same", "pathway", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConBox.java#L606-L612
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.modifyInstancePassword
public void modifyInstancePassword(ModifyInstancePasswordRequest request) throws BceClientException { """ Modifying the password of the instance. You can reboot the instance only when the instance is Running or Stopped , otherwise,it's will get <code>409</code> errorCode. This is an asynchronous interface, ...
java
public void modifyInstancePassword(ModifyInstancePasswordRequest request) throws BceClientException { checkNotNull(request, "request should not be null."); checkStringNotEmpty(request.getInstanceId(), "request instanceId should not be empty."); checkStringNotEmpty(request.getAdminPass(), "reques...
[ "public", "void", "modifyInstancePassword", "(", "ModifyInstancePasswordRequest", "request", ")", "throws", "BceClientException", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getInstanceI...
Modifying the password of the instance. You can reboot the instance only when the instance is Running or Stopped , otherwise,it's will get <code>409</code> errorCode. This is an asynchronous interface, you can get the latest status by invoke {@link #getInstance(GetInstanceRequest)} @param request The request contain...
[ "Modifying", "the", "password", "of", "the", "instance", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L537-L555
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java
I18nEngine.formatContentText
@ObjectiveCName("formatContentTextWithSenderId:withContentType:withText:withRelatedUid:withIsChannel:") public String formatContentText(int senderId, ContentType contentType, String text, int relatedUid, boolean isChannel) { """ Formatting content for Dialog List and Notific...
java
@ObjectiveCName("formatContentTextWithSenderId:withContentType:withText:withRelatedUid:withIsChannel:") public String formatContentText(int senderId, ContentType contentType, String text, int relatedUid, boolean isChannel) { String groupKey = isChannel ? "channels" : "gr...
[ "@", "ObjectiveCName", "(", "\"formatContentTextWithSenderId:withContentType:withText:withRelatedUid:withIsChannel:\"", ")", "public", "String", "formatContentText", "(", "int", "senderId", ",", "ContentType", "contentType", ",", "String", "text", ",", "int", "relatedUid", ",...
Formatting content for Dialog List and Notifications @param senderId sender of message (used in service messages) @param contentType type of content @param text text of message @param relatedUid optional related uid @return formatted content
[ "Formatting", "content", "for", "Dialog", "List", "and", "Notifications" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java#L296-L363
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestClient.java
RestClient.createWebTarget
private WebTarget createWebTarget(String restPath, Map<String, String> queryParams) { """ Creates the web target. @param restPath the rest path @param queryParams the query params @return the web target """ WebTarget webTarget; try { URI u = new URI(this.baseURI + "/plugins/restapi/v1/" + restPat...
java
private WebTarget createWebTarget(String restPath, Map<String, String> queryParams) { WebTarget webTarget; try { URI u = new URI(this.baseURI + "/plugins/restapi/v1/" + restPath); Client client = createRestClient(); webTarget = client.target(u); if (queryParams != null && !queryParams.isEmpty()) { ...
[ "private", "WebTarget", "createWebTarget", "(", "String", "restPath", ",", "Map", "<", "String", ",", "String", ">", "queryParams", ")", "{", "WebTarget", "webTarget", ";", "try", "{", "URI", "u", "=", "new", "URI", "(", "this", ".", "baseURI", "+", "\"/...
Creates the web target. @param restPath the rest path @param queryParams the query params @return the web target
[ "Creates", "the", "web", "target", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestClient.java#L207-L228
Netflix/ribbon
ribbon-core/src/main/java/com/netflix/client/ssl/AbstractSslContextFactory.java
AbstractSslContextFactory.createKeyManagers
private KeyManager[] createKeyManagers() throws ClientSslSocketFactoryException { """ Creates the key managers to be used by the factory from the associated key store and password. @return the newly created array of key managers @throws ClientSslSocketFactoryException if an exception is detected in loading the...
java
private KeyManager[] createKeyManagers() throws ClientSslSocketFactoryException { final KeyManagerFactory factory; try { factory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); factory.init(this.keyStore, this.keyStorePassword.toCharArray()); }...
[ "private", "KeyManager", "[", "]", "createKeyManagers", "(", ")", "throws", "ClientSslSocketFactoryException", "{", "final", "KeyManagerFactory", "factory", ";", "try", "{", "factory", "=", "KeyManagerFactory", ".", "getInstance", "(", "KeyManagerFactory", ".", "getDe...
Creates the key managers to be used by the factory from the associated key store and password. @return the newly created array of key managers @throws ClientSslSocketFactoryException if an exception is detected in loading the key store
[ "Creates", "the", "key", "managers", "to", "be", "used", "by", "the", "factory", "from", "the", "associated", "key", "store", "and", "password", "." ]
train
https://github.com/Netflix/ribbon/blob/d15cd7715b0bf2f64ae6ca98c5e4d184f178e261/ribbon-core/src/main/java/com/netflix/client/ssl/AbstractSslContextFactory.java#L124-L146
roboconf/roboconf-platform
core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/utils/RestServicesUtils.java
RestServicesUtils.handleError
public static ResponseBuilder handleError( int status, RestError restError, String lang ) { """ Handles an error and makes the magic stuff so that users can understand it. @param status the response's status @param restError a REST error @param lang the user language @return a response builder """ List<...
java
public static ResponseBuilder handleError( int status, RestError restError, String lang ) { List<RoboconfError> errors = new ArrayList<> (); errors.add( restError ); if( restError.getException() instanceof InvalidApplicationException ) { errors.addAll(((InvalidApplicationException) restError.getException()).g...
[ "public", "static", "ResponseBuilder", "handleError", "(", "int", "status", ",", "RestError", "restError", ",", "String", "lang", ")", "{", "List", "<", "RoboconfError", ">", "errors", "=", "new", "ArrayList", "<>", "(", ")", ";", "errors", ".", "add", "("...
Handles an error and makes the magic stuff so that users can understand it. @param status the response's status @param restError a REST error @param lang the user language @return a response builder
[ "Handles", "an", "error", "and", "makes", "the", "magic", "stuff", "so", "that", "users", "can", "understand", "it", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/utils/RestServicesUtils.java#L62-L88
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/processor/ExtendedSwidProcessor.java
ExtendedSwidProcessor.setSku
public ExtendedSwidProcessor setSku(final String sku) { """ Defines product stock keeping unit (tag: sku). @param sku product stock keeping unit @return a reference to this object. """ swidTag.setSku(new Token(sku, idGenerator.nextId())); return this; }
java
public ExtendedSwidProcessor setSku(final String sku) { swidTag.setSku(new Token(sku, idGenerator.nextId())); return this; }
[ "public", "ExtendedSwidProcessor", "setSku", "(", "final", "String", "sku", ")", "{", "swidTag", ".", "setSku", "(", "new", "Token", "(", "sku", ",", "idGenerator", ".", "nextId", "(", ")", ")", ")", ";", "return", "this", ";", "}" ]
Defines product stock keeping unit (tag: sku). @param sku product stock keeping unit @return a reference to this object.
[ "Defines", "product", "stock", "keeping", "unit", "(", "tag", ":", "sku", ")", "." ]
train
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/processor/ExtendedSwidProcessor.java#L200-L203
james-hu/jabb-core
src/main/java/net/sf/jabb/util/db/dao/AbstractHibernateDao.java
AbstractHibernateDao.getAllByHql
public List< T> getAllByHql(String secondHalfOfHql, Object paramValue, Type paramType) { """ Get all by HQL with one pair of parameterType-value @param secondHalfOfHql @param paramValue @param paramType @return the query result """ return getAllByHql(secondHalfOfHql, new Object[] {paramValue}, new ...
java
public List< T> getAllByHql(String secondHalfOfHql, Object paramValue, Type paramType) { return getAllByHql(secondHalfOfHql, new Object[] {paramValue}, new Type[]{paramType}, null, null); }
[ "public", "List", "<", "T", ">", "getAllByHql", "(", "String", "secondHalfOfHql", ",", "Object", "paramValue", ",", "Type", "paramType", ")", "{", "return", "getAllByHql", "(", "secondHalfOfHql", ",", "new", "Object", "[", "]", "{", "paramValue", "}", ",", ...
Get all by HQL with one pair of parameterType-value @param secondHalfOfHql @param paramValue @param paramType @return the query result
[ "Get", "all", "by", "HQL", "with", "one", "pair", "of", "parameterType", "-", "value" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/db/dao/AbstractHibernateDao.java#L155-L157
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/MachinetagsApi.java
MachinetagsApi.getRecentValues
public Values getRecentValues(String namespace, String predicate, String addedSince, boolean sign) throws JinxException { """ Fetch recently used (or created) machine tags values. <br> This method does not require authentication. @param namespace (Optional) A namespace that all values should be restricted to...
java
public Values getRecentValues(String namespace, String predicate, String addedSince, boolean sign) throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.machinetags.getRecentValues"); if (!JinxUtils.isNullOrEmpty(namespace)) { params.put("namespace", namespa...
[ "public", "Values", "getRecentValues", "(", "String", "namespace", ",", "String", "predicate", ",", "String", "addedSince", ",", "boolean", "sign", ")", "throws", "JinxException", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "new", "TreeMap", ...
Fetch recently used (or created) machine tags values. <br> This method does not require authentication. @param namespace (Optional) A namespace that all values should be restricted to. @param predicate (Optional) A predicate that all values should be restricted to. @param addedSince (Optional) Only return machine ta...
[ "Fetch", "recently", "used", "(", "or", "created", ")", "machine", "tags", "values", ".", "<br", ">", "This", "method", "does", "not", "require", "authentication", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/MachinetagsApi.java#L151-L170
aoindustries/aocode-public
src/main/java/com/aoindustries/servlet/http/ServletUtil.java
ServletUtil.getResource
@Deprecated public static URL getResource(ServletContext servletContext, HttpServletRequest request, String relativeUrlPath) throws MalformedURLException { """ Gets the URL for the provided possibly-relative path or <code>null</code> if no resource is mapped to the path. @deprecated Use regular methods direc...
java
@Deprecated public static URL getResource(ServletContext servletContext, HttpServletRequest request, String relativeUrlPath) throws MalformedURLException { return servletContext.getResource(getAbsolutePath(request, relativeUrlPath)); }
[ "@", "Deprecated", "public", "static", "URL", "getResource", "(", "ServletContext", "servletContext", ",", "HttpServletRequest", "request", ",", "String", "relativeUrlPath", ")", "throws", "MalformedURLException", "{", "return", "servletContext", ".", "getResource", "("...
Gets the URL for the provided possibly-relative path or <code>null</code> if no resource is mapped to the path. @deprecated Use regular methods directly @see #getAbsoluteURL(javax.servlet.http.HttpServletRequest, java.lang.String) @see ServletContext#getResource(java.lang.String) @see ServletContextCache#getResou...
[ "Gets", "the", "URL", "for", "the", "provided", "possibly", "-", "relative", "path", "or", "<code", ">", "null<", "/", "code", ">", "if", "no", "resource", "is", "mapped", "to", "the", "path", "." ]
train
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/servlet/http/ServletUtil.java#L175-L178
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/fmt/JakartaInline.java
JakartaInline.setResponseLocale
static void setResponseLocale(PageContext pc, Locale locale) { """ /* Stores the given locale in the response object of the given page context, and stores the locale's associated charset in the javax.servlet.jsp.jstl.fmt.request.charset session attribute, which may be used by the <requestEncoding> action in a ...
java
static void setResponseLocale(PageContext pc, Locale locale) { // set response locale ServletResponse response = pc.getResponse(); response.setLocale(locale); // get response character encoding and store it in session attribute if (pc.getSession() != null) { try { ...
[ "static", "void", "setResponseLocale", "(", "PageContext", "pc", ",", "Locale", "locale", ")", "{", "// set response locale", "ServletResponse", "response", "=", "pc", ".", "getResponse", "(", ")", ";", "response", ".", "setLocale", "(", "locale", ")", ";", "/...
/* Stores the given locale in the response object of the given page context, and stores the locale's associated charset in the javax.servlet.jsp.jstl.fmt.request.charset session attribute, which may be used by the <requestEncoding> action in a page invoked by a form included in the response to set the request charset t...
[ "/", "*", "Stores", "the", "given", "locale", "in", "the", "response", "object", "of", "the", "given", "page", "context", "and", "stores", "the", "locale", "s", "associated", "charset", "in", "the", "javax", ".", "servlet", ".", "jsp", ".", "jstl", ".", ...
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/fmt/JakartaInline.java#L332-L345
treasure-data/td-client-java
src/main/java/com/treasuredata/client/TDHttpClient.java
TDHttpClient.call
public String call(TDApiRequest apiRequest, Optional<String> apiKeyCache) { """ Submit an API request and get the result as String value (e.g. json) @param apiRequest @param apiKeyCache @return """ String content = submitRequest(apiRequest, apiKeyCache, stringContentHandler); if (logger.is...
java
public String call(TDApiRequest apiRequest, Optional<String> apiKeyCache) { String content = submitRequest(apiRequest, apiKeyCache, stringContentHandler); if (logger.isTraceEnabled()) { logger.trace("response:\n{}", content); } return content; }
[ "public", "String", "call", "(", "TDApiRequest", "apiRequest", ",", "Optional", "<", "String", ">", "apiKeyCache", ")", "{", "String", "content", "=", "submitRequest", "(", "apiRequest", ",", "apiKeyCache", ",", "stringContentHandler", ")", ";", "if", "(", "lo...
Submit an API request and get the result as String value (e.g. json) @param apiRequest @param apiKeyCache @return
[ "Submit", "an", "API", "request", "and", "get", "the", "result", "as", "String", "value", "(", "e", ".", "g", ".", "json", ")" ]
train
https://github.com/treasure-data/td-client-java/blob/2769cbcf0e787d457344422cfcdde467399bd684/src/main/java/com/treasuredata/client/TDHttpClient.java#L481-L488
Gagravarr/VorbisJava
core/src/main/java/org/gagravarr/ogg/OggFile.java
OggFile.getPacketWriter
public OggPacketWriter getPacketWriter(int sid) { """ Creates a new Logical Bit Stream in the file, and returns a Writer for putting data into it. """ if(!writing) { throw new IllegalStateException("Can only write to a file opened with an OutputStream"); } seenSIDs.add(sid...
java
public OggPacketWriter getPacketWriter(int sid) { if(!writing) { throw new IllegalStateException("Can only write to a file opened with an OutputStream"); } seenSIDs.add(sid); return new OggPacketWriter(this, sid); }
[ "public", "OggPacketWriter", "getPacketWriter", "(", "int", "sid", ")", "{", "if", "(", "!", "writing", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Can only write to a file opened with an OutputStream\"", ")", ";", "}", "seenSIDs", ".", "add", "(", ...
Creates a new Logical Bit Stream in the file, and returns a Writer for putting data into it.
[ "Creates", "a", "new", "Logical", "Bit", "Stream", "in", "the", "file", "and", "returns", "a", "Writer", "for", "putting", "data", "into", "it", "." ]
train
https://github.com/Gagravarr/VorbisJava/blob/22b4d645b00386d59d17a336a2bc9d54db08df16/core/src/main/java/org/gagravarr/ogg/OggFile.java#L128-L134
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitIndex
@Override public R visitIndex(IndexTree node, P p) { """ {@inheritDoc} This implementation returns {@code null}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ R r = scan(node.getSearchTerm(), p); r = scanAndReduce(node.getDescription(), p, r); ...
java
@Override public R visitIndex(IndexTree node, P p) { R r = scan(node.getSearchTerm(), p); r = scanAndReduce(node.getDescription(), p, r); return r; }
[ "@", "Override", "public", "R", "visitIndex", "(", "IndexTree", "node", ",", "P", "p", ")", "{", "R", "r", "=", "scan", "(", "node", ".", "getSearchTerm", "(", ")", ",", "p", ")", ";", "r", "=", "scanAndReduce", "(", "node", ".", "getDescription", ...
{@inheritDoc} This implementation returns {@code null}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L268-L273
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/resource/SignatureRequest.java
SignatureRequest.addSigner
public void addSigner(String email, String name, int order) throws HelloSignException { """ Adds the signer with the given order to the list of signers for this request. NOTE: The order refers to the 1-base index, not 0-base. This is to reflect the indexing used by the HelloSign API. This means that adding an i...
java
public void addSigner(String email, String name, int order) throws HelloSignException { try { signers.add((order - 1), new Signer(email, name)); } catch (Exception ex) { throw new HelloSignException(ex); } }
[ "public", "void", "addSigner", "(", "String", "email", ",", "String", "name", ",", "int", "order", ")", "throws", "HelloSignException", "{", "try", "{", "signers", ".", "add", "(", "(", "order", "-", "1", ")", ",", "new", "Signer", "(", "email", ",", ...
Adds the signer with the given order to the list of signers for this request. NOTE: The order refers to the 1-base index, not 0-base. This is to reflect the indexing used by the HelloSign API. This means that adding an item at order 1 will place it in the 0th index of the list (it will be the first item). @param email...
[ "Adds", "the", "signer", "with", "the", "given", "order", "to", "the", "list", "of", "signers", "for", "this", "request", ".", "NOTE", ":", "The", "order", "refers", "to", "the", "1", "-", "base", "index", "not", "0", "-", "base", ".", "This", "is", ...
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/SignatureRequest.java#L193-L199
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfig.java
ClientConfig.getReliableTopicConfig
public ClientReliableTopicConfig getReliableTopicConfig(String name) { """ Gets the ClientReliableTopicConfig for a given reliable topic name. @param name the name of the reliable topic @return the found config. If none is found, a default configured one is returned. """ return ConfigUtils.getConfi...
java
public ClientReliableTopicConfig getReliableTopicConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, reliableTopicConfigMap, name, ClientReliableTopicConfig.class, new BiConsumer<ClientReliableTopicConfig, String>() { @Override public ...
[ "public", "ClientReliableTopicConfig", "getReliableTopicConfig", "(", "String", "name", ")", "{", "return", "ConfigUtils", ".", "getConfig", "(", "configPatternMatcher", ",", "reliableTopicConfigMap", ",", "name", ",", "ClientReliableTopicConfig", ".", "class", ",", "ne...
Gets the ClientReliableTopicConfig for a given reliable topic name. @param name the name of the reliable topic @return the found config. If none is found, a default configured one is returned.
[ "Gets", "the", "ClientReliableTopicConfig", "for", "a", "given", "reliable", "topic", "name", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfig.java#L307-L315
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java
NotificationService.getGroups
public void getGroups(String startFrom, boolean forward, Collection<Recipient> result) { """ Returns a bolus of mail groups. @param startFrom Starting entry. @param forward Direction of traversal. @param result Result of lookup. """ List<String> lst = broker.callRPCList("RGUTRPC FILGET", null, 3.8...
java
public void getGroups(String startFrom, boolean forward, Collection<Recipient> result) { List<String> lst = broker.callRPCList("RGUTRPC FILGET", null, 3.8, startFrom, forward ? 1 : -1, MG_SCREEN, 40); toRecipients(lst, true, startFrom, result); }
[ "public", "void", "getGroups", "(", "String", "startFrom", ",", "boolean", "forward", ",", "Collection", "<", "Recipient", ">", "result", ")", "{", "List", "<", "String", ">", "lst", "=", "broker", ".", "callRPCList", "(", "\"RGUTRPC FILGET\"", ",", "null", ...
Returns a bolus of mail groups. @param startFrom Starting entry. @param forward Direction of traversal. @param result Result of lookup.
[ "Returns", "a", "bolus", "of", "mail", "groups", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java#L62-L65
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ReComputeEndDateHandler.java
ReComputeEndDateHandler.init
public void init(BaseField field, String targetFieldName, NumberField fldTimeField) { """ Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param iTargetFieldSeq The date field sequence in this owner to use to calc the difference. @param fldOtherDate The other...
java
public void init(BaseField field, String targetFieldName, NumberField fldTimeField) { m_fldTimeField = fldTimeField; super.init(field, targetFieldName, null); }
[ "public", "void", "init", "(", "BaseField", "field", ",", "String", "targetFieldName", ",", "NumberField", "fldTimeField", ")", "{", "m_fldTimeField", "=", "fldTimeField", ";", "super", ".", "init", "(", "field", ",", "targetFieldName", ",", "null", ")", ";", ...
Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param iTargetFieldSeq The date field sequence in this owner to use to calc the difference. @param fldOtherDate The other date field to use in calculating the date difference. If null, uses the current time.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ReComputeEndDateHandler.java#L56-L60
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/csv/internal/CsvParser.java
CsvParser.isNextCharacterEscapedQuote
private boolean isNextCharacterEscapedQuote(String nextLine, boolean inQuotes, int i) { """ precondition: the current character is a quote or an escape @param nextLine the current line @param inQuotes true if the current context is quoted @param i current index in line @return true if the following character...
java
private boolean isNextCharacterEscapedQuote(String nextLine, boolean inQuotes, int i) { return inQuotes // we are in quotes, therefore there can be escaped // quotes in here. && nextLine.length() > (i + 1) // there is indeed another // character to check. && format.isDelimiter(nextLi...
[ "private", "boolean", "isNextCharacterEscapedQuote", "(", "String", "nextLine", ",", "boolean", "inQuotes", ",", "int", "i", ")", "{", "return", "inQuotes", "// we are in quotes, therefore there can be escaped", "// quotes in here.", "&&", "nextLine", ".", "length", "(", ...
precondition: the current character is a quote or an escape @param nextLine the current line @param inQuotes true if the current context is quoted @param i current index in line @return true if the following character is a quote
[ "precondition", ":", "the", "current", "character", "is", "a", "quote", "or", "an", "escape" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/csv/internal/CsvParser.java#L202-L208
sculptor/sculptor
sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/FactoryHelper.java
FactoryHelper.newInstanceFromName
public static Object newInstanceFromName(Object enclosingObject, String className, ClassLoader classLoader) { """ Creates an instance from a String class name. @param className full class name @param classLoader the class will be loaded with this ClassLoader @return new instance of the class @throws Runtim...
java
public static Object newInstanceFromName(Object enclosingObject, String className, ClassLoader classLoader) { try { Class<?> clazz = Class.forName(className, false, classLoader); for (Constructor<?> c : clazz.getConstructors()) { Class<?>[] parameterTypes = c.getParameterTypes(); if (parameterTypes...
[ "public", "static", "Object", "newInstanceFromName", "(", "Object", "enclosingObject", ",", "String", "className", ",", "ClassLoader", "classLoader", ")", "{", "try", "{", "Class", "<", "?", ">", "clazz", "=", "Class", ".", "forName", "(", "className", ",", ...
Creates an instance from a String class name. @param className full class name @param classLoader the class will be loaded with this ClassLoader @return new instance of the class @throws RuntimeException if class not found or could not be instantiated
[ "Creates", "an", "instance", "from", "a", "String", "class", "name", "." ]
train
https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/FactoryHelper.java#L64-L81
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/databases/AbstractDatabase.java
AbstractDatabase.defineTableParent
public T defineTableParent(final Connection _con, final String _table, final String _parentTable) throws InstallationException { """ For a new created SQL table the column <code>ID</code> is update with a foreign key to a parent table. @para...
java
public T defineTableParent(final Connection _con, final String _table, final String _parentTable) throws InstallationException { return addForeignKey(_con, _table, _table + "_FK_ID", "ID", _parentTable + "(ID)", false); }
[ "public", "T", "defineTableParent", "(", "final", "Connection", "_con", ",", "final", "String", "_table", ",", "final", "String", "_parentTable", ")", "throws", "InstallationException", "{", "return", "addForeignKey", "(", "_con", ",", "_table", ",", "_table", "...
For a new created SQL table the column <code>ID</code> is update with a foreign key to a parent table. @param _con SQL connection @param _table name of the SQL table to update @param _parentTable name of the parent table @return this instance @throws InstallationException if the update of the table failed
[ "For", "a", "new", "created", "SQL", "table", "the", "column", "<code", ">", "ID<", "/", "code", ">", "is", "update", "with", "a", "foreign", "key", "to", "a", "parent", "table", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/databases/AbstractDatabase.java#L646-L652
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.logSlowQueryByJUL
public ProxyDataSourceBuilder logSlowQueryByJUL(long thresholdTime, TimeUnit timeUnit, Level logLevel) { """ Register {@link JULSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param logLevel log level for JUL @return builder @since...
java
public ProxyDataSourceBuilder logSlowQueryByJUL(long thresholdTime, TimeUnit timeUnit, Level logLevel) { return logSlowQueryByJUL(thresholdTime, timeUnit, logLevel, null); }
[ "public", "ProxyDataSourceBuilder", "logSlowQueryByJUL", "(", "long", "thresholdTime", ",", "TimeUnit", "timeUnit", ",", "Level", "logLevel", ")", "{", "return", "logSlowQueryByJUL", "(", "thresholdTime", ",", "timeUnit", ",", "logLevel", ",", "null", ")", ";", "}...
Register {@link JULSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param logLevel log level for JUL @return builder @since 1.4.1
[ "Register", "{", "@link", "JULSlowQueryListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L452-L454
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java
Normalizer.quickCheck
@Deprecated public static QuickCheckResult quickCheck(char[] source, Mode mode, int options) { """ Convenience method. @param source Array of characters for determining if it is in a normalized format @param mode normalization format (Normalizer.NFC,Normalizer.NFD, Normalizer.NFKC,Normalizer.NFKD) @pa...
java
@Deprecated public static QuickCheckResult quickCheck(char[] source, Mode mode, int options) { return quickCheck(source, 0, source.length, mode, options); }
[ "@", "Deprecated", "public", "static", "QuickCheckResult", "quickCheck", "(", "char", "[", "]", "source", ",", "Mode", "mode", ",", "int", "options", ")", "{", "return", "quickCheck", "(", "source", ",", "0", ",", "source", ".", "length", ",", "mode", ",...
Convenience method. @param source Array of characters for determining if it is in a normalized format @param mode normalization format (Normalizer.NFC,Normalizer.NFD, Normalizer.NFKC,Normalizer.NFKD) @param options Options for use with exclusion set and tailored Normalization The only option that is currently reco...
[ "Convenience", "method", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L1027-L1030
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java
ST_GeometryShadow.createShadowPolygons
private static void createShadowPolygons(Collection<Polygon> shadows, Coordinate[] coordinates, double[] shadow, GeometryFactory factory) { """ Create and collect shadow polygons. @param shadows @param coordinates @param shadow @param factory """ for (int i = 1; i < coordinates.length; i++) { ...
java
private static void createShadowPolygons(Collection<Polygon> shadows, Coordinate[] coordinates, double[] shadow, GeometryFactory factory) { for (int i = 1; i < coordinates.length; i++) { Coordinate startCoord = coordinates[i - 1]; Coordinate endCoord = coordinates[i]; Coordin...
[ "private", "static", "void", "createShadowPolygons", "(", "Collection", "<", "Polygon", ">", "shadows", ",", "Coordinate", "[", "]", "coordinates", ",", "double", "[", "]", "shadow", ",", "GeometryFactory", "factory", ")", "{", "for", "(", "int", "i", "=", ...
Create and collect shadow polygons. @param shadows @param coordinates @param shadow @param factory
[ "Create", "and", "collect", "shadow", "polygons", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/earth/ST_GeometryShadow.java#L235-L248
facebookarchive/hadoop-20
src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/LocalStore.java
LocalStore.zipCompress
public static void zipCompress(String filename) throws IOException { """ Compress a text file using the ZIP compressing algorithm. @param filename the path to the file to be compressed """ FileOutputStream fos = new FileOutputStream(filename + COMPRESSION_SUFFIX); CheckedOutputStream csum = new Chec...
java
public static void zipCompress(String filename) throws IOException { FileOutputStream fos = new FileOutputStream(filename + COMPRESSION_SUFFIX); CheckedOutputStream csum = new CheckedOutputStream(fos, new CRC32()); ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(csum)); out.setComment...
[ "public", "static", "void", "zipCompress", "(", "String", "filename", ")", "throws", "IOException", "{", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "filename", "+", "COMPRESSION_SUFFIX", ")", ";", "CheckedOutputStream", "csum", "=", "new", "Ch...
Compress a text file using the ZIP compressing algorithm. @param filename the path to the file to be compressed
[ "Compress", "a", "text", "file", "using", "the", "ZIP", "compressing", "algorithm", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/LocalStore.java#L206-L221
lucee/Lucee
core/src/main/java/lucee/transformer/cfml/expression/AbstrCFMLExprTransformer.java
AbstrCFMLExprTransformer.multiLineComment
private boolean multiLineComment(Data data) throws TemplateException { """ Liest einen Mehrzeiligen Kommentar ein. <br /> EBNF:<br /> <code>?-"*<!-- -->/";</code> @return bool Wurde ein Kommentar entfernt? @throws TemplateException """ SourceCode cfml = data.srcCode; if (!cfml.forwardIfCurrent("/*")) r...
java
private boolean multiLineComment(Data data) throws TemplateException { SourceCode cfml = data.srcCode; if (!cfml.forwardIfCurrent("/*")) return false; int pos = cfml.getPos(); boolean isDocComment = cfml.isCurrent('*'); while (cfml.isValidIndex()) { if (cfml.isCurrent("*/")) break; cfml.next(); } if (!...
[ "private", "boolean", "multiLineComment", "(", "Data", "data", ")", "throws", "TemplateException", "{", "SourceCode", "cfml", "=", "data", ".", "srcCode", ";", "if", "(", "!", "cfml", ".", "forwardIfCurrent", "(", "\"/*\"", ")", ")", "return", "false", ";", ...
Liest einen Mehrzeiligen Kommentar ein. <br /> EBNF:<br /> <code>?-"*<!-- -->/";</code> @return bool Wurde ein Kommentar entfernt? @throws TemplateException
[ "Liest", "einen", "Mehrzeiligen", "Kommentar", "ein", ".", "<br", "/", ">", "EBNF", ":", "<br", "/", ">", "<code", ">", "?", "-", "*", "<!", "--", "--", ">", "/", ";", "<", "/", "code", ">" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/cfml/expression/AbstrCFMLExprTransformer.java#L1976-L1994
google/closure-compiler
src/com/google/javascript/jscomp/ProcessClosurePrimitives.java
ProcessClosurePrimitives.verifyProvide
private boolean verifyProvide(Node methodName, Node arg) { """ Verifies that a provide method call has exactly one argument, and that it's a string literal and that the contents of the string are valid JS tokens. Reports a compile error if it doesn't. @return Whether the argument checked out okay """ i...
java
private boolean verifyProvide(Node methodName, Node arg) { if (!verifyLastArgumentIsString(methodName, arg)) { return false; } if (!NodeUtil.isValidQualifiedName( compiler.getOptions().getLanguageIn().toFeatureSet(), arg.getString())) { compiler.report( JSError.make( ...
[ "private", "boolean", "verifyProvide", "(", "Node", "methodName", ",", "Node", "arg", ")", "{", "if", "(", "!", "verifyLastArgumentIsString", "(", "methodName", ",", "arg", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "NodeUtil", ".", "isV...
Verifies that a provide method call has exactly one argument, and that it's a string literal and that the contents of the string are valid JS tokens. Reports a compile error if it doesn't. @return Whether the argument checked out okay
[ "Verifies", "that", "a", "provide", "method", "call", "has", "exactly", "one", "argument", "and", "that", "it", "s", "a", "string", "literal", "and", "that", "the", "contents", "of", "the", "string", "are", "valid", "JS", "tokens", ".", "Reports", "a", "...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ProcessClosurePrimitives.java#L831-L848
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/BaseField.java
BaseField.moveFields
public static void moveFields(PdfDictionary from, PdfDictionary to) { """ Moves the field keys from <CODE>from</CODE> to <CODE>to</CODE>. The moved keys are removed from <CODE>from</CODE>. @param from the source @param to the destination. It may be <CODE>null</CODE> """ for (Iterator i = from.getKey...
java
public static void moveFields(PdfDictionary from, PdfDictionary to) { for (Iterator i = from.getKeys().iterator(); i.hasNext();) { PdfName key = (PdfName)i.next(); if (fieldKeys.containsKey(key)) { if (to != null) to.put(key, from.get(key)); ...
[ "public", "static", "void", "moveFields", "(", "PdfDictionary", "from", ",", "PdfDictionary", "to", ")", "{", "for", "(", "Iterator", "i", "=", "from", ".", "getKeys", "(", ")", ".", "iterator", "(", ")", ";", "i", ".", "hasNext", "(", ")", ";", ")",...
Moves the field keys from <CODE>from</CODE> to <CODE>to</CODE>. The moved keys are removed from <CODE>from</CODE>. @param from the source @param to the destination. It may be <CODE>null</CODE>
[ "Moves", "the", "field", "keys", "from", "<CODE", ">", "from<", "/", "CODE", ">", "to", "<CODE", ">", "to<", "/", "CODE", ">", ".", "The", "moved", "keys", "are", "removed", "from", "<CODE", ">", "from<", "/", "CODE", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/BaseField.java#L664-L673
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java
HtmlBuilder.tableStyle
public static String tableStyle(String style, String... content) { """ Build a HTML Table with given CSS style for a string. Given content does <b>not</b> consists of HTML snippets and as such is being prepared with {@link HtmlBuilder#htmlEncode(String)}. @param style style for table element @param content c...
java
public static String tableStyle(String style, String... content) { return tagStyle(Html.Tag.TABLE, style, content); }
[ "public", "static", "String", "tableStyle", "(", "String", "style", ",", "String", "...", "content", ")", "{", "return", "tagStyle", "(", "Html", ".", "Tag", ".", "TABLE", ",", "style", ",", "content", ")", ";", "}" ]
Build a HTML Table with given CSS style for a string. Given content does <b>not</b> consists of HTML snippets and as such is being prepared with {@link HtmlBuilder#htmlEncode(String)}. @param style style for table element @param content content string @return HTML table element as string
[ "Build", "a", "HTML", "Table", "with", "given", "CSS", "style", "for", "a", "string", ".", "Given", "content", "does", "<b", ">", "not<", "/", "b", ">", "consists", "of", "HTML", "snippets", "and", "as", "such", "is", "being", "prepared", "with", "{", ...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L80-L82
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/receivers/db/DBReceiverJob.java
DBReceiverJob.getException
ThrowableInformation getException(Connection connection, long id) throws SQLException { """ Retrieve the exception string representation from the logging_event_exception table. @param connection @param id @throws SQLException """ PreparedStatement statement = null; try { statement =...
java
ThrowableInformation getException(Connection connection, long id) throws SQLException { PreparedStatement statement = null; try { statement = connection.prepareStatement(sqlException); statement.setLong(1, id); ResultSet rs = statement.executeQuery(); Vector v = new Vector(); ...
[ "ThrowableInformation", "getException", "(", "Connection", "connection", ",", "long", "id", ")", "throws", "SQLException", "{", "PreparedStatement", "statement", "=", "null", ";", "try", "{", "statement", "=", "connection", ".", "prepareStatement", "(", "sqlExceptio...
Retrieve the exception string representation from the logging_event_exception table. @param connection @param id @throws SQLException
[ "Retrieve", "the", "exception", "string", "representation", "from", "the", "logging_event_exception", "table", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/db/DBReceiverJob.java#L198-L227
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/TypeDiffComputer.java
TypeDiffComputer.computeAnyFieldDifferences
@SuppressWarnings("unchecked") private static void computeAnyFieldDifferences(FieldNode oField, FieldNode nField, TypeDelta td) { """ Check the properties of the field - if they have changed at all then record what kind of change for the field. Thinking the type delta should have a map from names to a delta desc...
java
@SuppressWarnings("unchecked") private static void computeAnyFieldDifferences(FieldNode oField, FieldNode nField, TypeDelta td) { // Want to record things that are different between these two fields... FieldDelta fd = new FieldDelta(oField.name); if (oField.access != nField.access) { // access changed fd.s...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "void", "computeAnyFieldDifferences", "(", "FieldNode", "oField", ",", "FieldNode", "nField", ",", "TypeDelta", "td", ")", "{", "// Want to record things that are different between these two fields...", ...
Check the properties of the field - if they have changed at all then record what kind of change for the field. Thinking the type delta should have a map from names to a delta describing (capturing) the change.
[ "Check", "the", "properties", "of", "the", "field", "-", "if", "they", "have", "changed", "at", "all", "then", "record", "what", "kind", "of", "change", "for", "the", "field", ".", "Thinking", "the", "type", "delta", "should", "have", "a", "map", "from",...
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/TypeDiffComputer.java#L153-L174
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/api/histogram/PercentileTimer.java
PercentileTimer.computeIfAbsent
private static PercentileTimer computeIfAbsent(Registry registry, Id id, long min, long max) { """ Only create a new instance of the counter if there is not a cached copy. The array for keeping track of the counter per bucket is quite large (1-2k depending on pointer size) and can lead to a high allocation rate ...
java
private static PercentileTimer computeIfAbsent(Registry registry, Id id, long min, long max) { Object timer = Utils.computeIfAbsent( registry.state(), id, i -> new PercentileTimer(registry, id, min, max)); return (timer instanceof PercentileTimer) ? ((PercentileTimer) timer).withRange(min, max) ...
[ "private", "static", "PercentileTimer", "computeIfAbsent", "(", "Registry", "registry", ",", "Id", "id", ",", "long", "min", ",", "long", "max", ")", "{", "Object", "timer", "=", "Utils", ".", "computeIfAbsent", "(", "registry", ".", "state", "(", ")", ","...
Only create a new instance of the counter if there is not a cached copy. The array for keeping track of the counter per bucket is quite large (1-2k depending on pointer size) and can lead to a high allocation rate if the timer is not reused in a high volume call site.
[ "Only", "create", "a", "new", "instance", "of", "the", "counter", "if", "there", "is", "not", "a", "cached", "copy", ".", "The", "array", "for", "keeping", "track", "of", "the", "counter", "per", "bucket", "is", "quite", "large", "(", "1", "-", "2k", ...
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/api/histogram/PercentileTimer.java#L75-L81
FedericoPecora/meta-csp-framework
src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelope.java
TrajectoryEnvelope.updateDuration
public void updateDuration() { """ Imposes a temporal constraint that models the minimum duration of this {@link TrajectoryEnvelope}, derived from the minimum transition times between path poses (deltaTs). """ long minDuration = 0; Trajectory traj = this.getTrajectory(); for (int i = 0; i < traj.getDTs...
java
public void updateDuration() { long minDuration = 0; Trajectory traj = this.getTrajectory(); for (int i = 0; i < traj.getDTs().length; i++) { minDuration += traj.getDTs()[i]*RESOLUTION; } duration = new AllenIntervalConstraint(AllenIntervalConstraint.Type.Duration, new Bounds(minDuration,APSPSolver.INF)); ...
[ "public", "void", "updateDuration", "(", ")", "{", "long", "minDuration", "=", "0", ";", "Trajectory", "traj", "=", "this", ".", "getTrajectory", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "traj", ".", "getDTs", "(", ")", ".", ...
Imposes a temporal constraint that models the minimum duration of this {@link TrajectoryEnvelope}, derived from the minimum transition times between path poses (deltaTs).
[ "Imposes", "a", "temporal", "constraint", "that", "models", "the", "minimum", "duration", "of", "this", "{" ]
train
https://github.com/FedericoPecora/meta-csp-framework/blob/42aaef2e2b76d0f738427f0dd9653c4f62b40517/src/main/java/org/metacsp/multi/spatioTemporal/paths/TrajectoryEnvelope.java#L836-L848
mgormley/pacaya
src/main/java/edu/jhu/pacaya/parse/dep/ParentsArray.java
ParentsArray.getChildrenOf
public static IntArrayList getChildrenOf(int[] parents, int parent) { """ Gets the children of the specified parent. @param parents A parents array. @param parent The parent for which the children should be extracted. @return The indices of the children. """ IntArrayList children = new IntArrayList...
java
public static IntArrayList getChildrenOf(int[] parents, int parent) { IntArrayList children = new IntArrayList(); for (int i=0; i<parents.length; i++) { if (parents[i] == parent) { children.add(i); } } return children; }
[ "public", "static", "IntArrayList", "getChildrenOf", "(", "int", "[", "]", "parents", ",", "int", "parent", ")", "{", "IntArrayList", "children", "=", "new", "IntArrayList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "parents", "."...
Gets the children of the specified parent. @param parents A parents array. @param parent The parent for which the children should be extracted. @return The indices of the children.
[ "Gets", "the", "children", "of", "the", "specified", "parent", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/parse/dep/ParentsArray.java#L200-L208
chrisjenx/Calligraphy
calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyUtils.java
CalligraphyUtils.pullFontPathFromTheme
static String pullFontPathFromTheme(Context context, int styleAttrId, int subStyleAttrId, int[] attributeId) { """ Last but not least, try to pull the Font Path from the Theme, which is defined. @param context Activity Context @param styleAttrId Theme style id @param subStyleAttrId the sub style fro...
java
static String pullFontPathFromTheme(Context context, int styleAttrId, int subStyleAttrId, int[] attributeId) { if (styleAttrId == -1 || attributeId == null) return null; final Resources.Theme theme = context.getTheme(); final TypedValue value = new TypedValue(); theme.resol...
[ "static", "String", "pullFontPathFromTheme", "(", "Context", "context", ",", "int", "styleAttrId", ",", "int", "subStyleAttrId", ",", "int", "[", "]", "attributeId", ")", "{", "if", "(", "styleAttrId", "==", "-", "1", "||", "attributeId", "==", "null", ")", ...
Last but not least, try to pull the Font Path from the Theme, which is defined. @param context Activity Context @param styleAttrId Theme style id @param subStyleAttrId the sub style from the theme to look up after the first style @param attributeId if -1 returns null. @return null if no theme or attribute...
[ "Last", "but", "not", "least", "try", "to", "pull", "the", "Font", "Path", "from", "the", "Theme", "which", "is", "defined", "." ]
train
https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyUtils.java#L281-L313
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesInner.java
VirtualNetworkRulesInner.getAsync
public Observable<VirtualNetworkRuleInner> getAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { """ Gets the specified Data Lake Store virtual network rule. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store accou...
java
public Observable<VirtualNetworkRuleInner> getAsync(String resourceGroupName, String accountName, String virtualNetworkRuleName) { return getWithServiceResponseAsync(resourceGroupName, accountName, virtualNetworkRuleName).map(new Func1<ServiceResponse<VirtualNetworkRuleInner>, VirtualNetworkRuleInner>() { ...
[ "public", "Observable", "<", "VirtualNetworkRuleInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "virtualNetworkRuleName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountNa...
Gets the specified Data Lake Store virtual network rule. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store account. @param virtualNetworkRuleName The name of the virtual network rule to retrieve. @throws IllegalArgumentException thrown if parameters fail ...
[ "Gets", "the", "specified", "Data", "Lake", "Store", "virtual", "network", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/VirtualNetworkRulesInner.java#L355-L362
defei/codelogger-utils
src/main/java/org/codelogger/utils/DateUtils.java
DateUtils.getDateOfYearsBack
public static Date getDateOfYearsBack(final int yearsBack, final Date date) { """ Get specify years back from given date. @param yearsBack how many years want to be back. @param date date to be handled. @return a new Date object. """ return dateBack(Calendar.YEAR, yearsBack, date); }
java
public static Date getDateOfYearsBack(final int yearsBack, final Date date) { return dateBack(Calendar.YEAR, yearsBack, date); }
[ "public", "static", "Date", "getDateOfYearsBack", "(", "final", "int", "yearsBack", ",", "final", "Date", "date", ")", "{", "return", "dateBack", "(", "Calendar", ".", "YEAR", ",", "yearsBack", ",", "date", ")", ";", "}" ]
Get specify years back from given date. @param yearsBack how many years want to be back. @param date date to be handled. @return a new Date object.
[ "Get", "specify", "years", "back", "from", "given", "date", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/DateUtils.java#L221-L224
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageSaver.java
ImageSaver.saveImage
public static void saveImage(Image image, File file, String imgFileFormat) { """ Saves image using {@link #saveImage(Image, OutputStream, String)}. @param image to be saved @param file to save image to @param imgFileFormat image file format. Consult {@link #getSaveableImageFileFormats()} @throws ImageSaverExce...
java
public static void saveImage(Image image, File file, String imgFileFormat){ FileOutputStream fos = null; try { fos = new FileOutputStream(file); saveImage(image, fos, imgFileFormat); } catch (FileNotFoundException e) { throw new ImageSaverException(e); } finally { closeQuietly(fos); } }
[ "public", "static", "void", "saveImage", "(", "Image", "image", ",", "File", "file", ",", "String", "imgFileFormat", ")", "{", "FileOutputStream", "fos", "=", "null", ";", "try", "{", "fos", "=", "new", "FileOutputStream", "(", "file", ")", ";", "saveImage...
Saves image using {@link #saveImage(Image, OutputStream, String)}. @param image to be saved @param file to save image to @param imgFileFormat image file format. Consult {@link #getSaveableImageFileFormats()} @throws ImageSaverException if an IOException occured during the process, no OutputStream could be created due t...
[ "Saves", "image", "using", "{" ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageSaver.java#L144-L154
couchbase/java-dcp-client
src/main/java/com/couchbase/client/dcp/Client.java
Client.dataEventHandler
public void dataEventHandler(final DataEventHandler dataEventHandler) { """ Stores a {@link DataEventHandler} to be called when data events happen. <p> All events (passed as {@link ByteBuf}s) that the callback receives need to be handled and at least released (by using {@link ByteBuf#release()}, otherwise they ...
java
public void dataEventHandler(final DataEventHandler dataEventHandler) { env.setDataEventHandler(new DataEventHandler() { @Override public void onEvent(ChannelFlowController flowController, ByteBuf event) { if (DcpMutationMessage.is(event)) { short partition = DcpMutationMessage.partiti...
[ "public", "void", "dataEventHandler", "(", "final", "DataEventHandler", "dataEventHandler", ")", "{", "env", ".", "setDataEventHandler", "(", "new", "DataEventHandler", "(", ")", "{", "@", "Override", "public", "void", "onEvent", "(", "ChannelFlowController", "flowC...
Stores a {@link DataEventHandler} to be called when data events happen. <p> All events (passed as {@link ByteBuf}s) that the callback receives need to be handled and at least released (by using {@link ByteBuf#release()}, otherwise they will leak. <p> The following messages can happen and should be handled depending on ...
[ "Stores", "a", "{", "@link", "DataEventHandler", "}", "to", "be", "called", "when", "data", "events", "happen", ".", "<p", ">", "All", "events", "(", "passed", "as", "{", "@link", "ByteBuf", "}", "s", ")", "that", "the", "callback", "receives", "need", ...
train
https://github.com/couchbase/java-dcp-client/blob/75359d8c081d6c575f8087cf7c28d24ab24c6421/src/main/java/com/couchbase/client/dcp/Client.java#L292-L317
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dslTemplate
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, Object... args) { """ Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression """ return dslTemplate(cl, createTemplate(t...
java
public static <T> DslTemplate<T> dslTemplate(Class<? extends T> cl, String template, Object... args) { return dslTemplate(cl, createTemplate(template), ImmutableList.copyOf(args)); }
[ "public", "static", "<", "T", ">", "DslTemplate", "<", "T", ">", "dslTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "String", "template", ",", "Object", "...", "args", ")", "{", "return", "dslTemplate", "(", "cl", ",", "createTempla...
Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L320-L322
HeidelTime/heideltime
src/jmaxent/Feature.java
Feature.FeatureInit
public void FeatureInit(String str, Map cpStr2Int, Map lbStr2Int) { """ Feature init. @param str the str @param cpStr2Int the cp str2 int @param lbStr2Int the lb str2 int """ StringTokenizer strTok = new StringTokenizer(str, " \t\r\n"); // <label> <cp> <idx> <wgt> int len = strTok.countTokens(); if ...
java
public void FeatureInit(String str, Map cpStr2Int, Map lbStr2Int) { StringTokenizer strTok = new StringTokenizer(str, " \t\r\n"); // <label> <cp> <idx> <wgt> int len = strTok.countTokens(); if (len != 4) { return; } String labelStr = strTok.nextToken(); String cpStr = strTok.nextToken(); int idx = Inte...
[ "public", "void", "FeatureInit", "(", "String", "str", ",", "Map", "cpStr2Int", ",", "Map", "lbStr2Int", ")", "{", "StringTokenizer", "strTok", "=", "new", "StringTokenizer", "(", "str", ",", "\" \\t\\r\\n\"", ")", ";", "// <label> <cp> <idx> <wgt>", "int", "len...
Feature init. @param str the str @param cpStr2Int the cp str2 int @param lbStr2Int the lb str2 int
[ "Feature", "init", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jmaxent/Feature.java#L129-L151
wcm-io/wcm-io-sling
commons/src/main/java/io/wcm/sling/commons/request/RequestParam.java
RequestParam.get
public static @Nullable String get(@NotNull ServletRequest request, @NotNull String param, @Nullable String defaultValue) { """ Returns a request parameter.<br> In addition the method fixes problems with incorrect UTF-8 characters returned by the servlet engine. All character data is converted from ISO-8859-1 to...
java
public static @Nullable String get(@NotNull ServletRequest request, @NotNull String param, @Nullable String defaultValue) { String value = request.getParameter(param); if (value != null) { // convert encoding to UTF-8 if not form encoding parameter is set if (!hasFormEncodingParam(request)) { ...
[ "public", "static", "@", "Nullable", "String", "get", "(", "@", "NotNull", "ServletRequest", "request", ",", "@", "NotNull", "String", "param", ",", "@", "Nullable", "String", "defaultValue", ")", "{", "String", "value", "=", "request", ".", "getParameter", ...
Returns a request parameter.<br> In addition the method fixes problems with incorrect UTF-8 characters returned by the servlet engine. All character data is converted from ISO-8859-1 to UTF-8 if not '_charset_' parameter is provided. @param request Request. @param param Parameter name. @param defaultValue Default value...
[ "Returns", "a", "request", "parameter", ".", "<br", ">", "In", "addition", "the", "method", "fixes", "problems", "with", "incorrect", "UTF", "-", "8", "characters", "returned", "by", "the", "servlet", "engine", ".", "All", "character", "data", "is", "convert...
train
https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/request/RequestParam.java#L76-L88
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.isCollectionAttribute
private boolean isCollectionAttribute(PluralAttribute<? super X, ?, ?> attribute) { """ Checks if is collection attribute. @param attribute the attribute @return true, if is collection attribute """ return attribute != null && attribute.getCollectionType().equals(CollectionType.COLLECTION); }
java
private boolean isCollectionAttribute(PluralAttribute<? super X, ?, ?> attribute) { return attribute != null && attribute.getCollectionType().equals(CollectionType.COLLECTION); }
[ "private", "boolean", "isCollectionAttribute", "(", "PluralAttribute", "<", "?", "super", "X", ",", "?", ",", "?", ">", "attribute", ")", "{", "return", "attribute", "!=", "null", "&&", "attribute", ".", "getCollectionType", "(", ")", ".", "equals", "(", "...
Checks if is collection attribute. @param attribute the attribute @return true, if is collection attribute
[ "Checks", "if", "is", "collection", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L1027-L1030
facebook/fresco
samples/zoomable/src/main/java/com/facebook/samples/zoomable/DefaultZoomableController.java
DefaultZoomableController.mapImageToView
public PointF mapImageToView(PointF imagePoint) { """ Maps point from image-relative to view-absolute coordinates. This takes into account the zoomable transformation. """ float[] points = mTempValues; points[0] = imagePoint.x; points[1] = imagePoint.y; mapRelativeToAbsolute(points, points, 1)...
java
public PointF mapImageToView(PointF imagePoint) { float[] points = mTempValues; points[0] = imagePoint.x; points[1] = imagePoint.y; mapRelativeToAbsolute(points, points, 1); mActiveTransform.mapPoints(points, 0, points, 0, 1); return new PointF(points[0], points[1]); }
[ "public", "PointF", "mapImageToView", "(", "PointF", "imagePoint", ")", "{", "float", "[", "]", "points", "=", "mTempValues", ";", "points", "[", "0", "]", "=", "imagePoint", ".", "x", ";", "points", "[", "1", "]", "=", "imagePoint", ".", "y", ";", "...
Maps point from image-relative to view-absolute coordinates. This takes into account the zoomable transformation.
[ "Maps", "point", "from", "image", "-", "relative", "to", "view", "-", "absolute", "coordinates", ".", "This", "takes", "into", "account", "the", "zoomable", "transformation", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/samples/zoomable/src/main/java/com/facebook/samples/zoomable/DefaultZoomableController.java#L298-L305
Red5/red5-server-common
src/main/java/org/red5/server/net/remoting/RemotingClient.java
RemotingClient.addHeader
public void addHeader(String name, boolean required, Object value) { """ Send an additional header to the server. @param name Header name @param required Header required? @param value Header body """ RemotingHeader header = new RemotingHeader(name, required, value); headers.put(name, ...
java
public void addHeader(String name, boolean required, Object value) { RemotingHeader header = new RemotingHeader(name, required, value); headers.put(name, header); }
[ "public", "void", "addHeader", "(", "String", "name", ",", "boolean", "required", ",", "Object", "value", ")", "{", "RemotingHeader", "header", "=", "new", "RemotingHeader", "(", "name", ",", "required", ",", "value", ")", ";", "headers", ".", "put", "(", ...
Send an additional header to the server. @param name Header name @param required Header required? @param value Header body
[ "Send", "an", "additional", "header", "to", "the", "server", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/remoting/RemotingClient.java#L290-L293
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VFSUtils.java
VFSUtils.recursiveCopy
public static void recursiveCopy(File original, File destDir) throws IOException { """ Recursively copy a file or directory from one location to another. @param original the original file or directory @param destDir the destination directory @throws IOException if an I/O error occurs before the copy is compl...
java
public static void recursiveCopy(File original, File destDir) throws IOException { final String name = original.getName(); final File destFile = new File(destDir, name); if (original.isDirectory()) { destFile.mkdir(); for (File file : original.listFiles()) { ...
[ "public", "static", "void", "recursiveCopy", "(", "File", "original", ",", "File", "destDir", ")", "throws", "IOException", "{", "final", "String", "name", "=", "original", ".", "getName", "(", ")", ";", "final", "File", "destFile", "=", "new", "File", "("...
Recursively copy a file or directory from one location to another. @param original the original file or directory @param destDir the destination directory @throws IOException if an I/O error occurs before the copy is complete
[ "Recursively", "copy", "a", "file", "or", "directory", "from", "one", "location", "to", "another", "." ]
train
https://github.com/jbossas/jboss-vfs/blob/420f4b896d6178ee5f6758f3421e9f350d2b8ab5/src/main/java/org/jboss/vfs/VFSUtils.java#L713-L731
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/ipc/RPC.java
RPC.getServer
public static Server getServer(final Object instance, final String bindAddress, final int port, final int numHandlers) throws IOException { """ Construct a server for a protocol implementation instance listening on a port and address. """ return new Server(instance, bindAddress, port, numHandlers); }
java
public static Server getServer(final Object instance, final String bindAddress, final int port, final int numHandlers) throws IOException { return new Server(instance, bindAddress, port, numHandlers); }
[ "public", "static", "Server", "getServer", "(", "final", "Object", "instance", ",", "final", "String", "bindAddress", ",", "final", "int", "port", ",", "final", "int", "numHandlers", ")", "throws", "IOException", "{", "return", "new", "Server", "(", "instance"...
Construct a server for a protocol implementation instance listening on a port and address.
[ "Construct", "a", "server", "for", "a", "protocol", "implementation", "instance", "listening", "on", "a", "port", "and", "address", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/ipc/RPC.java#L354-L357
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.get
public String get(CharSequence name, String defaultValue) { """ Returns the value of a header with the specified name. If there are more than one values for the specified name, the first value is returned. @param name The name of the header to search @return The first header value or {@code defaultValue} if ...
java
public String get(CharSequence name, String defaultValue) { String value = get(name); if (value == null) { return defaultValue; } return value; }
[ "public", "String", "get", "(", "CharSequence", "name", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "get", "(", "name", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "return", "value", ";...
Returns the value of a header with the specified name. If there are more than one values for the specified name, the first value is returned. @param name The name of the header to search @return The first header value or {@code defaultValue} if there is no such header
[ "Returns", "the", "value", "of", "a", "header", "with", "the", "specified", "name", ".", "If", "there", "are", "more", "than", "one", "values", "for", "the", "specified", "name", "the", "first", "value", "is", "returned", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L1202-L1208