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
biojava/biojava
biojava-alignment/src/main/java/org/biojava/nbio/alignment/routines/AlignerHelper.java
AlignerHelper.setSteps
public static int[] setSteps(Last[][][] traceback, int[][][] scores, List<Step> sx, List<Step> sy) { """ Find global alignment path through traceback matrix @param traceback @param scores @param sx @param sy @return """ int xMax = scores.length - 1, yMax = scores[xMax].length - 1; boolean linear = (tr...
java
public static int[] setSteps(Last[][][] traceback, int[][][] scores, List<Step> sx, List<Step> sy) { int xMax = scores.length - 1, yMax = scores[xMax].length - 1; boolean linear = (traceback[xMax][yMax].length == 1); Last last = linear ? traceback[xMax][yMax][0] : (scores[xMax][yMax][1] > scores[xMa...
[ "public", "static", "int", "[", "]", "setSteps", "(", "Last", "[", "]", "[", "]", "[", "]", "traceback", ",", "int", "[", "]", "[", "]", "[", "]", "scores", ",", "List", "<", "Step", ">", "sx", ",", "List", "<", "Step", ">", "sy", ")", "{", ...
Find global alignment path through traceback matrix @param traceback @param scores @param sx @param sy @return
[ "Find", "global", "alignment", "path", "through", "traceback", "matrix" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-alignment/src/main/java/org/biojava/nbio/alignment/routines/AlignerHelper.java#L652-L671
fuinorg/units4j
src/main/java/org/fuin/units4j/analyzer/MCAClassVisitor.java
MCAClassVisitor.addCall
public final void addCall(final MCAMethod found, final int line) { """ Adds the current method to the list of callers. @param found Called method. @param line Line number of the call. """ calls.add(new MCAMethodCall(found, className, methodName, methodDescr, source, line)); }
java
public final void addCall(final MCAMethod found, final int line) { calls.add(new MCAMethodCall(found, className, methodName, methodDescr, source, line)); }
[ "public", "final", "void", "addCall", "(", "final", "MCAMethod", "found", ",", "final", "int", "line", ")", "{", "calls", ".", "add", "(", "new", "MCAMethodCall", "(", "found", ",", "className", ",", "methodName", ",", "methodDescr", ",", "source", ",", ...
Adds the current method to the list of callers. @param found Called method. @param line Line number of the call.
[ "Adds", "the", "current", "method", "to", "the", "list", "of", "callers", "." ]
train
https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/analyzer/MCAClassVisitor.java#L88-L90
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_server_serviceName_feature_GET
public ArrayList<String> dedicated_server_serviceName_feature_GET(String serviceName, OvhOrderableSysFeatureEnum feature) throws IOException { """ Get allowed durations for 'feature' option REST: GET /order/dedicated/server/{serviceName}/feature @param feature [required] the feature @param serviceName [requir...
java
public ArrayList<String> dedicated_server_serviceName_feature_GET(String serviceName, OvhOrderableSysFeatureEnum feature) throws IOException { String qPath = "/order/dedicated/server/{serviceName}/feature"; StringBuilder sb = path(qPath, serviceName); query(sb, "feature", feature); String resp = exec(qPath, "GE...
[ "public", "ArrayList", "<", "String", ">", "dedicated_server_serviceName_feature_GET", "(", "String", "serviceName", ",", "OvhOrderableSysFeatureEnum", "feature", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/server/{serviceName}/feature\"", "...
Get allowed durations for 'feature' option REST: GET /order/dedicated/server/{serviceName}/feature @param feature [required] the feature @param serviceName [required] The internal name of your dedicated server
[ "Get", "allowed", "durations", "for", "feature", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2193-L2199
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java
Extern.getExternalLink
public DocLink getExternalLink(String pkgName, DocPath relativepath, String filename) { """ Convert a link to be an external link if appropriate. @param pkgName The package name. @param relativepath The relative path. @param filename The link to convert. @return if external return converted link else r...
java
public DocLink getExternalLink(String pkgName, DocPath relativepath, String filename) { return getExternalLink(pkgName, relativepath, filename, null); }
[ "public", "DocLink", "getExternalLink", "(", "String", "pkgName", ",", "DocPath", "relativepath", ",", "String", "filename", ")", "{", "return", "getExternalLink", "(", "pkgName", ",", "relativepath", ",", "filename", ",", "null", ")", ";", "}" ]
Convert a link to be an external link if appropriate. @param pkgName The package name. @param relativepath The relative path. @param filename The link to convert. @return if external return converted link else return null
[ "Convert", "a", "link", "to", "be", "an", "external", "link", "if", "appropriate", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java#L155-L157
epam/parso
src/main/java/com/epam/parso/impl/SasFileParser.java
SasFileParser.bytesToString
private String bytesToString(byte[] bytes, int offset, int length) throws UnsupportedEncodingException, StringIndexOutOfBoundsException { """ The function to convert a sub-range of an array of bytes into a string. @param bytes a string represented by an array of bytes. @param offset the initial of...
java
private String bytesToString(byte[] bytes, int offset, int length) throws UnsupportedEncodingException, StringIndexOutOfBoundsException { return new String(bytes, offset, length, encoding); }
[ "private", "String", "bytesToString", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "length", ")", "throws", "UnsupportedEncodingException", ",", "StringIndexOutOfBoundsException", "{", "return", "new", "String", "(", "bytes", ",", "offset", ...
The function to convert a sub-range of an array of bytes into a string. @param bytes a string represented by an array of bytes. @param offset the initial offset @param length the length @return the conversion result string. @throws UnsupportedEncodingException when unknown encoding. @throws StringIndexOutOfBoundsE...
[ "The", "function", "to", "convert", "a", "sub", "-", "range", "of", "an", "array", "of", "bytes", "into", "a", "string", "." ]
train
https://github.com/epam/parso/blob/fb132cf943ba099a35b2f5a1490c0a59641e09dc/src/main/java/com/epam/parso/impl/SasFileParser.java#L886-L889
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java
URLStreamHandler.sameFile
protected boolean sameFile(URL u1, URL u2) { """ Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path. This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called indirectly by java.net.URL class. @...
java
protected boolean sameFile(URL u1, URL u2) { // Compare the protocols. if (!((u1.getProtocol() == u2.getProtocol()) || (u1.getProtocol() != null && u1.getProtocol().equalsIgnoreCase(u2.getProtocol())))) return false; // Compare the files. if (!(u...
[ "protected", "boolean", "sameFile", "(", "URL", "u1", ",", "URL", "u2", ")", "{", "// Compare the protocols.", "if", "(", "!", "(", "(", "u1", ".", "getProtocol", "(", ")", "==", "u2", ".", "getProtocol", "(", ")", ")", "||", "(", "u1", ".", "getProt...
Compare two urls to see whether they refer to the same file, i.e., having the same protocol, host, port, and path. This method requires that none of its arguments is null. This is guaranteed by the fact that it is only called indirectly by java.net.URL class. @param u1 a URL object @param u2 a URL object @return true i...
[ "Compare", "two", "urls", "to", "see", "whether", "they", "refer", "to", "the", "same", "file", "i", ".", "e", ".", "having", "the", "same", "protocol", "host", "port", "and", "path", ".", "This", "method", "requires", "that", "none", "of", "its", "arg...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java#L414-L444
zaproxy/zaproxy
src/org/zaproxy/zap/utils/HirshbergMatcher.java
HirshbergMatcher.getLCS
public String getLCS(String strA, String strB) { """ Gets the Longest Common Subsequence of two strings, using Dynamic programming techniques, and minimal memory @param strA the first String @param strB the second String @return the Longest Common Subsequence of strA and strB """ if ("".equals(st...
java
public String getLCS(String strA, String strB) { if ("".equals(strA)) { return ""; } StringBuilder sb = new StringBuilder(); algC(sb, strA.length(), strB.length(), strA, strB); return sb.toString(); }
[ "public", "String", "getLCS", "(", "String", "strA", ",", "String", "strB", ")", "{", "if", "(", "\"\"", ".", "equals", "(", "strA", ")", ")", "{", "return", "\"\"", ";", "}", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "algC",...
Gets the Longest Common Subsequence of two strings, using Dynamic programming techniques, and minimal memory @param strA the first String @param strB the second String @return the Longest Common Subsequence of strA and strB
[ "Gets", "the", "Longest", "Common", "Subsequence", "of", "two", "strings", "using", "Dynamic", "programming", "techniques", "and", "minimal", "memory" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/HirshbergMatcher.java#L137-L145
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/io/support/ResourceUtils.java
ResourceUtils.getFile
public static File getFile(URI resourceUri, String description) throws FileNotFoundException { """ Resolve the given resource URI to a <code>java.io.File</code>, i.e. to a file in the file system. @param resourceUri the resource URI to resolve @param description a description of the original resource that th...
java
public static File getFile(URI resourceUri, String description) throws FileNotFoundException { if (!URL_PROTOCOL_FILE.equals(resourceUri.getScheme())) { throw new FileNotFoundException( description + " cannot be resolved to absolute file path " + "because it does ...
[ "public", "static", "File", "getFile", "(", "URI", "resourceUri", ",", "String", "description", ")", "throws", "FileNotFoundException", "{", "if", "(", "!", "URL_PROTOCOL_FILE", ".", "equals", "(", "resourceUri", ".", "getScheme", "(", ")", ")", ")", "{", "t...
Resolve the given resource URI to a <code>java.io.File</code>, i.e. to a file in the file system. @param resourceUri the resource URI to resolve @param description a description of the original resource that the URI was created for (for example, a class path location) @return a corresponding File object @throws FileNo...
[ "Resolve", "the", "given", "resource", "URI", "to", "a", "<code", ">", "java", ".", "io", ".", "File<", "/", "code", ">", "i", ".", "e", ".", "to", "a", "file", "in", "the", "file", "system", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/ResourceUtils.java#L251-L258
sniggle/simple-pgp
simple-pgp-java/src/main/java/me/sniggle/pgp/crypt/PGPKeyPairGenerator.java
PGPKeyPairGenerator.createKeyRingGenerator
private PGPKeyRingGenerator createKeyRingGenerator(String userId, String password, int keySize) { """ creates and initializes a PGP Key Ring Generator @param userId the user id to use @param password the password used for the private key @param keySize the key size used for the keys @return the initialize...
java
private PGPKeyRingGenerator createKeyRingGenerator(String userId, String password, int keySize) { LOGGER.trace("createKeyRingGenerator(String, String, int)"); LOGGER.trace("User ID: {}, Password: {}, Key Size: {}", userId, password == null ? "not set" : "********", keySize); PGPKeyRingGenerator generator = ...
[ "private", "PGPKeyRingGenerator", "createKeyRingGenerator", "(", "String", "userId", ",", "String", "password", ",", "int", "keySize", ")", "{", "LOGGER", ".", "trace", "(", "\"createKeyRingGenerator(String, String, int)\"", ")", ";", "LOGGER", ".", "trace", "(", "\...
creates and initializes a PGP Key Ring Generator @param userId the user id to use @param password the password used for the private key @param keySize the key size used for the keys @return the initialized key ring generator or null if something goes wrong
[ "creates", "and", "initializes", "a", "PGP", "Key", "Ring", "Generator" ]
train
https://github.com/sniggle/simple-pgp/blob/2ab83e4d370b8189f767d8e4e4c7e6020e60fbe3/simple-pgp-java/src/main/java/me/sniggle/pgp/crypt/PGPKeyPairGenerator.java#L47-L78
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPSpecificationOptionPersistenceImpl.java
CPSpecificationOptionPersistenceImpl.findByGroupId
@Override public List<CPSpecificationOption> findByGroupId(long groupId, int start, int end) { """ Returns a range of all the cp specification options where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> a...
java
@Override public List<CPSpecificationOption> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CPSpecificationOption", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ";", "...
Returns a range of all the cp specification options where groupId = &#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 the first result in th...
[ "Returns", "a", "range", "of", "all", "the", "cp", "specification", "options", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPSpecificationOptionPersistenceImpl.java#L1541-L1545
twilio/twilio-java
src/main/java/com/twilio/rest/monitor/v1/AlertReader.java
AlertReader.firstPage
@Override @SuppressWarnings("checkstyle:linelength") public Page<Alert> firstPage(final TwilioRestClient client) { """ Make the request to the Twilio API to perform the read. @param client TwilioRestClient with which to make the request @return Alert ResourceSet """ Request request = new Re...
java
@Override @SuppressWarnings("checkstyle:linelength") public Page<Alert> firstPage(final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, Domains.MONITOR.toString(), "/v1/Alerts", client.getRegion() ); addQueryParam...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"checkstyle:linelength\"", ")", "public", "Page", "<", "Alert", ">", "firstPage", "(", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ".", "GET", ...
Make the request to the Twilio API to perform the read. @param client TwilioRestClient with which to make the request @return Alert ResourceSet
[ "Make", "the", "request", "to", "the", "Twilio", "API", "to", "perform", "the", "read", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/monitor/v1/AlertReader.java#L88-L100
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.roundToSignificantFigures
public static Number roundToSignificantFigures(Number num, int precision) { """ <p> Rounds a number to significant figures. </p> @param num The number to be rounded @param precision The number of significant digits @return The number rounded to significant figures """ return new BigDecimal(num...
java
public static Number roundToSignificantFigures(Number num, int precision) { return new BigDecimal(num.doubleValue()) .round(new MathContext(precision, RoundingMode.HALF_EVEN)); }
[ "public", "static", "Number", "roundToSignificantFigures", "(", "Number", "num", ",", "int", "precision", ")", "{", "return", "new", "BigDecimal", "(", "num", ".", "doubleValue", "(", ")", ")", ".", "round", "(", "new", "MathContext", "(", "precision", ",", ...
<p> Rounds a number to significant figures. </p> @param num The number to be rounded @param precision The number of significant digits @return The number rounded to significant figures
[ "<p", ">", "Rounds", "a", "number", "to", "significant", "figures", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2521-L2525
drinkjava2/jDialects
core/src/main/java/com/github/drinkjava2/jdialects/ClassCacheUtils.java
ClassCacheUtils.getClassFieldWriteMethod
public static Method getClassFieldWriteMethod(Class<?> clazz, String fieldName) { """ Return cached class field write method to avoid each time use reflect """ return getClassWriteMethods(clazz).get(fieldName); }
java
public static Method getClassFieldWriteMethod(Class<?> clazz, String fieldName) { return getClassWriteMethods(clazz).get(fieldName); }
[ "public", "static", "Method", "getClassFieldWriteMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "{", "return", "getClassWriteMethods", "(", "clazz", ")", ".", "get", "(", "fieldName", ")", ";", "}" ]
Return cached class field write method to avoid each time use reflect
[ "Return", "cached", "class", "field", "write", "method", "to", "avoid", "each", "time", "use", "reflect" ]
train
https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/ClassCacheUtils.java#L177-L179
Impetus/Kundera
src/kundera-cassandra/cassandra-ds-driver/src/main/java/com/impetus/kundera/client/cassandra/dsdriver/DSClientUtilities.java
DSClientUtilities.setUDTValue
private static Object setUDTValue(Object entity, Class embeddedClass, UDTValue udt, MetamodelImpl metaModel) { """ Sets the udt value. @param entity the entity @param embeddedClass the embedded class @param udt the udt @param metaModel the meta model @return the object """ Object embeddedObj...
java
private static Object setUDTValue(Object entity, Class embeddedClass, UDTValue udt, MetamodelImpl metaModel) { Object embeddedObject = KunderaCoreUtils.createNewInstance(embeddedClass); EmbeddableType embeddable = metaModel.embeddable(embeddedClass); for (Object subAttribute : embeddable.ge...
[ "private", "static", "Object", "setUDTValue", "(", "Object", "entity", ",", "Class", "embeddedClass", ",", "UDTValue", "udt", ",", "MetamodelImpl", "metaModel", ")", "{", "Object", "embeddedObject", "=", "KunderaCoreUtils", ".", "createNewInstance", "(", "embeddedCl...
Sets the udt value. @param entity the entity @param embeddedClass the embedded class @param udt the udt @param metaModel the meta model @return the object
[ "Sets", "the", "udt", "value", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-ds-driver/src/main/java/com/impetus/kundera/client/cassandra/dsdriver/DSClientUtilities.java#L414-L438
casmi/casmi
src/main/java/casmi/image/Image.java
Image.setColor
public final void setColor(Color color, int x, int y) { """ Sets the color value of the pixel data in this Image. @param color <<<<<<< HEAD The color value of the pixel. ======= The color value of the pixel. >>>>>>> 16121fd9fe4eeaef3cb56619769a3119a9e6531a @param x The x-coordinate of the pixel. @param ...
java
public final void setColor(Color color, int x, int y) { int[] pixels = ((DataBufferInt)img.getRaster().getDataBuffer()).getData(); int red = (int)(color.getRed() * 255.0); int green = (int)(color.getGreen() * 255.0); int blue = (int)(color.getBlue() * 255.0); int alpha = (i...
[ "public", "final", "void", "setColor", "(", "Color", "color", ",", "int", "x", ",", "int", "y", ")", "{", "int", "[", "]", "pixels", "=", "(", "(", "DataBufferInt", ")", "img", ".", "getRaster", "(", ")", ".", "getDataBuffer", "(", ")", ")", ".", ...
Sets the color value of the pixel data in this Image. @param color <<<<<<< HEAD The color value of the pixel. ======= The color value of the pixel. >>>>>>> 16121fd9fe4eeaef3cb56619769a3119a9e6531a @param x The x-coordinate of the pixel. @param y The y-coordinate of the pixel.
[ "Sets", "the", "color", "value", "of", "the", "pixel", "data", "in", "this", "Image", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/image/Image.java#L360-L370
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.loadArgumentsFile
private List<String> loadArgumentsFile(final String argumentsFile) { """ Read an argument file and return a list of the args contained in it A line that starts with {@link #ARGUMENT_FILE_COMMENT} is ignored. @param argumentsFile a text file containing args @return false if a fatal error occurred """ ...
java
private List<String> loadArgumentsFile(final String argumentsFile) { List<String> args = new ArrayList<>(); try (BufferedReader reader = new BufferedReader(new FileReader(argumentsFile))){ String line; while ((line = reader.readLine()) != null) { if (!line.startsW...
[ "private", "List", "<", "String", ">", "loadArgumentsFile", "(", "final", "String", "argumentsFile", ")", "{", "List", "<", "String", ">", "args", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedRe...
Read an argument file and return a list of the args contained in it A line that starts with {@link #ARGUMENT_FILE_COMMENT} is ignored. @param argumentsFile a text file containing args @return false if a fatal error occurred
[ "Read", "an", "argument", "file", "and", "return", "a", "list", "of", "the", "args", "contained", "in", "it", "A", "line", "that", "starts", "with", "{", "@link", "#ARGUMENT_FILE_COMMENT", "}", "is", "ignored", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L662-L675
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java
LongExtensions.operator_lessThan
@Pure @Inline(value="($1 < $2)", constantExpression=true) public static boolean operator_lessThan(long a, double b) { """ The binary <code>lessThan</code> operator. This is the equivalent to the Java <code>&lt;</code> operator. @param a a long. @param b a double. @return <code>a&lt;b</code> @since 2.3 ...
java
@Pure @Inline(value="($1 < $2)", constantExpression=true) public static boolean operator_lessThan(long a, double b) { return a < b; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 < $2)\"", ",", "constantExpression", "=", "true", ")", "public", "static", "boolean", "operator_lessThan", "(", "long", "a", ",", "double", "b", ")", "{", "return", "a", "<", "b", ";", "}" ]
The binary <code>lessThan</code> operator. This is the equivalent to the Java <code>&lt;</code> operator. @param a a long. @param b a double. @return <code>a&lt;b</code> @since 2.3
[ "The", "binary", "<code", ">", "lessThan<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "Java", "<code", ">", "&lt", ";", "<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java#L320-L324
taimos/RESTUtils
src/main/java/de/taimos/restutils/RESTAssert.java
RESTAssert.assertPattern
public static void assertPattern(String string, String pattern) { """ assert that string matches the given pattern @param string the string to check @param pattern the pattern to check @throws WebApplicationException with status code 422 (Unprocessable Entity) """ RESTAssert.assertPattern(string, patter...
java
public static void assertPattern(String string, String pattern) { RESTAssert.assertPattern(string, pattern, RESTAssert.DEFAULT_STATUS_CODE); }
[ "public", "static", "void", "assertPattern", "(", "String", "string", ",", "String", "pattern", ")", "{", "RESTAssert", ".", "assertPattern", "(", "string", ",", "pattern", ",", "RESTAssert", ".", "DEFAULT_STATUS_CODE", ")", ";", "}" ]
assert that string matches the given pattern @param string the string to check @param pattern the pattern to check @throws WebApplicationException with status code 422 (Unprocessable Entity)
[ "assert", "that", "string", "matches", "the", "given", "pattern" ]
train
https://github.com/taimos/RESTUtils/blob/bdb1bf9a2eb13ede0eec6f071c10cb2698313501/src/main/java/de/taimos/restutils/RESTAssert.java#L289-L291
dashorst/wicket-stuff-markup-validator
jing/src/main/java/com/thaiopensource/validate/nvdl/Mode.java
Mode.bindElement
boolean bindElement(String ns, String wildcard, ActionSet actions) { """ Adds a set of element actions to be performed in this mode for elements in a specified namespace. @param ns The namespace pattern. @param wildcard The wildcard character. @param actions The set of element actions. @return true if succe...
java
boolean bindElement(String ns, String wildcard, ActionSet actions) { NamespaceSpecification nss = new NamespaceSpecification(ns, wildcard); if (nssElementMap.get(nss) != null) return false; for (Enumeration e = nssElementMap.keys(); e.hasMoreElements();) { NamespaceSpecification nssI = (Namespac...
[ "boolean", "bindElement", "(", "String", "ns", ",", "String", "wildcard", ",", "ActionSet", "actions", ")", "{", "NamespaceSpecification", "nss", "=", "new", "NamespaceSpecification", "(", "ns", ",", "wildcard", ")", ";", "if", "(", "nssElementMap", ".", "get"...
Adds a set of element actions to be performed in this mode for elements in a specified namespace. @param ns The namespace pattern. @param wildcard The wildcard character. @param actions The set of element actions. @return true if successfully added, that is the namespace was not already present in the elementMap, othe...
[ "Adds", "a", "set", "of", "element", "actions", "to", "be", "performed", "in", "this", "mode", "for", "elements", "in", "a", "specified", "namespace", "." ]
train
https://github.com/dashorst/wicket-stuff-markup-validator/blob/9e529a4dc8bfdbbe4c794f3132ef400a006560a1/jing/src/main/java/com/thaiopensource/validate/nvdl/Mode.java#L364-L376
docker-java/docker-java
src/main/java/com/github/dockerjava/core/async/ResultCallbackTemplate.java
ResultCallbackTemplate.awaitCompletion
public boolean awaitCompletion(long timeout, TimeUnit timeUnit) throws InterruptedException { """ Blocks until {@link ResultCallback#onComplete()} was called or the given timeout occurs @return {@code true} if completed and {@code false} if the waiting time elapsed before {@link ResultCallback#onComplete()} was ...
java
public boolean awaitCompletion(long timeout, TimeUnit timeUnit) throws InterruptedException { boolean result = completed.await(timeout, timeUnit); throwFirstError(); return result; }
[ "public", "boolean", "awaitCompletion", "(", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "throws", "InterruptedException", "{", "boolean", "result", "=", "completed", ".", "await", "(", "timeout", ",", "timeUnit", ")", ";", "throwFirstError", "(", ")", ...
Blocks until {@link ResultCallback#onComplete()} was called or the given timeout occurs @return {@code true} if completed and {@code false} if the waiting time elapsed before {@link ResultCallback#onComplete()} was called.
[ "Blocks", "until", "{" ]
train
https://github.com/docker-java/docker-java/blob/c5c89327108abdc50aa41d7711d4743b8bac75fe/src/main/java/com/github/dockerjava/core/async/ResultCallbackTemplate.java#L103-L107
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java
PropertiesManagerCore.deleteValue
public int deleteValue(String property, String value) { """ Delete the property value from all GeoPackages @param property property name @param value property value @return number of GeoPackages deleted from """ int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteValue(geo...
java
public int deleteValue(String property, String value) { int count = 0; for (String geoPackage : propertiesMap.keySet()) { if (deleteValue(geoPackage, property, value)) { count++; } } return count; }
[ "public", "int", "deleteValue", "(", "String", "property", ",", "String", "value", ")", "{", "int", "count", "=", "0", ";", "for", "(", "String", "geoPackage", ":", "propertiesMap", ".", "keySet", "(", ")", ")", "{", "if", "(", "deleteValue", "(", "geo...
Delete the property value from all GeoPackages @param property property name @param value property value @return number of GeoPackages deleted from
[ "Delete", "the", "property", "value", "from", "all", "GeoPackages" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L471-L479
googlemaps/google-maps-services-java
src/main/java/com/google/maps/GeocodingApi.java
GeocodingApi.reverseGeocode
public static GeocodingApiRequest reverseGeocode(GeoApiContext context, LatLng location) { """ Requests the street address of a {@code location}. @param context The {@link GeoApiContext} to make requests through. @param location The location to reverse geocode. @return Returns the request, ready to run. "...
java
public static GeocodingApiRequest reverseGeocode(GeoApiContext context, LatLng location) { GeocodingApiRequest request = new GeocodingApiRequest(context); request.latlng(location); return request; }
[ "public", "static", "GeocodingApiRequest", "reverseGeocode", "(", "GeoApiContext", "context", ",", "LatLng", "location", ")", "{", "GeocodingApiRequest", "request", "=", "new", "GeocodingApiRequest", "(", "context", ")", ";", "request", ".", "latlng", "(", "location...
Requests the street address of a {@code location}. @param context The {@link GeoApiContext} to make requests through. @param location The location to reverse geocode. @return Returns the request, ready to run.
[ "Requests", "the", "street", "address", "of", "a", "{", "@code", "location", "}", "." ]
train
https://github.com/googlemaps/google-maps-services-java/blob/23d20d1930f80e310d856d2da51d72ee0db4476b/src/main/java/com/google/maps/GeocodingApi.java#L65-L69
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/ConfigManager.java
ConfigManager.getPoolMinimum
public synchronized int getPoolMinimum(PoolInfo poolInfo, ResourceType type) { """ Get the configured minimum allocation for a given {@link ResourceType} in a given pool @param poolInfo Pool info to check @param type the type of the resource @return the minimum allocation for the resource in a pool """ ...
java
public synchronized int getPoolMinimum(PoolInfo poolInfo, ResourceType type) { Integer min = (typePoolInfoToMin == null) ? null : typePoolInfoToMin.get(type, poolInfo); return min == null ? 0 : min; }
[ "public", "synchronized", "int", "getPoolMinimum", "(", "PoolInfo", "poolInfo", ",", "ResourceType", "type", ")", "{", "Integer", "min", "=", "(", "typePoolInfoToMin", "==", "null", ")", "?", "null", ":", "typePoolInfoToMin", ".", "get", "(", "type", ",", "p...
Get the configured minimum allocation for a given {@link ResourceType} in a given pool @param poolInfo Pool info to check @param type the type of the resource @return the minimum allocation for the resource in a pool
[ "Get", "the", "configured", "minimum", "allocation", "for", "a", "given", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/ConfigManager.java#L519-L523
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.truncatedEquals
public static boolean truncatedEquals(final Calendar cal1, final Calendar cal2, final int field) { """ Copied from Apache Commons Lang under Apache License v2. <br /> Determines if two calendars are equal up to no more than the specified most significant field. @param cal1 the first calendar, not <code>nul...
java
public static boolean truncatedEquals(final Calendar cal1, final Calendar cal2, final int field) { return truncatedCompareTo(cal1, cal2, field) == 0; }
[ "public", "static", "boolean", "truncatedEquals", "(", "final", "Calendar", "cal1", ",", "final", "Calendar", "cal2", ",", "final", "int", "field", ")", "{", "return", "truncatedCompareTo", "(", "cal1", ",", "cal2", ",", "field", ")", "==", "0", ";", "}" ]
Copied from Apache Commons Lang under Apache License v2. <br /> Determines if two calendars are equal up to no more than the specified most significant field. @param cal1 the first calendar, not <code>null</code> @param cal2 the second calendar, not <code>null</code> @param field the field from {@code Calendar} @retu...
[ "Copied", "from", "Apache", "Commons", "Lang", "under", "Apache", "License", "v2", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L1540-L1542
alkacon/opencms-core
src/org/opencms/importexport/CmsImportVersion5.java
CmsImportVersion5.importRelations
protected void importRelations(CmsResource resource, Element parentElement) { """ Reads all the relations of the resource from the <code>manifest.xml</code> file and adds them to the according resource.<p> @param resource the resource to import the relations for @param parentElement the current element ""...
java
protected void importRelations(CmsResource resource, Element parentElement) { // Get the nodes for the relations @SuppressWarnings("unchecked") List<Node> relationElements = parentElement.selectNodes( "./" + A_CmsImport.N_RELATIONS + "/" + A_CmsImport.N_RELATION); List<CmsR...
[ "protected", "void", "importRelations", "(", "CmsResource", "resource", ",", "Element", "parentElement", ")", "{", "// Get the nodes for the relations", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "List", "<", "Node", ">", "relationElements", "=", "parentElement...
Reads all the relations of the resource from the <code>manifest.xml</code> file and adds them to the according resource.<p> @param resource the resource to import the relations for @param parentElement the current element
[ "Reads", "all", "the", "relations", "of", "the", "resource", "from", "the", "<code", ">", "manifest", ".", "xml<", "/", "code", ">", "file", "and", "adds", "them", "to", "the", "according", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion5.java#L300-L331
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.readCSV
static public WorkSheet readCSV(InputStream is, char delimiter) throws Exception { """ Read a CSV/Tab delimited file where you pass in the delimiter @param f @param delimiter @return @throws Exception """ CompactCharSequence[][] data = getAllValuesCompactCharSequence(is, delimiter); WorkSheet work...
java
static public WorkSheet readCSV(InputStream is, char delimiter) throws Exception { CompactCharSequence[][] data = getAllValuesCompactCharSequence(is, delimiter); WorkSheet workSheet = new WorkSheet(data); workSheet.setMetaDataColumnsAfterColumn(); workSheet.setMetaDataRowsAfterRow(); return workSheet; }
[ "static", "public", "WorkSheet", "readCSV", "(", "InputStream", "is", ",", "char", "delimiter", ")", "throws", "Exception", "{", "CompactCharSequence", "[", "]", "[", "]", "data", "=", "getAllValuesCompactCharSequence", "(", "is", ",", "delimiter", ")", ";", "...
Read a CSV/Tab delimited file where you pass in the delimiter @param f @param delimiter @return @throws Exception
[ "Read", "a", "CSV", "/", "Tab", "delimited", "file", "where", "you", "pass", "in", "the", "delimiter" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L1472-L1481
alkacon/opencms-core
src/org/opencms/webdav/CmsWebdavServlet.java
CmsWebdavServlet.copyRange
protected IOException copyRange(InputStream istream, ServletOutputStream ostream) { """ Copy the contents of the specified input stream to the specified output stream, and ensure that both streams are closed before returning (even in the face of an exception).<p> @param istream the input stream to read from ...
java
protected IOException copyRange(InputStream istream, ServletOutputStream ostream) { // Copy the input stream to the output stream IOException exception = null; byte[] buffer = new byte[m_input]; int len = buffer.length; while (true) { try { len = istr...
[ "protected", "IOException", "copyRange", "(", "InputStream", "istream", ",", "ServletOutputStream", "ostream", ")", "{", "// Copy the input stream to the output stream", "IOException", "exception", "=", "null", ";", "byte", "[", "]", "buffer", "=", "new", "byte", "[",...
Copy the contents of the specified input stream to the specified output stream, and ensure that both streams are closed before returning (even in the face of an exception).<p> @param istream the input stream to read from @param ostream the output stream to write to @return the exception which occurred during processi...
[ "Copy", "the", "contents", "of", "the", "specified", "input", "stream", "to", "the", "specified", "output", "stream", "and", "ensure", "that", "both", "streams", "are", "closed", "before", "returning", "(", "even", "in", "the", "face", "of", "an", "exception...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/webdav/CmsWebdavServlet.java#L808-L828
aspectran/aspectran
web/src/main/java/com/aspectran/web/service/AspectranWebService.java
AspectranWebService.getActivityContext
private static ActivityContext getActivityContext(ServletContext servletContext, String attrName) { """ Find the ActivityContext for this web aspectran service. @param servletContext ServletContext to find the web aspectran service for @param attrName the name of the ServletContext attribute to look for @retu...
java
private static ActivityContext getActivityContext(ServletContext servletContext, String attrName) { Object attr = servletContext.getAttribute(attrName); if (attr == null) { return null; } if (!(attr instanceof AspectranWebService)) { throw new IllegalStateExceptio...
[ "private", "static", "ActivityContext", "getActivityContext", "(", "ServletContext", "servletContext", ",", "String", "attrName", ")", "{", "Object", "attr", "=", "servletContext", ".", "getAttribute", "(", "attrName", ")", ";", "if", "(", "attr", "==", "null", ...
Find the ActivityContext for this web aspectran service. @param servletContext ServletContext to find the web aspectran service for @param attrName the name of the ServletContext attribute to look for @return the ActivityContext for this web aspectran service
[ "Find", "the", "ActivityContext", "for", "this", "web", "aspectran", "service", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/web/src/main/java/com/aspectran/web/service/AspectranWebService.java#L405-L415
google/closure-compiler
src/com/google/javascript/jscomp/ReplaceStrings.java
ReplaceStrings.parseConfiguration
private Config parseConfiguration(String function) { """ Convert the provide string into a Config. The string can be a static function: foo(,,?) foo.bar(?) or a class method: foo.prototype.bar(?) And is allowed to either replace all parameters using "*" or one parameter "?". "," is used as a placeholder for igno...
java
private Config parseConfiguration(String function) { // Looks like this function_name(,$,) int first = function.indexOf('('); int last = function.indexOf(')'); int colon = function.indexOf(EXCLUSION_PREFIX); // TODO(johnlenz): Make parsing precondition checks JSErrors reports. checkState(first ...
[ "private", "Config", "parseConfiguration", "(", "String", "function", ")", "{", "// Looks like this function_name(,$,)", "int", "first", "=", "function", ".", "indexOf", "(", "'", "'", ")", ";", "int", "last", "=", "function", ".", "indexOf", "(", "'", "'", ...
Convert the provide string into a Config. The string can be a static function: foo(,,?) foo.bar(?) or a class method: foo.prototype.bar(?) And is allowed to either replace all parameters using "*" or one parameter "?". "," is used as a placeholder for ignored parameters.
[ "Convert", "the", "provide", "string", "into", "a", "Config", ".", "The", "string", "can", "be", "a", "static", "function", ":", "foo", "(", "?", ")", "foo", ".", "bar", "(", "?", ")", "or", "a", "class", "method", ":", "foo", ".", "prototype", "."...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/ReplaceStrings.java#L478-L517
forge/core
parser-java/api/src/main/java/org/jboss/forge/addon/parser/java/beans/FieldOperations.java
FieldOperations.addFieldTo
public FieldSource<JavaClassSource> addFieldTo(final JavaClassSource targetClass, final String fieldType, final String fieldName, String... annotations) { """ Adds the field with private visibility, including getter and setter, updating the toString() @param targetClass The class which the field wil...
java
public FieldSource<JavaClassSource> addFieldTo(final JavaClassSource targetClass, final String fieldType, final String fieldName, String... annotations) { return addFieldTo(targetClass, fieldType, fieldName, Visibility.PRIVATE, true, true, annotations); }
[ "public", "FieldSource", "<", "JavaClassSource", ">", "addFieldTo", "(", "final", "JavaClassSource", "targetClass", ",", "final", "String", "fieldType", ",", "final", "String", "fieldName", ",", "String", "...", "annotations", ")", "{", "return", "addFieldTo", "("...
Adds the field with private visibility, including getter and setter, updating the toString() @param targetClass The class which the field will be added to @param fieldType The type of the field @param fieldName The name of the field @param annotations An optional list of annotations that will be added to the field @re...
[ "Adds", "the", "field", "with", "private", "visibility", "including", "getter", "and", "setter", "updating", "the", "toString", "()" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/parser-java/api/src/main/java/org/jboss/forge/addon/parser/java/beans/FieldOperations.java#L56-L61
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XTimeExtension.java
XTimeExtension.assignTimestamp
public void assignTimestamp(XEvent event, long time) { """ Assigns to a given event its timestamp. @param event Event to be modified. @param time Timestamp, as a long of milliseconds in UNIX time. """ XAttributeTimestamp attr = (XAttributeTimestamp) ATTR_TIMESTAMP.clone(); attr.setValueMillis(time); ...
java
public void assignTimestamp(XEvent event, long time) { XAttributeTimestamp attr = (XAttributeTimestamp) ATTR_TIMESTAMP.clone(); attr.setValueMillis(time); event.getAttributes().put(KEY_TIMESTAMP, attr); }
[ "public", "void", "assignTimestamp", "(", "XEvent", "event", ",", "long", "time", ")", "{", "XAttributeTimestamp", "attr", "=", "(", "XAttributeTimestamp", ")", "ATTR_TIMESTAMP", ".", "clone", "(", ")", ";", "attr", ".", "setValueMillis", "(", "time", ")", "...
Assigns to a given event its timestamp. @param event Event to be modified. @param time Timestamp, as a long of milliseconds in UNIX time.
[ "Assigns", "to", "a", "given", "event", "its", "timestamp", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XTimeExtension.java#L163-L167
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.assertCurrentActivity
public void assertCurrentActivity(String message, String name, boolean isNewInstance) { """ Asserts that the Activity matching the specified name is active, with the possibility to verify that the expected Activity is a new instance of the Activity. @param message the message to display if the assert fails @p...
java
public void assertCurrentActivity(String message, String name, boolean isNewInstance) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "assertCurrentActivity("+message+", "+name+", "+isNewInstance+")"); } asserter.assertCurrentActivity(message, name, isNewInstance); }
[ "public", "void", "assertCurrentActivity", "(", "String", "message", ",", "String", "name", ",", "boolean", "isNewInstance", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggingTag", ",", "\"ass...
Asserts that the Activity matching the specified name is active, with the possibility to verify that the expected Activity is a new instance of the Activity. @param message the message to display if the assert fails @param name the name of the Activity that is expected to be active. Example is: {@code "MyActivity"} @p...
[ "Asserts", "that", "the", "Activity", "matching", "the", "specified", "name", "is", "active", "with", "the", "possibility", "to", "verify", "that", "the", "expected", "Activity", "is", "a", "new", "instance", "of", "the", "Activity", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L1013-L1020
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Trie2.java
Trie2.rangeEnd
int rangeEnd(int start, int limitp, int val) { """ Find the last character in a contiguous range of characters with the same Trie2 value as the input character. @param c The character to begin with. @return The last contiguous character with the same value. """ int c; int limit = Math.m...
java
int rangeEnd(int start, int limitp, int val) { int c; int limit = Math.min(highStart, limitp); for (c = start+1; c < limit; c++) { if (get(c) != val) { break; } } if (c >= highStart) { c = limitp; } return c - 1...
[ "int", "rangeEnd", "(", "int", "start", ",", "int", "limitp", ",", "int", "val", ")", "{", "int", "c", ";", "int", "limit", "=", "Math", ".", "min", "(", "highStart", ",", "limitp", ")", ";", "for", "(", "c", "=", "start", "+", "1", ";", "c", ...
Find the last character in a contiguous range of characters with the same Trie2 value as the input character. @param c The character to begin with. @return The last contiguous character with the same value.
[ "Find", "the", "last", "character", "in", "a", "contiguous", "range", "of", "characters", "with", "the", "same", "Trie2", "value", "as", "the", "input", "character", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Trie2.java#L1011-L1024
pwittchen/ReactiveNetwork
library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/internet/observing/strategy/SocketInternetObservingStrategy.java
SocketInternetObservingStrategy.isConnected
protected boolean isConnected(final String host, final int port, final int timeoutInMs, final ErrorHandler errorHandler) { """ checks if device is connected to given host at given port @param host to connect @param port to connect @param timeoutInMs connection timeout @param errorHandler error handler ...
java
protected boolean isConnected(final String host, final int port, final int timeoutInMs, final ErrorHandler errorHandler) { final Socket socket = new Socket(); return isConnected(socket, host, port, timeoutInMs, errorHandler); }
[ "protected", "boolean", "isConnected", "(", "final", "String", "host", ",", "final", "int", "port", ",", "final", "int", "timeoutInMs", ",", "final", "ErrorHandler", "errorHandler", ")", "{", "final", "Socket", "socket", "=", "new", "Socket", "(", ")", ";", ...
checks if device is connected to given host at given port @param host to connect @param port to connect @param timeoutInMs connection timeout @param errorHandler error handler for socket connection @return boolean true if connected and false if not
[ "checks", "if", "device", "is", "connected", "to", "given", "host", "at", "given", "port" ]
train
https://github.com/pwittchen/ReactiveNetwork/blob/cfeb3b79a1e44d106581af5e6709ff206e60c369/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/internet/observing/strategy/SocketInternetObservingStrategy.java#L107-L111
jpelzer/pelzer-spring
src/main/java/com/pelzer/util/spring/SpringUtil.java
SpringUtil.getSpringBean
public static <T> T getSpringBean(final Class<T> beanClass) { """ Takes the given beanClass (which is probably an interface) and requests that Spring instantiate a bean for that class. The underlying mechanism is specific to us, in that we expect the beanClass to have a static String 'BEAN_NAME', which we will ...
java
public static <T> T getSpringBean(final Class<T> beanClass){ return getSpringBean(SpringUtilConstants.CONTEXT_DEFINITION, beanClass); }
[ "public", "static", "<", "T", ">", "T", "getSpringBean", "(", "final", "Class", "<", "T", ">", "beanClass", ")", "{", "return", "getSpringBean", "(", "SpringUtilConstants", ".", "CONTEXT_DEFINITION", ",", "beanClass", ")", ";", "}" ]
Takes the given beanClass (which is probably an interface) and requests that Spring instantiate a bean for that class. The underlying mechanism is specific to us, in that we expect the beanClass to have a static String 'BEAN_NAME', which we will then pass to Spring to get our bean. <p> <b>WARNING</b> YOU MAY ONLY CALL ...
[ "Takes", "the", "given", "beanClass", "(", "which", "is", "probably", "an", "interface", ")", "and", "requests", "that", "Spring", "instantiate", "a", "bean", "for", "that", "class", ".", "The", "underlying", "mechanism", "is", "specific", "to", "us", "in", ...
train
https://github.com/jpelzer/pelzer-spring/blob/b5bd9877df244d9092df01c12d81e7b35d438c57/src/main/java/com/pelzer/util/spring/SpringUtil.java#L54-L56
lessthanoptimal/ddogleg
src/org/ddogleg/optimization/DerivativeChecker.java
DerivativeChecker.jacobianR
public static <S extends DMatrix> boolean jacobianR( FunctionNtoM func , FunctionNtoMxN<S> jacobian , double param[] , double tol ) { """ Checks the jacobian using a relative error threshold. @param tol fractional difference """ return jacobianR(func,jacobian,param,tol,Math.sqrt(UtilEjml.EPS)); }
java
public static <S extends DMatrix> boolean jacobianR( FunctionNtoM func , FunctionNtoMxN<S> jacobian , double param[] , double tol ) { return jacobianR(func,jacobian,param,tol,Math.sqrt(UtilEjml.EPS)); }
[ "public", "static", "<", "S", "extends", "DMatrix", ">", "boolean", "jacobianR", "(", "FunctionNtoM", "func", ",", "FunctionNtoMxN", "<", "S", ">", "jacobian", ",", "double", "param", "[", "]", ",", "double", "tol", ")", "{", "return", "jacobianR", "(", ...
Checks the jacobian using a relative error threshold. @param tol fractional difference
[ "Checks", "the", "jacobian", "using", "a", "relative", "error", "threshold", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/optimization/DerivativeChecker.java#L177-L182
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.divideAndRound
private static long divideAndRound(long ldividend, long ldivisor, int roundingMode) { """ Divides {@code long} by {@code long} and do rounding based on the passed in roundingMode. """ int qsign; // quotient sign long q = ldividend / ldivisor; // store quotient in long if (roundingMode ...
java
private static long divideAndRound(long ldividend, long ldivisor, int roundingMode) { int qsign; // quotient sign long q = ldividend / ldivisor; // store quotient in long if (roundingMode == ROUND_DOWN) return q; long r = ldividend % ldivisor; // store remainder in long ...
[ "private", "static", "long", "divideAndRound", "(", "long", "ldividend", ",", "long", "ldivisor", ",", "int", "roundingMode", ")", "{", "int", "qsign", ";", "// quotient sign", "long", "q", "=", "ldividend", "/", "ldivisor", ";", "// store quotient in long", "if...
Divides {@code long} by {@code long} and do rounding based on the passed in roundingMode.
[ "Divides", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L4128-L4141
thulab/iotdb-jdbc
src/main/java/cn/edu/tsinghua/iotdb/jdbc/Utils.java
Utils.parseURL
public static TsfileConnectionParams parseURL(String url, Properties info) throws TsfileURLException { """ Parse JDBC connection URL The only supported format of the URL is: jdbc:tsfile://localhost:6667/ """ TsfileConnectionParams params = new TsfileConnectionParams(url); if (url.trim().equals...
java
public static TsfileConnectionParams parseURL(String url, Properties info) throws TsfileURLException { TsfileConnectionParams params = new TsfileConnectionParams(url); if (url.trim().equalsIgnoreCase(TsfileJDBCConfig.TSFILE_URL_PREFIX)) { return params; } Pattern pattern = P...
[ "public", "static", "TsfileConnectionParams", "parseURL", "(", "String", "url", ",", "Properties", "info", ")", "throws", "TsfileURLException", "{", "TsfileConnectionParams", "params", "=", "new", "TsfileConnectionParams", "(", "url", ")", ";", "if", "(", "url", "...
Parse JDBC connection URL The only supported format of the URL is: jdbc:tsfile://localhost:6667/
[ "Parse", "JDBC", "connection", "URL", "The", "only", "supported", "format", "of", "the", "URL", "is", ":", "jdbc", ":", "tsfile", ":", "//", "localhost", ":", "6667", "/" ]
train
https://github.com/thulab/iotdb-jdbc/blob/badd5b304fd628da9d69e621477769eeefe0870d/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Utils.java#L31-L57
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.patchMyProfile
@Override public Observable<ComapiResult<Map<String, Object>>> patchMyProfile(@NonNull Map<String, Object> profileDetails, String eTag) { """ Applies profile patch for an active session. @param profileDetails Profile details. @param eTag ETag for server to check if local version of the data is th...
java
@Override public Observable<ComapiResult<Map<String, Object>>> patchMyProfile(@NonNull Map<String, Object> profileDetails, String eTag) { final SessionData session = dataMgr.getSessionDAO().session(); final String profileId = session != null ? session.getProfileId() : null; if (TextUtils.i...
[ "@", "Override", "public", "Observable", "<", "ComapiResult", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "patchMyProfile", "(", "@", "NonNull", "Map", "<", "String", ",", "Object", ">", "profileDetails", ",", "String", "eTag", ")", "{", "fi...
Applies profile patch for an active session. @param profileDetails Profile details. @param eTag ETag for server to check if local version of the data is the same as the one the server side. @return Observable with to perform update profile for current session.
[ "Applies", "profile", "patch", "for", "an", "active", "session", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L372-L383
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/EnsureUniqueAssociation.java
EnsureUniqueAssociation.process
public void process( FastQueue<AssociatedIndex> matches, int sizeDst ) { """ Removes ambiguous associations. Call {@link #getMatches()} to get the list of unambiguous matches. @param matches List of candidate associations @param sizeDst Number of 'dst' features """ // initialize data structures if( b...
java
public void process( FastQueue<AssociatedIndex> matches, int sizeDst ) { // initialize data structures if( bestScores.length < sizeDst ) bestScores = new AssociatedIndex[sizeDst]; for( int i = 0; i < matches.size; i++ ) { AssociatedIndex match = matches.data[i]; if( bestScores[match.dst] == null || mat...
[ "public", "void", "process", "(", "FastQueue", "<", "AssociatedIndex", ">", "matches", ",", "int", "sizeDst", ")", "{", "// initialize data structures", "if", "(", "bestScores", ".", "length", "<", "sizeDst", ")", "bestScores", "=", "new", "AssociatedIndex", "["...
Removes ambiguous associations. Call {@link #getMatches()} to get the list of unambiguous matches. @param matches List of candidate associations @param sizeDst Number of 'dst' features
[ "Removes", "ambiguous", "associations", ".", "Call", "{", "@link", "#getMatches", "()", "}", "to", "get", "the", "list", "of", "unambiguous", "matches", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/associate/EnsureUniqueAssociation.java#L44-L66
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsXmlContainerPage.java
CmsXmlContainerPage.writeContainerPage
public void writeContainerPage(CmsObject cms, CmsContainerPageBean cntPage) throws CmsException { """ Saves a container page in in-memory XML structure.<p> @param cms the current CMS context @param cntPage the container page bean to save @throws CmsException if something goes wrong """ // keep ...
java
public void writeContainerPage(CmsObject cms, CmsContainerPageBean cntPage) throws CmsException { // keep unused containers CmsContainerPageBean savePage = cleanupContainersContainers(cms, cntPage); savePage = removeEmptyContainers(cntPage); // Replace existing locales with master local...
[ "public", "void", "writeContainerPage", "(", "CmsObject", "cms", ",", "CmsContainerPageBean", "cntPage", ")", "throws", "CmsException", "{", "// keep unused containers", "CmsContainerPageBean", "savePage", "=", "cleanupContainersContainers", "(", "cms", ",", "cntPage", ")...
Saves a container page in in-memory XML structure.<p> @param cms the current CMS context @param cntPage the container page bean to save @throws CmsException if something goes wrong
[ "Saves", "a", "container", "page", "in", "in", "-", "memory", "XML", "structure", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsXmlContainerPage.java#L311-L327
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/osgi/container/config/merge/MailSessionComparator.java
MailSessionComparator.isMatchingString
private boolean isMatchingString(String value1, String value2) { """ Compare two string values. @param value1 @param value2 @return true if matching """ boolean valuesMatch = true; if (value1 == null) { if (value2 != null) { valuesMatch = false...
java
private boolean isMatchingString(String value1, String value2) { boolean valuesMatch = true; if (value1 == null) { if (value2 != null) { valuesMatch = false; } } else { valuesMatch = value1.equals(value2); } ...
[ "private", "boolean", "isMatchingString", "(", "String", "value1", ",", "String", "value2", ")", "{", "boolean", "valuesMatch", "=", "true", ";", "if", "(", "value1", "==", "null", ")", "{", "if", "(", "value2", "!=", "null", ")", "{", "valuesMatch", "="...
Compare two string values. @param value1 @param value2 @return true if matching
[ "Compare", "two", "string", "values", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/osgi/container/config/merge/MailSessionComparator.java#L59-L72
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
AbstractBigtableAdmin.deleteTableSnapshots
@Override public void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) throws IOException { """ {@inheritDoc} The snapshots will be deleted serially and the first failure will prevent the deletion of the remaining snapshots. """ for (SnapshotDescription snapshotDescription ...
java
@Override public void deleteTableSnapshots(Pattern tableNamePattern, Pattern snapshotNamePattern) throws IOException { for (SnapshotDescription snapshotDescription : listTableSnapshots(tableNamePattern, snapshotNamePattern)) { deleteSnapshot(snapshotDescription.getName()); } }
[ "@", "Override", "public", "void", "deleteTableSnapshots", "(", "Pattern", "tableNamePattern", ",", "Pattern", "snapshotNamePattern", ")", "throws", "IOException", "{", "for", "(", "SnapshotDescription", "snapshotDescription", ":", "listTableSnapshots", "(", "tableNamePat...
{@inheritDoc} The snapshots will be deleted serially and the first failure will prevent the deletion of the remaining snapshots.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java#L996-L1001
apache/incubator-heron
heron/schedulers/src/java/org/apache/heron/scheduler/mesos/MesosScheduler.java
MesosScheduler.getBaseContainer
protected BaseContainer getBaseContainer(Integer containerIndex, PackingPlan packing) { """ Get BaseContainer info. @param containerIndex container index to start @param packing the PackingPlan @return BaseContainer Info """ BaseContainer container = new BaseContainer(); container.name = TaskUtil...
java
protected BaseContainer getBaseContainer(Integer containerIndex, PackingPlan packing) { BaseContainer container = new BaseContainer(); container.name = TaskUtils.getTaskNameForContainerIndex(containerIndex); container.runAsUser = Context.role(config); container.description = String.format("Container %...
[ "protected", "BaseContainer", "getBaseContainer", "(", "Integer", "containerIndex", ",", "PackingPlan", "packing", ")", "{", "BaseContainer", "container", "=", "new", "BaseContainer", "(", ")", ";", "container", ".", "name", "=", "TaskUtils", ".", "getTaskNameForCon...
Get BaseContainer info. @param containerIndex container index to start @param packing the PackingPlan @return BaseContainer Info
[ "Get", "BaseContainer", "info", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/schedulers/src/java/org/apache/heron/scheduler/mesos/MesosScheduler.java#L217-L244
alkacon/opencms-core
src/org/opencms/publish/CmsPublishManager.java
CmsPublishManager.publishResource
public CmsUUID publishResource(CmsObject cms, String resourcename) throws Exception { """ Publishes a single resource, printing messages to a shell report.<p> The siblings of the resource will not be published.<p> @param cms the cms request context @param resourcename the name of the resource to be publishe...
java
public CmsUUID publishResource(CmsObject cms, String resourcename) throws Exception { return publishResource(cms, resourcename, false, new CmsShellReport(cms.getRequestContext().getLocale())); }
[ "public", "CmsUUID", "publishResource", "(", "CmsObject", "cms", ",", "String", "resourcename", ")", "throws", "Exception", "{", "return", "publishResource", "(", "cms", ",", "resourcename", ",", "false", ",", "new", "CmsShellReport", "(", "cms", ".", "getReques...
Publishes a single resource, printing messages to a shell report.<p> The siblings of the resource will not be published.<p> @param cms the cms request context @param resourcename the name of the resource to be published @return the publish history id of the published project @throws Exception if something goes wron...
[ "Publishes", "a", "single", "resource", "printing", "messages", "to", "a", "shell", "report", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/publish/CmsPublishManager.java#L603-L606
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java
GlobalizationPreferences.setNumberFormat
public GlobalizationPreferences setNumberFormat(int style, NumberFormat format) { """ Sets a number format explicitly. Overrides the general locale settings. @param style NF_NUMBER, NF_CURRENCY, NF_PERCENT, NF_SCIENTIFIC, NF_INTEGER @param format The number format @return this, for chaining @hide draft / pro...
java
public GlobalizationPreferences setNumberFormat(int style, NumberFormat format) { if (isFrozen()) { throw new UnsupportedOperationException("Attempt to modify immutable object"); } if (numberFormats == null) { numberFormats = new NumberFormat[NF_LIMIT]; } ...
[ "public", "GlobalizationPreferences", "setNumberFormat", "(", "int", "style", ",", "NumberFormat", "format", ")", "{", "if", "(", "isFrozen", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Attempt to modify immutable object\"", ")", ";", ...
Sets a number format explicitly. Overrides the general locale settings. @param style NF_NUMBER, NF_CURRENCY, NF_PERCENT, NF_SCIENTIFIC, NF_INTEGER @param format The number format @return this, for chaining @hide draft / provisional / internal are hidden on Android
[ "Sets", "a", "number", "format", "explicitly", ".", "Overrides", "the", "general", "locale", "settings", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java#L715-L724
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscape.java
HtmlEscape.escapeHtml
public static void escapeHtml(final Reader reader, final Writer writer, final HtmlEscapeType type, final HtmlEscapeLevel level) throws IOException { """ <p> Perform a (configurable) HTML <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> Th...
java
public static void escapeHtml(final Reader reader, final Writer writer, final HtmlEscapeType type, final HtmlEscapeLevel level) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (type == null) { ...
[ "public", "static", "void", "escapeHtml", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ",", "final", "HtmlEscapeType", "type", ",", "final", "HtmlEscapeLevel", "level", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null"...
<p> Perform a (configurable) HTML <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.html.HtmlEscapeType} and {@link org.unbescape.html.HtmlEscapeLevel} argument values....
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "HTML", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">"...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscape.java#L805-L822
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/codec/TIFFDirectory.java
TIFFDirectory.getNumDirectories
public static int getNumDirectories(RandomAccessFileOrArray stream) throws IOException { """ Returns the number of image directories (subimages) stored in a given TIFF file, represented by a <code>SeekableStream</code>. """ long pointer = stream.getFilePointer(); // Save stream pointer ...
java
public static int getNumDirectories(RandomAccessFileOrArray stream) throws IOException{ long pointer = stream.getFilePointer(); // Save stream pointer stream.seek(0L); int endian = stream.readUnsignedShort(); if (!isValidEndianTag(endian)) { throw new ...
[ "public", "static", "int", "getNumDirectories", "(", "RandomAccessFileOrArray", "stream", ")", "throws", "IOException", "{", "long", "pointer", "=", "stream", ".", "getFilePointer", "(", ")", ";", "// Save stream pointer", "stream", ".", "seek", "(", "0L", ")", ...
Returns the number of image directories (subimages) stored in a given TIFF file, represented by a <code>SeekableStream</code>.
[ "Returns", "the", "number", "of", "image", "directories", "(", "subimages", ")", "stored", "in", "a", "given", "TIFF", "file", "represented", "by", "a", "<code", ">", "SeekableStream<", "/", "code", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/codec/TIFFDirectory.java#L615-L653
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/dns/DNSResolver.java
DNSResolver.lookupSRVRecords
public final List<SRVRecord> lookupSRVRecords(DnsName name, List<HostAddress> failedAddresses, DnssecMode dnssecMode) { """ Gets a list of service records for the specified service. @param name The symbolic name of the service. @param failedAddresses list of failed addresses. @param dnssecMode security mode. @...
java
public final List<SRVRecord> lookupSRVRecords(DnsName name, List<HostAddress> failedAddresses, DnssecMode dnssecMode) { checkIfDnssecRequestedAndSupported(dnssecMode); return lookupSRVRecords0(name, failedAddresses, dnssecMode); }
[ "public", "final", "List", "<", "SRVRecord", ">", "lookupSRVRecords", "(", "DnsName", "name", ",", "List", "<", "HostAddress", ">", "failedAddresses", ",", "DnssecMode", "dnssecMode", ")", "{", "checkIfDnssecRequestedAndSupported", "(", "dnssecMode", ")", ";", "re...
Gets a list of service records for the specified service. @param name The symbolic name of the service. @param failedAddresses list of failed addresses. @param dnssecMode security mode. @return The list of SRV records mapped to the service name.
[ "Gets", "a", "list", "of", "service", "records", "for", "the", "specified", "service", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/dns/DNSResolver.java#L51-L54
nats-io/java-nats
src/main/java/io/nats/client/NKey.java
NKey.fromSeed
public static NKey fromSeed(char[] seed) { """ Creates an NKey object from a string encoded seed. This NKey can be used to sign or verify. @param seed the string encoded seed, see {@link NKey#getSeed() getSeed()} @return the Nkey """ DecodedSeed decoded = decodeSeed(seed); // Should throw on bad se...
java
public static NKey fromSeed(char[] seed) { DecodedSeed decoded = decodeSeed(seed); // Should throw on bad seed if (decoded.bytes.length == ED25519_PRIVATE_KEYSIZE) { return new NKey(Type.fromPrefix(decoded.prefix), null, seed); } else { try { return creat...
[ "public", "static", "NKey", "fromSeed", "(", "char", "[", "]", "seed", ")", "{", "DecodedSeed", "decoded", "=", "decodeSeed", "(", "seed", ")", ";", "// Should throw on bad seed", "if", "(", "decoded", ".", "bytes", ".", "length", "==", "ED25519_PRIVATE_KEYSIZ...
Creates an NKey object from a string encoded seed. This NKey can be used to sign or verify. @param seed the string encoded seed, see {@link NKey#getSeed() getSeed()} @return the Nkey
[ "Creates", "an", "NKey", "object", "from", "a", "string", "encoded", "seed", ".", "This", "NKey", "can", "be", "used", "to", "sign", "or", "verify", "." ]
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/NKey.java#L580-L592
VoltDB/voltdb
src/frontend/org/voltdb/planner/FilterMatcher.java
FilterMatcher.valueConstantsMatch
private static boolean valueConstantsMatch(AbstractExpression e1, AbstractExpression e2) { """ Value comparison between one CVE and one PVE. @param e1 first expression @param e2 second expression @return whether one is CVE, the other is PVE, and their values equal. """ return (e1 instanceof Paramete...
java
private static boolean valueConstantsMatch(AbstractExpression e1, AbstractExpression e2) { return (e1 instanceof ParameterValueExpression && e2 instanceof ConstantValueExpression || e1 instanceof ConstantValueExpression && e2 instanceof ParameterValueExpression) && equalsAsCVE(e1...
[ "private", "static", "boolean", "valueConstantsMatch", "(", "AbstractExpression", "e1", ",", "AbstractExpression", "e2", ")", "{", "return", "(", "e1", "instanceof", "ParameterValueExpression", "&&", "e2", "instanceof", "ConstantValueExpression", "||", "e1", "instanceof...
Value comparison between one CVE and one PVE. @param e1 first expression @param e2 second expression @return whether one is CVE, the other is PVE, and their values equal.
[ "Value", "comparison", "between", "one", "CVE", "and", "one", "PVE", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/FilterMatcher.java#L124-L128
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/ConstantFloatInfo.java
ConstantFloatInfo.make
static ConstantFloatInfo make(ConstantPool cp, float value) { """ Will return either a new ConstantFloatInfo object or one already in the constant pool. If it is a new ConstantFloatInfo, it will be inserted into the pool. """ ConstantInfo ci = new ConstantFloatInfo(value); return (ConstantFlo...
java
static ConstantFloatInfo make(ConstantPool cp, float value) { ConstantInfo ci = new ConstantFloatInfo(value); return (ConstantFloatInfo)cp.addConstant(ci); }
[ "static", "ConstantFloatInfo", "make", "(", "ConstantPool", "cp", ",", "float", "value", ")", "{", "ConstantInfo", "ci", "=", "new", "ConstantFloatInfo", "(", "value", ")", ";", "return", "(", "ConstantFloatInfo", ")", "cp", ".", "addConstant", "(", "ci", ")...
Will return either a new ConstantFloatInfo object or one already in the constant pool. If it is a new ConstantFloatInfo, it will be inserted into the pool.
[ "Will", "return", "either", "a", "new", "ConstantFloatInfo", "object", "or", "one", "already", "in", "the", "constant", "pool", ".", "If", "it", "is", "a", "new", "ConstantFloatInfo", "it", "will", "be", "inserted", "into", "the", "pool", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/ConstantFloatInfo.java#L35-L38
cdk/cdk
tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java
InChITautomerGenerator.getTautomers
public List<IAtomContainer> getTautomers(IAtomContainer mol) throws CDKException, CloneNotSupportedException { """ Public method to get tautomers for an input molecule, based on the InChI which will be calculated by JNI-InChI. @param mol molecule for which to generate tautomers @return a list of tautomers, if an...
java
public List<IAtomContainer> getTautomers(IAtomContainer mol) throws CDKException, CloneNotSupportedException { String opt = ""; if ((flags & KETO_ENOL) != 0) opt += " -KET"; if ((flags & ONE_FIVE_SHIFT) != 0) opt += " -15T"; InChIGenerator gen = InChIGenerator...
[ "public", "List", "<", "IAtomContainer", ">", "getTautomers", "(", "IAtomContainer", "mol", ")", "throws", "CDKException", ",", "CloneNotSupportedException", "{", "String", "opt", "=", "\"\"", ";", "if", "(", "(", "flags", "&", "KETO_ENOL", ")", "!=", "0", "...
Public method to get tautomers for an input molecule, based on the InChI which will be calculated by JNI-InChI. @param mol molecule for which to generate tautomers @return a list of tautomers, if any @throws CDKException @throws CloneNotSupportedException
[ "Public", "method", "to", "get", "tautomers", "for", "an", "input", "molecule", "based", "on", "the", "InChI", "which", "will", "be", "calculated", "by", "JNI", "-", "InChI", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/tautomer/src/main/java/org/openscience/cdk/tautomers/InChITautomerGenerator.java#L102-L121
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/TimeField.java
TimeField.getSQLFromField
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { """ Move the physical binary data to this SQL parameter row. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param iParamColumn The column in the prepared statement to...
java
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().get...
[ "public", "void", "getSQLFromField", "(", "PreparedStatement", "statement", ",", "int", "iType", ",", "int", "iParamColumn", ")", "throws", "SQLException", "{", "if", "(", "this", ".", "isNull", "(", ")", ")", "{", "if", "(", "(", "!", "this", ".", "isNu...
Move the physical binary data to this SQL parameter row. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param iParamColumn The column in the prepared statement to set the data. @exception SQLException From SQL calls.
[ "Move", "the", "physical", "binary", "data", "to", "this", "SQL", "parameter", "row", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/TimeField.java#L184-L203
googlegenomics/dataflow-java
src/main/java/com/google/cloud/genomics/dataflow/functions/ibs/SharedAllelesRatioCalculator.java
SharedAllelesRatioCalculator.similarity
@Override public double similarity(VariantCall call1, VariantCall call2) { """ scores when the number of alleles is different than 2 and when the genotypes are unphased. """ int minNumberOfGenotypes = Math.min(call1.getGenotypeCount(), call2.getGenotypeCount()); int numberOfSharedAlleles = 0; for...
java
@Override public double similarity(VariantCall call1, VariantCall call2) { int minNumberOfGenotypes = Math.min(call1.getGenotypeCount(), call2.getGenotypeCount()); int numberOfSharedAlleles = 0; for (int i = 0; i < minNumberOfGenotypes; ++i) { if (call1.getGenotype(i) == call2.getGenotype(i)) { ...
[ "@", "Override", "public", "double", "similarity", "(", "VariantCall", "call1", ",", "VariantCall", "call2", ")", "{", "int", "minNumberOfGenotypes", "=", "Math", ".", "min", "(", "call1", ".", "getGenotypeCount", "(", ")", ",", "call2", ".", "getGenotypeCount...
scores when the number of alleles is different than 2 and when the genotypes are unphased.
[ "scores", "when", "the", "number", "of", "alleles", "is", "different", "than", "2", "and", "when", "the", "genotypes", "are", "unphased", "." ]
train
https://github.com/googlegenomics/dataflow-java/blob/ef2c56ed1a6397843c55102748b8c2b12aaa4772/src/main/java/com/google/cloud/genomics/dataflow/functions/ibs/SharedAllelesRatioCalculator.java#L29-L40
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_service_serviceName_PUT
public void billingAccount_service_serviceName_PUT(String billingAccount, String serviceName, OvhTelephonyService body) throws IOException { """ Alter this object properties REST: PUT /telephony/{billingAccount}/service/{serviceName} @param body [required] New object properties @param billingAccount [required...
java
public void billingAccount_service_serviceName_PUT(String billingAccount, String serviceName, OvhTelephonyService body) throws IOException { String qPath = "/telephony/{billingAccount}/service/{serviceName}"; StringBuilder sb = path(qPath, billingAccount, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "billingAccount_service_serviceName_PUT", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhTelephonyService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/service/{serviceName}\"", "...
Alter this object properties REST: PUT /telephony/{billingAccount}/service/{serviceName} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param serviceName [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3789-L3793
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/JodaBeanSer.java
JodaBeanSer.withNewLine
public JodaBeanSer withNewLine(String newLine) { """ Returns a copy of this serializer with the specified pretty print new line. @param newLine the new line, not null @return a copy of this object with the new line changed, not null """ JodaBeanUtils.notNull(newLine, "newLine"); return new...
java
public JodaBeanSer withNewLine(String newLine) { JodaBeanUtils.notNull(newLine, "newLine"); return new JodaBeanSer(indent, newLine, converter, iteratorFactory, shortTypes, deserializers, includeDerived); }
[ "public", "JodaBeanSer", "withNewLine", "(", "String", "newLine", ")", "{", "JodaBeanUtils", ".", "notNull", "(", "newLine", ",", "\"newLine\"", ")", ";", "return", "new", "JodaBeanSer", "(", "indent", ",", "newLine", ",", "converter", ",", "iteratorFactory", ...
Returns a copy of this serializer with the specified pretty print new line. @param newLine the new line, not null @return a copy of this object with the new line changed, not null
[ "Returns", "a", "copy", "of", "this", "serializer", "with", "the", "specified", "pretty", "print", "new", "line", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/JodaBeanSer.java#L137-L140
btc-ag/redg
redg-generator/src/main/java/com/btc/redg/generator/extractor/DatabaseManager.java
DatabaseManager.executePreparationScripts
public static void executePreparationScripts(final Connection connection, final File[] sqlScripts) throws IOException, SQLException { """ Executes the SQL scripts specified in the {@code sqlScripts} parameter. The SQL gets split into statements and gets executed via the {@code connection} by a {@link ScriptRunner...
java
public static void executePreparationScripts(final Connection connection, final File[] sqlScripts) throws IOException, SQLException { LOG.info("Executing provided SQL scripts..."); if (sqlScripts == null || sqlScripts.length == 0) { LOG.info("No SQL script was provided."); re...
[ "public", "static", "void", "executePreparationScripts", "(", "final", "Connection", "connection", ",", "final", "File", "[", "]", "sqlScripts", ")", "throws", "IOException", ",", "SQLException", "{", "LOG", ".", "info", "(", "\"Executing provided SQL scripts...\"", ...
Executes the SQL scripts specified in the {@code sqlScripts} parameter. The SQL gets split into statements and gets executed via the {@code connection} by a {@link ScriptRunner}. The output from the script runner simply gets discarded. @param connection The JDBC connection to use for script execution @param sqlScripts...
[ "Executes", "the", "SQL", "scripts", "specified", "in", "the", "{", "@code", "sqlScripts", "}", "parameter", ".", "The", "SQL", "gets", "split", "into", "statements", "and", "gets", "executed", "via", "the", "{", "@code", "connection", "}", "by", "a", "{",...
train
https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/DatabaseManager.java#L108-L134
twilliamson/mogwee-logging
src/main/java/com/mogwee/logging/Logger.java
Logger.infof
public final void infof(Throwable cause, String message, Object... args) { """ Logs a formatted message and stack trace if INFO logging is enabled. @param cause an exception to print stack trace of @param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format ...
java
public final void infof(Throwable cause, String message, Object... args) { logf(Level.INFO, cause, message, args); }
[ "public", "final", "void", "infof", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "logf", "(", "Level", ".", "INFO", ",", "cause", ",", "message", ",", "args", ")", ";", "}" ]
Logs a formatted message and stack trace if INFO logging is enabled. @param cause an exception to print stack trace of @param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a> @param args arguments referenced by the format specifiers in the format s...
[ "Logs", "a", "formatted", "message", "and", "stack", "trace", "if", "INFO", "logging", "is", "enabled", "." ]
train
https://github.com/twilliamson/mogwee-logging/blob/30b99c2649de455432d956a8f6a74316de4cd62c/src/main/java/com/mogwee/logging/Logger.java#L137-L140
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.eachFileMatch
public static void eachFileMatch(final Path self, final Object nameFilter, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { """ Invokes the closure for each file whose name (file.name) matches the given nameFilter in the given directory - calling...
java
public static void eachFileMatch(final Path self, final Object nameFilter, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { // throws FileNotFoundException, IllegalArgumentException { eachFileMatch(self, FileType.ANY, nameFilter, closur...
[ "public", "static", "void", "eachFileMatch", "(", "final", "Path", "self", ",", "final", "Object", "nameFilter", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.nio.file.Path\"", ")", "final", "Closure", "...
Invokes the closure for each file whose name (file.name) matches the given nameFilter in the given directory - calling the {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#isCase(Object, Object)} method to determine if a match occurs. This method can be used with different kinds of filters like regular expressi...
[ "Invokes", "the", "closure", "for", "each", "file", "whose", "name", "(", "file", ".", "name", ")", "matches", "the", "given", "nameFilter", "in", "the", "given", "directory", "-", "calling", "the", "{", "@link", "org", ".", "codehaus", ".", "groovy", "....
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1249-L1252
javagl/ND
nd-tuples/src/main/java/de/javagl/nd/tuples/i/IntTuples.java
IntTuples.incrementLexicographically
private static boolean incrementLexicographically( MutableIntTuple current, IntTuple min, IntTuple max, int index) { """ Recursively increment the given tuple lexicographically, starting at the given index. @param current The tuple to increment @param min The minimum values @param max The maximum va...
java
private static boolean incrementLexicographically( MutableIntTuple current, IntTuple min, IntTuple max, int index) { if (index == -1) { return false; } int oldValue = current.get(index); int newValue = oldValue + 1; current.set(index, newV...
[ "private", "static", "boolean", "incrementLexicographically", "(", "MutableIntTuple", "current", ",", "IntTuple", "min", ",", "IntTuple", "max", ",", "int", "index", ")", "{", "if", "(", "index", "==", "-", "1", ")", "{", "return", "false", ";", "}", "int"...
Recursively increment the given tuple lexicographically, starting at the given index. @param current The tuple to increment @param min The minimum values @param max The maximum values @param index The index @return Whether the tuple could be incremented
[ "Recursively", "increment", "the", "given", "tuple", "lexicographically", "starting", "at", "the", "given", "index", "." ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-tuples/src/main/java/de/javagl/nd/tuples/i/IntTuples.java#L1557-L1573
code4everything/util
src/main/java/com/zhazhapan/util/NetUtils.java
NetUtils.responseFile
public static void responseFile(HttpServletResponse response, String local, boolean isDownloaded) throws IOException { """ 响应文件 @param response {@link HttpServletResponse} @param local 文件路径 @param isDownloaded 是否下载 @throws IOException 异常 @since 1.1.1 """ if (Checker.isExists(local)) { ...
java
public static void responseFile(HttpServletResponse response, String local, boolean isDownloaded) throws IOException { if (Checker.isExists(local)) { File file = new File(local); try (FileInputStream in = new FileInputStream(file); ServletOutputStream os = response.getOutputStream()) { ...
[ "public", "static", "void", "responseFile", "(", "HttpServletResponse", "response", ",", "String", "local", ",", "boolean", "isDownloaded", ")", "throws", "IOException", "{", "if", "(", "Checker", ".", "isExists", "(", "local", ")", ")", "{", "File", "file", ...
响应文件 @param response {@link HttpServletResponse} @param local 文件路径 @param isDownloaded 是否下载 @throws IOException 异常 @since 1.1.1
[ "响应文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/NetUtils.java#L78-L97
liferay/com-liferay-commerce
commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/persistence/impl/CommerceShippingFixedOptionPersistenceImpl.java
CommerceShippingFixedOptionPersistenceImpl.findAll
@Override public List<CommerceShippingFixedOption> findAll(int start, int end) { """ Returns a range of all the commerce shipping fixed options. <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 i...
java
@Override public List<CommerceShippingFixedOption> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceShippingFixedOption", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce shipping fixed options. <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 the first result in the set. Setting ...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "shipping", "fixed", "options", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-shipping-engine-fixed-service/src/main/java/com/liferay/commerce/shipping/engine/fixed/service/persistence/impl/CommerceShippingFixedOptionPersistenceImpl.java#L1162-L1165
virgo47/javasimon
javaee/src/main/java/org/javasimon/javaee/SimonServletFilter.java
SimonServletFilter.shouldBeReported
protected boolean shouldBeReported(HttpServletRequest request, long requestNanoTime, List<Split> splits) { """ Determines whether the request is over the threshold - with all incoming parameters this method can be very flexible. Default implementation just compares the actual requestNanoTime with {@link #getThre...
java
protected boolean shouldBeReported(HttpServletRequest request, long requestNanoTime, List<Split> splits) { return requestNanoTime > getThreshold(request); }
[ "protected", "boolean", "shouldBeReported", "(", "HttpServletRequest", "request", ",", "long", "requestNanoTime", ",", "List", "<", "Split", ">", "splits", ")", "{", "return", "requestNanoTime", ">", "getThreshold", "(", "request", ")", ";", "}" ]
Determines whether the request is over the threshold - with all incoming parameters this method can be very flexible. Default implementation just compares the actual requestNanoTime with {@link #getThreshold(javax.servlet.http.HttpServletRequest)} (which by default returns value configured in {@code web.xml}) @param r...
[ "Determines", "whether", "the", "request", "is", "over", "the", "threshold", "-", "with", "all", "incoming", "parameters", "this", "method", "can", "be", "very", "flexible", ".", "Default", "implementation", "just", "compares", "the", "actual", "requestNanoTime", ...
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/javaee/src/main/java/org/javasimon/javaee/SimonServletFilter.java#L278-L280
h2oai/h2o-2
src/main/java/hex/deeplearning/DeepLearning.java
DeepLearning.reBalance
private Frame reBalance(final Frame fr, boolean local) { """ Rebalance a frame for load balancing @param fr Input frame @param local whether to only create enough chunks to max out all cores on one node only @return Frame that has potentially more chunks """ int chunks = (int)Math.min( 4 * H2O.NUMCPUS *...
java
private Frame reBalance(final Frame fr, boolean local) { int chunks = (int)Math.min( 4 * H2O.NUMCPUS * (local ? 1 : H2O.CLOUD.size()), fr.numRows()); if (fr.anyVec().nChunks() > chunks && !reproducible) { Log.info("Dataset already contains " + fr.anyVec().nChunks() + " chunks. No need to rebalance."); ...
[ "private", "Frame", "reBalance", "(", "final", "Frame", "fr", ",", "boolean", "local", ")", "{", "int", "chunks", "=", "(", "int", ")", "Math", ".", "min", "(", "4", "*", "H2O", ".", "NUMCPUS", "*", "(", "local", "?", "1", ":", "H2O", ".", "CLOUD...
Rebalance a frame for load balancing @param fr Input frame @param local whether to only create enough chunks to max out all cores on one node only @return Frame that has potentially more chunks
[ "Rebalance", "a", "frame", "for", "load", "balancing" ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/hex/deeplearning/DeepLearning.java#L1179-L1196
threerings/nenya
core/src/main/java/com/threerings/media/image/ImageManager.java
ImageManager.getImage
public BufferedImage getImage (String path, Colorization[] zations) { """ Like {@link #getImage(String)} but the specified colorizations are applied to the image before it is returned. """ return getImage(null, path, zations); }
java
public BufferedImage getImage (String path, Colorization[] zations) { return getImage(null, path, zations); }
[ "public", "BufferedImage", "getImage", "(", "String", "path", ",", "Colorization", "[", "]", "zations", ")", "{", "return", "getImage", "(", "null", ",", "path", ",", "zations", ")", ";", "}" ]
Like {@link #getImage(String)} but the specified colorizations are applied to the image before it is returned.
[ "Like", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ImageManager.java#L182-L185
lastaflute/lastaflute
src/main/java/org/lastaflute/web/login/TypicalLoginAssist.java
TypicalLoginAssist.handleLoginSuccess
protected void handleLoginSuccess(USER_ENTITY userEntity, LoginSpecifiedOption option) { """ Handle login success for the found login user. @param userEntity The found entity of the login user. (NotNull) @param option The option of login specified by caller. (NotNull) """ assertUserEntityRequired(use...
java
protected void handleLoginSuccess(USER_ENTITY userEntity, LoginSpecifiedOption option) { assertUserEntityRequired(userEntity); final USER_BEAN userBean = saveLoginInfoToSession(userEntity); if (userBean instanceof SyncCheckable) { ((SyncCheckable) userBean).manageLastestSyncCheckTime...
[ "protected", "void", "handleLoginSuccess", "(", "USER_ENTITY", "userEntity", ",", "LoginSpecifiedOption", "option", ")", "{", "assertUserEntityRequired", "(", "userEntity", ")", ";", "final", "USER_BEAN", "userBean", "=", "saveLoginInfoToSession", "(", "userEntity", ")"...
Handle login success for the found login user. @param userEntity The found entity of the login user. (NotNull) @param option The option of login specified by caller. (NotNull)
[ "Handle", "login", "success", "for", "the", "found", "login", "user", "." ]
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/login/TypicalLoginAssist.java#L316-L331
prestodb/presto
presto-main/src/main/java/com/facebook/presto/util/DateTimeUtils.java
DateTimeUtils.parseTimestampWithTimeZone
public static long parseTimestampWithTimeZone(TimeZoneKey timeZoneKey, String timestampWithTimeZone) { """ Parse a string (optionally containing a zone) as a value of TIMESTAMP WITH TIME ZONE type. If the string doesn't specify a zone, it is interpreted in {@code timeZoneKey} zone. <p> For example: {@code "2000...
java
public static long parseTimestampWithTimeZone(TimeZoneKey timeZoneKey, String timestampWithTimeZone) { DateTime dateTime = TIMESTAMP_WITH_OR_WITHOUT_TIME_ZONE_FORMATTER.withChronology(getChronology(timeZoneKey)).withOffsetParsed().parseDateTime(timestampWithTimeZone); return packDateTimeWithZone(dat...
[ "public", "static", "long", "parseTimestampWithTimeZone", "(", "TimeZoneKey", "timeZoneKey", ",", "String", "timestampWithTimeZone", ")", "{", "DateTime", "dateTime", "=", "TIMESTAMP_WITH_OR_WITHOUT_TIME_ZONE_FORMATTER", ".", "withChronology", "(", "getChronology", "(", "ti...
Parse a string (optionally containing a zone) as a value of TIMESTAMP WITH TIME ZONE type. If the string doesn't specify a zone, it is interpreted in {@code timeZoneKey} zone. <p> For example: {@code "2000-01-01 01:23:00"} is parsed to TIMESTAMP WITH TIME ZONE {@code 2000-01-01T01:23:00 <provided zone>} and {@code "200...
[ "Parse", "a", "string", "(", "optionally", "containing", "a", "zone", ")", "as", "a", "value", "of", "TIMESTAMP", "WITH", "TIME", "ZONE", "type", ".", "If", "the", "string", "doesn", "t", "specify", "a", "zone", "it", "is", "interpreted", "in", "{", "@...
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/util/DateTimeUtils.java#L194-L198
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.getObject
@NotNull public <T> T getObject(@NotNull final String hash, @NotNull final StreamHandler<T> handler) throws IOException { """ Download object by hash. @param hash Object hash. @param handler Stream handler. @return Stream handler result. @throws FileNotFoundException File not found exception if object d...
java
@NotNull public <T> T getObject(@NotNull final String hash, @NotNull final StreamHandler<T> handler) throws IOException { return doWork(auth -> { final ObjectRes links = doRequest(auth, new MetaGet(), AuthHelper.join(auth.getHref(), PATH_OBJECTS + "/" + hash)); if (links == null) { throw new F...
[ "@", "NotNull", "public", "<", "T", ">", "T", "getObject", "(", "@", "NotNull", "final", "String", "hash", ",", "@", "NotNull", "final", "StreamHandler", "<", "T", ">", "handler", ")", "throws", "IOException", "{", "return", "doWork", "(", "auth", "->", ...
Download object by hash. @param hash Object hash. @param handler Stream handler. @return Stream handler result. @throws FileNotFoundException File not found exception if object don't exists on LFS server. @throws IOException On some errors.
[ "Download", "object", "by", "hash", "." ]
train
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L130-L139
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.removeMultiValueForKey
@SuppressWarnings( { """ Remove a unique value from a multi-value user profile property <p/> If the key currently contains a scalar value, prior to performing the remove operation the key will be promoted to a multi-value property with the current value cast to a string. If the multi-value property is empty af...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public void removeMultiValueForKey(String key, String value) { //noinspection ConstantConditions if (value == null || value.isEmpty()) { _generateEmptyMultiValueError(key); return; } removeMultiValuesForKey(key, ...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"WeakerAccess\"", "}", ")", "public", "void", "removeMultiValueForKey", "(", "String", "key", ",", "String", "value", ")", "{", "//noinspection ConstantConditions", "if", "(", "value", "==", "null", "||", "...
Remove a unique value from a multi-value user profile property <p/> If the key currently contains a scalar value, prior to performing the remove operation the key will be promoted to a multi-value property with the current value cast to a string. If the multi-value property is empty after the remove operation, the key ...
[ "Remove", "a", "unique", "value", "from", "a", "multi", "-", "value", "user", "profile", "property", "<p", "/", ">", "If", "the", "key", "currently", "contains", "a", "scalar", "value", "prior", "to", "performing", "the", "remove", "operation", "the", "key...
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L3440-L3450
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java
PublicIPAddressesInner.beginDelete
public void beginDelete(String resourceGroupName, String publicIpAddressName) { """ Deletes the specified public IP address. @param resourceGroupName The name of the resource group. @param publicIpAddressName The name of the subnet. @throws IllegalArgumentException thrown if parameters fail the validation @t...
java
public void beginDelete(String resourceGroupName, String publicIpAddressName) { beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); }
[ "public", "void", "beginDelete", "(", "String", "resourceGroupName", ",", "String", "publicIpAddressName", ")", "{", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "publicIpAddressName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")",...
Deletes the specified public IP address. @param resourceGroupName The name of the resource group. @param publicIpAddressName The name of the subnet. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all ...
[ "Deletes", "the", "specified", "public", "IP", "address", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java#L211-L213
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java
ConverterManagerImpl.addConverter
public void addConverter(Class<?> fromClass, String syntax, Class<?> toClass, Converter converter) { """ Add a {@link Converter} to this <code>ConverterManager</code>. @param fromClass The class the <code>Converter</code> should be used to convert from. @param syntax The LDAP syntax that the <code>Converter</c...
java
public void addConverter(Class<?> fromClass, String syntax, Class<?> toClass, Converter converter) { converters.put(makeConverterKey(fromClass, syntax, toClass), converter); }
[ "public", "void", "addConverter", "(", "Class", "<", "?", ">", "fromClass", ",", "String", "syntax", ",", "Class", "<", "?", ">", "toClass", ",", "Converter", "converter", ")", "{", "converters", ".", "put", "(", "makeConverterKey", "(", "fromClass", ",", ...
Add a {@link Converter} to this <code>ConverterManager</code>. @param fromClass The class the <code>Converter</code> should be used to convert from. @param syntax The LDAP syntax that the <code>Converter</code> should be used for. @param toClass The class the <code>Converter</code> should be used to convert to. @param...
[ "Add", "a", "{", "@link", "Converter", "}", "to", "this", "<code", ">", "ConverterManager<", "/", "code", ">", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerImpl.java#L174-L176
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/event/task/EventNotificationManager.java
EventNotificationManager.subscribeToEvent
public void subscribeToEvent(final EventListener eventListener, final Class<? extends AbstractTaskEvent> eventType) { """ Subscribes the given event listener object to the specified event type. @param eventListener the {@link EventListener} object to create the subscription for @param eventType the event typ...
java
public void subscribeToEvent(final EventListener eventListener, final Class<? extends AbstractTaskEvent> eventType) { synchronized (this.subscriptions) { List<EventListener> subscribers = this.subscriptions.get(eventType); if (subscribers == null) { subscribers = new ArrayList<EventListener>(); this.s...
[ "public", "void", "subscribeToEvent", "(", "final", "EventListener", "eventListener", ",", "final", "Class", "<", "?", "extends", "AbstractTaskEvent", ">", "eventType", ")", "{", "synchronized", "(", "this", ".", "subscriptions", ")", "{", "List", "<", "EventLis...
Subscribes the given event listener object to the specified event type. @param eventListener the {@link EventListener} object to create the subscription for @param eventType the event type the given listener object wants to be notified about
[ "Subscribes", "the", "given", "event", "listener", "object", "to", "the", "specified", "event", "type", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/event/task/EventNotificationManager.java#L43-L55
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/SepaUtil.java
SepaUtil.sumBtgValue
public static BigDecimal sumBtgValue(HashMap<String, String> sepaParams, Integer max) { """ Liefert die Summe der Beträge aller Transaktionen. Bei einer Einzeltransaktion wird der Betrag zurückgeliefert. Mehrfachtransaktionen müssen die gleiche Währung verwenden, da eine Summenbildung sonst nicht möglich ist. ...
java
public static BigDecimal sumBtgValue(HashMap<String, String> sepaParams, Integer max) { if (max == null) return new BigDecimal(sepaParams.get("btg.value")); BigDecimal sum = BigDecimal.ZERO; String curr = null; for (int index = 0; index <= max; index++) { sum = ...
[ "public", "static", "BigDecimal", "sumBtgValue", "(", "HashMap", "<", "String", ",", "String", ">", "sepaParams", ",", "Integer", "max", ")", "{", "if", "(", "max", "==", "null", ")", "return", "new", "BigDecimal", "(", "sepaParams", ".", "get", "(", "\"...
Liefert die Summe der Beträge aller Transaktionen. Bei einer Einzeltransaktion wird der Betrag zurückgeliefert. Mehrfachtransaktionen müssen die gleiche Währung verwenden, da eine Summenbildung sonst nicht möglich ist. @param sepaParams die Properties, mit denen gearbeitet werden soll @param max Maximaler Index...
[ "Liefert", "die", "Summe", "der", "Beträge", "aller", "Transaktionen", ".", "Bei", "einer", "Einzeltransaktion", "wird", "der", "Betrag", "zurückgeliefert", ".", "Mehrfachtransaktionen", "müssen", "die", "gleiche", "Währung", "verwenden", "da", "eine", "Summenbildung"...
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/SepaUtil.java#L122-L143
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/util/ShareSheetStyle.java
ShareSheetStyle.setCopyUrlStyle
public ShareSheetStyle setCopyUrlStyle(Drawable icon, String label, String message) { """ <p> Set the icon, label and success message for copy url option. Default label is "Copy link".</p> @param icon Drawable to set as the icon for copy url option. Default icon is system menu_save icon @param label A {@...
java
public ShareSheetStyle setCopyUrlStyle(Drawable icon, String label, String message) { copyUrlIcon_ = icon; copyURlText_ = label; urlCopiedMessage_ = message; return this; }
[ "public", "ShareSheetStyle", "setCopyUrlStyle", "(", "Drawable", "icon", ",", "String", "label", ",", "String", "message", ")", "{", "copyUrlIcon_", "=", "icon", ";", "copyURlText_", "=", "label", ";", "urlCopiedMessage_", "=", "message", ";", "return", "this", ...
<p> Set the icon, label and success message for copy url option. Default label is "Copy link".</p> @param icon Drawable to set as the icon for copy url option. Default icon is system menu_save icon @param label A {@link String} with value for the copy url option label. Default label is "Copy link" @param message...
[ "<p", ">", "Set", "the", "icon", "label", "and", "success", "message", "for", "copy", "url", "option", ".", "Default", "label", "is", "Copy", "link", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/util/ShareSheetStyle.java#L120-L125
infinispan/infinispan
server/hotrod/src/main/java/org/infinispan/server/hotrod/TransactionRequestProcessor.java
TransactionRequestProcessor.isValid
private boolean isValid(TransactionWrite write, AdvancedCache<byte[], byte[]> readCache) { """ Validates if the value read is still valid and the write operation can proceed. """ if (write.skipRead()) { if (isTrace) { log.tracef("Operation %s wasn't read.", write); } ...
java
private boolean isValid(TransactionWrite write, AdvancedCache<byte[], byte[]> readCache) { if (write.skipRead()) { if (isTrace) { log.tracef("Operation %s wasn't read.", write); } return true; } CacheEntry<byte[], byte[]> entry = readCache.getCacheEntry(write.key...
[ "private", "boolean", "isValid", "(", "TransactionWrite", "write", ",", "AdvancedCache", "<", "byte", "[", "]", ",", "byte", "[", "]", ">", "readCache", ")", "{", "if", "(", "write", ".", "skipRead", "(", ")", ")", "{", "if", "(", "isTrace", ")", "{"...
Validates if the value read is still valid and the write operation can proceed.
[ "Validates", "if", "the", "value", "read", "is", "still", "valid", "and", "the", "write", "operation", "can", "proceed", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/TransactionRequestProcessor.java#L248-L266
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineImagesInner.java
VirtualMachineImagesInner.getAsync
public Observable<VirtualMachineImageInner> getAsync(String location, String publisherName, String offer, String skus, String version) { """ Gets a virtual machine image. @param location The name of a supported Azure region. @param publisherName A valid image publisher. @param offer A valid image publisher of...
java
public Observable<VirtualMachineImageInner> getAsync(String location, String publisherName, String offer, String skus, String version) { return getWithServiceResponseAsync(location, publisherName, offer, skus, version).map(new Func1<ServiceResponse<VirtualMachineImageInner>, VirtualMachineImageInner>() { ...
[ "public", "Observable", "<", "VirtualMachineImageInner", ">", "getAsync", "(", "String", "location", ",", "String", "publisherName", ",", "String", "offer", ",", "String", "skus", ",", "String", "version", ")", "{", "return", "getWithServiceResponseAsync", "(", "l...
Gets a virtual machine image. @param location The name of a supported Azure region. @param publisherName A valid image publisher. @param offer A valid image publisher offer. @param skus A valid image SKU. @param version A valid image SKU version. @throws IllegalArgumentException thrown if parameters fail the validatio...
[ "Gets", "a", "virtual", "machine", "image", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineImagesInner.java#L121-L128
googleads/googleads-java-lib
modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/GmailAd.java
GmailAd.getProductVideoList
public com.google.api.ads.adwords.axis.v201809.cm.Video[] getProductVideoList() { """ Gets the productVideoList value for this GmailAd. @return productVideoList * Product Videos. Either productVideoList or marketingImage must be specified. Supports up to 7 product videos. It must be a YouTube hosted video ...
java
public com.google.api.ads.adwords.axis.v201809.cm.Video[] getProductVideoList() { return productVideoList; }
[ "public", "com", ".", "google", ".", "api", ".", "ads", ".", "adwords", ".", "axis", ".", "v201809", ".", "cm", ".", "Video", "[", "]", "getProductVideoList", "(", ")", "{", "return", "productVideoList", ";", "}" ]
Gets the productVideoList value for this GmailAd. @return productVideoList * Product Videos. Either productVideoList or marketingImage must be specified. Supports up to 7 product videos. It must be a YouTube hosted video and mediaId must be populated. The YouTube hosted video can be added to AdWords through either t...
[ "Gets", "the", "productVideoList", "value", "for", "this", "GmailAd", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201809/cm/GmailAd.java#L426-L428
GCRC/nunaliit
nunaliit2-dbSec/src/main/java/ca/carleton/gcrc/dbSec/DbSecurity.java
DbSecurity.getTableSchemaFromName
public TableSchema getTableSchemaFromName(String tableName, DbUser user) throws Exception { """ Computes from the database the access to a table for a given user. In this call, a user is represented by the set of groups it belongs to. @param tableName Name of the table to be queried @param user User requesting ...
java
public TableSchema getTableSchemaFromName(String tableName, DbUser user) throws Exception { List<String> tableNames = new Vector<String>(); tableNames.add(tableName); Map<String,TableSchemaImpl> nameToTableMap = getTableDataFromGroups(user,tableNames); if( false == nameToTableMap.containsKey(tableName) ) ...
[ "public", "TableSchema", "getTableSchemaFromName", "(", "String", "tableName", ",", "DbUser", "user", ")", "throws", "Exception", "{", "List", "<", "String", ">", "tableNames", "=", "new", "Vector", "<", "String", ">", "(", ")", ";", "tableNames", ".", "add"...
Computes from the database the access to a table for a given user. In this call, a user is represented by the set of groups it belongs to. @param tableName Name of the table to be queried @param user User requesting access to the schema @return An object that represents available access to a table. Null if the table no...
[ "Computes", "from", "the", "database", "the", "access", "to", "a", "table", "for", "a", "given", "user", ".", "In", "this", "call", "a", "user", "is", "represented", "by", "the", "set", "of", "groups", "it", "belongs", "to", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-dbSec/src/main/java/ca/carleton/gcrc/dbSec/DbSecurity.java#L87-L98
playn/playn
scene/src/playn/scene/SceneGame.java
SceneGame.setClearColor
public void setClearColor (float red, float green, float blue, float alpha) { """ Configures the color to which the frame buffer is cleared prior to painting the scene graph. """ cred = red; cgreen = green; cblue = blue; calpha = alpha; }
java
public void setClearColor (float red, float green, float blue, float alpha) { cred = red; cgreen = green; cblue = blue; calpha = alpha; }
[ "public", "void", "setClearColor", "(", "float", "red", ",", "float", "green", ",", "float", "blue", ",", "float", "alpha", ")", "{", "cred", "=", "red", ";", "cgreen", "=", "green", ";", "cblue", "=", "blue", ";", "calpha", "=", "alpha", ";", "}" ]
Configures the color to which the frame buffer is cleared prior to painting the scene graph.
[ "Configures", "the", "color", "to", "which", "the", "frame", "buffer", "is", "cleared", "prior", "to", "painting", "the", "scene", "graph", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/SceneGame.java#L50-L52
JodaOrg/joda-money
src/main/java/org/joda/money/BigMoney.java
BigMoney.minusRetainScale
public BigMoney minusRetainScale(BigDecimal amountToSubtract, RoundingMode roundingMode) { """ Returns a copy of this monetary value with the amount subtracted retaining the scale by rounding the result. <p> The scale of the result will be the same as the scale of this instance. For example,'USD 25.95' minus '...
java
public BigMoney minusRetainScale(BigDecimal amountToSubtract, RoundingMode roundingMode) { MoneyUtils.checkNotNull(amountToSubtract, "Amount must not be null"); if (amountToSubtract.compareTo(BigDecimal.ZERO) == 0) { return this; } BigDecimal newAmount = amount.subtract(...
[ "public", "BigMoney", "minusRetainScale", "(", "BigDecimal", "amountToSubtract", ",", "RoundingMode", "roundingMode", ")", "{", "MoneyUtils", ".", "checkNotNull", "(", "amountToSubtract", ",", "\"Amount must not be null\"", ")", ";", "if", "(", "amountToSubtract", ".", ...
Returns a copy of this monetary value with the amount subtracted retaining the scale by rounding the result. <p> The scale of the result will be the same as the scale of this instance. For example,'USD 25.95' minus '3.029' gives 'USD 22.92' with most rounding modes. <p> This instance is immutable and unaffected by this...
[ "Returns", "a", "copy", "of", "this", "monetary", "value", "with", "the", "amount", "subtracted", "retaining", "the", "scale", "by", "rounding", "the", "result", ".", "<p", ">", "The", "scale", "of", "the", "result", "will", "be", "the", "same", "as", "t...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/BigMoney.java#L1197-L1205
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.isBetweenInclusive
public static BigDecimal isBetweenInclusive (final BigDecimal aValue, final String sName, @Nonnull final BigDecimal aLowerBoundInclusive, @Nonnull final BigDecimal aUpperBoundIncl...
java
public static BigDecimal isBetweenInclusive (final BigDecimal aValue, final String sName, @Nonnull final BigDecimal aLowerBoundInclusive, @Nonnull final BigDecimal aUpperBoundIncl...
[ "public", "static", "BigDecimal", "isBetweenInclusive", "(", "final", "BigDecimal", "aValue", ",", "final", "String", "sName", ",", "@", "Nonnull", "final", "BigDecimal", "aLowerBoundInclusive", ",", "@", "Nonnull", "final", "BigDecimal", "aUpperBoundInclusive", ")", ...
Check if <code>nValue &ge; nLowerBoundInclusive &amp;&amp; nValue &le; nUpperBoundInclusive</code> @param aValue Value @param sName Name @param aLowerBoundInclusive Lower bound @param aUpperBoundInclusive Upper bound @return The value
[ "Check", "if", "<code", ">", "nValue", "&ge", ";", "nLowerBoundInclusive", "&amp", ";", "&amp", ";", "nValue", "&le", ";", "nUpperBoundInclusive<", "/", "code", ">" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L2557-L2565
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java
ContentUriChecker.extractPlaceHoldersFromURI
private <L extends Collection<ContentUriPlaceHolder>> L extractPlaceHoldersFromURI(String uri, final L result) { """ Extract place holders from URI. @param <L> the generic type @param uri the uri @param result the result @return the l """ final One<Boolean> valid = new One<>(); valid.value0 = false; ...
java
private <L extends Collection<ContentUriPlaceHolder>> L extractPlaceHoldersFromURI(String uri, final L result) { final One<Boolean> valid = new One<>(); valid.value0 = false; analyzeInternal(uri, new UriBaseListener() { @Override public void enterBind_parameter(Bind_parameterContext ctx) { result.add(...
[ "private", "<", "L", "extends", "Collection", "<", "ContentUriPlaceHolder", ">", ">", "L", "extractPlaceHoldersFromURI", "(", "String", "uri", ",", "final", "L", "result", ")", "{", "final", "One", "<", "Boolean", ">", "valid", "=", "new", "One", "<>", "("...
Extract place holders from URI. @param <L> the generic type @param uri the uri @param result the result @return the l
[ "Extract", "place", "holders", "from", "URI", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/uri/ContentUriChecker.java#L189-L207
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java
ASMUtil.getAttributeLiteral
public static Literal getAttributeLiteral(Tag tag, String attrName) throws EvaluatorException { """ extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException """ Attribute attr = tag.getAttribute(attrName); if (attr != null && attr.getValue() in...
java
public static Literal getAttributeLiteral(Tag tag, String attrName) throws EvaluatorException { Attribute attr = tag.getAttribute(attrName); if (attr != null && attr.getValue() instanceof Literal) return ((Literal) attr.getValue()); throw new EvaluatorException("attribute [" + attrName + "] must be a constant value"...
[ "public", "static", "Literal", "getAttributeLiteral", "(", "Tag", "tag", ",", "String", "attrName", ")", "throws", "EvaluatorException", "{", "Attribute", "attr", "=", "tag", ".", "getAttribute", "(", "attrName", ")", ";", "if", "(", "attr", "!=", "null", "&...
extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException
[ "extract", "the", "content", "of", "a", "attribut" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java#L371-L375
alkacon/opencms-core
src/org/opencms/main/CmsShellCommands.java
CmsShellCommands.setIndexRebuildMode
public void setIndexRebuildMode(String searchIndex, String mode) { """ Sets the rebuild mode for the requested index. Allowing to disable indexing during module import.<p> This setting will not be written to the XML configuration file and will only take effect within the current shell instance.<p> @param searc...
java
public void setIndexRebuildMode(String searchIndex, String mode) { I_CmsSearchIndex index = OpenCms.getSearchManager().getIndex(searchIndex); if (index != null) { index.setRebuildMode(mode); // required for this setting to take effect OpenCms.getSearchManager().initO...
[ "public", "void", "setIndexRebuildMode", "(", "String", "searchIndex", ",", "String", "mode", ")", "{", "I_CmsSearchIndex", "index", "=", "OpenCms", ".", "getSearchManager", "(", ")", ".", "getIndex", "(", "searchIndex", ")", ";", "if", "(", "index", "!=", "...
Sets the rebuild mode for the requested index. Allowing to disable indexing during module import.<p> This setting will not be written to the XML configuration file and will only take effect within the current shell instance.<p> @param searchIndex the search index @param mode the rebuild mode to set
[ "Sets", "the", "rebuild", "mode", "for", "the", "requested", "index", ".", "Allowing", "to", "disable", "indexing", "during", "module", "import", ".", "<p", ">", "This", "setting", "will", "not", "be", "written", "to", "the", "XML", "configuration", "file", ...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsShellCommands.java#L1505-L1513
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java
Functions.randomNumber
public static String randomNumber(Long length, boolean padding, TestContext context) { """ Runs random number function with arguments. @param length @param padding @return """ return new RandomNumberFunction().execute(Arrays.asList(String.valueOf(length), String.valueOf(padding)), context); }
java
public static String randomNumber(Long length, boolean padding, TestContext context) { return new RandomNumberFunction().execute(Arrays.asList(String.valueOf(length), String.valueOf(padding)), context); }
[ "public", "static", "String", "randomNumber", "(", "Long", "length", ",", "boolean", "padding", ",", "TestContext", "context", ")", "{", "return", "new", "RandomNumberFunction", "(", ")", ".", "execute", "(", "Arrays", ".", "asList", "(", "String", ".", "val...
Runs random number function with arguments. @param length @param padding @return
[ "Runs", "random", "number", "function", "with", "arguments", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java#L178-L180
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotateZYX
public Matrix4f rotateZYX(Vector3f angles) { """ Apply rotation of <code>angles.z</code> radians about the Z axis, followed by a rotation of <code>angles.y</code> radians about the Y axis and followed by a rotation of <code>angles.x</code> radians about the X axis. <p> When used with a right-handed coordinate s...
java
public Matrix4f rotateZYX(Vector3f angles) { return rotateZYX(angles.z, angles.y, angles.x); }
[ "public", "Matrix4f", "rotateZYX", "(", "Vector3f", "angles", ")", "{", "return", "rotateZYX", "(", "angles", ".", "z", ",", "angles", ".", "y", ",", "angles", ".", "x", ")", ";", "}" ]
Apply rotation of <code>angles.z</code> radians about the Z axis, followed by a rotation of <code>angles.y</code> radians about the Y axis and followed by a rotation of <code>angles.x</code> radians about the X axis. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter...
[ "Apply", "rotation", "of", "<code", ">", "angles", ".", "z<", "/", "code", ">", "radians", "about", "the", "Z", "axis", "followed", "by", "a", "rotation", "of", "<code", ">", "angles", ".", "y<", "/", "code", ">", "radians", "about", "the", "Y", "axi...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L5469-L5471
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.saveFile
public static void saveFile(String path, String content, boolean append) throws IOException { """ 保存文件 @param path 文件路径 @param content 内容 @param append 保存方式 @throws IOException 异常 """ saveFile(new File(path), content, append); }
java
public static void saveFile(String path, String content, boolean append) throws IOException { saveFile(new File(path), content, append); }
[ "public", "static", "void", "saveFile", "(", "String", "path", ",", "String", "content", ",", "boolean", "append", ")", "throws", "IOException", "{", "saveFile", "(", "new", "File", "(", "path", ")", ",", "content", ",", "append", ")", ";", "}" ]
保存文件 @param path 文件路径 @param content 内容 @param append 保存方式 @throws IOException 异常
[ "保存文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L883-L885
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
ClassUseWriter.addPackageList
protected void addPackageList(Content contentTree) throws IOException { """ Add the packages list that use the given class. @param contentTree the content tree to which the packages list will be added """ Content caption = getTableCaption(configuration.getResource( "doclet.ClassUse_P...
java
protected void addPackageList(Content contentTree) throws IOException { Content caption = getTableCaption(configuration.getResource( "doclet.ClassUse_Packages.that.use.0", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)))); Content ta...
[ "protected", "void", "addPackageList", "(", "Content", "contentTree", ")", "throws", "IOException", "{", "Content", "caption", "=", "getTableCaption", "(", "configuration", ".", "getResource", "(", "\"doclet.ClassUse_Packages.that.use.0\"", ",", "getLink", "(", "new", ...
Add the packages list that use the given class. @param contentTree the content tree to which the packages list will be added
[ "Add", "the", "packages", "list", "that", "use", "the", "given", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java#L278-L302
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageFileSystem.java
GoogleCloudStorageFileSystem.validatePathAndGetId
@Deprecated public static StorageResourceId validatePathAndGetId(URI uri, boolean allowEmptyObjectNames) { """ Validate a URI using the legacy path codec and return a StorageResourceId. @deprecated This method is deprecated as each instance of GCS FS can be configured with a codec. """ return LEGACY_...
java
@Deprecated public static StorageResourceId validatePathAndGetId(URI uri, boolean allowEmptyObjectNames) { return LEGACY_PATH_CODEC.validatePathAndGetId(uri, allowEmptyObjectNames); }
[ "@", "Deprecated", "public", "static", "StorageResourceId", "validatePathAndGetId", "(", "URI", "uri", ",", "boolean", "allowEmptyObjectNames", ")", "{", "return", "LEGACY_PATH_CODEC", ".", "validatePathAndGetId", "(", "uri", ",", "allowEmptyObjectNames", ")", ";", "}...
Validate a URI using the legacy path codec and return a StorageResourceId. @deprecated This method is deprecated as each instance of GCS FS can be configured with a codec.
[ "Validate", "a", "URI", "using", "the", "legacy", "path", "codec", "and", "return", "a", "StorageResourceId", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageFileSystem.java#L1536-L1539
OpenLiberty/open-liberty
dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/TransactionImpl.java
TransactionImpl.enlistResource
public boolean enlistResource(XAResource xaRes, int recoveryIndex) throws RollbackException, IllegalStateException, SystemException { """ Enlist the resouce with the transaction associated with the target TransactionImpl object. This is the implementation version of the method and does take in the XA resource...
java
public boolean enlistResource(XAResource xaRes, int recoveryIndex) throws RollbackException, IllegalStateException, SystemException { return enlistResource(xaRes, recoveryIndex, XAResource.TMNOFLAGS); }
[ "public", "boolean", "enlistResource", "(", "XAResource", "xaRes", ",", "int", "recoveryIndex", ")", "throws", "RollbackException", ",", "IllegalStateException", ",", "SystemException", "{", "return", "enlistResource", "(", "xaRes", ",", "recoveryIndex", ",", "XAResou...
Enlist the resouce with the transaction associated with the target TransactionImpl object. This is the implementation version of the method and does take in the XA resource class name and info objects required during recovery. If these fields are provided (ie are not passed in as nulls) the resource will be logged and...
[ "Enlist", "the", "resouce", "with", "the", "transaction", "associated", "with", "the", "target", "TransactionImpl", "object", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/TransactionImpl.java#L2033-L2035
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0.cdi/src/com/ibm/ws/cdi/jms/JMSContextInjectionBean.java
JMSContextInjectionBean.getJMSContext
@Produces public JMSContext getJMSContext(InjectionPoint injectionPoint) throws NamingException { """ /* This method is called while JMSContext is injected in the container. For every new @Inject Annotation a new instance of JMSContext is returned. In case of active transaction when the injected JMSContext ...
java
@Produces public JMSContext getJMSContext(InjectionPoint injectionPoint) throws NamingException { //Default connection factory string, if no @JMSConnectionFactory annotation //is provided, then this value is used for lookup String connectionFactoryString = "java:comp/DefaultJMSConnectionF...
[ "@", "Produces", "public", "JMSContext", "getJMSContext", "(", "InjectionPoint", "injectionPoint", ")", "throws", "NamingException", "{", "//Default connection factory string, if no @JMSConnectionFactory annotation ", "//is provided, then this value is used for lookup", "String", "con...
/* This method is called while JMSContext is injected in the container. For every new @Inject Annotation a new instance of JMSContext is returned. In case of active transaction when the injected JMSContext is being used, a new instance is created and added to the transaction registry so that next request with the same ...
[ "/", "*", "This", "method", "is", "called", "while", "JMSContext", "is", "injected", "in", "the", "container", ".", "For", "every", "new" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0.cdi/src/com/ibm/ws/cdi/jms/JMSContextInjectionBean.java#L35-L74
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/AmazonDynamoDBClient.java
AmazonDynamoDBClient.batchWriteItem
public BatchWriteItemResult batchWriteItem(BatchWriteItemRequest batchWriteItemRequest) throws AmazonServiceException, AmazonClientException { """ <p> Allows to execute a batch of Put and/or Delete Requests for many tables in a single call. A total of 25 requests are allowed. </p> <p> There are no...
java
public BatchWriteItemResult batchWriteItem(BatchWriteItemRequest batchWriteItemRequest) throws AmazonServiceException, AmazonClientException { ExecutionContext executionContext = createExecutionContext(batchWriteItemRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsReque...
[ "public", "BatchWriteItemResult", "batchWriteItem", "(", "BatchWriteItemRequest", "batchWriteItemRequest", ")", "throws", "AmazonServiceException", ",", "AmazonClientException", "{", "ExecutionContext", "executionContext", "=", "createExecutionContext", "(", "batchWriteItemRequest"...
<p> Allows to execute a batch of Put and/or Delete Requests for many tables in a single call. A total of 25 requests are allowed. </p> <p> There are no transaction guarantees provided by this API. It does not allow conditional puts nor does it support return values. </p> @param batchWriteItemRequest Container for the ...
[ "<p", ">", "Allows", "to", "execute", "a", "batch", "of", "Put", "and", "/", "or", "Delete", "Requests", "for", "many", "tables", "in", "a", "single", "call", ".", "A", "total", "of", "25", "requests", "are", "allowed", ".", "<", "/", "p", ">", "<p...
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/AmazonDynamoDBClient.java#L457-L469
apache/flink
flink-core/src/main/java/org/apache/flink/util/NetUtils.java
NetUtils.createSocketFromPorts
public static ServerSocket createSocketFromPorts(Iterator<Integer> portsIterator, SocketFactory factory) { """ Tries to allocate a socket from the given sets of ports. @param portsIterator A set of ports to choose from. @param factory A factory for creating the SocketServer @return null if no port was availab...
java
public static ServerSocket createSocketFromPorts(Iterator<Integer> portsIterator, SocketFactory factory) { while (portsIterator.hasNext()) { int port = portsIterator.next(); LOG.debug("Trying to open socket on port {}", port); try { return factory.createSocket(port); } catch (IOException | IllegalArgu...
[ "public", "static", "ServerSocket", "createSocketFromPorts", "(", "Iterator", "<", "Integer", ">", "portsIterator", ",", "SocketFactory", "factory", ")", "{", "while", "(", "portsIterator", ".", "hasNext", "(", ")", ")", "{", "int", "port", "=", "portsIterator",...
Tries to allocate a socket from the given sets of ports. @param portsIterator A set of ports to choose from. @param factory A factory for creating the SocketServer @return null if no port was available or an allocated socket.
[ "Tries", "to", "allocate", "a", "socket", "from", "the", "given", "sets", "of", "ports", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/NetUtils.java#L374-L389
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_OffSetCurve.java
ST_OffSetCurve.geometryOffSetCurve
public static void geometryOffSetCurve(ArrayList<LineString> list, Geometry geometry, double offset, BufferParameters bufferParameters) { """ Compute the offset curve for a polygon, a point or a collection of geometries @param list @param geometry @param offset @param bufferParameters """ final Lis...
java
public static void geometryOffSetCurve(ArrayList<LineString> list, Geometry geometry, double offset, BufferParameters bufferParameters) { final List curves = new OffsetCurveSetBuilder(geometry, offset, new OffsetCurveBuilder(geometry.getFactory().getPrecisionModel(), bufferParameters)).getCurves(); fina...
[ "public", "static", "void", "geometryOffSetCurve", "(", "ArrayList", "<", "LineString", ">", "list", ",", "Geometry", "geometry", ",", "double", "offset", ",", "BufferParameters", "bufferParameters", ")", "{", "final", "List", "curves", "=", "new", "OffsetCurveSet...
Compute the offset curve for a polygon, a point or a collection of geometries @param list @param geometry @param offset @param bufferParameters
[ "Compute", "the", "offset", "curve", "for", "a", "polygon", "a", "point", "or", "a", "collection", "of", "geometries" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/buffer/ST_OffSetCurve.java#L160-L166
mapsforge/mapsforge
mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/util/JTSUtils.java
JTSUtils.toJtsGeometry
public static Geometry toJtsGeometry(TDWay way, List<TDWay> innerWays) { """ Converts a way with potential inner ways to a JTS geometry. @param way the way @param innerWays the inner ways or null @return the JTS geometry """ if (way == null) { LOGGER.warning("way is null"); ...
java
public static Geometry toJtsGeometry(TDWay way, List<TDWay> innerWays) { if (way == null) { LOGGER.warning("way is null"); return null; } if (way.isForcePolygonLine()) { // may build a single line string if inner ways are empty return buildMultiLi...
[ "public", "static", "Geometry", "toJtsGeometry", "(", "TDWay", "way", ",", "List", "<", "TDWay", ">", "innerWays", ")", "{", "if", "(", "way", "==", "null", ")", "{", "LOGGER", ".", "warning", "(", "\"way is null\"", ")", ";", "return", "null", ";", "}...
Converts a way with potential inner ways to a JTS geometry. @param way the way @param innerWays the inner ways or null @return the JTS geometry
[ "Converts", "a", "way", "with", "potential", "inner", "ways", "to", "a", "JTS", "geometry", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/util/JTSUtils.java#L74-L98
landawn/AbacusUtil
src/com/landawn/abacus/util/CSVUtil.java
CSVUtil.loadCSV
public static <E extends Exception> DataSet loadCSV(final Class<?> entityClass, final File csvFile, final Collection<String> selectColumnNames, final long offset, final long count, final Try.Predicate<String[], E> filter) throws UncheckedIOException, E { """ Load the data from CSV. @param entityCla...
java
public static <E extends Exception> DataSet loadCSV(final Class<?> entityClass, final File csvFile, final Collection<String> selectColumnNames, final long offset, final long count, final Try.Predicate<String[], E> filter) throws UncheckedIOException, E { InputStream csvInputStream = null; ...
[ "public", "static", "<", "E", "extends", "Exception", ">", "DataSet", "loadCSV", "(", "final", "Class", "<", "?", ">", "entityClass", ",", "final", "File", "csvFile", ",", "final", "Collection", "<", "String", ">", "selectColumnNames", ",", "final", "long", ...
Load the data from CSV. @param entityClass @param csvFile @param selectColumnNames @param offset @param count @param filter @return
[ "Load", "the", "data", "from", "CSV", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CSVUtil.java#L240-L253
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupDb.java
CmsSetupDb.executeSqlStatement
public CmsSetupDBWrapper executeSqlStatement(String query, Map<String, String> replacer, List<Object> params) throws SQLException { """ Creates and executes a database statement from a String returning the result set.<p> @param query the query to execute @param replacer the replacements to perform in the s...
java
public CmsSetupDBWrapper executeSqlStatement(String query, Map<String, String> replacer, List<Object> params) throws SQLException { CmsSetupDBWrapper dbwrapper = new CmsSetupDBWrapper(m_con); String queryToExecute = query; // Check if a map of replacements is given if (replacer !=...
[ "public", "CmsSetupDBWrapper", "executeSqlStatement", "(", "String", "query", ",", "Map", "<", "String", ",", "String", ">", "replacer", ",", "List", "<", "Object", ">", "params", ")", "throws", "SQLException", "{", "CmsSetupDBWrapper", "dbwrapper", "=", "new", ...
Creates and executes a database statement from a String returning the result set.<p> @param query the query to execute @param replacer the replacements to perform in the script @param params the list of parameters for the statement @return the result set of the query @throws SQLException if something goes wrong
[ "Creates", "and", "executes", "a", "database", "statement", "from", "a", "String", "returning", "the", "result", "set", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupDb.java#L344-L361
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dag/OptimizerNode.java
OptimizerNode.addBroadcastConnection
public void addBroadcastConnection(String name, PactConnection broadcastConnection) { """ Adds the broadcast connection identified by the given {@code name} to this node. @param broadcastConnection The connection to add. """ this.broadcastConnectionNames.add(name); this.broadcastConnections.add(broadca...
java
public void addBroadcastConnection(String name, PactConnection broadcastConnection) { this.broadcastConnectionNames.add(name); this.broadcastConnections.add(broadcastConnection); }
[ "public", "void", "addBroadcastConnection", "(", "String", "name", ",", "PactConnection", "broadcastConnection", ")", "{", "this", ".", "broadcastConnectionNames", ".", "add", "(", "name", ")", ";", "this", ".", "broadcastConnections", ".", "add", "(", "broadcastC...
Adds the broadcast connection identified by the given {@code name} to this node. @param broadcastConnection The connection to add.
[ "Adds", "the", "broadcast", "connection", "identified", "by", "the", "given", "{", "@code", "name", "}", "to", "this", "node", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/dag/OptimizerNode.java#L335-L338
janus-project/guava.janusproject.io
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/FluentIterable.java
FluentIterable.filter
@CheckReturnValue public final FluentIterable<E> filter(Predicate<? super E> predicate) { """ Returns the elements from this fluent iterable that satisfy a predicate. The resulting fluent iterable's iterator does not support {@code remove()}. """ return from(Iterables.filter(iterable, predicate)); }
java
@CheckReturnValue public final FluentIterable<E> filter(Predicate<? super E> predicate) { return from(Iterables.filter(iterable, predicate)); }
[ "@", "CheckReturnValue", "public", "final", "FluentIterable", "<", "E", ">", "filter", "(", "Predicate", "<", "?", "super", "E", ">", "predicate", ")", "{", "return", "from", "(", "Iterables", ".", "filter", "(", "iterable", ",", "predicate", ")", ")", "...
Returns the elements from this fluent iterable that satisfy a predicate. The resulting fluent iterable's iterator does not support {@code remove()}.
[ "Returns", "the", "elements", "from", "this", "fluent", "iterable", "that", "satisfy", "a", "predicate", ".", "The", "resulting", "fluent", "iterable", "s", "iterator", "does", "not", "support", "{" ]
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/FluentIterable.java#L196-L199