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
openengsb/openengsb
api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java
EDBObject.putEDBObjectEntry
public void putEDBObjectEntry(String key, Object value) { """ Adds an EDBObjectEntry to this EDBObject. It uses the type of the given object value as type parameter """ putEDBObjectEntry(key, value, value.getClass()); }
java
public void putEDBObjectEntry(String key, Object value) { putEDBObjectEntry(key, value, value.getClass()); }
[ "public", "void", "putEDBObjectEntry", "(", "String", "key", ",", "Object", "value", ")", "{", "putEDBObjectEntry", "(", "key", ",", "value", ",", "value", ".", "getClass", "(", ")", ")", ";", "}" ]
Adds an EDBObjectEntry to this EDBObject. It uses the type of the given object value as type parameter
[ "Adds", "an", "EDBObjectEntry", "to", "this", "EDBObject", ".", "It", "uses", "the", "type", "of", "the", "given", "object", "value", "as", "type", "parameter" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/edb/src/main/java/org/openengsb/core/edb/api/EDBObject.java#L192-L194
d-michail/jheaps
src/main/java/org/jheaps/array/MinMaxBinaryArrayDoubleEndedHeap.java
MinMaxBinaryArrayDoubleEndedHeap.fixdownMaxWithComparator
private void fixdownMaxWithComparator(int k) { """ Downwards fix starting from a particular element at a maximum level. Performs comparisons using the comparator. @param k the index of the starting element """ int c = 2 * k; while (c <= size) { int m = maxChildOrGrandchildWithC...
java
private void fixdownMaxWithComparator(int k) { int c = 2 * k; while (c <= size) { int m = maxChildOrGrandchildWithComparator(k); if (m > c + 1) { // grandchild if (comparator.compare(array[m], array[k]) <= 0) { break; } ...
[ "private", "void", "fixdownMaxWithComparator", "(", "int", "k", ")", "{", "int", "c", "=", "2", "*", "k", ";", "while", "(", "c", "<=", "size", ")", "{", "int", "m", "=", "maxChildOrGrandchildWithComparator", "(", "k", ")", ";", "if", "(", "m", ">", ...
Downwards fix starting from a particular element at a maximum level. Performs comparisons using the comparator. @param k the index of the starting element
[ "Downwards", "fix", "starting", "from", "a", "particular", "element", "at", "a", "maximum", "level", ".", "Performs", "comparisons", "using", "the", "comparator", "." ]
train
https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/array/MinMaxBinaryArrayDoubleEndedHeap.java#L639-L667
aws/aws-sdk-java
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/AuthorizerDescription.java
AuthorizerDescription.withTokenSigningPublicKeys
public AuthorizerDescription withTokenSigningPublicKeys(java.util.Map<String, String> tokenSigningPublicKeys) { """ <p> The public keys used to validate the token signature returned by your custom authentication service. </p> @param tokenSigningPublicKeys The public keys used to validate the token signature ...
java
public AuthorizerDescription withTokenSigningPublicKeys(java.util.Map<String, String> tokenSigningPublicKeys) { setTokenSigningPublicKeys(tokenSigningPublicKeys); return this; }
[ "public", "AuthorizerDescription", "withTokenSigningPublicKeys", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tokenSigningPublicKeys", ")", "{", "setTokenSigningPublicKeys", "(", "tokenSigningPublicKeys", ")", ";", "return", "this", ";", ...
<p> The public keys used to validate the token signature returned by your custom authentication service. </p> @param tokenSigningPublicKeys The public keys used to validate the token signature returned by your custom authentication service. @return Returns a reference to this object so that method calls can be chained...
[ "<p", ">", "The", "public", "keys", "used", "to", "validate", "the", "token", "signature", "returned", "by", "your", "custom", "authentication", "service", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/AuthorizerDescription.java#L272-L275
OpenLiberty/open-liberty
dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RLSUtils.java
RLSUtils.toHexString
public static String toHexString(byte [] byteSource,int bytes) { """ Converts a byte array into a printable hex string. @param byteSource The byte array source. @param bytes The number of bytes to display. @return String printable hex string or "null" """ StringBuffer result = null; boolean trun...
java
public static String toHexString(byte [] byteSource,int bytes) { StringBuffer result = null; boolean truncated = false; if (byteSource != null) { if (bytes > byteSource.length) { // If the number of bytes to display is larger than the available number of // bytes, then res...
[ "public", "static", "String", "toHexString", "(", "byte", "[", "]", "byteSource", ",", "int", "bytes", ")", "{", "StringBuffer", "result", "=", "null", ";", "boolean", "truncated", "=", "false", ";", "if", "(", "byteSource", "!=", "null", ")", "{", "if",...
Converts a byte array into a printable hex string. @param byteSource The byte array source. @param bytes The number of bytes to display. @return String printable hex string or "null"
[ "Converts", "a", "byte", "array", "into", "a", "printable", "hex", "string", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RLSUtils.java#L105-L148
stripe/stripe-java
src/main/java/com/stripe/model/EventDataObjectDeserializer.java
EventDataObjectDeserializer.deserializeUnsafe
public StripeObject deserializeUnsafe() throws EventDataObjectDeserializationException { """ Force deserialize raw JSON to {@code StripeObject}. The deserialized data is not guaranteed to fully represent the JSON. For example, events of new API version having fields that are not captured by current model class w...
java
public StripeObject deserializeUnsafe() throws EventDataObjectDeserializationException { try { return EventDataDeserializer.deserializeStripeObject(rawJsonObject); } catch (JsonParseException e) { String errorMessage; if (!apiVersionMatch()) { errorMessage = String.format( ...
[ "public", "StripeObject", "deserializeUnsafe", "(", ")", "throws", "EventDataObjectDeserializationException", "{", "try", "{", "return", "EventDataDeserializer", ".", "deserializeStripeObject", "(", "rawJsonObject", ")", ";", "}", "catch", "(", "JsonParseException", "e", ...
Force deserialize raw JSON to {@code StripeObject}. The deserialized data is not guaranteed to fully represent the JSON. For example, events of new API version having fields that are not captured by current model class will be lost. Similarly, events of old API version having fields that should be translated into the n...
[ "Force", "deserialize", "raw", "JSON", "to", "{", "@code", "StripeObject", "}", ".", "The", "deserialized", "data", "is", "not", "guaranteed", "to", "fully", "represent", "the", "JSON", ".", "For", "example", "events", "of", "new", "API", "version", "having"...
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/EventDataObjectDeserializer.java#L147-L173
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsTriggerHelper.java
JenkinsTriggerHelper.triggerJobAndWaitUntilFinished
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, boolean crumbFlag) throws IOException, InterruptedException { """ This method will trigger a build of the given job and will wait until the builds is ended or if the build has been cancelled. @param jobName The name of the job w...
java
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, boolean crumbFlag) throws IOException, InterruptedException { JobWithDetails job = this.server.getJob(jobName); QueueReference queueRef = job.build(crumbFlag); return triggerJobAndWaitUntilFinished(jobName, queue...
[ "public", "BuildWithDetails", "triggerJobAndWaitUntilFinished", "(", "String", "jobName", ",", "boolean", "crumbFlag", ")", "throws", "IOException", ",", "InterruptedException", "{", "JobWithDetails", "job", "=", "this", ".", "server", ".", "getJob", "(", "jobName", ...
This method will trigger a build of the given job and will wait until the builds is ended or if the build has been cancelled. @param jobName The name of the job which should be triggered. @param crumbFlag set to <code>true</code> or <code>false</code>. @return In case of an cancelled job you will get {@link BuildWithD...
[ "This", "method", "will", "trigger", "a", "build", "of", "the", "given", "job", "and", "will", "wait", "until", "the", "builds", "is", "ended", "or", "if", "the", "build", "has", "been", "cancelled", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsTriggerHelper.java#L149-L155
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java
JavaBean.getCollectionProperties
public static Collection<Object> getCollectionProperties(Collection<?> collection,String name) throws Exception { """ Retrieve the list of properties that exists in a given collection @param collection the collection of object @param name the name of property @return collection of objects @throws Exception...
java
public static Collection<Object> getCollectionProperties(Collection<?> collection,String name) throws Exception { if(collection == null) throw new IllegalArgumentException("collection, name"); ArrayList<Object> list = new ArrayList<Object>(collection.size()); for (Object bean : c...
[ "public", "static", "Collection", "<", "Object", ">", "getCollectionProperties", "(", "Collection", "<", "?", ">", "collection", ",", "String", "name", ")", "throws", "Exception", "{", "if", "(", "collection", "==", "null", ")", "throw", "new", "IllegalArgumen...
Retrieve the list of properties that exists in a given collection @param collection the collection of object @param name the name of property @return collection of objects @throws Exception when an unknown error occurs
[ "Retrieve", "the", "list", "of", "properties", "that", "exists", "in", "a", "given", "collection" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java#L565-L579
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_burst_PUT
public void serviceName_burst_PUT(String serviceName, OvhServerBurst body) throws IOException { """ Alter this object properties REST: PUT /dedicated/server/{serviceName}/burst @param body [required] New object properties @param serviceName [required] The internal name of your dedicated server """ Strin...
java
public void serviceName_burst_PUT(String serviceName, OvhServerBurst body) throws IOException { String qPath = "/dedicated/server/{serviceName}/burst"; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_burst_PUT", "(", "String", "serviceName", ",", "OvhServerBurst", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/burst\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", ...
Alter this object properties REST: PUT /dedicated/server/{serviceName}/burst @param body [required] New object properties @param serviceName [required] The internal name of your dedicated server
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L513-L517
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleContentTypes.java
ModuleContentTypes.fetchOneSnapshot
public CMASnapshot fetchOneSnapshot(CMAContentType contentType, String snapshotId) { """ Fetch a specific snapshot of this content type. @param contentType the contentType whose snapshot to be returned. @param snapshotId the snapshot to be returned. @return an array of snapshots. @throws IllegalArgumentExce...
java
public CMASnapshot fetchOneSnapshot(CMAContentType contentType, String snapshotId) { assertNotNull(contentType, "contentType"); assertNotNull(snapshotId, "snapshotId"); final String contentTypeId = getResourceIdOrThrow(contentType, "contentType"); final String spaceId = getSpaceIdOrThrow(contentType, "...
[ "public", "CMASnapshot", "fetchOneSnapshot", "(", "CMAContentType", "contentType", ",", "String", "snapshotId", ")", "{", "assertNotNull", "(", "contentType", ",", "\"contentType\"", ")", ";", "assertNotNull", "(", "snapshotId", ",", "\"snapshotId\"", ")", ";", "fin...
Fetch a specific snapshot of this content type. @param contentType the contentType whose snapshot to be returned. @param snapshotId the snapshot to be returned. @return an array of snapshots. @throws IllegalArgumentException if contentType is null. @throws IllegalArgumentException if contentType's id is null. @throws...
[ "Fetch", "a", "specific", "snapshot", "of", "this", "content", "type", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleContentTypes.java#L357-L371
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/core/convert/support/ConversionServiceFactory.java
ConversionServiceFactory.registerConverters
public static void registerConverters(Set<?> converters, ConverterRegistry registry) { """ Register the given Converter objects with the given target ConverterRegistry. @param converters the converter objects: implementing {@link Converter}, {@link ConverterFactory}, or {@link GenericConverter} @param registry ...
java
public static void registerConverters(Set<?> converters, ConverterRegistry registry) { if (converters != null) { for (Object converter : converters) { if (converter instanceof GenericConverter) { registry.addConverter((GenericConverter) converter); } else if (converter instanceof Converter<?, ?>) ...
[ "public", "static", "void", "registerConverters", "(", "Set", "<", "?", ">", "converters", ",", "ConverterRegistry", "registry", ")", "{", "if", "(", "converters", "!=", "null", ")", "{", "for", "(", "Object", "converter", ":", "converters", ")", "{", "if"...
Register the given Converter objects with the given target ConverterRegistry. @param converters the converter objects: implementing {@link Converter}, {@link ConverterFactory}, or {@link GenericConverter} @param registry the target registry
[ "Register", "the", "given", "Converter", "objects", "with", "the", "given", "target", "ConverterRegistry", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/core/convert/support/ConversionServiceFactory.java#L43-L61
HadoopGenomics/Hadoop-BAM
src/main/java/org/seqdoop/hadoop_bam/util/ConfHelper.java
ConfHelper.parseBoolean
public static boolean parseBoolean(String value, boolean defaultValue) { """ Convert a string to a boolean. Accepted values: "yes", "true", "t", "y", "1" "no", "false", "f", "n", "0" All comparisons are case insensitive. If the value provided is null, defaultValue is returned. @exception IllegalArgument...
java
public static boolean parseBoolean(String value, boolean defaultValue) { if (value == null) return defaultValue; value = value.trim(); // any of the following will final String[] acceptedTrue = new String[]{ "yes", "true", "t", "y", "1" }; final String[] acceptedFalse = new String[]{ "no", "false", "f"...
[ "public", "static", "boolean", "parseBoolean", "(", "String", "value", ",", "boolean", "defaultValue", ")", "{", "if", "(", "value", "==", "null", ")", "return", "defaultValue", ";", "value", "=", "value", ".", "trim", "(", ")", ";", "// any of the following...
Convert a string to a boolean. Accepted values: "yes", "true", "t", "y", "1" "no", "false", "f", "n", "0" All comparisons are case insensitive. If the value provided is null, defaultValue is returned. @exception IllegalArgumentException Thrown if value is not null and doesn't match any of the accepted strings.
[ "Convert", "a", "string", "to", "a", "boolean", "." ]
train
https://github.com/HadoopGenomics/Hadoop-BAM/blob/9f974cf635a8d72f69604021cc3d5f3469d38d2f/src/main/java/org/seqdoop/hadoop_bam/util/ConfHelper.java#L41-L64
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java
Bytes.iterateOnSplits
public static Iterable<byte[]> iterateOnSplits(final byte[] a, final byte[] b, final int num) { """ Iterate over keys within the passed range, splitting at an [a,b) boundary. """ return iterateOnSplits(a, b, false, num); }
java
public static Iterable<byte[]> iterateOnSplits(final byte[] a, final byte[] b, final int num) { return iterateOnSplits(a, b, false, num); }
[ "public", "static", "Iterable", "<", "byte", "[", "]", ">", "iterateOnSplits", "(", "final", "byte", "[", "]", "a", ",", "final", "byte", "[", "]", "b", ",", "final", "int", "num", ")", "{", "return", "iterateOnSplits", "(", "a", ",", "b", ",", "fa...
Iterate over keys within the passed range, splitting at an [a,b) boundary.
[ "Iterate", "over", "keys", "within", "the", "passed", "range", "splitting", "at", "an", "[", "a", "b", ")", "boundary", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L1128-L1130
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/JobApi.java
JobApi.downloadArtifactsFile
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException { """ Download a single artifact file from within the job's artifacts archive. Only a single file is going to be extracted from the archive and streamed to a client. ...
java
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, ArtifactsFile artifactsFile, File directory) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts", ar...
[ "public", "File", "downloadArtifactsFile", "(", "Object", "projectIdOrPath", ",", "Integer", "jobId", ",", "ArtifactsFile", "artifactsFile", ",", "File", "directory", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".",...
Download a single artifact file from within the job's artifacts archive. Only a single file is going to be extracted from the archive and streamed to a client. <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id/artifacts/*artifact_path</code></pre> @param projectIdOrPath id, path of the project, or a Project...
[ "Download", "a", "single", "artifact", "file", "from", "within", "the", "job", "s", "artifacts", "archive", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L318-L337
linkhub-sdk/popbill.sdk.java
src/main/java/com/popbill/api/statement/StatementServiceImp.java
StatementServiceImp.sendSMS
@Override public Response sendSMS(String CorpNum, int ItemCode, String MgtKey, String Sender, String Receiver, String Contents, String UserID) throws PopbillException { """ /* (non-Javadoc) @see com.popbill.api.StatementService#sendSMS(java.lang.String, java.number.Integer, java.lang.String, java.lang.S...
java
@Override public Response sendSMS(String CorpNum, int ItemCode, String MgtKey, String Sender, String Receiver, String Contents, String UserID) throws PopbillException { if (MgtKey == null || MgtKey.isEmpty()) throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다."); ResendRequest request = new...
[ "@", "Override", "public", "Response", "sendSMS", "(", "String", "CorpNum", ",", "int", "ItemCode", ",", "String", "MgtKey", ",", "String", "Sender", ",", "String", "Receiver", ",", "String", "Contents", ",", "String", "UserID", ")", "throws", "PopbillExceptio...
/* (non-Javadoc) @see com.popbill.api.StatementService#sendSMS(java.lang.String, java.number.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/statement/StatementServiceImp.java#L283-L300
shrinkwrap/descriptors
metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/MetadataUtil.java
MetadataUtil.hasParentOf
public static boolean hasParentOf(final Element parentElement, XsdElementEnum parentEnum) { """ Checks for the first parent node occurrence of the a w3c parentEnum element. @param parentElement the element from which the search starts. @param parentEnum the <code>XsdElementEnum</code> specifying the parent e...
java
public static boolean hasParentOf(final Element parentElement, XsdElementEnum parentEnum) { Node parent = parentElement.getParentNode(); while (parent != null) { if (parent.getNodeType() == Node.ELEMENT_NODE) { final Element parentElm = (Element) parent; if (p...
[ "public", "static", "boolean", "hasParentOf", "(", "final", "Element", "parentElement", ",", "XsdElementEnum", "parentEnum", ")", "{", "Node", "parent", "=", "parentElement", ".", "getParentNode", "(", ")", ";", "while", "(", "parent", "!=", "null", ")", "{", ...
Checks for the first parent node occurrence of the a w3c parentEnum element. @param parentElement the element from which the search starts. @param parentEnum the <code>XsdElementEnum</code> specifying the parent element. @return true, if found, otherwise false.
[ "Checks", "for", "the", "first", "parent", "node", "occurrence", "of", "the", "a", "w3c", "parentEnum", "element", "." ]
train
https://github.com/shrinkwrap/descriptors/blob/023ba080e6396b9f4dd8275dc4e5c0ebb6b5e6ba/metadata-parser/src/main/java/org/jboss/shrinkwrap/descriptor/metadata/MetadataUtil.java#L144-L156
Nexmo/nexmo-java
src/main/java/com/nexmo/client/legacyutils/XmlParser.java
XmlParser.parseXml
public Document parseXml(String xml) throws NexmoResponseParseException { """ Parse a provided XML String and return the generated DOM Document. @param xml A String containing XML. @return A Document generated from the parsed XML. @throws NexmoResponseParseException If there is a problem initializing the XML ...
java
public Document parseXml(String xml) throws NexmoResponseParseException { // TODO: Maybe an Error subclass for XML initialization errors, as these are serious and unexpected. Document doc; this.documentBuilderLock.lock(); try { if (this.documentBuilder == null) { ...
[ "public", "Document", "parseXml", "(", "String", "xml", ")", "throws", "NexmoResponseParseException", "{", "// TODO: Maybe an Error subclass for XML initialization errors, as these are serious and unexpected.", "Document", "doc", ";", "this", ".", "documentBuilderLock", ".", "loc...
Parse a provided XML String and return the generated DOM Document. @param xml A String containing XML. @return A Document generated from the parsed XML. @throws NexmoResponseParseException If there is a problem initializing the XML parser or parsing the XML.
[ "Parse", "a", "provided", "XML", "String", "and", "return", "the", "generated", "DOM", "Document", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/legacyutils/XmlParser.java#L53-L69
Netflix/conductor
grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java
TaskClient.removeTaskFromQueue
public void removeTaskFromQueue(String taskType, String taskId) { """ Removes a task from a taskType queue @param taskType the taskType to identify the queue @param taskId the id of the task to be removed """ Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank...
java
public void removeTaskFromQueue(String taskType, String taskId) { Preconditions.checkArgument(StringUtils.isNotBlank(taskType), "Task type cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); stub.removeTaskFromQueue( TaskServ...
[ "public", "void", "removeTaskFromQueue", "(", "String", "taskType", ",", "String", "taskId", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskType", ")", ",", "\"Task type cannot be blank\"", ")", ";", "Preconditions"...
Removes a task from a taskType queue @param taskType the taskType to identify the queue @param taskId the id of the task to be removed
[ "Removes", "a", "task", "from", "a", "taskType", "queue" ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/grpc-client/src/main/java/com/netflix/conductor/client/grpc/TaskClient.java#L222-L231
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/columns/strings/ByteDictionaryMap.java
ByteDictionaryMap.addValuesToSelection
private void addValuesToSelection(Selection results, byte key) { """ Given a key matching some string, add to the selection the index of every record that matches that key """ if (key != DEFAULT_RETURN_VALUE) { int i = 0; for (byte next : values) { if (key == nex...
java
private void addValuesToSelection(Selection results, byte key) { if (key != DEFAULT_RETURN_VALUE) { int i = 0; for (byte next : values) { if (key == next) { results.add(i); } i++; } } }
[ "private", "void", "addValuesToSelection", "(", "Selection", "results", ",", "byte", "key", ")", "{", "if", "(", "key", "!=", "DEFAULT_RETURN_VALUE", ")", "{", "int", "i", "=", "0", ";", "for", "(", "byte", "next", ":", "values", ")", "{", "if", "(", ...
Given a key matching some string, add to the selection the index of every record that matches that key
[ "Given", "a", "key", "matching", "some", "string", "add", "to", "the", "selection", "the", "index", "of", "every", "record", "that", "matches", "that", "key" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/columns/strings/ByteDictionaryMap.java#L229-L239
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/preview/CmsImageFormatHandler.java
CmsImageFormatHandler.getMatchingFormat
private I_CmsFormatRestriction getMatchingFormat(CmsCroppingParamBean croppingParam, boolean forceByName) { """ Checks the format restrictions if the match the giving cropping parameter.<p> @param croppingParam the cropping parameter @param forceByName force format match by name within cropping parameter @r...
java
private I_CmsFormatRestriction getMatchingFormat(CmsCroppingParamBean croppingParam, boolean forceByName) { I_CmsFormatRestriction result = null; if (forceByName && m_formats.containsKey(croppingParam.getFormatName())) { result = m_formats.get(croppingParam.getFormatName()); if ...
[ "private", "I_CmsFormatRestriction", "getMatchingFormat", "(", "CmsCroppingParamBean", "croppingParam", ",", "boolean", "forceByName", ")", "{", "I_CmsFormatRestriction", "result", "=", "null", ";", "if", "(", "forceByName", "&&", "m_formats", ".", "containsKey", "(", ...
Checks the format restrictions if the match the giving cropping parameter.<p> @param croppingParam the cropping parameter @param forceByName force format match by name within cropping parameter @return the matching format restriction
[ "Checks", "the", "format", "restrictions", "if", "the", "match", "the", "giving", "cropping", "parameter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/CmsImageFormatHandler.java#L596-L616
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/aop/JDKAopProxy.java
JDKAopProxy.createProxyObject
@SuppressWarnings("unchecked") public static <T> T createProxyObject(Class<T> interfaceType, Object implementObject) { """ 创建代理对象 <p>Function: createProxyObject</p> <p>Description: </p> @param interfaceType 接口类类型 @param implementObject 基于interfaceType接口的实现类实例 @return @author acexy@thankjava.com @dat...
java
@SuppressWarnings("unchecked") public static <T> T createProxyObject(Class<T> interfaceType, Object implementObject) { return (T) Proxy.newProxyInstance( implementObject.getClass().getClassLoader(), implementObject.getClass().getInterfaces(), new InvokeInterce...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "createProxyObject", "(", "Class", "<", "T", ">", "interfaceType", ",", "Object", "implementObject", ")", "{", "return", "(", "T", ")", "Proxy", ".", "newProxyInstanc...
创建代理对象 <p>Function: createProxyObject</p> <p>Description: </p> @param interfaceType 接口类类型 @param implementObject 基于interfaceType接口的实现类实例 @return @author acexy@thankjava.com @date 2016年8月17日 下午1:58:11 @version 1.0
[ "创建代理对象", "<p", ">", "Function", ":", "createProxyObject<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/aop/JDKAopProxy.java#L28-L36
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/FormBeanUtil.java
FormBeanUtil.validateAction
public static boolean validateAction(String actionName, ActionMapping mapping) { """ 根据struts-config.xml配置立即创建ActionForm @param actionMapping ActionMapping @param actionForm ActionForm @param request HttpServletRequest @param moduleConfig ModuleConfig @return ModelForm @throws Exception private static...
java
public static boolean validateAction(String actionName, ActionMapping mapping) { boolean res = true; int result = actionTransfer(actionName); // 如果没有使用规定名称 if (result == 0) res = false; if (mapping.findForward(actionName) == null) // 如果配置文件没有该名称 res = false; return res; }
[ "public", "static", "boolean", "validateAction", "(", "String", "actionName", ",", "ActionMapping", "mapping", ")", "{", "boolean", "res", "=", "true", ";", "int", "result", "=", "actionTransfer", "(", "actionName", ")", ";", "// 如果没有使用规定名称\r", "if", "(", "res...
根据struts-config.xml配置立即创建ActionForm @param actionMapping ActionMapping @param actionForm ActionForm @param request HttpServletRequest @param moduleConfig ModuleConfig @return ModelForm @throws Exception private static ModelForm createModelFormNow(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest r...
[ "根据struts", "-", "config", ".", "xml配置立即创建ActionForm" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/FormBeanUtil.java#L201-L212
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.listStream
public ListStreamResponse listStream(ListStreamRequest request) { """ List a domain's streams in the live stream service. @param request The request object containing all options for listing domain's streams @return the response """ checkNotNull(request, "The parameter request should NOT be null.")...
java
public ListStreamResponse listStream(ListStreamRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getPlayDomain(), "playDomain should NOT be empty."); InternalRequest internalRequest = createRequest(HttpMethodName.GET, ...
[ "public", "ListStreamResponse", "listStream", "(", "ListStreamRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getPlayDomain", "(", ")", ",", "\"pl...
List a domain's streams in the live stream service. @param request The request object containing all options for listing domain's streams @return the response
[ "List", "a", "domain", "s", "streams", "in", "the", "live", "stream", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1393-L1414
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/util/MBeanUtil.java
MBeanUtil.registerMBean
public String registerMBean(Object bean, String name) throws MalformedObjectNameException, NotCompliantMBeanException, MBeanRegistrationException { """ Overloaded method with 'replace' parameter set to false. See: {@link MBeanUtil#registerMBean(Object, String, boolean)} """ return registe...
java
public String registerMBean(Object bean, String name) throws MalformedObjectNameException, NotCompliantMBeanException, MBeanRegistrationException { return registerMBean(bean, name, false); }
[ "public", "String", "registerMBean", "(", "Object", "bean", ",", "String", "name", ")", "throws", "MalformedObjectNameException", ",", "NotCompliantMBeanException", ",", "MBeanRegistrationException", "{", "return", "registerMBean", "(", "bean", ",", "name", ",", "fals...
Overloaded method with 'replace' parameter set to false. See: {@link MBeanUtil#registerMBean(Object, String, boolean)}
[ "Overloaded", "method", "with", "replace", "parameter", "set", "to", "false", ".", "See", ":", "{" ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/util/MBeanUtil.java#L99-L102
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java
XmlInOut.exportXML
public boolean exportXML(BaseTable table, String strFileName) { """ Export this table. @record The record to export. @strFileName The destination filename (deleted the old copy if this file exists). """ Record record = table.getRecord(); boolean bSuccess = true; File file = new File(strF...
java
public boolean exportXML(BaseTable table, String strFileName) { Record record = table.getRecord(); boolean bSuccess = true; File file = new File(strFileName); if (file.exists()) file.delete(); // Delete if it exists else { String strPath = fi...
[ "public", "boolean", "exportXML", "(", "BaseTable", "table", ",", "String", "strFileName", ")", "{", "Record", "record", "=", "table", ".", "getRecord", "(", ")", ";", "boolean", "bSuccess", "=", "true", ";", "File", "file", "=", "new", "File", "(", "str...
Export this table. @record The record to export. @strFileName The destination filename (deleted the old copy if this file exists).
[ "Export", "this", "table", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlInOut.java#L213-L245
casbin/jcasbin
src/main/java/org/casbin/jcasbin/rbac/DefaultRoleManager.java
DefaultRoleManager.addLink
@Override public void addLink(String name1, String name2, String... domain) { """ addLink adds the inheritance link between role: name1 and role: name2. aka role: name1 inherits role: name2. domain is a prefix to the roles. """ if (domain.length == 1) { name1 = domain[0] + "::" + name...
java
@Override public void addLink(String name1, String name2, String... domain) { if (domain.length == 1) { name1 = domain[0] + "::" + name1; name2 = domain[0] + "::" + name2; } else if (domain.length > 1) { throw new Error("error: domain should be 1 parameter"); ...
[ "@", "Override", "public", "void", "addLink", "(", "String", "name1", ",", "String", "name2", ",", "String", "...", "domain", ")", "{", "if", "(", "domain", ".", "length", "==", "1", ")", "{", "name1", "=", "domain", "[", "0", "]", "+", "\"::\"", "...
addLink adds the inheritance link between role: name1 and role: name2. aka role: name1 inherits role: name2. domain is a prefix to the roles.
[ "addLink", "adds", "the", "inheritance", "link", "between", "role", ":", "name1", "and", "role", ":", "name2", ".", "aka", "role", ":", "name1", "inherits", "role", ":", "name2", ".", "domain", "is", "a", "prefix", "to", "the", "roles", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/rbac/DefaultRoleManager.java#L66-L78
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.deposit_depositId_paidBills_billId_debt_operation_operationId_GET
public OvhOperation deposit_depositId_paidBills_billId_debt_operation_operationId_GET(String depositId, String billId, Long operationId) throws IOException { """ Get this object properties REST: GET /me/deposit/{depositId}/paidBills/{billId}/debt/operation/{operationId} @param depositId [required] @param bill...
java
public OvhOperation deposit_depositId_paidBills_billId_debt_operation_operationId_GET(String depositId, String billId, Long operationId) throws IOException { String qPath = "/me/deposit/{depositId}/paidBills/{billId}/debt/operation/{operationId}"; StringBuilder sb = path(qPath, depositId, billId, operationId); St...
[ "public", "OvhOperation", "deposit_depositId_paidBills_billId_debt_operation_operationId_GET", "(", "String", "depositId", ",", "String", "billId", ",", "Long", "operationId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/deposit/{depositId}/paidBills/{billI...
Get this object properties REST: GET /me/deposit/{depositId}/paidBills/{billId}/debt/operation/{operationId} @param depositId [required] @param billId [required] @param operationId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3195-L3200
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/channelfw/objectpool/TwoTierObjectPool.java
TwoTierObjectPool.getThreadLocalObjectPool
private LocalThreadObjectPool getThreadLocalObjectPool() { """ get a local thread specific pool. To be used for threads that frequently access this pool system. """ if (threadPoolSize <= 0) { // no local thread pool needed. return null; } LocalThreadObjectPool ...
java
private LocalThreadObjectPool getThreadLocalObjectPool() { if (threadPoolSize <= 0) { // no local thread pool needed. return null; } LocalThreadObjectPool localPool = null; if (threadLocals != null) { localPool = threadLocals.get(); if (loc...
[ "private", "LocalThreadObjectPool", "getThreadLocalObjectPool", "(", ")", "{", "if", "(", "threadPoolSize", "<=", "0", ")", "{", "// no local thread pool needed.", "return", "null", ";", "}", "LocalThreadObjectPool", "localPool", "=", "null", ";", "if", "(", "thread...
get a local thread specific pool. To be used for threads that frequently access this pool system.
[ "get", "a", "local", "thread", "specific", "pool", ".", "To", "be", "used", "for", "threads", "that", "frequently", "access", "this", "pool", "system", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/channelfw/objectpool/TwoTierObjectPool.java#L203-L220
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsMultiDialog.java
CmsMultiDialog.setDialogTitle
public void setDialogTitle(String singleKey, String multiKey) { """ Sets the title of the dialog depending on the operation type, multiple or single operation.<p> @param singleKey the key for the single operation @param multiKey the key for the multiple operation """ if (isMultiOperation()) { ...
java
public void setDialogTitle(String singleKey, String multiKey) { if (isMultiOperation()) { // generate title with number of selected resources and parent folder parameters String resCount = String.valueOf(getResourceList().size()); String currentFolder = CmsResource.getFolder...
[ "public", "void", "setDialogTitle", "(", "String", "singleKey", ",", "String", "multiKey", ")", "{", "if", "(", "isMultiOperation", "(", ")", ")", "{", "// generate title with number of selected resources and parent folder parameters", "String", "resCount", "=", "String",...
Sets the title of the dialog depending on the operation type, multiple or single operation.<p> @param singleKey the key for the single operation @param multiKey the key for the multiple operation
[ "Sets", "the", "title", "of", "the", "dialog", "depending", "on", "the", "operation", "type", "multiple", "or", "single", "operation", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsMultiDialog.java#L276-L290
real-logic/agrona
agrona/src/main/java/org/agrona/collections/Hashing.java
Hashing.evenHash
public static int evenHash(final long value, final int mask) { """ Generate an even hash for a long value. @param value to be hashed. @param mask mask to be applied that must be a power of 2 - 1. @return the hash of the value which is always even. """ int hash = (int)value ^ (int)(value >>> 32); ...
java
public static int evenHash(final long value, final int mask) { int hash = (int)value ^ (int)(value >>> 32); hash = (hash << 1) - (hash << 8); return hash & mask; }
[ "public", "static", "int", "evenHash", "(", "final", "long", "value", ",", "final", "int", "mask", ")", "{", "int", "hash", "=", "(", "int", ")", "value", "^", "(", "int", ")", "(", "value", ">>>", "32", ")", ";", "hash", "=", "(", "hash", "<<", ...
Generate an even hash for a long value. @param value to be hashed. @param mask mask to be applied that must be a power of 2 - 1. @return the hash of the value which is always even.
[ "Generate", "an", "even", "hash", "for", "a", "long", "value", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/collections/Hashing.java#L118-L124
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listSecretsAsync
public ServiceFuture<List<SecretItem>> listSecretsAsync(final String vaultBaseUrl, final ListOperationCallback<SecretItem> serviceCallback) { """ List secrets in the specified vault. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param serviceCallback the async ServiceC...
java
public ServiceFuture<List<SecretItem>> listSecretsAsync(final String vaultBaseUrl, final ListOperationCallback<SecretItem> serviceCallback) { return getSecretsAsync(vaultBaseUrl, serviceCallback); }
[ "public", "ServiceFuture", "<", "List", "<", "SecretItem", ">", ">", "listSecretsAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "ListOperationCallback", "<", "SecretItem", ">", "serviceCallback", ")", "{", "return", "getSecretsAsync", "(", "vaultBaseU...
List secrets in the specified vault. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param serviceCallback the async ServiceCallback to handle successful and failed responses. @return the {@link ServiceFuture} object
[ "List", "secrets", "in", "the", "specified", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1183-L1186
integration-technology/amazon-mws-orders
src/main/java/com/amazonservices/mws/client/MwsXmlReader.java
MwsXmlReader.parseElement
@SuppressWarnings("unchecked") private <T> T parseElement(Element element, Class<T> cls) { """ Read an element into a new instance of a class. @param element The element, if null returns null. @param cls The class to create an instance of. @return The new instance. """ T value; i...
java
@SuppressWarnings("unchecked") private <T> T parseElement(Element element, Class<T> cls) { T value; if (element == null) { value = null; } else if (MwsObject.class.isAssignableFrom(cls)) { value = MwsUtl.newInstance(cls); Element holdElement = currentEleme...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "T", "parseElement", "(", "Element", "element", ",", "Class", "<", "T", ">", "cls", ")", "{", "T", "value", ";", "if", "(", "element", "==", "null", ")", "{", "value", "=",...
Read an element into a new instance of a class. @param element The element, if null returns null. @param cls The class to create an instance of. @return The new instance.
[ "Read", "an", "element", "into", "a", "new", "instance", "of", "a", "class", "." ]
train
https://github.com/integration-technology/amazon-mws-orders/blob/042e8cd5b10588a30150222bf9c91faf4f130b3c/src/main/java/com/amazonservices/mws/client/MwsXmlReader.java#L110-L130
johnlcox/motif
generator/src/main/java/com/leacox/motif/generate/BaseMatchMethodPermutationBuilder.java
BaseMatchMethodPermutationBuilder.getMatcherString
protected String getMatcherString(MatchType matchType, String paramName) { """ Returns the matcher string {@code any() or eq(x)} for a given type. """ String matchB; if (matchType == MatchType.DECOMPOSE || matchType == MatchType.ANY) { matchB = "any()"; } else { matchB = "eq(" + paramNa...
java
protected String getMatcherString(MatchType matchType, String paramName) { String matchB; if (matchType == MatchType.DECOMPOSE || matchType == MatchType.ANY) { matchB = "any()"; } else { matchB = "eq(" + paramName + ".t)"; } return matchB; }
[ "protected", "String", "getMatcherString", "(", "MatchType", "matchType", ",", "String", "paramName", ")", "{", "String", "matchB", ";", "if", "(", "matchType", "==", "MatchType", ".", "DECOMPOSE", "||", "matchType", "==", "MatchType", ".", "ANY", ")", "{", ...
Returns the matcher string {@code any() or eq(x)} for a given type.
[ "Returns", "the", "matcher", "string", "{" ]
train
https://github.com/johnlcox/motif/blob/33a72d79fcbac16c89f8c4b0567856f2442f59be/generator/src/main/java/com/leacox/motif/generate/BaseMatchMethodPermutationBuilder.java#L203-L211
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagProperty.java
CmsJspTagProperty.propertyTagAction
public static String propertyTagAction( String property, String action, String defaultValue, boolean escape, ServletRequest req) throws CmsException { """ Internal action method.<p> @param property the property to look up @param action the search action @param defau...
java
public static String propertyTagAction( String property, String action, String defaultValue, boolean escape, ServletRequest req) throws CmsException { return propertyTagAction(property, action, defaultValue, escape, req, null); }
[ "public", "static", "String", "propertyTagAction", "(", "String", "property", ",", "String", "action", ",", "String", "defaultValue", ",", "boolean", "escape", ",", "ServletRequest", "req", ")", "throws", "CmsException", "{", "return", "propertyTagAction", "(", "p...
Internal action method.<p> @param property the property to look up @param action the search action @param defaultValue the default value @param escape if the result html should be escaped or not @param req the current request @return the value of the property or <code>null</code> if not found (and no defaultValue was...
[ "Internal", "action", "method", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagProperty.java#L303-L312
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/bond/Bond.java
Bond.getAccruedInterest
public double getAccruedInterest(LocalDate date, AnalyticModel model) { """ Returns the accrued interest of the bond for a given date. @param date The date of interest. @param model The model under which the product is valued. @return The accrued interest. """ int periodIndex=schedule.getPeriodIndex(dat...
java
public double getAccruedInterest(LocalDate date, AnalyticModel model) { int periodIndex=schedule.getPeriodIndex(date); Period period=schedule.getPeriod(periodIndex); DayCountConvention dcc= schedule.getDaycountconvention(); double accruedInterest=getCouponPayment(periodIndex,model)*(dcc.getDaycountFraction(peri...
[ "public", "double", "getAccruedInterest", "(", "LocalDate", "date", ",", "AnalyticModel", "model", ")", "{", "int", "periodIndex", "=", "schedule", ".", "getPeriodIndex", "(", "date", ")", ";", "Period", "period", "=", "schedule", ".", "getPeriod", "(", "perio...
Returns the accrued interest of the bond for a given date. @param date The date of interest. @param model The model under which the product is valued. @return The accrued interest.
[ "Returns", "the", "accrued", "interest", "of", "the", "bond", "for", "a", "given", "date", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/bond/Bond.java#L309-L315
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.unregister
protected void unregister(IConnection conn, boolean deleteIfNoConns) { """ Removes client-connection association for given connection @param conn Connection object @param deleteIfNoConns Whether to delete this client if it no longer has any connections """ log.debug("Unregister connection ({}:{}...
java
protected void unregister(IConnection conn, boolean deleteIfNoConns) { log.debug("Unregister connection ({}:{}) client id: {}", conn.getRemoteAddress(), conn.getRemotePort(), id); // remove connection from connected scopes list connections.remove(conn); // If client is not connected ...
[ "protected", "void", "unregister", "(", "IConnection", "conn", ",", "boolean", "deleteIfNoConns", ")", "{", "log", ".", "debug", "(", "\"Unregister connection ({}:{}) client id: {}\"", ",", "conn", ".", "getRemoteAddress", "(", ")", ",", "conn", ".", "getRemotePort"...
Removes client-connection association for given connection @param conn Connection object @param deleteIfNoConns Whether to delete this client if it no longer has any connections
[ "Removes", "client", "-", "connection", "association", "for", "given", "connection" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L300-L309
lessthanoptimal/ddogleg
src/org/ddogleg/nn/alg/searches/KdTreeSearch1Bbf.java
KdTreeSearch1Bbf.checkBestDistance
@Override protected void checkBestDistance(KdTree.Node node, P target) { """ Checks to see if the current node's point is the closet point found so far """ double distanceSq = distance.distance((P)node.point,target); if( distanceSq <= bestDistanceSq ) { if( bestNode == null || distanceSq < bestDistance...
java
@Override protected void checkBestDistance(KdTree.Node node, P target) { double distanceSq = distance.distance((P)node.point,target); if( distanceSq <= bestDistanceSq ) { if( bestNode == null || distanceSq < bestDistanceSq ) { bestDistanceSq = distanceSq; bestNode = node; } } }
[ "@", "Override", "protected", "void", "checkBestDistance", "(", "KdTree", ".", "Node", "node", ",", "P", "target", ")", "{", "double", "distanceSq", "=", "distance", ".", "distance", "(", "(", "P", ")", "node", ".", "point", ",", "target", ")", ";", "i...
Checks to see if the current node's point is the closet point found so far
[ "Checks", "to", "see", "if", "the", "current", "node", "s", "point", "is", "the", "closet", "point", "found", "so", "far" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/searches/KdTreeSearch1Bbf.java#L64-L73
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/ReflectionUtils.java
ReflectionUtils.setField
public static void setField(Field field, Object target, Object value) { """ Set the field represented by the supplied {@link Field field object} on the specified {@link Object target object} to the specified {@code value}. In accordance with {@link Field#set(Object, Object)} semantics, the new value is automati...
java
public static void setField(Field field, Object target, Object value) { try { field.set(target, value); } catch (IllegalAccessException e) { throw new IllegalStateException("Could not access field: " + field, e); } }
[ "public", "static", "void", "setField", "(", "Field", "field", ",", "Object", "target", ",", "Object", "value", ")", "{", "try", "{", "field", ".", "set", "(", "target", ",", "value", ")", ";", "}", "catch", "(", "IllegalAccessException", "e", ")", "{"...
Set the field represented by the supplied {@link Field field object} on the specified {@link Object target object} to the specified {@code value}. In accordance with {@link Field#set(Object, Object)} semantics, the new value is automatically unwrapped if the underlying field has a primitive type. @param field the fiel...
[ "Set", "the", "field", "represented", "by", "the", "supplied", "{", "@link", "Field", "field", "object", "}", "on", "the", "specified", "{", "@link", "Object", "target", "object", "}", "to", "the", "specified", "{", "@code", "value", "}", ".", "In", "acc...
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/ReflectionUtils.java#L58-L64
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.cubicTo
public SVGPath cubicTo(double c1x, double c1y, double c2x, double c2y, double x, double y) { """ Cubic Bezier line to the given coordinates. @param c1x first control point x @param c1y first control point y @param c2x second control point x @param c2y second control point y @param x new coordinates @param ...
java
public SVGPath cubicTo(double c1x, double c1y, double c2x, double c2y, double x, double y) { return append(PATH_CUBIC_TO).append(c1x).append(c1y).append(c2x).append(c2y).append(x).append(y); }
[ "public", "SVGPath", "cubicTo", "(", "double", "c1x", ",", "double", "c1y", ",", "double", "c2x", ",", "double", "c2y", ",", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_CUBIC_TO", ")", ".", "append", "(", "c1x", ")", "...
Cubic Bezier line to the given coordinates. @param c1x first control point x @param c1y first control point y @param c2x second control point x @param c2y second control point y @param x new coordinates @param y new coordinates @return path object, for compact syntax.
[ "Cubic", "Bezier", "line", "to", "the", "given", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L357-L359
kiegroup/droolsjbpm-integration
kie-camel/src/main/java/org/kie/camel/embedded/component/FastCloner.java
FastCloner.deepClone
public <T> T deepClone(final T o) { """ deep clones "o". @param <T> the type of "o" @param o the object to be deep-cloned @return a deep-clone of "o". """ if (o == null) { return null; } if (!this.cloningEnabled) { return o; } if (this.dump...
java
public <T> T deepClone(final T o) { if (o == null) { return null; } if (!this.cloningEnabled) { return o; } if (this.dumpClonedClasses) { System.out.println("start>" + o.getClass()); } final Map<Object, Object> clones = new Iden...
[ "public", "<", "T", ">", "T", "deepClone", "(", "final", "T", "o", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "!", "this", ".", "cloningEnabled", ")", "{", "return", "o", ";", "}", "if", "(", "thi...
deep clones "o". @param <T> the type of "o" @param o the object to be deep-cloned @return a deep-clone of "o".
[ "deep", "clones", "o", "." ]
train
https://github.com/kiegroup/droolsjbpm-integration/blob/6c26200ab03855dbb92b56ca0c6363cdec0eaf2c/kie-camel/src/main/java/org/kie/camel/embedded/component/FastCloner.java#L241-L257
bernardladenthin/streambuffer
src/main/java/net/ladenthin/streambuffer/StreamBuffer.java
StreamBuffer.correctOffsetAndLengthToRead
public static boolean correctOffsetAndLengthToRead(byte[] b, int off, int len) { """ Security check mostly copied from {@link InputStream#read(byte[], int, int)}. Ensures the parameter are valid. @param b the byte array to copy from @param off the offset to read from the array @param len the len of the bytes t...
java
public static boolean correctOffsetAndLengthToRead(byte[] b, int off, int len) { if (b == null) { throw new NullPointerException(); } else if (off < 0 || len < 0 || len > b.length - off) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return fa...
[ "public", "static", "boolean", "correctOffsetAndLengthToRead", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "{", "if", "(", "b", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "else", "if",...
Security check mostly copied from {@link InputStream#read(byte[], int, int)}. Ensures the parameter are valid. @param b the byte array to copy from @param off the offset to read from the array @param len the len of the bytes to read from the array @return <code>true</code> if there are bytes to read, otherwise <code>fa...
[ "Security", "check", "mostly", "copied", "from", "{" ]
train
https://github.com/bernardladenthin/streambuffer/blob/46d586c95fc3316c7a92b76a556c932b9346015d/src/main/java/net/ladenthin/streambuffer/StreamBuffer.java#L170-L179
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java
ArrayBackedSortedColumns.reconcileWith
private void reconcileWith(int i, Cell cell) { """ Reconcile with a cell at position i. Assume that i is a valid position. """ cells[i] = cell.reconcile(cells[i]); }
java
private void reconcileWith(int i, Cell cell) { cells[i] = cell.reconcile(cells[i]); }
[ "private", "void", "reconcileWith", "(", "int", "i", ",", "Cell", "cell", ")", "{", "cells", "[", "i", "]", "=", "cell", ".", "reconcile", "(", "cells", "[", "i", "]", ")", ";", "}" ]
Reconcile with a cell at position i. Assume that i is a valid position.
[ "Reconcile", "with", "a", "cell", "at", "position", "i", ".", "Assume", "that", "i", "is", "a", "valid", "position", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/ArrayBackedSortedColumns.java#L401-L404
box/box-java-sdk
src/main/java/com/box/sdk/BoxFolder.java
BoxFolder.uploadFile
public BoxFile.Info uploadFile(InputStream fileContent, String name) { """ Uploads a new file to this folder. @param fileContent a stream containing the contents of the file to upload. @param name the name to give the uploaded file. @return the uploaded file's info. """ FileUploadParams upl...
java
public BoxFile.Info uploadFile(InputStream fileContent, String name) { FileUploadParams uploadInfo = new FileUploadParams() .setContent(fileContent) .setName(name); return this.uploadFile(uploadInfo); }
[ "public", "BoxFile", ".", "Info", "uploadFile", "(", "InputStream", "fileContent", ",", "String", "name", ")", "{", "FileUploadParams", "uploadInfo", "=", "new", "FileUploadParams", "(", ")", ".", "setContent", "(", "fileContent", ")", ".", "setName", "(", "na...
Uploads a new file to this folder. @param fileContent a stream containing the contents of the file to upload. @param name the name to give the uploaded file. @return the uploaded file's info.
[ "Uploads", "a", "new", "file", "to", "this", "folder", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L452-L457
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Flash.java
Flash.put
public void put(String key, String value) { """ Adds a value with a specific key to the flash overwriting an existing value @param key The key @param value The value """ if (validCharacters(key) && validCharacters(value)) { this.values.put(key, value); } }
java
public void put(String key, String value) { if (validCharacters(key) && validCharacters(value)) { this.values.put(key, value); } }
[ "public", "void", "put", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "validCharacters", "(", "key", ")", "&&", "validCharacters", "(", "value", ")", ")", "{", "this", ".", "values", ".", "put", "(", "key", ",", "value", ")", ...
Adds a value with a specific key to the flash overwriting an existing value @param key The key @param value The value
[ "Adds", "a", "value", "with", "a", "specific", "key", "to", "the", "flash", "overwriting", "an", "existing", "value" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Flash.java#L86-L90
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java
NetworkServiceRecordAgent.deletePhysicalNetworkFunctionRecord
@Help( help = "Delete the PhysicalNetworkFunctionRecord of a NetworkServiceRecord with specific id" ) public void deletePhysicalNetworkFunctionRecord(final String idNsr, final String idPnfr) throws SDKException { """ Deletes a specific PhysicalNetworkFunctionRecord. @param idNsr the ID of the Netw...
java
@Help( help = "Delete the PhysicalNetworkFunctionRecord of a NetworkServiceRecord with specific id" ) public void deletePhysicalNetworkFunctionRecord(final String idNsr, final String idPnfr) throws SDKException { String url = idNsr + "/pnfrecords" + "/" + idPnfr; requestDelete(url); }
[ "@", "Help", "(", "help", "=", "\"Delete the PhysicalNetworkFunctionRecord of a NetworkServiceRecord with specific id\"", ")", "public", "void", "deletePhysicalNetworkFunctionRecord", "(", "final", "String", "idNsr", ",", "final", "String", "idPnfr", ")", "throws", "SDKExcept...
Deletes a specific PhysicalNetworkFunctionRecord. @param idNsr the ID of the NetworkFunctionRecord containing the PhysicalNetworkFunctionRecord @param idPnfr the ID of the PhysicalNetworkFunctionRecord to delete @throws SDKException if the request fails
[ "Deletes", "a", "specific", "PhysicalNetworkFunctionRecord", "." ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java#L588-L595
google/closure-templates
java/src/com/google/template/soy/passes/CombineConsecutiveRawTextNodesPass.java
CombineConsecutiveRawTextNodesPass.mergeRange
@SuppressWarnings("unchecked") private int mergeRange(ParentSoyNode<?> parent, int start, int lastNonEmptyRawTextNode, int end) { """ RawTextNodes and if we can remove a RawTextNode, we can also add one. """ checkArgument(start < end); if (start == -1 || end == start + 1) { return end; } ...
java
@SuppressWarnings("unchecked") private int mergeRange(ParentSoyNode<?> parent, int start, int lastNonEmptyRawTextNode, int end) { checkArgument(start < end); if (start == -1 || end == start + 1) { return end; } // general case, there are N rawtextnodes to merge where n > 1 // merge all the n...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "int", "mergeRange", "(", "ParentSoyNode", "<", "?", ">", "parent", ",", "int", "start", ",", "int", "lastNonEmptyRawTextNode", ",", "int", "end", ")", "{", "checkArgument", "(", "start", "<", "e...
RawTextNodes and if we can remove a RawTextNode, we can also add one.
[ "RawTextNodes", "and", "if", "we", "can", "remove", "a", "RawTextNode", "we", "can", "also", "add", "one", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/passes/CombineConsecutiveRawTextNodesPass.java#L96-L112
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Form.java
Form.addValueList
public void addValueList(String key, String value) { """ Adds an additional item to the value list @param key The name of the form element @param value The value to store """ Objects.requireNonNull(key, Required.KEY.toString()); if (!valueMap.containsKey(key)) { List<String> valu...
java
public void addValueList(String key, String value) { Objects.requireNonNull(key, Required.KEY.toString()); if (!valueMap.containsKey(key)) { List<String> values = new ArrayList<>(); values.add(value); valueMap.put(key, values); } else { ...
[ "public", "void", "addValueList", "(", "String", "key", ",", "String", "value", ")", "{", "Objects", ".", "requireNonNull", "(", "key", ",", "Required", ".", "KEY", ".", "toString", "(", ")", ")", ";", "if", "(", "!", "valueMap", ".", "containsKey", "(...
Adds an additional item to the value list @param key The name of the form element @param value The value to store
[ "Adds", "an", "additional", "item", "to", "the", "value", "list" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Form.java#L188-L202
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/shared/FakeTable.java
FakeTable.doSetHandle
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException { """ Reposition to this record using this bookmark. @param bookmark The handle to use to position the record. @param iHandleType The type of handle (DATA_SOURCE/OBJECT_ID,OBJECT_SOURCE,BOOKMARK). @return - true - record found/fals...
java
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException { FieldList fieldList = this.getSharedTable().setHandle(bookmark, iHandleType); if (fieldList != null) if (fieldList.getTable() != this) // Must be this type of record throw new DBException("Can't ...
[ "public", "boolean", "doSetHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "FieldList", "fieldList", "=", "this", ".", "getSharedTable", "(", ")", ".", "setHandle", "(", "bookmark", ",", "iHandleType", ")", ";"...
Reposition to this record using this bookmark. @param bookmark The handle to use to position the record. @param iHandleType The type of handle (DATA_SOURCE/OBJECT_ID,OBJECT_SOURCE,BOOKMARK). @return - true - record found/false - record not found @exception FILE_NOT_OPEN. @exception DBException File exception.
[ "Reposition", "to", "this", "record", "using", "this", "bookmark", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/shared/FakeTable.java#L238-L245
JavaMoney/jsr354-api
src/main/java/javax/money/Monetary.java
Monetary.getCurrencies
public static Collection<CurrencyUnit> getCurrencies(CurrencyQuery query) { """ Query all currencies matching the given query. @param query The {@link javax.money.CurrencyQuery}, not null. @return the list of known currencies, never null. """ return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON...
java
public static Collection<CurrencyUnit> getCurrencies(CurrencyQuery query) { return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow( () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup.")) .getCurrencies(query); }
[ "public", "static", "Collection", "<", "CurrencyUnit", ">", "getCurrencies", "(", "CurrencyQuery", "query", ")", "{", "return", "Optional", ".", "ofNullable", "(", "MONETARY_CURRENCIES_SINGLETON_SPI", "(", ")", ")", ".", "orElseThrow", "(", "(", ")", "->", "new"...
Query all currencies matching the given query. @param query The {@link javax.money.CurrencyQuery}, not null. @return the list of known currencies, never null.
[ "Query", "all", "currencies", "matching", "the", "given", "query", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/Monetary.java#L483-L487
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java
PageFlowUtils.addValidationError
public static void addValidationError( String propertyName, String messageKey, ServletRequest request ) { """ Add a validation error that will be shown with the Errors and Error tags. @deprecated Use {@link #addActionError(ServletRequest, String, String, Object[])} instead. @param propertyName the name of the ...
java
public static void addValidationError( String propertyName, String messageKey, ServletRequest request ) { addActionError( request, propertyName, messageKey ); }
[ "public", "static", "void", "addValidationError", "(", "String", "propertyName", ",", "String", "messageKey", ",", "ServletRequest", "request", ")", "{", "addActionError", "(", "request", ",", "propertyName", ",", "messageKey", ")", ";", "}" ]
Add a validation error that will be shown with the Errors and Error tags. @deprecated Use {@link #addActionError(ServletRequest, String, String, Object[])} instead. @param propertyName the name of the property with which to associate this error. @param messageKey the message-resources key for the error message. @param...
[ "Add", "a", "validation", "error", "that", "will", "be", "shown", "with", "the", "Errors", "and", "Error", "tags", ".", "@deprecated", "Use", "{", "@link", "#addActionError", "(", "ServletRequest", "String", "String", "Object", "[]", ")", "}", "instead", "."...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java#L1014-L1017
alibaba/cobarclient
src/main/java/com/alibaba/cobar/client/CobarSqlMapClientTemplate.java
CobarSqlMapClientTemplate.queryForPaginatedList
@Override public PaginatedList queryForPaginatedList(String statementName, int pageSize) throws DataAccessException { """ NOTE: since it's a deprecated interface, so distributed data access is not supported. """ return super.queryForPaginatedList(statementName, pageSize); }
java
@Override public PaginatedList queryForPaginatedList(String statementName, int pageSize) throws DataAccessException { return super.queryForPaginatedList(statementName, pageSize); }
[ "@", "Override", "public", "PaginatedList", "queryForPaginatedList", "(", "String", "statementName", ",", "int", "pageSize", ")", "throws", "DataAccessException", "{", "return", "super", ".", "queryForPaginatedList", "(", "statementName", ",", "pageSize", ")", ";", ...
NOTE: since it's a deprecated interface, so distributed data access is not supported.
[ "NOTE", ":", "since", "it", "s", "a", "deprecated", "interface", "so", "distributed", "data", "access", "is", "not", "supported", "." ]
train
https://github.com/alibaba/cobarclient/blob/46396017857e213c537b0fc88cae7e8ea3a798db/src/main/java/com/alibaba/cobar/client/CobarSqlMapClientTemplate.java#L717-L721
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/TypeCompatibilityObligation.java
TypeCompatibilityObligation.newInstance
public static TypeCompatibilityObligation newInstance(PExp exp, PType etype, PType atype, IPOContextStack ctxt, IPogAssistantFactory assistantFactory) throws AnalysisException { """ Factory Method since we need to return null STOs (which should be discarded @param exp The expression to be checked @param...
java
public static TypeCompatibilityObligation newInstance(PExp exp, PType etype, PType atype, IPOContextStack ctxt, IPogAssistantFactory assistantFactory) throws AnalysisException { TypeCompatibilityObligation sto = new TypeCompatibilityObligation(exp, etype, atype, ctxt, assistantFactory); if (sto.getValueTree...
[ "public", "static", "TypeCompatibilityObligation", "newInstance", "(", "PExp", "exp", ",", "PType", "etype", ",", "PType", "atype", ",", "IPOContextStack", "ctxt", ",", "IPogAssistantFactory", "assistantFactory", ")", "throws", "AnalysisException", "{", "TypeCompatibili...
Factory Method since we need to return null STOs (which should be discarded @param exp The expression to be checked @param etype The expected type @param atype The actual type @param ctxt Context Information @param assistantFactory @return @throws AnalysisException
[ "Factory", "Method", "since", "we", "need", "to", "return", "null", "STOs", "(", "which", "should", "be", "discarded" ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/TypeCompatibilityObligation.java#L111-L123
graphhopper/graphhopper
core/src/main/java/com/graphhopper/util/GHUtility.java
GHUtility.createEdgeKey
public static int createEdgeKey(int nodeA, int nodeB, int edgeId, boolean reverse) { """ Creates unique positive number for specified edgeId taking into account the direction defined by nodeA, nodeB and reverse. """ edgeId = edgeId << 1; if (reverse) return (nodeA > nodeB) ? edgeId...
java
public static int createEdgeKey(int nodeA, int nodeB, int edgeId, boolean reverse) { edgeId = edgeId << 1; if (reverse) return (nodeA > nodeB) ? edgeId : edgeId + 1; return (nodeA > nodeB) ? edgeId + 1 : edgeId; }
[ "public", "static", "int", "createEdgeKey", "(", "int", "nodeA", ",", "int", "nodeB", ",", "int", "edgeId", ",", "boolean", "reverse", ")", "{", "edgeId", "=", "edgeId", "<<", "1", ";", "if", "(", "reverse", ")", "return", "(", "nodeA", ">", "nodeB", ...
Creates unique positive number for specified edgeId taking into account the direction defined by nodeA, nodeB and reverse.
[ "Creates", "unique", "positive", "number", "for", "specified", "edgeId", "taking", "into", "account", "the", "direction", "defined", "by", "nodeA", "nodeB", "and", "reverse", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/util/GHUtility.java#L465-L470
apache/fluo
modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java
Bytes.contentEquals
public boolean contentEquals(byte[] bytes, int offset, int len) { """ Returns true if this Bytes object equals another. This method checks it's arguments. @since 1.2.0 """ Preconditions.checkArgument(len >= 0 && offset >= 0 && offset + len <= bytes.length); return contentEqualsUnchecked(bytes, offse...
java
public boolean contentEquals(byte[] bytes, int offset, int len) { Preconditions.checkArgument(len >= 0 && offset >= 0 && offset + len <= bytes.length); return contentEqualsUnchecked(bytes, offset, len); }
[ "public", "boolean", "contentEquals", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "len", ")", "{", "Preconditions", ".", "checkArgument", "(", "len", ">=", "0", "&&", "offset", ">=", "0", "&&", "offset", "+", "len", "<=", "bytes",...
Returns true if this Bytes object equals another. This method checks it's arguments. @since 1.2.0
[ "Returns", "true", "if", "this", "Bytes", "object", "equals", "another", ".", "This", "method", "checks", "it", "s", "arguments", "." ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java#L298-L301
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smiles/DeduceBondSystemTool.java
DeduceBondSystemTool.storeRingSystem
private void storeRingSystem(IAtomContainer mol, IRingSet ringSet) { """ Stores an IRingSet corresponding to a AtomContainer using the bond numbers. @param mol The IAtomContainer for which to store the IRingSet. @param ringSet The IRingSet to store """ listOfRings = new ArrayList<Integer[]>()...
java
private void storeRingSystem(IAtomContainer mol, IRingSet ringSet) { listOfRings = new ArrayList<Integer[]>(); // this is a list of int arrays for (int r = 0; r < ringSet.getAtomContainerCount(); ++r) { IRing ring = (IRing) ringSet.getAtomContainer(r); Integer[] bondNumbers = new...
[ "private", "void", "storeRingSystem", "(", "IAtomContainer", "mol", ",", "IRingSet", "ringSet", ")", "{", "listOfRings", "=", "new", "ArrayList", "<", "Integer", "[", "]", ">", "(", ")", ";", "// this is a list of int arrays", "for", "(", "int", "r", "=", "0...
Stores an IRingSet corresponding to a AtomContainer using the bond numbers. @param mol The IAtomContainer for which to store the IRingSet. @param ringSet The IRingSet to store
[ "Stores", "an", "IRingSet", "corresponding", "to", "a", "AtomContainer", "using", "the", "bond", "numbers", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smiles/DeduceBondSystemTool.java#L810-L819
foundation-runtime/configuration
configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamValidators.java
ParamValidators.getValidatorsMap
private static ConcurrentHashMap<Class, List<ParamValidator>> getValidatorsMap() { """ build a map of all Validator implementations by their class type and required value """ // use <ConcurrentHashMap> in case validators are added while initializing parameters through <getValidator> method. Co...
java
private static ConcurrentHashMap<Class, List<ParamValidator>> getValidatorsMap() { // use <ConcurrentHashMap> in case validators are added while initializing parameters through <getValidator> method. ConcurrentHashMap<Class, List<ParamValidator>> map = new ConcurrentHashMap(); addValidators(map...
[ "private", "static", "ConcurrentHashMap", "<", "Class", ",", "List", "<", "ParamValidator", ">", ">", "getValidatorsMap", "(", ")", "{", "// use <ConcurrentHashMap> in case validators are added while initializing parameters through <getValidator> method.", "ConcurrentHashMap", "<",...
build a map of all Validator implementations by their class type and required value
[ "build", "a", "map", "of", "all", "Validator", "implementations", "by", "their", "class", "type", "and", "required", "value" ]
train
https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/validation/params/ParamValidators.java#L402-L412
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/EmptyField.java
EmptyField.init
public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { """ Constructor. @param record The parent record. @param strName The field name. @param iDataLength The maximum string length (pass -1 for default). @param strDesc The string description (usually pass null, to...
java
public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.init(record, Constants.BLANK, 0, Constants.BLANK, null); m_data = Constants.BLANK; }
[ "public", "void", "init", "(", "Record", "record", ",", "String", "strName", ",", "int", "iDataLength", ",", "String", "strDesc", ",", "Object", "strDefault", ")", "{", "super", ".", "init", "(", "record", ",", "Constants", ".", "BLANK", ",", "0", ",", ...
Constructor. @param record The parent record. @param strName The field name. @param iDataLength The maximum string length (pass -1 for default). @param strDesc The string description (usually pass null, to use the resource file desc). @param strDefault The default value (if object, this value is the default value, if s...
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/EmptyField.java#L68-L72
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java
CirculantTracker.subpixelPeak
protected void subpixelPeak(int peakX, int peakY) { """ Refine the local-peak using a search algorithm for sub-pixel accuracy. """ // this function for r was determined empirically by using work regions of 32,64,128 int r = Math.min(2,response.width/25); if( r < 0 ) return; localPeak.setSearchRadiu...
java
protected void subpixelPeak(int peakX, int peakY) { // this function for r was determined empirically by using work regions of 32,64,128 int r = Math.min(2,response.width/25); if( r < 0 ) return; localPeak.setSearchRadius(r); localPeak.search(peakX,peakY); offX = localPeak.getPeakX() - peakX; offY = ...
[ "protected", "void", "subpixelPeak", "(", "int", "peakX", ",", "int", "peakY", ")", "{", "// this function for r was determined empirically by using work regions of 32,64,128", "int", "r", "=", "Math", ".", "min", "(", "2", ",", "response", ".", "width", "/", "25", ...
Refine the local-peak using a search algorithm for sub-pixel accuracy.
[ "Refine", "the", "local", "-", "peak", "using", "a", "search", "algorithm", "for", "sub", "-", "pixel", "accuracy", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java#L377-L388
gearpump/gearpump
core/src/main/java/io/gearpump/util/AkkaHelper.java
AkkaHelper.actorFor
@SuppressWarnings("deprecation") public static ActorRef actorFor(ActorSystem system, String path) { """ Helper util to access the private[akka] system.actorFor method This is used for performance optimization, we encode the session Id in the ActorRef path. Session Id is used to identity sender Task. @para...
java
@SuppressWarnings("deprecation") public static ActorRef actorFor(ActorSystem system, String path) { return system.actorFor(path); }
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "static", "ActorRef", "actorFor", "(", "ActorSystem", "system", ",", "String", "path", ")", "{", "return", "system", ".", "actorFor", "(", "path", ")", ";", "}" ]
Helper util to access the private[akka] system.actorFor method This is used for performance optimization, we encode the session Id in the ActorRef path. Session Id is used to identity sender Task. @param system ActorSystem @param path Relative or absolute path of this Actor System. @return Full qualified ActorRef.
[ "Helper", "util", "to", "access", "the", "private", "[", "akka", "]", "system", ".", "actorFor", "method" ]
train
https://github.com/gearpump/gearpump/blob/6f505aad25d5b8f54976867dbf4e752f13f9702e/core/src/main/java/io/gearpump/util/AkkaHelper.java#L32-L35
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent.mp.1.0/src/com/ibm/ws/concurrent/mp/ContextManagerImpl.java
ContextManagerImpl.getDefault
<T> T getDefault(String mpConfigPropName, T defaultValue) { """ Obtain a default value from MicroProfile Config if available. @param mpConfigPropName name of the MicroProfile Config property. @param defaultValue value to use if not found in MicroProfile Config. @return default value. """ MPConfigA...
java
<T> T getDefault(String mpConfigPropName, T defaultValue) { MPConfigAccessor accessor = cmProvider.mpConfigAccessor; if (accessor != null) { Object mpConfig = mpConfigRef.get(); if (mpConfig == Boolean.FALSE) // not initialized yet if (!mpConfigRef.compareAndSet(B...
[ "<", "T", ">", "T", "getDefault", "(", "String", "mpConfigPropName", ",", "T", "defaultValue", ")", "{", "MPConfigAccessor", "accessor", "=", "cmProvider", ".", "mpConfigAccessor", ";", "if", "(", "accessor", "!=", "null", ")", "{", "Object", "mpConfig", "="...
Obtain a default value from MicroProfile Config if available. @param mpConfigPropName name of the MicroProfile Config property. @param defaultValue value to use if not found in MicroProfile Config. @return default value.
[ "Obtain", "a", "default", "value", "from", "MicroProfile", "Config", "if", "available", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent.mp.1.0/src/com/ibm/ws/concurrent/mp/ContextManagerImpl.java#L152-L164
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.findByLtE_S
@Override public List<CommerceDiscount> findByLtE_S(Date expirationDate, int status, int start, int end) { """ Returns a range of all the commerce discounts where expirationDate &lt; &#63; and status = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>...
java
@Override public List<CommerceDiscount> findByLtE_S(Date expirationDate, int status, int start, int end) { return findByLtE_S(expirationDate, status, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscount", ">", "findByLtE_S", "(", "Date", "expirationDate", ",", "int", "status", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByLtE_S", "(", "expirationDate", ",", "status", ",", "start"...
Returns a range of all the commerce discounts where expirationDate &lt; &#63; and status = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "discounts", "where", "expirationDate", "&lt", ";", "&#63", ";", "and", "status", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L3976-L3980
phax/ph-css
ph-css/src/main/java/com/helger/css/utils/CSSURLHelper.java
CSSURLHelper.getAsCSSURL
@Nonnull @Nonempty public static String getAsCSSURL (@Nonnull final String sURL, final boolean bForceQuoteURL) { """ Surround the passed URL with the CSS "url(...)". When the passed URL contains characters that require quoting, quotes are automatically added! @param sURL URL to be wrapped. May not be <cod...
java
@Nonnull @Nonempty public static String getAsCSSURL (@Nonnull final String sURL, final boolean bForceQuoteURL) { ValueEnforcer.notNull (sURL, "URL"); final StringBuilder aSB = new StringBuilder (CCSSValue.PREFIX_URL_OPEN); final boolean bAreQuotesRequired = bForceQuoteURL || isCSSURLRequiringQuotes (...
[ "@", "Nonnull", "@", "Nonempty", "public", "static", "String", "getAsCSSURL", "(", "@", "Nonnull", "final", "String", "sURL", ",", "final", "boolean", "bForceQuoteURL", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sURL", ",", "\"URL\"", ")", ";", "final"...
Surround the passed URL with the CSS "url(...)". When the passed URL contains characters that require quoting, quotes are automatically added! @param sURL URL to be wrapped. May not be <code>null</code> but maybe empty. @param bForceQuoteURL if <code>true</code> single quotes are added around the URL @return <code>url...
[ "Surround", "the", "passed", "URL", "with", "the", "CSS", "url", "(", "...", ")", ".", "When", "the", "passed", "URL", "contains", "characters", "that", "require", "quoting", "quotes", "are", "automatically", "added!" ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/utils/CSSURLHelper.java#L191-L215
jfinal/jfinal
src/main/java/com/jfinal/plugin/redis/Cache.java
Cache.hincrByFloat
public Double hincrByFloat(Object key, Object field, double value) { """ 为哈希表 key 中的域 field 加上浮点数增量 increment 。 如果哈希表中没有域 field ,那么 HINCRBYFLOAT 会先将域 field 的值设为 0 ,然后再执行加法操作。 如果键 key 不存在,那么 HINCRBYFLOAT 会先创建一个哈希表,再创建域 field ,最后再执行加法操作。 当以下任意一个条件发生时,返回一个错误: 1:域 field 的值不是字符串类型(因为 redis 中的数字和浮点数都以字符串的形式保存,所以它们都属...
java
public Double hincrByFloat(Object key, Object field, double value) { Jedis jedis = getJedis(); try { return jedis.hincrByFloat(keyToBytes(key), fieldToBytes(field), value); } finally {close(jedis);} }
[ "public", "Double", "hincrByFloat", "(", "Object", "key", ",", "Object", "field", ",", "double", "value", ")", "{", "Jedis", "jedis", "=", "getJedis", "(", ")", ";", "try", "{", "return", "jedis", ".", "hincrByFloat", "(", "keyToBytes", "(", "key", ")", ...
为哈希表 key 中的域 field 加上浮点数增量 increment 。 如果哈希表中没有域 field ,那么 HINCRBYFLOAT 会先将域 field 的值设为 0 ,然后再执行加法操作。 如果键 key 不存在,那么 HINCRBYFLOAT 会先创建一个哈希表,再创建域 field ,最后再执行加法操作。 当以下任意一个条件发生时,返回一个错误: 1:域 field 的值不是字符串类型(因为 redis 中的数字和浮点数都以字符串的形式保存,所以它们都属于字符串类型) 2:域 field 当前的值或给定的增量 increment 不能解释(parse)为双精度浮点数(double precision floatin...
[ "为哈希表", "key", "中的域", "field", "加上浮点数增量", "increment", "。", "如果哈希表中没有域", "field", ",那么", "HINCRBYFLOAT", "会先将域", "field", "的值设为", "0", ",然后再执行加法操作。", "如果键", "key", "不存在,那么", "HINCRBYFLOAT", "会先创建一个哈希表,再创建域", "field", ",最后再执行加法操作。", "当以下任意一个条件发生时,返回一个错误:", "1", ":", ...
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/redis/Cache.java#L597-L603
groupon/monsoon
history/src/main/java/com/groupon/lex/metrics/history/xdr/support/FileUtil.java
FileUtil.createTempFile
public static FileChannel createTempFile(String prefix, String suffix) throws IOException { """ Create a temporary file that will be removed when it is closed, in the tmpdir location. """ return createTempFile(TMPDIR, prefix, suffix); }
java
public static FileChannel createTempFile(String prefix, String suffix) throws IOException { return createTempFile(TMPDIR, prefix, suffix); }
[ "public", "static", "FileChannel", "createTempFile", "(", "String", "prefix", ",", "String", "suffix", ")", "throws", "IOException", "{", "return", "createTempFile", "(", "TMPDIR", ",", "prefix", ",", "suffix", ")", ";", "}" ]
Create a temporary file that will be removed when it is closed, in the tmpdir location.
[ "Create", "a", "temporary", "file", "that", "will", "be", "removed", "when", "it", "is", "closed", "in", "the", "tmpdir", "location", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/history/src/main/java/com/groupon/lex/metrics/history/xdr/support/FileUtil.java#L66-L68
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java
ContentSpecProcessor.doesFileMatch
protected boolean doesFileMatch(final File file, final CSNodeWrapper node) { """ Checks to see if a ContentSpec topic matches a Content Spec Entity file. @param file The ContentSpec file object. @param node The Content Spec Entity file. @return True if the file is determined to match otherwise false. """ ...
java
protected boolean doesFileMatch(final File file, final CSNodeWrapper node) { if (!node.getNodeType().equals(CommonConstants.CS_NODE_FILE)) return false; // If the unique id is not from the parser, in which case it will start with a number than use the unique id to compare if (file.getUniqueId()...
[ "protected", "boolean", "doesFileMatch", "(", "final", "File", "file", ",", "final", "CSNodeWrapper", "node", ")", "{", "if", "(", "!", "node", ".", "getNodeType", "(", ")", ".", "equals", "(", "CommonConstants", ".", "CS_NODE_FILE", ")", ")", "return", "f...
Checks to see if a ContentSpec topic matches a Content Spec Entity file. @param file The ContentSpec file object. @param node The Content Spec Entity file. @return True if the file is determined to match otherwise false.
[ "Checks", "to", "see", "if", "a", "ContentSpec", "topic", "matches", "a", "Content", "Spec", "Entity", "file", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java#L2174-L2184
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java
AttributeRenderer.renderIconImage
public void renderIconImage(ImageTag.State state, TreeElement elem) { """ This method will render the values assocated with the Icon Image. @param state @param elem """ ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_ICON]; assert(al != null); if (al.size() == 0) ...
java
public void renderIconImage(ImageTag.State state, TreeElement elem) { ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_ICON]; assert(al != null); if (al.size() == 0) return; int cnt = al.size(); for (int i = 0; i < cnt; i++) { TreeHtmlAttrib...
[ "public", "void", "renderIconImage", "(", "ImageTag", ".", "State", "state", ",", "TreeElement", "elem", ")", "{", "ArrayList", "al", "=", "_lists", "[", "TreeHtmlAttributeInfo", ".", "HTML_LOCATION_ICON", "]", ";", "assert", "(", "al", "!=", "null", ")", ";...
This method will render the values assocated with the Icon Image. @param state @param elem
[ "This", "method", "will", "render", "the", "values", "assocated", "with", "the", "Icon", "Image", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java#L168-L181
threerings/gwt-utils
src/main/java/com/threerings/gwt/tools/I18nSync.java
I18nSync.processFile
@Deprecated // static methods suck. Create an instance and call the method on it. public static void processFile (File sourceDir, File propsFile) throws IOException { """ Converts a single i18n properties file to its corresponding source file. @param sourceDir the root of the source directory. Used ...
java
@Deprecated // static methods suck. Create an instance and call the method on it. public static void processFile (File sourceDir, File propsFile) throws IOException { new I18nSync().process(sourceDir, propsFile); }
[ "@", "Deprecated", "// static methods suck. Create an instance and call the method on it.", "public", "static", "void", "processFile", "(", "File", "sourceDir", ",", "File", "propsFile", ")", "throws", "IOException", "{", "new", "I18nSync", "(", ")", ".", "process", "("...
Converts a single i18n properties file to its corresponding source file. @param sourceDir the root of the source directory. Used to infer the package for the generated source given the path to the properties file and the root of the source directory. @param propsFile the properties file from which to generate a source...
[ "Converts", "a", "single", "i18n", "properties", "file", "to", "its", "corresponding", "source", "file", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/tools/I18nSync.java#L77-L82
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.removeAll
@Nullable public static String removeAll (@Nullable final String sInputString, @Nullable final String sRemoveString) { """ Remove all occurrences of the passed character from the specified input string @param sInputString The input string where the character should be removed. If this parameter is <code>nu...
java
@Nullable public static String removeAll (@Nullable final String sInputString, @Nullable final String sRemoveString) { // Is input string empty? if (hasNoText (sInputString)) return sInputString; final int nRemoveLength = getLength (sRemoveString); if (nRemoveLength == 0) { // Nothi...
[ "@", "Nullable", "public", "static", "String", "removeAll", "(", "@", "Nullable", "final", "String", "sInputString", ",", "@", "Nullable", "final", "String", "sRemoveString", ")", "{", "// Is input string empty?", "if", "(", "hasNoText", "(", "sInputString", ")", ...
Remove all occurrences of the passed character from the specified input string @param sInputString The input string where the character should be removed. If this parameter is <code>null</code> or empty, no removing is done. @param sRemoveString The String to be removed. May be <code>null</code> or empty in which case...
[ "Remove", "all", "occurrences", "of", "the", "passed", "character", "from", "the", "specified", "input", "string" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4447-L4483
vsima/uber-java-client
src/main/java/com/victorsima/uber/Utils.java
Utils.parseSurgeConfirmationError
public static SurgeConfirmationError parseSurgeConfirmationError(Gson gson, RetrofitError retrofitError) throws IOException { """ Parses surge confirmation retrofit error (409) into a model object @param gson @param retrofitError @return @throws IOException """ String body = IOUtils.toString(retrof...
java
public static SurgeConfirmationError parseSurgeConfirmationError(Gson gson, RetrofitError retrofitError) throws IOException { String body = IOUtils.toString(retrofitError.getResponse().getBody().in(), "UTF-8"); IOUtils.closeQuietly(retrofitError.getResponse().getBody().in()); return gson.fromJso...
[ "public", "static", "SurgeConfirmationError", "parseSurgeConfirmationError", "(", "Gson", "gson", ",", "RetrofitError", "retrofitError", ")", "throws", "IOException", "{", "String", "body", "=", "IOUtils", ".", "toString", "(", "retrofitError", ".", "getResponse", "("...
Parses surge confirmation retrofit error (409) into a model object @param gson @param retrofitError @return @throws IOException
[ "Parses", "surge", "confirmation", "retrofit", "error", "(", "409", ")", "into", "a", "model", "object" ]
train
https://github.com/vsima/uber-java-client/blob/7cb081728db6286d949024c1b4c85dd74d275472/src/main/java/com/victorsima/uber/Utils.java#L26-L30
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/BasePrepareStatement.java
BasePrepareStatement.setClob
public void setClob(final int parameterIndex, final Reader reader, final long length) throws SQLException { """ Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number of characters specified by length otherwise a <code>SQLException</code> will be generated when ...
java
public void setClob(final int parameterIndex, final Reader reader, final long length) throws SQLException { setCharacterStream(parameterIndex, reader, length); }
[ "public", "void", "setClob", "(", "final", "int", "parameterIndex", ",", "final", "Reader", "reader", ",", "final", "long", "length", ")", "throws", "SQLException", "{", "setCharacterStream", "(", "parameterIndex", ",", "reader", ",", "length", ")", ";", "}" ]
Sets the designated parameter to a <code>Reader</code> object. The reader must contain the number of characters specified by length otherwise a <code>SQLException</code> will be generated when the <code>PreparedStatement</code> is executed. This method differs from the <code>setCharacterStream (int, Reader, int)</cod...
[ "Sets", "the", "designated", "parameter", "to", "a", "<code", ">", "Reader<", "/", "code", ">", "object", ".", "The", "reader", "must", "contain", "the", "number", "of", "characters", "specified", "by", "length", "otherwise", "a", "<code", ">", "SQLException...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/BasePrepareStatement.java#L424-L427
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java
AStar.newPath
@SuppressWarnings( { """ Create an empty path. <p>By default this function invokes the path factory passed as parameter of the constructor. @param startPoint is the first point in the path. @param segment is the first connection to follow. @return the path instance. """ "unchecked", "rawtypes" }) @Pu...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) @Pure protected GP newPath(PT startPoint, ST segment) { if (this.pathFactory != null) { return this.pathFactory.newPath(startPoint, segment); } try { return (GP) new GraphPath(segment, startPoint); } catch (Throwable e) { throw new IllegalStateException(...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "@", "Pure", "protected", "GP", "newPath", "(", "PT", "startPoint", ",", "ST", "segment", ")", "{", "if", "(", "this", ".", "pathFactory", "!=", "null", ")", "{", "return"...
Create an empty path. <p>By default this function invokes the path factory passed as parameter of the constructor. @param startPoint is the first point in the path. @param segment is the first connection to follow. @return the path instance.
[ "Create", "an", "empty", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/astar/AStar.java#L368-L379
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.minCols
public static DMatrixRMaj minCols(DMatrixRMaj input , DMatrixRMaj output ) { """ <p> Finds the element with the minimum value along column in the input matrix and returns the results in a vector:<br> <br> b<sub>j</sub> = min(i=1:m ; a<sub>ij</sub>) </p> @param input Input matrix @param output Optional stor...
java
public static DMatrixRMaj minCols(DMatrixRMaj input , DMatrixRMaj output ) { if( output == null ) { output = new DMatrixRMaj(1,input.numCols); } else { output.reshape(1,input.numCols); } for( int cols = 0; cols < input.numCols; cols++ ) { double minimu...
[ "public", "static", "DMatrixRMaj", "minCols", "(", "DMatrixRMaj", "input", ",", "DMatrixRMaj", "output", ")", "{", "if", "(", "output", "==", "null", ")", "{", "output", "=", "new", "DMatrixRMaj", "(", "1", ",", "input", ".", "numCols", ")", ";", "}", ...
<p> Finds the element with the minimum value along column in the input matrix and returns the results in a vector:<br> <br> b<sub>j</sub> = min(i=1:m ; a<sub>ij</sub>) </p> @param input Input matrix @param output Optional storage for output. Reshaped into a row vector. Modified. @return Vector containing the minimum o...
[ "<p", ">", "Finds", "the", "element", "with", "the", "minimum", "value", "along", "column", "in", "the", "input", "matrix", "and", "returns", "the", "results", "in", "a", "vector", ":", "<br", ">", "<br", ">", "b<sub", ">", "j<", "/", "sub", ">", "="...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L1991-L2011
biojava/biojava
biojava-alignment/src/main/java/org/biojava/nbio/alignment/routines/AlignerHelper.java
AlignerHelper.setScoreVector
public static Last[][] setScoreVector(int x, Subproblem subproblem, int gop, int gep, int[] subs, boolean storing, int[][][] scores) { """ Score global alignment for a given position in the query sequence @param x @param subproblem @param gop @param gep @param subs @param storing @param scores @return ...
java
public static Last[][] setScoreVector(int x, Subproblem subproblem, int gop, int gep, int[] subs, boolean storing, int[][][] scores) { return setScoreVector(x, subproblem.getQueryStartIndex(), subproblem.getTargetStartIndex(), subproblem.getTargetEndIndex(), gop, gep, subs, storing, scores, subproblem.isStartAncho...
[ "public", "static", "Last", "[", "]", "[", "]", "setScoreVector", "(", "int", "x", ",", "Subproblem", "subproblem", ",", "int", "gop", ",", "int", "gep", ",", "int", "[", "]", "subs", ",", "boolean", "storing", ",", "int", "[", "]", "[", "]", "[", ...
Score global alignment for a given position in the query sequence @param x @param subproblem @param gop @param gep @param subs @param storing @param scores @return
[ "Score", "global", "alignment", "for", "a", "given", "position", "in", "the", "query", "sequence" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-alignment/src/main/java/org/biojava/nbio/alignment/routines/AlignerHelper.java#L384-L387
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/helper/json/StringJsonBuilder.java
StringJsonBuilder.toJson
private static Object toJson(JsonObject obj, JsonBuilderFactory factory) { """ Converts a {@link JsonObject} to a JSON string @param obj the object to convert @param factory a factory used to create JSON builders @return the JSON string """ return obj.toJson(factory.createJsonBuilder()); }
java
private static Object toJson(JsonObject obj, JsonBuilderFactory factory) { return obj.toJson(factory.createJsonBuilder()); }
[ "private", "static", "Object", "toJson", "(", "JsonObject", "obj", ",", "JsonBuilderFactory", "factory", ")", "{", "return", "obj", ".", "toJson", "(", "factory", ".", "createJsonBuilder", "(", ")", ")", ";", "}" ]
Converts a {@link JsonObject} to a JSON string @param obj the object to convert @param factory a factory used to create JSON builders @return the JSON string
[ "Converts", "a", "{" ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/helper/json/StringJsonBuilder.java#L152-L154
WASdev/ci.maven
liberty-maven-plugin/src/main/java/net/wasdev/wlp/maven/plugins/applications/InstallAppMojoSupport.java
InstallAppMojoSupport.installLooseConfigWar
protected void installLooseConfigWar(MavenProject proj, LooseConfigData config) throws Exception { """ install war project artifact using loose application configuration file """ // return error if webapp contains java source but it is not compiled yet. File dir = new File(proj.getBuild().getOu...
java
protected void installLooseConfigWar(MavenProject proj, LooseConfigData config) throws Exception { // return error if webapp contains java source but it is not compiled yet. File dir = new File(proj.getBuild().getOutputDirectory()); if (!dir.exists() && containsJavaSource(proj)) { th...
[ "protected", "void", "installLooseConfigWar", "(", "MavenProject", "proj", ",", "LooseConfigData", "config", ")", "throws", "Exception", "{", "// return error if webapp contains java source but it is not compiled yet.", "File", "dir", "=", "new", "File", "(", "proj", ".", ...
install war project artifact using loose application configuration file
[ "install", "war", "project", "artifact", "using", "loose", "application", "configuration", "file" ]
train
https://github.com/WASdev/ci.maven/blob/4fcf2d314299a4c02e2c740e4fc99a4f6aba6918/liberty-maven-plugin/src/main/java/net/wasdev/wlp/maven/plugins/applications/InstallAppMojoSupport.java#L83-L102
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
AnnotationTypeBuilder.buildAnnotationTypeDoc
public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception { """ Build the annotation type documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added """ contentTree...
java
public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception { contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") + " " + annotationTypeDoc.name()); Content annotationContentTree = writer.getAnnotationContentHeader(); buildC...
[ "public", "void", "buildAnnotationTypeDoc", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "Exception", "{", "contentTree", "=", "writer", ".", "getHeader", "(", "configuration", ".", "getText", "(", "\"doclet.AnnotationType\"", ")", "+", "\...
Build the annotation type documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added
[ "Build", "the", "annotation", "type", "documentation", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java#L118-L128
mediathekview/MServer
src/main/java/mServer/tool/M3U8Utils.java
M3U8Utils.gatherUrlsFromWdrM3U8
public static Map<Qualities, String> gatherUrlsFromWdrM3U8(String aWDRM3U8Url) { """ If the URL follows the following structure it will be used to generate MP4 URLS from it.<br> This structure is needed: <code>http://adaptiv.wdr.de/i/medp/[region]/[fsk]/[unkownNumber]/[videoId]/,[Qualitie 01],[Qualitie 02],[Qua...
java
public static Map<Qualities, String> gatherUrlsFromWdrM3U8(String aWDRM3U8Url) { Map<Qualities, String> urlAndQualities = new EnumMap<>(Qualities.class); if (aWDRM3U8Url.contains(M3U8_WDR_URL_BEGIN) || aWDRM3U8Url.contains(M3U8_WDR_URL_ALTERNATIV_BEGIN)) { String m3u8Url = aWDRM3U8Url.replaceAll(REGEX_ALL_BEFORE...
[ "public", "static", "Map", "<", "Qualities", ",", "String", ">", "gatherUrlsFromWdrM3U8", "(", "String", "aWDRM3U8Url", ")", "{", "Map", "<", "Qualities", ",", "String", ">", "urlAndQualities", "=", "new", "EnumMap", "<>", "(", "Qualities", ".", "class", ")"...
If the URL follows the following structure it will be used to generate MP4 URLS from it.<br> This structure is needed: <code>http://adaptiv.wdr.de/i/medp/[region]/[fsk]/[unkownNumber]/[videoId]/,[Qualitie 01],[Qualitie 02],[Qualitie ...],.mp4.csmil/master.m3u8</code><br> @param aWDRM3U8Url The M3U8 URL. @return A Map ...
[ "If", "the", "URL", "follows", "the", "following", "structure", "it", "will", "be", "used", "to", "generate", "MP4", "URLS", "from", "it", ".", "<br", ">", "This", "structure", "is", "needed", ":", "<code", ">", "http", ":", "//", "adaptiv", ".", "wdr"...
train
https://github.com/mediathekview/MServer/blob/ba8d03e6a1a303db3807a1327f553f1decd30388/src/main/java/mServer/tool/M3U8Utils.java#L40-L47
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.processAmbiguousProperty
private void processAmbiguousProperty(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass, PropertyDescriptor propertyDescriptor) throws SecurityException, XMLStreamException { """ Where bean introspection is confused by getProperty() and getProperty(int index), this method determines the correct prope...
java
private void processAmbiguousProperty(XMLStreamWriter writer, Set<Method> methodSet, Class<?> aClass, PropertyDescriptor propertyDescriptor) throws SecurityException, XMLStreamException { String name = propertyDescriptor.getName(); name = name.toUpperCase().charAt(0) + name.substring(1); Method re...
[ "private", "void", "processAmbiguousProperty", "(", "XMLStreamWriter", "writer", ",", "Set", "<", "Method", ">", "methodSet", ",", "Class", "<", "?", ">", "aClass", ",", "PropertyDescriptor", "propertyDescriptor", ")", "throws", "SecurityException", ",", "XMLStreamE...
Where bean introspection is confused by getProperty() and getProperty(int index), this method determines the correct properties to add. @param writer XML stream writer @param methodSet set of methods processed @param aClass Java class @param propertyDescriptor Java property @throws SecurityException @throws XMLStreamE...
[ "Where", "bean", "introspection", "is", "confused", "by", "getProperty", "()", "and", "getProperty", "(", "int", "index", ")", "this", "method", "determines", "the", "correct", "properties", "to", "add", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L313-L350
google/closure-compiler
src/com/google/javascript/jscomp/MakeDeclaredNamesUnique.java
MakeDeclaredNamesUnique.findDeclaredNames
private void findDeclaredNames(NodeTraversal t, Node n) { """ Traverses the current scope and collects declared names by calling {@code addDeclaredName} on the {@code Renamer} that is at the top of the {@code renamerStack}. """ checkState(NodeUtil.createsScope(n) || n.isScript(), n); for (Var v : t.g...
java
private void findDeclaredNames(NodeTraversal t, Node n) { checkState(NodeUtil.createsScope(n) || n.isScript(), n); for (Var v : t.getScope().getVarIterable()) { renamerStack.peek().addDeclaredName(v.getName(), false); } }
[ "private", "void", "findDeclaredNames", "(", "NodeTraversal", "t", ",", "Node", "n", ")", "{", "checkState", "(", "NodeUtil", ".", "createsScope", "(", "n", ")", "||", "n", ".", "isScript", "(", ")", ",", "n", ")", ";", "for", "(", "Var", "v", ":", ...
Traverses the current scope and collects declared names by calling {@code addDeclaredName} on the {@code Renamer} that is at the top of the {@code renamerStack}.
[ "Traverses", "the", "current", "scope", "and", "collects", "declared", "names", "by", "calling", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/MakeDeclaredNamesUnique.java#L161-L167
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java
DatabasesInner.listPrincipals
public List<DatabasePrincipalInner> listPrincipals(String resourceGroupName, String clusterName, String databaseName) { """ Returns a list of database principals of the given Kusto cluster and database. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The...
java
public List<DatabasePrincipalInner> listPrincipals(String resourceGroupName, String clusterName, String databaseName) { return listPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).toBlocking().single().body(); }
[ "public", "List", "<", "DatabasePrincipalInner", ">", "listPrincipals", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ")", "{", "return", "listPrincipalsWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterNa...
Returns a list of database principals of the given Kusto cluster and database. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @throws IllegalArgumentException thro...
[ "Returns", "a", "list", "of", "database", "principals", "of", "the", "given", "Kusto", "cluster", "and", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java#L947-L949
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java
Shape.getOffset
public static long getOffset(long baseOffset, int[] shape, int[] stride, int... indices) { """ Get an offset for retrieval from a data buffer based on the given shape stride and given indices @param baseOffset the offset to start from @param shape the shape of the array @param stride the stride of the array ...
java
public static long getOffset(long baseOffset, int[] shape, int[] stride, int... indices) { //int ret = mappers[shape.length].getOffset(baseOffset, shape, stride, indices); if (shape.length != stride.length || indices.length != shape.length) throw new IllegalArgumentException("Indexes, shape...
[ "public", "static", "long", "getOffset", "(", "long", "baseOffset", ",", "int", "[", "]", "shape", ",", "int", "[", "]", "stride", ",", "int", "...", "indices", ")", "{", "//int ret = mappers[shape.length].getOffset(baseOffset, shape, stride, indices);", "if", "(",...
Get an offset for retrieval from a data buffer based on the given shape stride and given indices @param baseOffset the offset to start from @param shape the shape of the array @param stride the stride of the array @param indices the indices to iterate over @return the double at the specified index
[ "Get", "an", "offset", "for", "retrieval", "from", "a", "data", "buffer", "based", "on", "the", "given", "shape", "stride", "and", "given", "indices" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java#L848-L863
alkacon/opencms-core
src/org/opencms/loader/CmsMacroFormatterLoader.java
CmsMacroFormatterLoader.ensureElementFormatter
private void ensureElementFormatter(CmsResource resource, HttpServletRequest req) { """ Ensure the element formatter id is set in the element bean.<p> @param resource the formatter resource @param req the request """ CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req...
java
private void ensureElementFormatter(CmsResource resource, HttpServletRequest req) { CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req); CmsContainerElementBean element = contextBean.getElement(); if (!resource.getStructureId().equals(element.getFormatterId())) { ...
[ "private", "void", "ensureElementFormatter", "(", "CmsResource", "resource", ",", "HttpServletRequest", "req", ")", "{", "CmsJspStandardContextBean", "contextBean", "=", "CmsJspStandardContextBean", ".", "getInstance", "(", "req", ")", ";", "CmsContainerElementBean", "ele...
Ensure the element formatter id is set in the element bean.<p> @param resource the formatter resource @param req the request
[ "Ensure", "the", "element", "formatter", "id", "is", "set", "in", "the", "element", "bean", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsMacroFormatterLoader.java#L247-L254
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/mr/security/TokenUtil.java
TokenUtil.obtainTokenForJob
public static void obtainTokenForJob(final RestClient client, User user, Job job) { """ Obtain an authentication token on behalf of the given user and add it to the credentials for the given map reduce job. This version always obtains a fresh authentication token instead of checking for existing ones on the cur...
java
public static void obtainTokenForJob(final RestClient client, User user, Job job) { Token<EsTokenIdentifier> token = obtainToken(client, user); if (token == null) { throw new EsHadoopException("No token returned for user " + user.getKerberosPrincipal().getName()); } Text clus...
[ "public", "static", "void", "obtainTokenForJob", "(", "final", "RestClient", "client", ",", "User", "user", ",", "Job", "job", ")", "{", "Token", "<", "EsTokenIdentifier", ">", "token", "=", "obtainToken", "(", "client", ",", "user", ")", ";", "if", "(", ...
Obtain an authentication token on behalf of the given user and add it to the credentials for the given map reduce job. This version always obtains a fresh authentication token instead of checking for existing ones on the current user. @param client The Elasticsearch client @param user The user for whom to obtain the t...
[ "Obtain", "an", "authentication", "token", "on", "behalf", "of", "the", "given", "user", "and", "add", "it", "to", "the", "credentials", "for", "the", "given", "map", "reduce", "job", ".", "This", "version", "always", "obtains", "a", "fresh", "authentication...
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/mr/security/TokenUtil.java#L122-L133
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeParserBucket.java
DateTimeParserBucket.parseMillis
public long parseMillis(DateTimeParser parser, CharSequence text) { """ Parses a datetime from the given text, returning the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. <p> This parses the text using the parser into this bucket. The bucket is reset before parsing begins, allowing the bucket t...
java
public long parseMillis(DateTimeParser parser, CharSequence text) { reset(); return doParseMillis(DateTimeParserInternalParser.of(parser), text); }
[ "public", "long", "parseMillis", "(", "DateTimeParser", "parser", ",", "CharSequence", "text", ")", "{", "reset", "(", ")", ";", "return", "doParseMillis", "(", "DateTimeParserInternalParser", ".", "of", "(", "parser", ")", ",", "text", ")", ";", "}" ]
Parses a datetime from the given text, returning the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. <p> This parses the text using the parser into this bucket. The bucket is reset before parsing begins, allowing the bucket to be re-used. The bucket must not be shared between threads. @param parser the ...
[ "Parses", "a", "datetime", "from", "the", "given", "text", "returning", "the", "number", "of", "milliseconds", "since", "the", "epoch", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", ".", "<p", ">", "This", "parses", "the", "text", "using", "t...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeParserBucket.java#L173-L176
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/GenerationalDistance.java
GenerationalDistance.generationalDistance
public double generationalDistance(Front front, Front referenceFront) { """ Returns the generational distance value for a given front @param front The front @param referenceFront The reference pareto front """ double sum = 0.0; for (int i = 0; i < front.getNumberOfPoints(); i++) { s...
java
public double generationalDistance(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0; i < front.getNumberOfPoints(); i++) { sum += Math.pow(FrontUtils.distanceToClosestPoint(front.getPoint(i), referenceFront), pow); } sum = Math.pow(sum, 1.0 / pow); return sum /...
[ "public", "double", "generationalDistance", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "front", ".", "getNumberOfPoints", "(", ")", ";", "i", "++",...
Returns the generational distance value for a given front @param front The front @param referenceFront The reference pareto front
[ "Returns", "the", "generational", "distance", "value", "for", "a", "given", "front" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/GenerationalDistance.java#L82-L92
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyRangeAxiomImpl_CustomFieldSerializer.java
OWLAnnotationPropertyRangeAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLAnnotationPropertyRangeAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@lin...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLAnnotationPropertyRangeAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLAnnotationPropertyRangeAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", ...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyRangeAxiomImpl_CustomFieldSerializer.java#L99-L102
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getPvPSeasonLeaderboardInfo
public List<PvPLeaderBoard> getPvPSeasonLeaderboardInfo(String id, String type, World.Region region) throws GuildWars2Exception { """ For more info on pvp season API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/seasons">here</a><br/> Get pvp season info for the given pvp season id(s) @param id Se...
java
public List<PvPLeaderBoard> getPvPSeasonLeaderboardInfo(String id, String type, World.Region region) throws GuildWars2Exception { try { Response<List<PvPLeaderBoard>> response = gw2API.getPvPSeasonLeaderBoardInfo(id, type, region.name().toLowerCase()).execute(); if (!response.isSuccessful()) throwError(response...
[ "public", "List", "<", "PvPLeaderBoard", ">", "getPvPSeasonLeaderboardInfo", "(", "String", "id", ",", "String", "type", ",", "World", ".", "Region", "region", ")", "throws", "GuildWars2Exception", "{", "try", "{", "Response", "<", "List", "<", "PvPLeaderBoard",...
For more info on pvp season API go <a href="https://wiki.guildwars2.com/wiki/API:2/pvp/seasons">here</a><br/> Get pvp season info for the given pvp season id(s) @param id Season id @param type ladder/legendary/guild @param region na/eu @return list of pvp season info @throws GuildWars2Exception see {@link ErrorC...
[ "For", "more", "info", "on", "pvp", "season", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "pvp", "/", "seasons", ">", "here<", "/", "a", ">", "<br", "/", ">"...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L2916-L2924
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CertificatesInner.java
CertificatesInner.getAsync
public Observable<CertificateInner> getAsync(String resourceGroupName, String automationAccountName, String certificateName) { """ Retrieve the certificate identified by certificate name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. ...
java
public Observable<CertificateInner> getAsync(String resourceGroupName, String automationAccountName, String certificateName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, certificateName).map(new Func1<ServiceResponse<CertificateInner>, CertificateInner>() { @Overrid...
[ "public", "Observable", "<", "CertificateInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "certificateName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAcc...
Retrieve the certificate identified by certificate name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param certificateName The name of certificate. @throws IllegalArgumentException thrown if parameters fail the validation @return the obser...
[ "Retrieve", "the", "certificate", "identified", "by", "certificate", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/CertificatesInner.java#L221-L228
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Assert.java
Assert.noNullElements
public static <T extends Iterable<?>> T noNullElements(T iterable, String message, Object... values) { """ <p> Validate that the specified argument iterable is neither {@code null} nor contains any elements that are {@code null}; otherwise throwing an exception with the specified message. <pre> Assert.noNull...
java
public static <T extends Iterable<?>> T noNullElements(T iterable, String message, Object... values) { notNull(iterable); int i = 0; for (Iterator<?> it = iterable.iterator(); it.hasNext(); i++) { if (it.next() == null) { throw new IllegalArgumentException(String.format(message, Integer.valueOf(i))); ...
[ "public", "static", "<", "T", "extends", "Iterable", "<", "?", ">", ">", "T", "noNullElements", "(", "T", "iterable", ",", "String", "message", ",", "Object", "...", "values", ")", "{", "notNull", "(", "iterable", ")", ";", "int", "i", "=", "0", ";",...
<p> Validate that the specified argument iterable is neither {@code null} nor contains any elements that are {@code null}; otherwise throwing an exception with the specified message. <pre> Assert.noNullElements(myCollection, &quot;The collection contains null at position %d&quot;); </pre> <p> If the iterable is {@code...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "iterable", "is", "neither", "{", "@code", "null", "}", "nor", "contains", "any", "elements", "that", "are", "{", "@code", "null", "}", ";", "otherwise", "throwing", "an", "exception", "with", ...
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Assert.java#L199-L206
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java
KinesisProxy.describeStream
protected DescribeStreamResult describeStream(String streamName, @Nullable String startShardId) throws InterruptedException { """ Get metainfo for a Kinesis stream, which contains information about which shards this Kinesis stream possess. <p>This method is using a "full jitter" approach described in AWS's ...
java
protected DescribeStreamResult describeStream(String streamName, @Nullable String startShardId) throws InterruptedException { final DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest(); describeStreamRequest.setStreamName(streamName); describeStreamRequest.setExclusiveStartShardId(startSha...
[ "protected", "DescribeStreamResult", "describeStream", "(", "String", "streamName", ",", "@", "Nullable", "String", "startShardId", ")", "throws", "InterruptedException", "{", "final", "DescribeStreamRequest", "describeStreamRequest", "=", "new", "DescribeStreamRequest", "(...
Get metainfo for a Kinesis stream, which contains information about which shards this Kinesis stream possess. <p>This method is using a "full jitter" approach described in AWS's article, <a href="https://www.awsarchitectureblog.com/2015/03/backoff.html"> "Exponential Backoff and Jitter"</a>. This is necessary because ...
[ "Get", "metainfo", "for", "a", "Kinesis", "stream", "which", "contains", "information", "about", "which", "shards", "this", "Kinesis", "stream", "possess", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java#L512-L550
JOML-CI/JOML
src/org/joml/Matrix3x2d.java
Matrix3x2d.rotate
public Matrix3x2d rotate(double ang, Matrix3x2d dest) { """ Apply a rotation transformation to this matrix by rotating the given amount of radians and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <cod...
java
public Matrix3x2d rotate(double ang, Matrix3x2d dest) { double cos = Math.cos(ang); double sin = Math.sin(ang); double rm00 = cos; double rm01 = sin; double rm10 = -sin; double rm11 = cos; double nm00 = m00 * rm00 + m10 * rm01; double nm01 = m01 * rm00 + m...
[ "public", "Matrix3x2d", "rotate", "(", "double", "ang", ",", "Matrix3x2d", "dest", ")", "{", "double", "cos", "=", "Math", ".", "cos", "(", "ang", ")", ";", "double", "sin", "=", "Math", ".", "sin", "(", "ang", ")", ";", "double", "rm00", "=", "cos...
Apply a rotation transformation to this matrix by rotating the given amount of radians and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>R</code> the rotation matrix, then the new matrix will be <code>M * R</code>. So when transforming a vector <code>v</code> with th...
[ "Apply", "a", "rotation", "transformation", "to", "this", "matrix", "by", "rotating", "the", "given", "amount", "of", "radians", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ">", "If", "<code", ">", "M<", "...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2d.java#L1887-L1903
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_ip_failover_GET
public ArrayList<OvhFailoverIp> project_serviceName_ip_failover_GET(String serviceName) throws IOException { """ Get failover ips REST: GET /cloud/project/{serviceName}/ip/failover @param serviceName [required] Project id """ String qPath = "/cloud/project/{serviceName}/ip/failover"; StringBuilder sb =...
java
public ArrayList<OvhFailoverIp> project_serviceName_ip_failover_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/ip/failover"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t13); }
[ "public", "ArrayList", "<", "OvhFailoverIp", ">", "project_serviceName_ip_failover_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/ip/failover\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Get failover ips REST: GET /cloud/project/{serviceName}/ip/failover @param serviceName [required] Project id
[ "Get", "failover", "ips" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1322-L1327
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/util/NumberUtil.java
NumberUtil.getValue
private static int getValue(String str, boolean getMaximumValue) { """ Return the specified value from the string. @param str string to parse; assume it is either a single value or a range (delimited by "-") @param getMaximumValue if true return the maximum value @return specified value from the string ""...
java
private static int getValue(String str, boolean getMaximumValue) { int multiplier = 1; String upperOrLowerValue = null; final String[] rangeUnit = splitRangeUnit(str); if(rangeUnit.length == 2) { multiplier = getMultiplier(rangeUnit[1]); } String[] range = splitRange(rangeUnit[0]); ...
[ "private", "static", "int", "getValue", "(", "String", "str", ",", "boolean", "getMaximumValue", ")", "{", "int", "multiplier", "=", "1", ";", "String", "upperOrLowerValue", "=", "null", ";", "final", "String", "[", "]", "rangeUnit", "=", "splitRangeUnit", "...
Return the specified value from the string. @param str string to parse; assume it is either a single value or a range (delimited by "-") @param getMaximumValue if true return the maximum value @return specified value from the string
[ "Return", "the", "specified", "value", "from", "the", "string", "." ]
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/util/NumberUtil.java#L95-L114
line/armeria
saml/src/main/java/com/linecorp/armeria/server/saml/SamlEndpoint.java
SamlEndpoint.toUriString
String toUriString(String defaultScheme, String defaultHostname, int defaultPort) { """ Returns a {@link URI} of this endpoint as a string. The omitted values in the {@link URI} will be replaced with the specified default values, such as {@code defaultScheme}, {@code defaultHostname} and {@code defaultPort}. ...
java
String toUriString(String defaultScheme, String defaultHostname, int defaultPort) { requireNonNull(defaultScheme, "defaultScheme"); requireNonNull(defaultHostname, "defaultHostname"); validatePort(defaultPort); final StringBuilder sb = new StringBuilder(); sb.append(firstNonNull...
[ "String", "toUriString", "(", "String", "defaultScheme", ",", "String", "defaultHostname", ",", "int", "defaultPort", ")", "{", "requireNonNull", "(", "defaultScheme", ",", "\"defaultScheme\"", ")", ";", "requireNonNull", "(", "defaultHostname", ",", "\"defaultHostnam...
Returns a {@link URI} of this endpoint as a string. The omitted values in the {@link URI} will be replaced with the specified default values, such as {@code defaultScheme}, {@code defaultHostname} and {@code defaultPort}.
[ "Returns", "a", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/saml/src/main/java/com/linecorp/armeria/server/saml/SamlEndpoint.java#L102-L113
mangstadt/biweekly
src/main/java/biweekly/component/ICalComponent.java
ICalComponent.addExperimentalProperty
public RawProperty addExperimentalProperty(String name, String value) { """ Adds an experimental property to this component. @param name the property name (e.g. "X-ALT-DESC") @param value the property value @return the property object that was created """ return addExperimentalProperty(name, null, value);...
java
public RawProperty addExperimentalProperty(String name, String value) { return addExperimentalProperty(name, null, value); }
[ "public", "RawProperty", "addExperimentalProperty", "(", "String", "name", ",", "String", "value", ")", "{", "return", "addExperimentalProperty", "(", "name", ",", "null", ",", "value", ")", ";", "}" ]
Adds an experimental property to this component. @param name the property name (e.g. "X-ALT-DESC") @param value the property value @return the property object that was created
[ "Adds", "an", "experimental", "property", "to", "this", "component", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/ICalComponent.java#L230-L232
EdwardRaff/JSAT
JSAT/src/jsat/io/JSATData.java
JSATData.loadClassification
public static ClassificationDataSet loadClassification(InputStream inRaw, DataStore backingStore) throws IOException { """ Loads in a JSAT dataset as a {@link ClassificationDataSet}. An exception will be thrown if the original dataset in the file was not a {@link ClassificationDataSet}. @param inRaw the input...
java
public static ClassificationDataSet loadClassification(InputStream inRaw, DataStore backingStore) throws IOException { return (ClassificationDataSet) load(inRaw, backingStore); }
[ "public", "static", "ClassificationDataSet", "loadClassification", "(", "InputStream", "inRaw", ",", "DataStore", "backingStore", ")", "throws", "IOException", "{", "return", "(", "ClassificationDataSet", ")", "load", "(", "inRaw", ",", "backingStore", ")", ";", "}"...
Loads in a JSAT dataset as a {@link ClassificationDataSet}. An exception will be thrown if the original dataset in the file was not a {@link ClassificationDataSet}. @param inRaw the input stream, caller should buffer it @param backingStore the data store to put all data points in @return a ClassificationDataSet object...
[ "Loads", "in", "a", "JSAT", "dataset", "as", "a", "{", "@link", "ClassificationDataSet", "}", ".", "An", "exception", "will", "be", "thrown", "if", "the", "original", "dataset", "in", "the", "file", "was", "not", "a", "{", "@link", "ClassificationDataSet", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/JSATData.java#L568-L571
shekhargulati/strman-java
src/main/java/strman/Strman.java
Strman.contains
public static boolean contains(final String value, final String needle, final boolean caseSensitive) { """ Verifies that the needle is contained in the value. @param value to search @param needle to find @param caseSensitive true or false @return true if found else false. """ valid...
java
public static boolean contains(final String value, final String needle, final boolean caseSensitive) { validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER); if (caseSensitive) { return value.contains(needle); } return value.toLowerCase().contains(needle.toLowerCas...
[ "public", "static", "boolean", "contains", "(", "final", "String", "value", ",", "final", "String", "needle", ",", "final", "boolean", "caseSensitive", ")", "{", "validate", "(", "value", ",", "NULL_STRING_PREDICATE", ",", "NULL_STRING_MSG_SUPPLIER", ")", ";", "...
Verifies that the needle is contained in the value. @param value to search @param needle to find @param caseSensitive true or false @return true if found else false.
[ "Verifies", "that", "the", "needle", "is", "contained", "in", "the", "value", "." ]
train
https://github.com/shekhargulati/strman-java/blob/d0c2a10a6273fd6082f084e95156653ca55ce1be/src/main/java/strman/Strman.java#L165-L171
ReactiveX/RxJavaComputationExpressions
src/main/java/rx/Statement.java
Statement.doWhile
public static <T> Observable<T> doWhile(Observable<? extends T> source, Func0<Boolean> postCondition) { """ Return an Observable that replays the emissions from the source Observable, and then continues to replay them so long as a condtion is true. <p> <img width="640" src="https://raw.github.com/wiki/Reactive...
java
public static <T> Observable<T> doWhile(Observable<? extends T> source, Func0<Boolean> postCondition) { return Observable.create(new OperatorWhileDoWhile<T>(source, TRUE, postCondition)); }
[ "public", "static", "<", "T", ">", "Observable", "<", "T", ">", "doWhile", "(", "Observable", "<", "?", "extends", "T", ">", "source", ",", "Func0", "<", "Boolean", ">", "postCondition", ")", "{", "return", "Observable", ".", "create", "(", "new", "Ope...
Return an Observable that replays the emissions from the source Observable, and then continues to replay them so long as a condtion is true. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doWhile.png" alt=""> @param postCondition the post condition to test after the source O...
[ "Return", "an", "Observable", "that", "replays", "the", "emissions", "from", "the", "source", "Observable", "and", "then", "continues", "to", "replay", "them", "so", "long", "as", "a", "condtion", "is", "true", ".", "<p", ">", "<img", "width", "=", "640", ...
train
https://github.com/ReactiveX/RxJavaComputationExpressions/blob/f9d04ab762223b36fad47402ac36ce7969320d69/src/main/java/rx/Statement.java#L121-L123
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Library.java
Library.locate
public static int locate(String search, String s, Integer start) { """ Returns the starting position of the first occurrence of the given <code>search</code> <code>String</code> object within the given <code>String</code> object, <code>s</code>. The search for the first occurrence of <code>search</code> begin...
java
public static int locate(String search, String s, Integer start) { if (s == null || search == null) { return 0; } int i = (start == null) ? 0 : start.intValue() - 1; return s.indexOf(search, (i < 0) ? 0 ...
[ "public", "static", "int", "locate", "(", "String", "search", ",", "String", "s", ",", "Integer", "start", ")", "{", "if", "(", "s", "==", "null", "||", "search", "==", "null", ")", "{", "return", "0", ";", "}", "int", "i", "=", "(", "start", "==...
Returns the starting position of the first occurrence of the given <code>search</code> <code>String</code> object within the given <code>String</code> object, <code>s</code>. The search for the first occurrence of <code>search</code> begins with the first character position in <code>s</code>, unless the optional argum...
[ "Returns", "the", "starting", "position", "of", "the", "first", "occurrence", "of", "the", "given", "<code", ">", "search<", "/", "code", ">", "<code", ">", "String<", "/", "code", ">", "object", "within", "the", "given", "<code", ">", "String<", "/", "c...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Library.java#L269-L280
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java
Printer.printMethodArgs
protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) { """ Converts a set of method argument types into their corresponding localized string representation. @param args arguments to be rendered @param varArgs if true, the last method argument is regarded as a vararg @param locale...
java
protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) { if (!varArgs) { return visitTypes(args, locale); } else { StringBuilder buf = new StringBuilder(); while (args.tail.nonEmpty()) { buf.append(visit(args.head, locale)); ...
[ "protected", "String", "printMethodArgs", "(", "List", "<", "Type", ">", "args", ",", "boolean", "varArgs", ",", "Locale", "locale", ")", "{", "if", "(", "!", "varArgs", ")", "{", "return", "visitTypes", "(", "args", ",", "locale", ")", ";", "}", "else...
Converts a set of method argument types into their corresponding localized string representation. @param args arguments to be rendered @param varArgs if true, the last method argument is regarded as a vararg @param locale the locale in which the string is to be rendered @return localized string representation
[ "Converts", "a", "set", "of", "method", "argument", "types", "into", "their", "corresponding", "localized", "string", "representation", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java#L337-L360
OpenLiberty/open-liberty
dev/com.ibm.ws.mongo_fat/fat/src/com/ibm/ws/mongo/fat/MongoServerSelector.java
MongoServerSelector.updateMongoElements
private void updateMongoElements(String serverPlaceholder, ExternalTestService mongoService) { """ For the mongo elements containing the given placeholder value, the host and port placeholder values in the mongo element are replaced with an actual host and port of an available mongo server. @param availableMon...
java
private void updateMongoElements(String serverPlaceholder, ExternalTestService mongoService) { Integer[] port = { Integer.valueOf(mongoService.getPort()) }; for (MongoElement mongo : mongoElements.get(serverPlaceholder)) { mongo.setHostNames(mongoService.getAddress()); mongo.setP...
[ "private", "void", "updateMongoElements", "(", "String", "serverPlaceholder", ",", "ExternalTestService", "mongoService", ")", "{", "Integer", "[", "]", "port", "=", "{", "Integer", ".", "valueOf", "(", "mongoService", ".", "getPort", "(", ")", ")", "}", ";", ...
For the mongo elements containing the given placeholder value, the host and port placeholder values in the mongo element are replaced with an actual host and port of an available mongo server. @param availableMongoServer
[ "For", "the", "mongo", "elements", "containing", "the", "given", "placeholder", "value", "the", "host", "and", "port", "placeholder", "values", "in", "the", "mongo", "element", "are", "replaced", "with", "an", "actual", "host", "and", "port", "of", "an", "av...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.mongo_fat/fat/src/com/ibm/ws/mongo/fat/MongoServerSelector.java#L125-L139