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
vtatai/srec
core/src/main/java/com/github/srec/command/method/MethodCommand.java
MethodCommand.asBoolean
protected Boolean asBoolean(String name, Map<String, Value> params) { """ Gets a parameter value as a Java Boolean. @param name The parameter name @param params The parameters @return The boolean """ return coerceToBoolean(params.get(name)); }
java
protected Boolean asBoolean(String name, Map<String, Value> params) { return coerceToBoolean(params.get(name)); }
[ "protected", "Boolean", "asBoolean", "(", "String", "name", ",", "Map", "<", "String", ",", "Value", ">", "params", ")", "{", "return", "coerceToBoolean", "(", "params", ".", "get", "(", "name", ")", ")", ";", "}" ]
Gets a parameter value as a Java Boolean. @param name The parameter name @param params The parameters @return The boolean
[ "Gets", "a", "parameter", "value", "as", "a", "Java", "Boolean", "." ]
train
https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/method/MethodCommand.java#L174-L176
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MilestonesApi.java
MilestonesApi.activateMilestone
public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { """ Activate a milestone. @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param milestoneId the milestone ID to activate @return the activated Milest...
java
public Milestone activateMilestone(Object projectIdOrPath, Integer milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); } GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.AC...
[ "public", "Milestone", "activateMilestone", "(", "Object", "projectIdOrPath", ",", "Integer", "milestoneId", ")", "throws", "GitLabApiException", "{", "if", "(", "milestoneId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"milestoneId cannot be n...
Activate a milestone. @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param milestoneId the milestone ID to activate @return the activated Milestone instance @throws GitLabApiException if any exception occurs
[ "Activate", "a", "milestone", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L449-L459
mockito/mockito
src/main/java/org/mockito/internal/matchers/apachecommons/EqualsBuilder.java
EqualsBuilder.reflectionEquals
public static boolean reflectionEquals(Object lhs, Object rhs) { """ <p>This method uses reflection to determine if the two <code>Object</code>s are equal.</p> <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private fields. This means that it will throw a security exception if run und...
java
public static boolean reflectionEquals(Object lhs, Object rhs) { return reflectionEquals(lhs, rhs, false, null, null); }
[ "public", "static", "boolean", "reflectionEquals", "(", "Object", "lhs", ",", "Object", "rhs", ")", "{", "return", "reflectionEquals", "(", "lhs", ",", "rhs", ",", "false", ",", "null", ",", "null", ")", ";", "}" ]
<p>This method uses reflection to determine if the two <code>Object</code>s are equal.</p> <p>It uses <code>AccessibleObject.setAccessible</code> to gain access to private fields. This means that it will throw a security exception if run under a security manager, if the permissions are not set up correctly. It is also...
[ "<p", ">", "This", "method", "uses", "reflection", "to", "determine", "if", "the", "two", "<code", ">", "Object<", "/", "code", ">", "s", "are", "equal", ".", "<", "/", "p", ">" ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/matchers/apachecommons/EqualsBuilder.java#L115-L117
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.findMethod
public static @CheckForNull JavaClassAndMethod findMethod(JavaClass javaClass, String methodName, String methodSig) { """ Find a method in given class. @param javaClass the class @param methodName the name of the method @param methodSig the signature of the method @return the JavaClassAndMethod, or nu...
java
public static @CheckForNull JavaClassAndMethod findMethod(JavaClass javaClass, String methodName, String methodSig) { return findMethod(javaClass, methodName, methodSig, ANY_METHOD); }
[ "public", "static", "@", "CheckForNull", "JavaClassAndMethod", "findMethod", "(", "JavaClass", "javaClass", ",", "String", "methodName", ",", "String", "methodSig", ")", "{", "return", "findMethod", "(", "javaClass", ",", "methodName", ",", "methodSig", ",", "ANY_...
Find a method in given class. @param javaClass the class @param methodName the name of the method @param methodSig the signature of the method @return the JavaClassAndMethod, or null if no such method exists in the class
[ "Find", "a", "method", "in", "given", "class", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L427-L430
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/model/plugins/Component.java
Component.addMetric
public <T> void addMetric(String name, MetricTimeslice<T> timeslice) { """ Adds a metric to the set of metrics. @param <T> The type parameter used for the timeslice @param name The name of the metric @param timeslice The values representing the metric timeslice """ metrics.put(name, timeslice); ...
java
public <T> void addMetric(String name, MetricTimeslice<T> timeslice) { metrics.put(name, timeslice); }
[ "public", "<", "T", ">", "void", "addMetric", "(", "String", "name", ",", "MetricTimeslice", "<", "T", ">", "timeslice", ")", "{", "metrics", ".", "put", "(", "name", ",", "timeslice", ")", ";", "}" ]
Adds a metric to the set of metrics. @param <T> The type parameter used for the timeslice @param name The name of the metric @param timeslice The values representing the metric timeslice
[ "Adds", "a", "metric", "to", "the", "set", "of", "metrics", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/model/plugins/Component.java#L154-L157
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/MetatypeUtils.java
MetatypeUtils.collapseWhitespace
@Trivial private static String collapseWhitespace(String value) { """ Collapses contiguous sequences of whitespace to a single 0x20. Leading and trailing whitespace is removed. """ final int length = value.length(); for (int i = 0; i < length; ++i) { if (isSpace(value.charAt(i)...
java
@Trivial private static String collapseWhitespace(String value) { final int length = value.length(); for (int i = 0; i < length; ++i) { if (isSpace(value.charAt(i))) { return collapse0(value, i, length); } } return value; }
[ "@", "Trivial", "private", "static", "String", "collapseWhitespace", "(", "String", "value", ")", "{", "final", "int", "length", "=", "value", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "++", "i", ...
Collapses contiguous sequences of whitespace to a single 0x20. Leading and trailing whitespace is removed.
[ "Collapses", "contiguous", "sequences", "of", "whitespace", "to", "a", "single", "0x20", ".", "Leading", "and", "trailing", "whitespace", "is", "removed", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/MetatypeUtils.java#L557-L566
tropo/tropo-webapi-java
src/main/java/com/voxeo/tropo/Key.java
Key.SAY_OF_ON
public static Key SAY_OF_ON(com.voxeo.tropo.actions.OnAction.Say... says) { """ <p> This determines what is played or sent to the caller. This can be a single object or an array of objects. </p> """ return createKey("say", says); }
java
public static Key SAY_OF_ON(com.voxeo.tropo.actions.OnAction.Say... says) { return createKey("say", says); }
[ "public", "static", "Key", "SAY_OF_ON", "(", "com", ".", "voxeo", ".", "tropo", ".", "actions", ".", "OnAction", ".", "Say", "...", "says", ")", "{", "return", "createKey", "(", "\"say\"", ",", "says", ")", ";", "}" ]
<p> This determines what is played or sent to the caller. This can be a single object or an array of objects. </p>
[ "<p", ">", "This", "determines", "what", "is", "played", "or", "sent", "to", "the", "caller", ".", "This", "can", "be", "a", "single", "object", "or", "an", "array", "of", "objects", ".", "<", "/", "p", ">" ]
train
https://github.com/tropo/tropo-webapi-java/blob/96af1fa292c1d4b6321d85a559d9718d33eec7e0/src/main/java/com/voxeo/tropo/Key.java#L783-L786
Impetus/Kundera
src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBDataHandler.java
KuduDBDataHandler.getColumnValue
public static Object getColumnValue(RowResult result, String jpaColumnName) { """ Gets the column value. @param result the result @param jpaColumnName the jpa column name @return the column value """ if (result.isNull(jpaColumnName)) { return null; } switch ...
java
public static Object getColumnValue(RowResult result, String jpaColumnName) { if (result.isNull(jpaColumnName)) { return null; } switch (result.getColumnType(jpaColumnName)) { case BINARY: return result.getBinary(jpaColumnName); case ...
[ "public", "static", "Object", "getColumnValue", "(", "RowResult", "result", ",", "String", "jpaColumnName", ")", "{", "if", "(", "result", ".", "isNull", "(", "jpaColumnName", ")", ")", "{", "return", "null", ";", "}", "switch", "(", "result", ".", "getCol...
Gets the column value. @param result the result @param jpaColumnName the jpa column name @return the column value
[ "Gets", "the", "column", "value", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBDataHandler.java#L183-L217
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/utils/BoUtils.java
BoUtils.fromBytes
public static <T extends BaseBo> T fromBytes(byte[] bytes, Class<T> clazz) { """ De-serialize a BO from byte array. @param bytes the byte array obtained from {@link #toBytes(BaseBo)} @param clazz @return """ return fromBytes(bytes, clazz, null); }
java
public static <T extends BaseBo> T fromBytes(byte[] bytes, Class<T> clazz) { return fromBytes(bytes, clazz, null); }
[ "public", "static", "<", "T", "extends", "BaseBo", ">", "T", "fromBytes", "(", "byte", "[", "]", "bytes", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "fromBytes", "(", "bytes", ",", "clazz", ",", "null", ")", ";", "}" ]
De-serialize a BO from byte array. @param bytes the byte array obtained from {@link #toBytes(BaseBo)} @param clazz @return
[ "De", "-", "serialize", "a", "BO", "from", "byte", "array", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/utils/BoUtils.java#L195-L197
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java
CoverageUtilities.getWritableRandomIterator
public static WritableRandomIter getWritableRandomIterator( int width, int height ) { """ Creates a {@link WritableRandomIter}. <p>It is important to use this method since it supports also large GRASS rasters. <p>If the size would throw an integer overflow, a {@link GrassLegacyRandomIter} will be proposed ...
java
public static WritableRandomIter getWritableRandomIterator( int width, int height ) { if (doesOverFlow(width, height)) { GrassLegacyRandomIter iter = new GrassLegacyRandomIter(new double[height][width]); return iter; } WritableRaster pitRaster = CoverageUtilities.createWr...
[ "public", "static", "WritableRandomIter", "getWritableRandomIterator", "(", "int", "width", ",", "int", "height", ")", "{", "if", "(", "doesOverFlow", "(", "width", ",", "height", ")", ")", "{", "GrassLegacyRandomIter", "iter", "=", "new", "GrassLegacyRandomIter",...
Creates a {@link WritableRandomIter}. <p>It is important to use this method since it supports also large GRASS rasters. <p>If the size would throw an integer overflow, a {@link GrassLegacyRandomIter} will be proposed to try to save the saveable. @param raster the coverage on which to wrap a {@link WritableRandomIter...
[ "Creates", "a", "{", "@link", "WritableRandomIter", "}", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/coverage/CoverageUtilities.java#L143-L151
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/TransactionImpl.java
TransactionImpl.lockAndRegister
public void lockAndRegister(RuntimeObject rtObject, int lockMode, List registeredObjects) { """ Lock and register the specified object, make sure that when cascading locking and register is enabled to specify a List to register the already processed object Identiy. """ lockAndRegister(rtObject, lockM...
java
public void lockAndRegister(RuntimeObject rtObject, int lockMode, List registeredObjects) { lockAndRegister(rtObject, lockMode, isImplicitLocking(), registeredObjects); }
[ "public", "void", "lockAndRegister", "(", "RuntimeObject", "rtObject", ",", "int", "lockMode", ",", "List", "registeredObjects", ")", "{", "lockAndRegister", "(", "rtObject", ",", "lockMode", ",", "isImplicitLocking", "(", ")", ",", "registeredObjects", ")", ";", ...
Lock and register the specified object, make sure that when cascading locking and register is enabled to specify a List to register the already processed object Identiy.
[ "Lock", "and", "register", "the", "specified", "object", "make", "sure", "that", "when", "cascading", "locking", "and", "register", "is", "enabled", "to", "specify", "a", "List", "to", "register", "the", "already", "processed", "object", "Identiy", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/TransactionImpl.java#L254-L257
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java
RingPlacer.completePartiallyPlacedRing
boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) { """ Completes the layout of a partially laid out ring. @param rset ring set @param ring the ring to complete @param bondLength the bond length """ if (ring.getFlag(CDKConstants.ISPLACED)) return true; ...
java
boolean completePartiallyPlacedRing(IRingSet rset, IRing ring, double bondLength) { if (ring.getFlag(CDKConstants.ISPLACED)) return true; IRing partiallyPlacedRing = molecule.getBuilder().newInstance(IRing.class); for (IAtom atom : ring.atoms()) if (atom.getPoint2d() != n...
[ "boolean", "completePartiallyPlacedRing", "(", "IRingSet", "rset", ",", "IRing", "ring", ",", "double", "bondLength", ")", "{", "if", "(", "ring", ".", "getFlag", "(", "CDKConstants", ".", "ISPLACED", ")", ")", "return", "true", ";", "IRing", "partiallyPlacedR...
Completes the layout of a partially laid out ring. @param rset ring set @param ring the ring to complete @param bondLength the bond length
[ "Completes", "the", "layout", "of", "a", "partially", "laid", "out", "ring", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/RingPlacer.java#L543-L562
google/closure-templates
java/src/com/google/template/soy/shared/internal/Sanitizers.java
Sanitizers.cleanHtml
public static SanitizedContent cleanHtml( String value, Collection<? extends OptionalSafeTag> optionalSafeTags) { """ Normalizes the input HTML while preserving "safe" tags. The content directionality is unknown. @param optionalSafeTags to add to the basic whitelist of formatting safe tags @return the no...
java
public static SanitizedContent cleanHtml( String value, Collection<? extends OptionalSafeTag> optionalSafeTags) { return cleanHtml(value, null, optionalSafeTags); }
[ "public", "static", "SanitizedContent", "cleanHtml", "(", "String", "value", ",", "Collection", "<", "?", "extends", "OptionalSafeTag", ">", "optionalSafeTags", ")", "{", "return", "cleanHtml", "(", "value", ",", "null", ",", "optionalSafeTags", ")", ";", "}" ]
Normalizes the input HTML while preserving "safe" tags. The content directionality is unknown. @param optionalSafeTags to add to the basic whitelist of formatting safe tags @return the normalized input, in the form of {@link SanitizedContent} of {@link ContentKind#HTML}
[ "Normalizes", "the", "input", "HTML", "while", "preserving", "safe", "tags", ".", "The", "content", "directionality", "is", "unknown", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/shared/internal/Sanitizers.java#L211-L214
apereo/cas
support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java
AbstractServiceValidateController.verifyRegisteredServiceProperties
private static void verifyRegisteredServiceProperties(final RegisteredService registeredService, final Service service) { """ Ensure that the service is found and enabled in the service registry. @param registeredService the located entry in the registry @param service authenticating service @throws...
java
private static void verifyRegisteredServiceProperties(final RegisteredService registeredService, final Service service) { if (registeredService == null) { val msg = String.format("Service [%s] is not found in service registry.", service.getId()); LOGGER.warn(msg); throw new U...
[ "private", "static", "void", "verifyRegisteredServiceProperties", "(", "final", "RegisteredService", "registeredService", ",", "final", "Service", "service", ")", "{", "if", "(", "registeredService", "==", "null", ")", "{", "val", "msg", "=", "String", ".", "forma...
Ensure that the service is found and enabled in the service registry. @param registeredService the located entry in the registry @param service authenticating service @throws UnauthorizedServiceException if service is determined to be unauthorized
[ "Ensure", "that", "the", "service", "is", "found", "and", "enabled", "in", "the", "service", "registry", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-validation/src/main/java/org/apereo/cas/web/AbstractServiceValidateController.java#L67-L78
titorenko/quick-csv-streamer
src/main/java/uk/elementarysoftware/quickcsv/api/CSVParserBuilder.java
CSVParserBuilder.usingSeparatorWithNoQuotes
public CSVParserBuilder<T, K> usingSeparatorWithNoQuotes(char separator) { """ Use specified character as field separator. @param separator - field separator character @return this parser builder """ this.metadata = new CSVFileMetadata(separator, Optional.empty()); return this; }
java
public CSVParserBuilder<T, K> usingSeparatorWithNoQuotes(char separator) { this.metadata = new CSVFileMetadata(separator, Optional.empty()); return this; }
[ "public", "CSVParserBuilder", "<", "T", ",", "K", ">", "usingSeparatorWithNoQuotes", "(", "char", "separator", ")", "{", "this", ".", "metadata", "=", "new", "CSVFileMetadata", "(", "separator", ",", "Optional", ".", "empty", "(", ")", ")", ";", "return", ...
Use specified character as field separator. @param separator - field separator character @return this parser builder
[ "Use", "specified", "character", "as", "field", "separator", "." ]
train
https://github.com/titorenko/quick-csv-streamer/blob/cc11f6e9db6df4f3aac57ca72c4176501667f41d/src/main/java/uk/elementarysoftware/quickcsv/api/CSVParserBuilder.java#L108-L111
lastaflute/lastaflute
src/main/java/org/lastaflute/web/response/HtmlResponse.java
HtmlResponse.useForm
public <FORM> HtmlResponse useForm(Class<FORM> formType, PushedFormOpCall<FORM> opLambda) { """ Set up the HTML response as using action form with internal initial value. <br> And you can use the action form in your HTML template. <pre> <span style="color: #3F7E5E">// case of internal initial value</span> &#06...
java
public <FORM> HtmlResponse useForm(Class<FORM> formType, PushedFormOpCall<FORM> opLambda) { assertArgumentNotNull("formType", formType); assertArgumentNotNull("opLambda", opLambda); this.pushedFormInfo = createPushedFormInfo(formType, createPushedFormOption(opLambda)); return this; }
[ "public", "<", "FORM", ">", "HtmlResponse", "useForm", "(", "Class", "<", "FORM", ">", "formType", ",", "PushedFormOpCall", "<", "FORM", ">", "opLambda", ")", "{", "assertArgumentNotNull", "(", "\"formType\"", ",", "formType", ")", ";", "assertArgumentNotNull", ...
Set up the HTML response as using action form with internal initial value. <br> And you can use the action form in your HTML template. <pre> <span style="color: #3F7E5E">// case of internal initial value</span> &#064;Execute <span style="color: #70226C">public</span> HtmlResponse index() { <span style="color: #70226C">...
[ "Set", "up", "the", "HTML", "response", "as", "using", "action", "form", "with", "internal", "initial", "value", ".", "<br", ">", "And", "you", "can", "use", "the", "action", "form", "in", "your", "HTML", "template", ".", "<pre", ">", "<span", "style", ...
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/response/HtmlResponse.java#L247-L252
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/chains/EndPointInfoImpl.java
EndPointInfoImpl.updatePort
public int updatePort(final int newPort) { """ Update the port value for this end point. Will emit an AttributeChangeNotification if the value changed. @param newPort The new (or current) port value. If no change, no notification is sent. @return int The previous port value """ int oldPort = this....
java
public int updatePort(final int newPort) { int oldPort = this.port; this.port = newPort; if (oldPort != newPort) { sendNotification(new AttributeChangeNotification(this, sequenceNum.incrementAndGet(), System.currentTimeMillis(), this.toString() ...
[ "public", "int", "updatePort", "(", "final", "int", "newPort", ")", "{", "int", "oldPort", "=", "this", ".", "port", ";", "this", ".", "port", "=", "newPort", ";", "if", "(", "oldPort", "!=", "newPort", ")", "{", "sendNotification", "(", "new", "Attrib...
Update the port value for this end point. Will emit an AttributeChangeNotification if the value changed. @param newPort The new (or current) port value. If no change, no notification is sent. @return int The previous port value
[ "Update", "the", "port", "value", "for", "this", "end", "point", ".", "Will", "emit", "an", "AttributeChangeNotification", "if", "the", "value", "changed", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/chains/EndPointInfoImpl.java#L141-L151
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java
GregorianCalendar.getRolledValue
private static int getRolledValue(int value, int amount, int min, int max) { """ Returns the new value after 'roll'ing the specified value and amount. """ assert value >= min && value <= max; int range = max - min + 1; amount %= range; int n = value + amount; if (n > max...
java
private static int getRolledValue(int value, int amount, int min, int max) { assert value >= min && value <= max; int range = max - min + 1; amount %= range; int n = value + amount; if (n > max) { n -= range; } else if (n < min) { n += range; ...
[ "private", "static", "int", "getRolledValue", "(", "int", "value", ",", "int", "amount", ",", "int", "min", ",", "int", "max", ")", "{", "assert", "value", ">=", "min", "&&", "value", "<=", "max", ";", "int", "range", "=", "max", "-", "min", "+", "...
Returns the new value after 'roll'ing the specified value and amount.
[ "Returns", "the", "new", "value", "after", "roll", "ing", "the", "specified", "value", "and", "amount", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L3350-L3362
alkacon/opencms-core
src/org/opencms/file/types/CmsResourceTypeXmlContainerPage.java
CmsResourceTypeXmlContainerPage.isModelCopyGroup
public static boolean isModelCopyGroup(CmsObject cms, CmsResource resource) { """ Checks whether the given resource is a model reuse group.<p> @param cms the cms context @param resource the resource @return <code>true</code> in case the resource is a model reuse group """ boolean result = false...
java
public static boolean isModelCopyGroup(CmsObject cms, CmsResource resource) { boolean result = false; if (isModelGroup(resource)) { try { CmsProperty tempElementsProp = cms.readPropertyObject( resource, CmsPropertyDefinition.PROPERTY_T...
[ "public", "static", "boolean", "isModelCopyGroup", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "isModelGroup", "(", "resource", ")", ")", "{", "try", "{", "CmsProperty", "tempElementsPro...
Checks whether the given resource is a model reuse group.<p> @param cms the cms context @param resource the resource @return <code>true</code> in case the resource is a model reuse group
[ "Checks", "whether", "the", "given", "resource", "is", "a", "model", "reuse", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/types/CmsResourceTypeXmlContainerPage.java#L189-L208
samskivert/samskivert
src/main/java/com/samskivert/jdbc/SimpleRepository.java
SimpleRepository.configureDatabaseIdent
protected void configureDatabaseIdent (String dbident) { """ This is called automatically if a dbident is provided at construct time, but a derived class can pass null to its constructor and then call this method itself later if it wishes to obtain its database identifier from an overridable method which could n...
java
protected void configureDatabaseIdent (String dbident) { _dbident = dbident; // give the repository a chance to do any schema migration before things get further // underway try { executeUpdate(new Operation<Object>() { public Object invoke (Connection co...
[ "protected", "void", "configureDatabaseIdent", "(", "String", "dbident", ")", "{", "_dbident", "=", "dbident", ";", "// give the repository a chance to do any schema migration before things get further", "// underway", "try", "{", "executeUpdate", "(", "new", "Operation", "<"...
This is called automatically if a dbident is provided at construct time, but a derived class can pass null to its constructor and then call this method itself later if it wishes to obtain its database identifier from an overridable method which could not otherwise be called at construct time.
[ "This", "is", "called", "automatically", "if", "a", "dbident", "is", "provided", "at", "construct", "time", "but", "a", "derived", "class", "can", "pass", "null", "to", "its", "constructor", "and", "then", "call", "this", "method", "itself", "later", "if", ...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/jdbc/SimpleRepository.java#L63-L81
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/SubscriptionAdminClientSnippets.java
SubscriptionAdminClientSnippets.replacePushConfig
public void replacePushConfig(String subscriptionId, String endpoint) throws Exception { """ Example of replacing the push configuration of a subscription, setting the push endpoint. """ // [START pubsub_update_push_configuration] try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdmin...
java
public void replacePushConfig(String subscriptionId, String endpoint) throws Exception { // [START pubsub_update_push_configuration] try (SubscriptionAdminClient subscriptionAdminClient = SubscriptionAdminClient.create()) { ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(pr...
[ "public", "void", "replacePushConfig", "(", "String", "subscriptionId", ",", "String", "endpoint", ")", "throws", "Exception", "{", "// [START pubsub_update_push_configuration]", "try", "(", "SubscriptionAdminClient", "subscriptionAdminClient", "=", "SubscriptionAdminClient", ...
Example of replacing the push configuration of a subscription, setting the push endpoint.
[ "Example", "of", "replacing", "the", "push", "configuration", "of", "a", "subscription", "setting", "the", "push", "endpoint", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/SubscriptionAdminClientSnippets.java#L93-L102
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java
Configuration.setLong
@PublicEvolving public void setLong(ConfigOption<Long> key, long value) { """ Adds the given value to the configuration object. The main key of the config option will be used to map the value. @param key the option specifying the key to be added @param value the value of the key/value pair to be added ...
java
@PublicEvolving public void setLong(ConfigOption<Long> key, long value) { setValueInternal(key.key(), value); }
[ "@", "PublicEvolving", "public", "void", "setLong", "(", "ConfigOption", "<", "Long", ">", "key", ",", "long", "value", ")", "{", "setValueInternal", "(", "key", ".", "key", "(", ")", ",", "value", ")", ";", "}" ]
Adds the given value to the configuration object. The main key of the config option will be used to map the value. @param key the option specifying the key to be added @param value the value of the key/value pair to be added
[ "Adds", "the", "given", "value", "to", "the", "configuration", "object", ".", "The", "main", "key", "of", "the", "config", "option", "will", "be", "used", "to", "map", "the", "value", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L338-L341
jMotif/SAX
src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java
SAXRecords.addAll
public void addAll(HashMap<Integer, char[]> records) { """ This adds all to the internal store. Used by the parallel SAX conversion engine. @param records the data to add. """ for (Entry<Integer, char[]> e : records.entrySet()) { this.add(e.getValue(), e.getKey()); } }
java
public void addAll(HashMap<Integer, char[]> records) { for (Entry<Integer, char[]> e : records.entrySet()) { this.add(e.getValue(), e.getKey()); } }
[ "public", "void", "addAll", "(", "HashMap", "<", "Integer", ",", "char", "[", "]", ">", "records", ")", "{", "for", "(", "Entry", "<", "Integer", ",", "char", "[", "]", ">", "e", ":", "records", ".", "entrySet", "(", ")", ")", "{", "this", ".", ...
This adds all to the internal store. Used by the parallel SAX conversion engine. @param records the data to add.
[ "This", "adds", "all", "to", "the", "internal", "store", ".", "Used", "by", "the", "parallel", "SAX", "conversion", "engine", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java#L149-L153
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java
Text.getName
public static String getName(String path, boolean ignoreTrailingSlash) { """ Same as {@link #getName(String)} but adding the possibility to pass paths that end with a trailing '/' @see #getName(String) """ if (ignoreTrailingSlash && path.endsWith("/") && path.length() > 1) { path = pat...
java
public static String getName(String path, boolean ignoreTrailingSlash) { if (ignoreTrailingSlash && path.endsWith("/") && path.length() > 1) { path = path.substring(0, path.length() - 1); } return getName(path); }
[ "public", "static", "String", "getName", "(", "String", "path", ",", "boolean", "ignoreTrailingSlash", ")", "{", "if", "(", "ignoreTrailingSlash", "&&", "path", ".", "endsWith", "(", "\"/\"", ")", "&&", "path", ".", "length", "(", ")", ">", "1", ")", "{"...
Same as {@link #getName(String)} but adding the possibility to pass paths that end with a trailing '/' @see #getName(String)
[ "Same", "as", "{", "@link", "#getName", "(", "String", ")", "}", "but", "adding", "the", "possibility", "to", "pass", "paths", "that", "end", "with", "a", "trailing", "/" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/util/Text.java#L646-L653
redkale/redkale
src/org/redkale/net/http/HttpRequest.java
HttpRequest.getShortParameter
public short getShortParameter(int radix, String name, short defaultValue) { """ 获取指定的参数short值, 没有返回默认short值 @param radix 进制数 @param name 参数名 @param defaultValue 默认short值 @return 参数值 """ parseBody(); return params.getShortValue(radix, name, defaultValue); }
java
public short getShortParameter(int radix, String name, short defaultValue) { parseBody(); return params.getShortValue(radix, name, defaultValue); }
[ "public", "short", "getShortParameter", "(", "int", "radix", ",", "String", "name", ",", "short", "defaultValue", ")", "{", "parseBody", "(", ")", ";", "return", "params", ".", "getShortValue", "(", "radix", ",", "name", ",", "defaultValue", ")", ";", "}" ...
获取指定的参数short值, 没有返回默认short值 @param radix 进制数 @param name 参数名 @param defaultValue 默认short值 @return 参数值
[ "获取指定的参数short值", "没有返回默认short值" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpRequest.java#L1341-L1344
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/apache/commons/beanutils/PropertyUtils.java
PropertyUtils.getProperty
public static Object getProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { """ <p> Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions. ...
java
public static Object getProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { if (pbean == null) { throw new NoSuchMethodException("A null object has no getters"); } if (pname == null) { throw new NoSuchMethodExc...
[ "public", "static", "Object", "getProperty", "(", "final", "Object", "pbean", ",", "final", "String", "pname", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", ",", "NoSuchMethodException", "{", "if", "(", "pbean", "==", "null", ")", "{",...
<p> Return the value of the specified property of the specified bean, no matter which property reference format is used, with no type conversions. </p> <p> For more details see <code>PropertyUtilsBean</code>. </p> @param pbean Bean whose property is to be extracted @param pname Possibly indexed and/or nested name of ...
[ "<p", ">", "Return", "the", "value", "of", "the", "specified", "property", "of", "the", "specified", "bean", "no", "matter", "which", "property", "reference", "format", "is", "used", "with", "no", "type", "conversions", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/apache/commons/beanutils/PropertyUtils.java#L55-L81
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/alias/simple/CmsAliasPathColumn.java
CmsAliasPathColumn.getComparator
public static Comparator<CmsAliasTableRow> getComparator() { """ Gets the comparator used for this column.<p> @return the comparator to use for this row """ return new Comparator<CmsAliasTableRow>() { public int compare(CmsAliasTableRow o1, CmsAliasTableRow o2) { ...
java
public static Comparator<CmsAliasTableRow> getComparator() { return new Comparator<CmsAliasTableRow>() { public int compare(CmsAliasTableRow o1, CmsAliasTableRow o2) { return o1.getAliasPath().toString().compareTo(o2.getAliasPath().toString()); } }; ...
[ "public", "static", "Comparator", "<", "CmsAliasTableRow", ">", "getComparator", "(", ")", "{", "return", "new", "Comparator", "<", "CmsAliasTableRow", ">", "(", ")", "{", "public", "int", "compare", "(", "CmsAliasTableRow", "o1", ",", "CmsAliasTableRow", "o2", ...
Gets the comparator used for this column.<p> @return the comparator to use for this row
[ "Gets", "the", "comparator", "used", "for", "this", "column", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/alias/simple/CmsAliasPathColumn.java#L75-L84
jayantk/jklol
src/com/jayantkrish/jklol/ccg/HeadedSyntacticCategory.java
HeadedSyntacticCategory.addArgument
public HeadedSyntacticCategory addArgument(HeadedSyntacticCategory argument, Direction direction, int rootVarNum) { """ Gets the syntactic category and semantic variables that accepts {@code argument} on {@code direction} and returns {@code this}. Any semantic variables in both {@code argument} and {@code ...
java
public HeadedSyntacticCategory addArgument(HeadedSyntacticCategory argument, Direction direction, int rootVarNum) { SyntacticCategory newCategory = syntacticCategory.addArgument(argument.getSyntax(), direction); int[] newSemantics = Ints.concat(semanticVariables, new int[] { rootVarNum }, argument...
[ "public", "HeadedSyntacticCategory", "addArgument", "(", "HeadedSyntacticCategory", "argument", ",", "Direction", "direction", ",", "int", "rootVarNum", ")", "{", "SyntacticCategory", "newCategory", "=", "syntacticCategory", ".", "addArgument", "(", "argument", ".", "ge...
Gets the syntactic category and semantic variables that accepts {@code argument} on {@code direction} and returns {@code this}. Any semantic variables in both {@code argument} and {@code this} are assumed to be equivalent. @param argument @param direction @param rootVarNum @return
[ "Gets", "the", "syntactic", "category", "and", "semantic", "variables", "that", "accepts", "{", "@code", "argument", "}", "on", "{", "@code", "direction", "}", "and", "returns", "{", "@code", "this", "}", ".", "Any", "semantic", "variables", "in", "both", ...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/HeadedSyntacticCategory.java#L309-L316
Erudika/para
para-server/src/main/java/com/erudika/para/rest/RestUtils.java
RestUtils.queryParam
public static String queryParam(String param, ContainerRequestContext ctx) { """ Returns the query parameter value. @param param a parameter name @param ctx ctx @return parameter value """ return ctx.getUriInfo().getQueryParameters().getFirst(param); }
java
public static String queryParam(String param, ContainerRequestContext ctx) { return ctx.getUriInfo().getQueryParameters().getFirst(param); }
[ "public", "static", "String", "queryParam", "(", "String", "param", ",", "ContainerRequestContext", "ctx", ")", "{", "return", "ctx", ".", "getUriInfo", "(", ")", ".", "getQueryParameters", "(", ")", ".", "getFirst", "(", "param", ")", ";", "}" ]
Returns the query parameter value. @param param a parameter name @param ctx ctx @return parameter value
[ "Returns", "the", "query", "parameter", "value", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/rest/RestUtils.java#L1012-L1014
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/AbstractProxyLogicHandler.java
AbstractProxyLogicHandler.closeSession
protected void closeSession(final String message, final Throwable t) { """ Closes the session. @param message the error message @param t the exception which caused the session closing """ if (t != null) { LOGGER.error(message, t); proxyIoSession.setAuthenticationFailed(true)...
java
protected void closeSession(final String message, final Throwable t) { if (t != null) { LOGGER.error(message, t); proxyIoSession.setAuthenticationFailed(true); } else { LOGGER.error(message); } getSession().close(true); }
[ "protected", "void", "closeSession", "(", "final", "String", "message", ",", "final", "Throwable", "t", ")", "{", "if", "(", "t", "!=", "null", ")", "{", "LOGGER", ".", "error", "(", "message", ",", "t", ")", ";", "proxyIoSession", ".", "setAuthenticatio...
Closes the session. @param message the error message @param t the exception which caused the session closing
[ "Closes", "the", "session", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/AbstractProxyLogicHandler.java#L188-L197
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.updateLong
public void updateLong(int columnIndex, long x) throws SQLException { """ <!-- start generic documentation --> Updates the designated column with a <code>long</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlyi...
java
public void updateLong(int columnIndex, long x) throws SQLException { startUpdate(columnIndex); preparedStatement.setLongParameter(columnIndex, x); }
[ "public", "void", "updateLong", "(", "int", "columnIndex", ",", "long", "x", ")", "throws", "SQLException", "{", "startUpdate", "(", "columnIndex", ")", ";", "preparedStatement", ".", "setLongParameter", "(", "columnIndex", ",", "x", ")", ";", "}" ]
<!-- start generic documentation --> Updates the designated column with a <code>long</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods a...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Updates", "the", "designated", "column", "with", "a", "<code", ">", "long<", "/", "code", ">", "value", ".", "The", "updater", "methods", "are", "used", "to", "update", "column", "values", "in", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L2781-L2784
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.findConstructor
public static ConstructorNode findConstructor(ClassNode classNode,Parameter[] constructorParams) { """ Finds a constructor for the given class node and parameter types @param classNode The class node @param constructorParams The parameter types @return The located constructor or null """ List<Cons...
java
public static ConstructorNode findConstructor(ClassNode classNode,Parameter[] constructorParams) { List<ConstructorNode> declaredConstructors = classNode.getDeclaredConstructors(); for (ConstructorNode declaredConstructor : declaredConstructors) { if (parametersEqual(constructorParams, decla...
[ "public", "static", "ConstructorNode", "findConstructor", "(", "ClassNode", "classNode", ",", "Parameter", "[", "]", "constructorParams", ")", "{", "List", "<", "ConstructorNode", ">", "declaredConstructors", "=", "classNode", ".", "getDeclaredConstructors", "(", ")",...
Finds a constructor for the given class node and parameter types @param classNode The class node @param constructorParams The parameter types @return The located constructor or null
[ "Finds", "a", "constructor", "for", "the", "given", "class", "node", "and", "parameter", "types" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L511-L519
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.initTemplates
protected void initTemplates(Element root, CmsXmlContentDefinition contentDefinition) { """ Initializes the forbidden template contexts.<p> @param root the root XML element @param contentDefinition the content definition """ String strEnabledByDefault = root.attributeValue(ATTR_ENABLED_BY_DEFAULT)...
java
protected void initTemplates(Element root, CmsXmlContentDefinition contentDefinition) { String strEnabledByDefault = root.attributeValue(ATTR_ENABLED_BY_DEFAULT); m_allowedTemplates.setDefaultMembership(safeParseBoolean(strEnabledByDefault, true)); List<Node> elements = root.selectNodes(APPINFO...
[ "protected", "void", "initTemplates", "(", "Element", "root", ",", "CmsXmlContentDefinition", "contentDefinition", ")", "{", "String", "strEnabledByDefault", "=", "root", ".", "attributeValue", "(", "ATTR_ENABLED_BY_DEFAULT", ")", ";", "m_allowedTemplates", ".", "setDef...
Initializes the forbidden template contexts.<p> @param root the root XML element @param contentDefinition the content definition
[ "Initializes", "the", "forbidden", "template", "contexts", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L3169-L3180
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/headerfooter/RtfHeaderFooterGroup.java
RtfHeaderFooterGroup.setHeaderFooter
public void setHeaderFooter(RtfHeaderFooter headerFooter, int displayAt) { """ Set a RtfHeaderFooter to be displayed at a certain position @param headerFooter The RtfHeaderFooter to display @param displayAt The display location to use """ this.mode = MODE_MULTIPLE; headerFooter.setRtfDocume...
java
public void setHeaderFooter(RtfHeaderFooter headerFooter, int displayAt) { this.mode = MODE_MULTIPLE; headerFooter.setRtfDocument(this.document); headerFooter.setType(this.type); headerFooter.setDisplayAt(displayAt); switch(displayAt) { case RtfHeaderFooter.DISPLAY_AL...
[ "public", "void", "setHeaderFooter", "(", "RtfHeaderFooter", "headerFooter", ",", "int", "displayAt", ")", "{", "this", ".", "mode", "=", "MODE_MULTIPLE", ";", "headerFooter", ".", "setRtfDocument", "(", "this", ".", "document", ")", ";", "headerFooter", ".", ...
Set a RtfHeaderFooter to be displayed at a certain position @param headerFooter The RtfHeaderFooter to display @param displayAt The display location to use
[ "Set", "a", "RtfHeaderFooter", "to", "be", "displayed", "at", "a", "certain", "position" ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/headerfooter/RtfHeaderFooterGroup.java#L247-L266
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
TagletManager.addNewSimpleCustomTag
public void addNewSimpleCustomTag(String tagName, String header, String locations) { """ Add a new <code>SimpleTaglet</code>. If this tag already exists and the header passed as an argument is null, move tag to the back of the list. If this tag already exists and the header passed as an argument is not null, o...
java
public void addNewSimpleCustomTag(String tagName, String header, String locations) { if (tagName == null || locations == null) { return; } Taglet tag = customTags.get(tagName); locations = StringUtils.toLowerCase(locations); if (tag == null || header != null) { ...
[ "public", "void", "addNewSimpleCustomTag", "(", "String", "tagName", ",", "String", "header", ",", "String", "locations", ")", "{", "if", "(", "tagName", "==", "null", "||", "locations", "==", "null", ")", "{", "return", ";", "}", "Taglet", "tag", "=", "...
Add a new <code>SimpleTaglet</code>. If this tag already exists and the header passed as an argument is null, move tag to the back of the list. If this tag already exists and the header passed as an argument is not null, overwrite previous tag with new one. Otherwise, add new SimpleTaglet to list. @param tagName the ...
[ "Add", "a", "new", "<code", ">", "SimpleTaglet<", "/", "code", ">", ".", "If", "this", "tag", "already", "exists", "and", "the", "header", "passed", "as", "an", "argument", "is", "null", "move", "tag", "to", "the", "back", "of", "the", "list", ".", "...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java#L352-L369
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java
IndexElasticsearchUpdater.updateSettings
@Deprecated public static void updateSettings(Client client, String root, String index) throws Exception { """ Update index settings in Elasticsearch. Read also _update_settings.json if exists. @param client Elasticsearch client @param root dir within the classpath @param index Index name @throws Exception if...
java
@Deprecated public static void updateSettings(Client client, String root, String index) throws Exception { String settings = IndexSettingsReader.readUpdateSettings(root, index); updateIndexWithSettingsInElasticsearch(client, index, settings); }
[ "@", "Deprecated", "public", "static", "void", "updateSettings", "(", "Client", "client", ",", "String", "root", ",", "String", "index", ")", "throws", "Exception", "{", "String", "settings", "=", "IndexSettingsReader", ".", "readUpdateSettings", "(", "root", ",...
Update index settings in Elasticsearch. Read also _update_settings.json if exists. @param client Elasticsearch client @param root dir within the classpath @param index Index name @throws Exception if the elasticsearch API call is failing
[ "Update", "index", "settings", "in", "Elasticsearch", ".", "Read", "also", "_update_settings", ".", "json", "if", "exists", "." ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java#L184-L188
mapbox/mapbox-java
services-turf/src/main/java/com/mapbox/turf/TurfAssertions.java
TurfAssertions.collectionOf
public static void collectionOf(FeatureCollection featureCollection, String type, String name) { """ Enforce expectations about types of {@link FeatureCollection} inputs for Turf. Internally this uses {@link Feature#type()}} to judge geometry types. @param featureCollection for which features will be judged @...
java
public static void collectionOf(FeatureCollection featureCollection, String type, String name) { if (name == null || name.length() == 0) { throw new TurfException("collectionOf() requires a name"); } if (featureCollection == null || !featureCollection.type().equals("FeatureCollection") || featur...
[ "public", "static", "void", "collectionOf", "(", "FeatureCollection", "featureCollection", ",", "String", "type", ",", "String", "name", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new"...
Enforce expectations about types of {@link FeatureCollection} inputs for Turf. Internally this uses {@link Feature#type()}} to judge geometry types. @param featureCollection for which features will be judged @param type expected GeoJson type @param name name of calling function @see <a href="...
[ "Enforce", "expectations", "about", "types", "of", "{", "@link", "FeatureCollection", "}", "inputs", "for", "Turf", ".", "Internally", "this", "uses", "{", "@link", "Feature#type", "()", "}}", "to", "judge", "geometry", "types", "." ]
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-turf/src/main/java/com/mapbox/turf/TurfAssertions.java#L88-L107
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/internal/AsyncConnectionProvider.java
AsyncConnectionProvider.forEach
public void forEach(BiConsumer<? super K, ? super T> action) { """ Execute an action for all established and pending {@link AsyncCloseable}s. @param action the action. """ connections.forEach((key, sync) -> sync.doWithConnection(action)); }
java
public void forEach(BiConsumer<? super K, ? super T> action) { connections.forEach((key, sync) -> sync.doWithConnection(action)); }
[ "public", "void", "forEach", "(", "BiConsumer", "<", "?", "super", "K", ",", "?", "super", "T", ">", "action", ")", "{", "connections", ".", "forEach", "(", "(", "key", ",", "sync", ")", "->", "sync", ".", "doWithConnection", "(", "action", ")", ")",...
Execute an action for all established and pending {@link AsyncCloseable}s. @param action the action.
[ "Execute", "an", "action", "for", "all", "established", "and", "pending", "{", "@link", "AsyncCloseable", "}", "s", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/internal/AsyncConnectionProvider.java#L198-L200
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java
DocumentConventions.getJavaClass
public String getJavaClass(String id, ObjectNode document) { """ Get the java class (if exists) from the document @param id document id @param document document to get java class from @return java class """ return _findJavaClass.apply(id, document); }
java
public String getJavaClass(String id, ObjectNode document) { return _findJavaClass.apply(id, document); }
[ "public", "String", "getJavaClass", "(", "String", "id", ",", "ObjectNode", "document", ")", "{", "return", "_findJavaClass", ".", "apply", "(", "id", ",", "document", ")", ";", "}" ]
Get the java class (if exists) from the document @param id document id @param document document to get java class from @return java class
[ "Get", "the", "java", "class", "(", "if", "exists", ")", "from", "the", "document" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/conventions/DocumentConventions.java#L403-L405
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java
PublisherCreateOperation.replayEventsOverResultSet
private void replayEventsOverResultSet(QueryResult queryResult) throws Exception { """ Replay events over the result set of initial query. These events are received events during execution of the initial query. """ Map<Integer, Future<Object>> future = readAccumulators(); for (Map.Entry<Intege...
java
private void replayEventsOverResultSet(QueryResult queryResult) throws Exception { Map<Integer, Future<Object>> future = readAccumulators(); for (Map.Entry<Integer, Future<Object>> entry : future.entrySet()) { int partitionId = entry.getKey(); Object eventsInOneAcc = entry.getVal...
[ "private", "void", "replayEventsOverResultSet", "(", "QueryResult", "queryResult", ")", "throws", "Exception", "{", "Map", "<", "Integer", ",", "Future", "<", "Object", ">", ">", "future", "=", "readAccumulators", "(", ")", ";", "for", "(", "Map", ".", "Entr...
Replay events over the result set of initial query. These events are received events during execution of the initial query.
[ "Replay", "events", "over", "the", "result", "set", "of", "initial", "query", ".", "These", "events", "are", "received", "events", "during", "execution", "of", "the", "initial", "query", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java#L171-L191
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.fetchByC_C
@Override public CPInstance fetchByC_C(long CPDefinitionId, String CPInstanceUuid) { """ Returns the cp instance where CPDefinitionId = &#63; and CPInstanceUuid = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the cp definition ID @param CPInstanceUui...
java
@Override public CPInstance fetchByC_C(long CPDefinitionId, String CPInstanceUuid) { return fetchByC_C(CPDefinitionId, CPInstanceUuid, true); }
[ "@", "Override", "public", "CPInstance", "fetchByC_C", "(", "long", "CPDefinitionId", ",", "String", "CPInstanceUuid", ")", "{", "return", "fetchByC_C", "(", "CPDefinitionId", ",", "CPInstanceUuid", ",", "true", ")", ";", "}" ]
Returns the cp instance where CPDefinitionId = &#63; and CPInstanceUuid = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the cp definition ID @param CPInstanceUuid the cp instance uuid @return the matching cp instance, or <code>null</code> if a matching cp ins...
[ "Returns", "the", "cp", "instance", "where", "CPDefinitionId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder",...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L4121-L4124
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeConnectionAndWait
public static List<Response> executeConnectionAndWait(HttpURLConnection connection, Collection<Request> requests) { """ Executes requests that have already been serialized into an HttpURLConnection. No validation is done that the contents of the connection actually reflect the serialized requests, so it is the ca...
java
public static List<Response> executeConnectionAndWait(HttpURLConnection connection, Collection<Request> requests) { return executeConnectionAndWait(connection, new RequestBatch(requests)); }
[ "public", "static", "List", "<", "Response", ">", "executeConnectionAndWait", "(", "HttpURLConnection", "connection", ",", "Collection", "<", "Request", ">", "requests", ")", "{", "return", "executeConnectionAndWait", "(", "connection", ",", "new", "RequestBatch", "...
Executes requests that have already been serialized into an HttpURLConnection. No validation is done that the contents of the connection actually reflect the serialized requests, so it is the caller's responsibility to ensure that it will correctly generate the desired responses. <p/> This should only be called if you ...
[ "Executes", "requests", "that", "have", "already", "been", "serialized", "into", "an", "HttpURLConnection", ".", "No", "validation", "is", "done", "that", "the", "contents", "of", "the", "connection", "actually", "reflect", "the", "serialized", "requests", "so", ...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1532-L1534
zxing/zxing
core/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java
Encoder.recommendVersion
private static Version recommendVersion(ErrorCorrectionLevel ecLevel, Mode mode, BitArray headerBits, BitArray dataBits) throws WriterException { """ Decides the smallest version of QR code...
java
private static Version recommendVersion(ErrorCorrectionLevel ecLevel, Mode mode, BitArray headerBits, BitArray dataBits) throws WriterException { // Hard part: need to know version to know h...
[ "private", "static", "Version", "recommendVersion", "(", "ErrorCorrectionLevel", "ecLevel", ",", "Mode", "mode", ",", "BitArray", "headerBits", ",", "BitArray", "dataBits", ")", "throws", "WriterException", "{", "// Hard part: need to know version to know how many bits length...
Decides the smallest version of QR code that will contain all of the provided data. @throws WriterException if the data cannot fit in any version
[ "Decides", "the", "smallest", "version", "of", "QR", "code", "that", "will", "contain", "all", "of", "the", "provided", "data", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java#L173-L186
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/DockerfileParser.java
DockerfileParser.dockerfileToCommandList
public static List<DockerCommand> dockerfileToCommandList( File dockerfile ) throws IOException { """ Parses a dockerfile to a list of commands. @throws IOException @param dockerfile a file @return a list of Docker commands """ List<DockerCommand> result = new ArrayList<>(); FileInputStream in = new Fi...
java
public static List<DockerCommand> dockerfileToCommandList( File dockerfile ) throws IOException { List<DockerCommand> result = new ArrayList<>(); FileInputStream in = new FileInputStream( dockerfile ); Logger logger = Logger.getLogger( DockerfileParser.class.getName()); BufferedReader br = null; try { br...
[ "public", "static", "List", "<", "DockerCommand", ">", "dockerfileToCommandList", "(", "File", "dockerfile", ")", "throws", "IOException", "{", "List", "<", "DockerCommand", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "FileInputStream", "in", ...
Parses a dockerfile to a list of commands. @throws IOException @param dockerfile a file @return a list of Docker commands
[ "Parses", "a", "dockerfile", "to", "a", "list", "of", "commands", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/DockerfileParser.java#L59-L84
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getUntaggedImageCountAsync
public Observable<Integer> getUntaggedImageCountAsync(UUID projectId, GetUntaggedImageCountOptionalParameter getUntaggedImageCountOptionalParameter) { """ Gets the number of untagged images. This API returns the images which have no tags for a given project and optionally an iteration. If no iteration is specifie...
java
public Observable<Integer> getUntaggedImageCountAsync(UUID projectId, GetUntaggedImageCountOptionalParameter getUntaggedImageCountOptionalParameter) { return getUntaggedImageCountWithServiceResponseAsync(projectId, getUntaggedImageCountOptionalParameter).map(new Func1<ServiceResponse<Integer>, Integer>() { ...
[ "public", "Observable", "<", "Integer", ">", "getUntaggedImageCountAsync", "(", "UUID", "projectId", ",", "GetUntaggedImageCountOptionalParameter", "getUntaggedImageCountOptionalParameter", ")", "{", "return", "getUntaggedImageCountWithServiceResponseAsync", "(", "projectId", ","...
Gets the number of untagged images. This API returns the images which have no tags for a given project and optionally an iteration. If no iteration is specified the current workspace is used. @param projectId The project id @param getUntaggedImageCountOptionalParameter the object representing the optional parameters t...
[ "Gets", "the", "number", "of", "untagged", "images", ".", "This", "API", "returns", "the", "images", "which", "have", "no", "tags", "for", "a", "given", "project", "and", "optionally", "an", "iteration", ".", "If", "no", "iteration", "is", "specified", "th...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L4483-L4490
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java
Invariants.checkInvariantD
public static double checkInvariantD( final double value, final boolean condition, final DoubleFunction<String> describer) { """ A {@code double} specialized version of {@link #checkInvariant(Object, boolean, Function)} @param value The value @param condition The predicate @param describer Th...
java
public static double checkInvariantD( final double value, final boolean condition, final DoubleFunction<String> describer) { return innerCheckInvariantD(value, condition, describer); }
[ "public", "static", "double", "checkInvariantD", "(", "final", "double", "value", ",", "final", "boolean", "condition", ",", "final", "DoubleFunction", "<", "String", ">", "describer", ")", "{", "return", "innerCheckInvariantD", "(", "value", ",", "condition", "...
A {@code double} specialized version of {@link #checkInvariant(Object, boolean, Function)} @param value The value @param condition The predicate @param describer The describer of the predicate @return value @throws InvariantViolationException If the predicate is false
[ "A", "{", "@code", "double", "}", "specialized", "version", "of", "{", "@link", "#checkInvariant", "(", "Object", "boolean", "Function", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java#L551-L557
GoSimpleLLC/nbvcxz
src/main/java/me/gosimple/nbvcxz/resources/DictionaryUtil.java
DictionaryUtil.loadRankedDictionary
public static Map<String, Integer> loadRankedDictionary(final String fileName) { """ Read a resource file with a list of entries (sorted by frequency) and use it to create a ranked dictionary. <p> The dictionary must contain only lower case values for the matching to work properly. @param fileName the name o...
java
public static Map<String, Integer> loadRankedDictionary(final String fileName) { Map<String, Integer> ranked = new HashMap<>(); String path = "/dictionaries/" + fileName; try (InputStream is = DictionaryUtil.class.getResourceAsStream(path); BufferedReader br = new BufferedReader...
[ "public", "static", "Map", "<", "String", ",", "Integer", ">", "loadRankedDictionary", "(", "final", "String", "fileName", ")", "{", "Map", "<", "String", ",", "Integer", ">", "ranked", "=", "new", "HashMap", "<>", "(", ")", ";", "String", "path", "=", ...
Read a resource file with a list of entries (sorted by frequency) and use it to create a ranked dictionary. <p> The dictionary must contain only lower case values for the matching to work properly. @param fileName the name of the file @return the ranked dictionary (a {@code HashMap} which associated a rank to each ent...
[ "Read", "a", "resource", "file", "with", "a", "list", "of", "entries", "(", "sorted", "by", "frequency", ")", "and", "use", "it", "to", "create", "a", "ranked", "dictionary", ".", "<p", ">", "The", "dictionary", "must", "contain", "only", "lower", "case"...
train
https://github.com/GoSimpleLLC/nbvcxz/blob/a86fb24680e646efdf78d6fda9d68a5410145f56/src/main/java/me/gosimple/nbvcxz/resources/DictionaryUtil.java#L99-L119
pravega/pravega
bindings/src/main/java/io/pravega/storage/filesystem/FileSystemStorage.java
FileSystemStorage.doConcat
private Void doConcat(SegmentHandle targetHandle, long offset, String sourceSegment) throws IOException { """ Concatenation as currently implemented here requires that we read the data and write it back to target file. We do not make the assumption that a native operation exists as this is not a common feature su...
java
private Void doConcat(SegmentHandle targetHandle, long offset, String sourceSegment) throws IOException { long traceId = LoggerHelpers.traceEnter(log, "concat", targetHandle.getSegmentName(), offset, sourceSegment); Path sourcePath = Paths.get(config.getRoot(), sourceSegment); P...
[ "private", "Void", "doConcat", "(", "SegmentHandle", "targetHandle", ",", "long", "offset", ",", "String", "sourceSegment", ")", "throws", "IOException", "{", "long", "traceId", "=", "LoggerHelpers", ".", "traceEnter", "(", "log", ",", "\"concat\"", ",", "target...
Concatenation as currently implemented here requires that we read the data and write it back to target file. We do not make the assumption that a native operation exists as this is not a common feature supported by file systems. As such, a concatenation induces an important network overhead as each byte concatenated mu...
[ "Concatenation", "as", "currently", "implemented", "here", "requires", "that", "we", "read", "the", "data", "and", "write", "it", "back", "to", "target", "file", ".", "We", "do", "not", "make", "the", "assumption", "that", "a", "native", "operation", "exists...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/bindings/src/main/java/io/pravega/storage/filesystem/FileSystemStorage.java#L363-L386
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemMessage.java
ElemMessage.execute
public void execute( TransformerImpl transformer) throws TransformerException { """ Send a message to diagnostics. The xsl:message instruction sends a message in a way that is dependent on the XSLT transformer. The content of the xsl:message instruction is a template. The xsl:message is in...
java
public void execute( TransformerImpl transformer) throws TransformerException { String data = transformer.transformToString(this); transformer.getMsgMgr().message(this, data, m_terminate); if(m_terminate) transformer.getErrorListener().fatalError(new TransformerException...
[ "public", "void", "execute", "(", "TransformerImpl", "transformer", ")", "throws", "TransformerException", "{", "String", "data", "=", "transformer", ".", "transformToString", "(", "this", ")", ";", "transformer", ".", "getMsgMgr", "(", ")", ".", "message", "(",...
Send a message to diagnostics. The xsl:message instruction sends a message in a way that is dependent on the XSLT transformer. The content of the xsl:message instruction is a template. The xsl:message is instantiated by instantiating the content to create an XML fragment. This XML fragment is the content of the message...
[ "Send", "a", "message", "to", "diagnostics", ".", "The", "xsl", ":", "message", "instruction", "sends", "a", "message", "in", "a", "way", "that", "is", "dependent", "on", "the", "XSLT", "transformer", ".", "The", "content", "of", "the", "xsl", ":", "mess...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemMessage.java#L112-L123
geomajas/geomajas-project-geometry
core/src/main/java/org/geomajas/geometry/service/GeometryIndexService.java
GeometryIndexService.getVertex
public Coordinate getVertex(Geometry geometry, GeometryIndex index) throws GeometryIndexNotFoundException { """ Given a certain geometry, get the vertex the index points to. This only works if the index actually points to a vertex. @param geometry The geometry to search in. @param index The index that point...
java
public Coordinate getVertex(Geometry geometry, GeometryIndex index) throws GeometryIndexNotFoundException { if (index.hasChild()) { if (geometry.getGeometries() != null && geometry.getGeometries().length > index.getValue()) { return getVertex(geometry.getGeometries()[index.getValue()], index.getChild()); } ...
[ "public", "Coordinate", "getVertex", "(", "Geometry", "geometry", ",", "GeometryIndex", "index", ")", "throws", "GeometryIndexNotFoundException", "{", "if", "(", "index", ".", "hasChild", "(", ")", ")", "{", "if", "(", "geometry", ".", "getGeometries", "(", ")...
Given a certain geometry, get the vertex the index points to. This only works if the index actually points to a vertex. @param geometry The geometry to search in. @param index The index that points to a vertex within the given geometry. @return Returns the vertex if it exists. @throws GeometryIndexNotFoundException Th...
[ "Given", "a", "certain", "geometry", "get", "the", "vertex", "the", "index", "points", "to", ".", "This", "only", "works", "if", "the", "index", "actually", "points", "to", "a", "vertex", "." ]
train
https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/GeometryIndexService.java#L190-L202
virgo47/javasimon
jdbc41/src/main/java/org/javasimon/jdbc4/SimonConnection.java
SimonConnection.createStatement
@Override public Statement createStatement(int rsType, int rsConcurrency) throws SQLException { """ Calls real createStatement and wraps returned statement by Simon's statement. @param rsType result set type @param rsConcurrency result set concurrency @return Simon's statement with wrapped real statement @t...
java
@Override public Statement createStatement(int rsType, int rsConcurrency) throws SQLException { return new SimonStatement(this, conn.createStatement(rsType, rsConcurrency), prefix); }
[ "@", "Override", "public", "Statement", "createStatement", "(", "int", "rsType", ",", "int", "rsConcurrency", ")", "throws", "SQLException", "{", "return", "new", "SimonStatement", "(", "this", ",", "conn", ".", "createStatement", "(", "rsType", ",", "rsConcurre...
Calls real createStatement and wraps returned statement by Simon's statement. @param rsType result set type @param rsConcurrency result set concurrency @return Simon's statement with wrapped real statement @throws java.sql.SQLException if real operation fails
[ "Calls", "real", "createStatement", "and", "wraps", "returned", "statement", "by", "Simon", "s", "statement", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/jdbc41/src/main/java/org/javasimon/jdbc4/SimonConnection.java#L144-L147
beangle/beangle3
struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java
EntityActionSupport.getId
protected final <T> T getId(String name, Class<T> clazz) { """ Get entity's id from shortname.id,shortnameId,id @param name @param clazz """ Object[] entityIds = getAll(name + ".id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id"); if (Arrays.isEmpty(entityIds)) entityIds = getA...
java
protected final <T> T getId(String name, Class<T> clazz) { Object[] entityIds = getAll(name + ".id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll(name + "Id"); if (Arrays.isEmpty(entityIds)) entityIds = getAll("id"); if (Arrays.isEmpty(entityIds)) return null; else { String entityId = en...
[ "protected", "final", "<", "T", ">", "T", "getId", "(", "String", "name", ",", "Class", "<", "T", ">", "clazz", ")", "{", "Object", "[", "]", "entityIds", "=", "getAll", "(", "name", "+", "\".id\"", ")", ";", "if", "(", "Arrays", ".", "isEmpty", ...
Get entity's id from shortname.id,shortnameId,id @param name @param clazz
[ "Get", "entity", "s", "id", "from", "shortname", ".", "id", "shortnameId", "id" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/action/EntityActionSupport.java#L47-L58
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.registerTemplateTypeNamesInScope
public void registerTemplateTypeNamesInScope(Iterable<TemplateType> keys, Node scopeRoot) { """ Registers template types on the given scope root. This takes a Node rather than a StaticScope because at the time it is called, the scope has not yet been created. """ for (TemplateType key : keys) { scop...
java
public void registerTemplateTypeNamesInScope(Iterable<TemplateType> keys, Node scopeRoot) { for (TemplateType key : keys) { scopedNameTable.put(scopeRoot, key.getReferenceName(), key); } }
[ "public", "void", "registerTemplateTypeNamesInScope", "(", "Iterable", "<", "TemplateType", ">", "keys", ",", "Node", "scopeRoot", ")", "{", "for", "(", "TemplateType", "key", ":", "keys", ")", "{", "scopedNameTable", ".", "put", "(", "scopeRoot", ",", "key", ...
Registers template types on the given scope root. This takes a Node rather than a StaticScope because at the time it is called, the scope has not yet been created.
[ "Registers", "template", "types", "on", "the", "given", "scope", "root", ".", "This", "takes", "a", "Node", "rather", "than", "a", "StaticScope", "because", "at", "the", "time", "it", "is", "called", "the", "scope", "has", "not", "yet", "been", "created", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L2257-L2261
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonStreamExecutionEnvironment.java
PythonStreamExecutionEnvironment.generate_sequence
public PythonDataStream generate_sequence(long from, long to) { """ A thin wrapper layer over {@link StreamExecutionEnvironment#generateSequence(long, long)}. @param from The number to start at (inclusive) @param to The number to stop at (inclusive) @return A python data stream, containing all number in the [...
java
public PythonDataStream generate_sequence(long from, long to) { return new PythonDataStream<>(env.generateSequence(from, to).map(new AdapterMap<>())); }
[ "public", "PythonDataStream", "generate_sequence", "(", "long", "from", ",", "long", "to", ")", "{", "return", "new", "PythonDataStream", "<>", "(", "env", ".", "generateSequence", "(", "from", ",", "to", ")", ".", "map", "(", "new", "AdapterMap", "<>", "(...
A thin wrapper layer over {@link StreamExecutionEnvironment#generateSequence(long, long)}. @param from The number to start at (inclusive) @param to The number to stop at (inclusive) @return A python data stream, containing all number in the [from, to] interval
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "StreamExecutionEnvironment#generateSequence", "(", "long", "long", ")", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/environment/PythonStreamExecutionEnvironment.java#L176-L178
google/closure-templates
java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitor.java
GenJsCodeVisitor.handleForeachLoop
private Statement handleForeachLoop( ForNonemptyNode node, Expression limit, Function<Expression, Expression> getDataItemFunction) { """ Example: <pre> {for $foo in $boo.foos} ... {/for} </pre> might generate <pre> for (var foo2Index = 0; foo2Index &lt; foo2ListLen; foo2Index++) { ...
java
private Statement handleForeachLoop( ForNonemptyNode node, Expression limit, Function<Expression, Expression> getDataItemFunction) { // Build some local variable names. String varName = node.getVarName(); String varPrefix = varName + node.getForNodeId(); // TODO(b/32224284): A more co...
[ "private", "Statement", "handleForeachLoop", "(", "ForNonemptyNode", "node", ",", "Expression", "limit", ",", "Function", "<", "Expression", ",", "Expression", ">", "getDataItemFunction", ")", "{", "// Build some local variable names.", "String", "varName", "=", "node",...
Example: <pre> {for $foo in $boo.foos} ... {/for} </pre> might generate <pre> for (var foo2Index = 0; foo2Index &lt; foo2ListLen; foo2Index++) { var foo2Data = foo2List[foo2Index]; ... } </pre>
[ "Example", ":" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/internal/GenJsCodeVisitor.java#L1249-L1278
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/images/ImageHandlerBuilder.java
ImageHandlerBuilder.reduceQuality
public ImageHandlerBuilder reduceQuality(float qualityPercent) { """ Uses compression quality of <code>qualityPercent</code>. Can be applied multiple times @param qualityPercent the percentage of compression quality wanted. Must be between 0.0 and 1.0 @return this for chaining """ ImageWriter image...
java
public ImageHandlerBuilder reduceQuality(float qualityPercent) { ImageWriter imageWriter = ImageIO.getImageWritersByFormatName(fn.extension()).next(); if (imageWriter != null) { ImageWriteParam writeParam = imageWriter.getDefaultWriteParam(); writeParam.setCompressionMode(Ima...
[ "public", "ImageHandlerBuilder", "reduceQuality", "(", "float", "qualityPercent", ")", "{", "ImageWriter", "imageWriter", "=", "ImageIO", ".", "getImageWritersByFormatName", "(", "fn", ".", "extension", "(", ")", ")", ".", "next", "(", ")", ";", "if", "(", "im...
Uses compression quality of <code>qualityPercent</code>. Can be applied multiple times @param qualityPercent the percentage of compression quality wanted. Must be between 0.0 and 1.0 @return this for chaining
[ "Uses", "compression", "quality", "of", "<code", ">", "qualityPercent<", "/", "code", ">", ".", "Can", "be", "applied", "multiple", "times" ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/images/ImageHandlerBuilder.java#L220-L245
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java
MemcmpDecoder.readFixed
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { """ A fixed is decoded by just reading length bytes, and placing the bytes read into the bytes array, starting at index start. @param bytes The bytes array to populate. @param start The index in bytes to place the re...
java
@Override public void readFixed(byte[] bytes, int start, int length) throws IOException { int i = in.read(bytes, start, length); if (i < length) { throw new EOFException(); } }
[ "@", "Override", "public", "void", "readFixed", "(", "byte", "[", "]", "bytes", ",", "int", "start", ",", "int", "length", ")", "throws", "IOException", "{", "int", "i", "=", "in", ".", "read", "(", "bytes", ",", "start", ",", "length", ")", ";", "...
A fixed is decoded by just reading length bytes, and placing the bytes read into the bytes array, starting at index start. @param bytes The bytes array to populate. @param start The index in bytes to place the read bytes. @param length The number of bytes to read.
[ "A", "fixed", "is", "decoded", "by", "just", "reading", "length", "bytes", "and", "placing", "the", "bytes", "read", "into", "the", "bytes", "array", "starting", "at", "index", "start", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpDecoder.java#L227-L233
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java
ParallelRunner.submitCallable
public void submitCallable(Callable<Void> callable, String name) { """ Submit a callable to the thread pool <p> This method submits a task and returns immediately </p> @param callable the callable to submit @param name for the future """ this.futures.add(new NamedFuture(this.executor.submit(callab...
java
public void submitCallable(Callable<Void> callable, String name) { this.futures.add(new NamedFuture(this.executor.submit(callable), name)); }
[ "public", "void", "submitCallable", "(", "Callable", "<", "Void", ">", "callable", ",", "String", "name", ")", "{", "this", ".", "futures", ".", "add", "(", "new", "NamedFuture", "(", "this", ".", "executor", ".", "submit", "(", "callable", ")", ",", "...
Submit a callable to the thread pool <p> This method submits a task and returns immediately </p> @param callable the callable to submit @param name for the future
[ "Submit", "a", "callable", "to", "the", "thread", "pool" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java#L349-L351
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java
CqlConfigHelper.setInputColumns
public static void setInputColumns(Configuration conf, String columns) { """ Set the CQL columns for the input of this job. @param conf Job configuration you are about to run @param columns """ if (columns == null || columns.isEmpty()) return; conf.set(INPUT_CQL_COLUMNS...
java
public static void setInputColumns(Configuration conf, String columns) { if (columns == null || columns.isEmpty()) return; conf.set(INPUT_CQL_COLUMNS_CONFIG, columns); }
[ "public", "static", "void", "setInputColumns", "(", "Configuration", "conf", ",", "String", "columns", ")", "{", "if", "(", "columns", "==", "null", "||", "columns", ".", "isEmpty", "(", ")", ")", "return", ";", "conf", ".", "set", "(", "INPUT_CQL_COLUMNS_...
Set the CQL columns for the input of this job. @param conf Job configuration you are about to run @param columns
[ "Set", "the", "CQL", "columns", "for", "the", "input", "of", "this", "job", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java#L94-L100
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/PosixParser.java
PosixParser.processOptionToken
private void processOptionToken(String token, boolean stopAtNonOption) { """ <p>If an {@link Option} exists for <code>token</code> then add the token to the processed list.</p> <p>If an {@link Option} does not exist and <code>stopAtNonOption</code> is set then add the remaining tokens to the processed tokens ...
java
private void processOptionToken(String token, boolean stopAtNonOption) { if (stopAtNonOption && !options.hasOption(token)) { eatTheRest = true; } if (options.hasOption(token)) { currentOption = options.getOption(token); } tokens.add(t...
[ "private", "void", "processOptionToken", "(", "String", "token", ",", "boolean", "stopAtNonOption", ")", "{", "if", "(", "stopAtNonOption", "&&", "!", "options", ".", "hasOption", "(", "token", ")", ")", "{", "eatTheRest", "=", "true", ";", "}", "if", "(",...
<p>If an {@link Option} exists for <code>token</code> then add the token to the processed list.</p> <p>If an {@link Option} does not exist and <code>stopAtNonOption</code> is set then add the remaining tokens to the processed tokens list directly.</p> @param token The current option token @param stopAtNonOption Speci...
[ "<p", ">", "If", "an", "{", "@link", "Option", "}", "exists", "for", "<code", ">", "token<", "/", "code", ">", "then", "add", "the", "token", "to", "the", "processed", "list", ".", "<", "/", "p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/PosixParser.java#L223-L236
xcesco/kripton
kripton-shared-preferences/src/main/java/com/abubusoft/kripton/common/PrefsTypeAdapterUtils.java
PrefsTypeAdapterUtils.toData
@SuppressWarnings("unchecked") public static <D, J> D toData(Class<? extends PreferenceTypeAdapter<J, D>> clazz, J javaValue) { """ To data. @param <D> the generic type @param <J> the generic type @param clazz the clazz @param javaValue the java value @return the d """ PreferenceTypeAdapter<J, D> ada...
java
@SuppressWarnings("unchecked") public static <D, J> D toData(Class<? extends PreferenceTypeAdapter<J, D>> clazz, J javaValue) { PreferenceTypeAdapter<J, D> adapter = cache.get(clazz); if (adapter == null) { try { lock.lock(); adapter = clazz.newInstance(); cache.put(clazz, adapter); } catch (Thr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "D", ",", "J", ">", "D", "toData", "(", "Class", "<", "?", "extends", "PreferenceTypeAdapter", "<", "J", ",", "D", ">", ">", "clazz", ",", "J", "javaValue", ")", "{", "Prefere...
To data. @param <D> the generic type @param <J> the generic type @param clazz the clazz @param javaValue the java value @return the d
[ "To", "data", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-shared-preferences/src/main/java/com/abubusoft/kripton/common/PrefsTypeAdapterUtils.java#L105-L122
forge/furnace
proxy/src/main/java/org/jboss/forge/furnace/proxy/Proxies.java
Proxies.areEquivalent
public static boolean areEquivalent(Object proxiedObj, Object anotherProxiedObj) { """ This method tests if two proxied objects are equivalent. It does so by comparing the class names and the hashCode, since they may be loaded from different classloaders. """ if (proxiedObj == null && anotherProxiedOb...
java
public static boolean areEquivalent(Object proxiedObj, Object anotherProxiedObj) { if (proxiedObj == null && anotherProxiedObj == null) { return true; } else if (proxiedObj == null || anotherProxiedObj == null) { return false; } else { Object...
[ "public", "static", "boolean", "areEquivalent", "(", "Object", "proxiedObj", ",", "Object", "anotherProxiedObj", ")", "{", "if", "(", "proxiedObj", "==", "null", "&&", "anotherProxiedObj", "==", "null", ")", "{", "return", "true", ";", "}", "else", "if", "("...
This method tests if two proxied objects are equivalent. It does so by comparing the class names and the hashCode, since they may be loaded from different classloaders.
[ "This", "method", "tests", "if", "two", "proxied", "objects", "are", "equivalent", "." ]
train
https://github.com/forge/furnace/blob/bbe6deaa3c0d85ba43daa3e2f7d486f2dad21e0a/proxy/src/main/java/org/jboss/forge/furnace/proxy/Proxies.java#L398-L434
auth0/auth0-spring-security-api
lib/src/main/java/com/auth0/spring/security/api/JwtWebSecurityConfigurer.java
JwtWebSecurityConfigurer.forHS256
@SuppressWarnings( { """ Configures application authorization for JWT signed with HS256 @param audience identifier of the API and must match the {@code aud} value in the token @param issuer of the token for this API and must match the {@code iss} value in the token @param secret used to sign and verify tokens ...
java
@SuppressWarnings({"WeakerAccess", "SameParameterValue"}) public static JwtWebSecurityConfigurer forHS256(String audience, String issuer, byte[] secret) { return new JwtWebSecurityConfigurer(audience, issuer, new JwtAuthenticationProvider(secret, issuer, audience)); }
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"SameParameterValue\"", "}", ")", "public", "static", "JwtWebSecurityConfigurer", "forHS256", "(", "String", "audience", ",", "String", "issuer", ",", "byte", "[", "]", "secret", ")", "{", "return", "...
Configures application authorization for JWT signed with HS256 @param audience identifier of the API and must match the {@code aud} value in the token @param issuer of the token for this API and must match the {@code iss} value in the token @param secret used to sign and verify tokens @return JwtWebSecurityConfigurer f...
[ "Configures", "application", "authorization", "for", "JWT", "signed", "with", "HS256" ]
train
https://github.com/auth0/auth0-spring-security-api/blob/cebd4daa0125efd4da9e651cf29aa5ebdb147e2b/lib/src/main/java/com/auth0/spring/security/api/JwtWebSecurityConfigurer.java#L73-L76
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.order_orderId_paymentMeans_GET
public OvhPaymentMeans order_orderId_paymentMeans_GET(Long orderId) throws IOException { """ Return main data about the object the processing of the order generated REST: GET /me/order/{orderId}/paymentMeans @param orderId [required] """ String qPath = "/me/order/{orderId}/paymentMeans"; StringBuilder ...
java
public OvhPaymentMeans order_orderId_paymentMeans_GET(Long orderId) throws IOException { String qPath = "/me/order/{orderId}/paymentMeans"; StringBuilder sb = path(qPath, orderId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPaymentMeans.class); }
[ "public", "OvhPaymentMeans", "order_orderId_paymentMeans_GET", "(", "Long", "orderId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/order/{orderId}/paymentMeans\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "orderId", ")", ";", ...
Return main data about the object the processing of the order generated REST: GET /me/order/{orderId}/paymentMeans @param orderId [required]
[ "Return", "main", "data", "about", "the", "object", "the", "processing", "of", "the", "order", "generated" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1897-L1902
ag-gipp/MathMLTools
mathml-converters/src/main/java/com/formulasearchengine/mathmltools/converters/MathMLConverter.java
MathMLConverter.verifyMathML
String verifyMathML(String canMathML) throws MathConverterException { """ Just a quick scan over. @param canMathML final mathml to be inspected @return returns input string @throws MathConverterException if it is not a well-structured mathml """ try { Document tempDoc = XMLHelper.strin...
java
String verifyMathML(String canMathML) throws MathConverterException { try { Document tempDoc = XMLHelper.string2Doc(canMathML, true); Content content = scanFormulaNode((Element) tempDoc.getFirstChild()); //verify the formula if (content == Content.mathml) { ...
[ "String", "verifyMathML", "(", "String", "canMathML", ")", "throws", "MathConverterException", "{", "try", "{", "Document", "tempDoc", "=", "XMLHelper", ".", "string2Doc", "(", "canMathML", ",", "true", ")", ";", "Content", "content", "=", "scanFormulaNode", "("...
Just a quick scan over. @param canMathML final mathml to be inspected @return returns input string @throws MathConverterException if it is not a well-structured mathml
[ "Just", "a", "quick", "scan", "over", "." ]
train
https://github.com/ag-gipp/MathMLTools/blob/77c69b6366a5b8720796d1cd9d155ba26c2f1b20/mathml-converters/src/main/java/com/formulasearchengine/mathmltools/converters/MathMLConverter.java#L125-L139
lukas-krecan/JsonUnit
json-unit-spring/src/main/java/net/javacrumbs/jsonunit/spring/JsonUnitResultMatchers.java
JsonUnitResultMatchers.isNotEqualTo
public ResultMatcher isNotEqualTo(final Object expected) { """ Fails if compared documents are equal. The expected object is converted to JSON before comparison. Ignores order of sibling nodes and whitespaces. """ return new AbstractResultMatcher(path, configuration) { public void doMatch(...
java
public ResultMatcher isNotEqualTo(final Object expected) { return new AbstractResultMatcher(path, configuration) { public void doMatch(Object actual) { Diff diff = createDiff(expected, actual); if (diff.similar()) { failWithMessage("JSON is equal."...
[ "public", "ResultMatcher", "isNotEqualTo", "(", "final", "Object", "expected", ")", "{", "return", "new", "AbstractResultMatcher", "(", "path", ",", "configuration", ")", "{", "public", "void", "doMatch", "(", "Object", "actual", ")", "{", "Diff", "diff", "=",...
Fails if compared documents are equal. The expected object is converted to JSON before comparison. Ignores order of sibling nodes and whitespaces.
[ "Fails", "if", "compared", "documents", "are", "equal", ".", "The", "expected", "object", "is", "converted", "to", "JSON", "before", "comparison", ".", "Ignores", "order", "of", "sibling", "nodes", "and", "whitespaces", "." ]
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit-spring/src/main/java/net/javacrumbs/jsonunit/spring/JsonUnitResultMatchers.java#L126-L135
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/math/matrixes/Matrix.java
Matrix.setColumn
public void setColumn(ColumnVector cv, int c) throws MatrixException { """ Set a column of this matrix from a column vector. @param cv the column vector @param c the column index @throws numbercruncher.MatrixException for an invalid index or an invalid vector size """ if ((c < 0) || (c >= n...
java
public void setColumn(ColumnVector cv, int c) throws MatrixException { if ((c < 0) || (c >= nCols)) { throw new MatrixException(MatrixException.INVALID_INDEX); } if (nRows != cv.nRows) { throw new MatrixException( MatrixExceptio...
[ "public", "void", "setColumn", "(", "ColumnVector", "cv", ",", "int", "c", ")", "throws", "MatrixException", "{", "if", "(", "(", "c", "<", "0", ")", "||", "(", "c", ">=", "nCols", ")", ")", "{", "throw", "new", "MatrixException", "(", "MatrixException...
Set a column of this matrix from a column vector. @param cv the column vector @param c the column index @throws numbercruncher.MatrixException for an invalid index or an invalid vector size
[ "Set", "a", "column", "of", "this", "matrix", "from", "a", "column", "vector", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/math/matrixes/Matrix.java#L205-L219
rythmengine/rythmengine
src/main/java/org/rythmengine/internal/CodeBuilder.java
CodeBuilder.addInclude
public String addInclude(String include, int lineNo, ICodeType codeType) { """ add include @param include @param lineNo @param codeType @return the string """ TemplateTestResult testResult = engine.testTemplate(include, templateClass, codeType); if (null == testResult) { throw n...
java
public String addInclude(String include, int lineNo, ICodeType codeType) { TemplateTestResult testResult = engine.testTemplate(include, templateClass, codeType); if (null == testResult) { throw new ParseException(engine, templateClass, lineNo, "include template not found: %s", include); ...
[ "public", "String", "addInclude", "(", "String", "include", ",", "int", "lineNo", ",", "ICodeType", "codeType", ")", "{", "TemplateTestResult", "testResult", "=", "engine", ".", "testTemplate", "(", "include", ",", "templateClass", ",", "codeType", ")", ";", "...
add include @param include @param lineNo @param codeType @return the string
[ "add", "include" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/internal/CodeBuilder.java#L559-L584
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/A_CmsTabHandler.java
A_CmsTabHandler.selectResource
public void selectResource(String resourcePath, CmsUUID structureId, String title, String resourceType) { """ Selects the given resource and sets its path into the xml-content field or editor link.<p> @param resourcePath the item resource path @param structureId the structure id @param title the resource titl...
java
public void selectResource(String resourcePath, CmsUUID structureId, String title, String resourceType) { m_controller.selectResource(resourcePath, structureId, title, resourceType); }
[ "public", "void", "selectResource", "(", "String", "resourcePath", ",", "CmsUUID", "structureId", ",", "String", "title", ",", "String", "resourceType", ")", "{", "m_controller", ".", "selectResource", "(", "resourcePath", ",", "structureId", ",", "title", ",", ...
Selects the given resource and sets its path into the xml-content field or editor link.<p> @param resourcePath the item resource path @param structureId the structure id @param title the resource title @param resourceType the item resource type
[ "Selects", "the", "given", "resource", "and", "sets", "its", "path", "into", "the", "xml", "-", "content", "field", "or", "editor", "link", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/A_CmsTabHandler.java#L151-L154
Trilarion/java-vorbis-support
src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java
CodeBook.encodev
int encodev(int best, float[] a, Buffer b) { """ returns the number of bits and *modifies a* to the quantization value """ for (int k = 0; k < dim; k++) { a[k] = valuelist[best * dim + k]; } return (encode(best, b)); }
java
int encodev(int best, float[] a, Buffer b) { for (int k = 0; k < dim; k++) { a[k] = valuelist[best * dim + k]; } return (encode(best, b)); }
[ "int", "encodev", "(", "int", "best", ",", "float", "[", "]", "a", ",", "Buffer", "b", ")", "{", "for", "(", "int", "k", "=", "0", ";", "k", "<", "dim", ";", "k", "++", ")", "{", "a", "[", "k", "]", "=", "valuelist", "[", "best", "*", "di...
returns the number of bits and *modifies a* to the quantization value
[ "returns", "the", "number", "of", "bits", "and", "*", "modifies", "a", "*", "to", "the", "quantization", "value" ]
train
https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java#L65-L70
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/helpers/MBeanRoutedNotificationHelper.java
MBeanRoutedNotificationHelper.postRoutedServerNotificationListenerRegistrationEvent
private void postRoutedServerNotificationListenerRegistrationEvent(String operation, NotificationTargetInformation nti, ObjectName listener, NotificationFilter filter, Object handback) { """ Post an event to EventAdmin, instructing the Target-C...
java
private void postRoutedServerNotificationListenerRegistrationEvent(String operation, NotificationTargetInformation nti, ObjectName listener, NotificationFilter filter, Object handback) { Map<String, Object> props = createServerListenerRegist...
[ "private", "void", "postRoutedServerNotificationListenerRegistrationEvent", "(", "String", "operation", ",", "NotificationTargetInformation", "nti", ",", "ObjectName", "listener", ",", "NotificationFilter", "filter", ",", "Object", "handback", ")", "{", "Map", "<", "Strin...
Post an event to EventAdmin, instructing the Target-Client Manager to register or unregister a listener MBean on a given target.
[ "Post", "an", "event", "to", "EventAdmin", "instructing", "the", "Target", "-", "Client", "Manager", "to", "register", "or", "unregister", "a", "listener", "MBean", "on", "a", "given", "target", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/helpers/MBeanRoutedNotificationHelper.java#L257-L261
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroData.java
SynchroData.readTableHeaders
private List<SynchroTable> readTableHeaders(InputStream is) throws IOException { """ Read the table headers. This allows us to break the file into chunks representing the individual tables. @param is input stream @return list of tables in the file """ // Read the headers List<SynchroTable> tab...
java
private List<SynchroTable> readTableHeaders(InputStream is) throws IOException { // Read the headers List<SynchroTable> tables = new ArrayList<SynchroTable>(); byte[] header = new byte[48]; while (true) { is.read(header); m_offset += 48; SynchroTable table = r...
[ "private", "List", "<", "SynchroTable", ">", "readTableHeaders", "(", "InputStream", "is", ")", "throws", "IOException", "{", "// Read the headers", "List", "<", "SynchroTable", ">", "tables", "=", "new", "ArrayList", "<", "SynchroTable", ">", "(", ")", ";", "...
Read the table headers. This allows us to break the file into chunks representing the individual tables. @param is input stream @return list of tables in the file
[ "Read", "the", "table", "headers", ".", "This", "allows", "us", "to", "break", "the", "file", "into", "chunks", "representing", "the", "individual", "tables", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroData.java#L88-L132
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java
ProfilerTimerFilter.sessionCreated
@Override public void sessionCreated(NextFilter nextFilter, IoSession session) throws Exception { """ Profile a SessionCreated event. This method will gather the following informations : - the method duration - the shortest execution time - the slowest execution time - the average execution ti...
java
@Override public void sessionCreated(NextFilter nextFilter, IoSession session) throws Exception { if (profileSessionCreated) { long start = timeNow(); nextFilter.sessionCreated(session); long end = timeNow(); sessionCreatedTimerWorker.addNewDuratio...
[ "@", "Override", "public", "void", "sessionCreated", "(", "NextFilter", "nextFilter", ",", "IoSession", "session", ")", "throws", "Exception", "{", "if", "(", "profileSessionCreated", ")", "{", "long", "start", "=", "timeNow", "(", ")", ";", "nextFilter", ".",...
Profile a SessionCreated event. This method will gather the following informations : - the method duration - the shortest execution time - the slowest execution time - the average execution time - the global number of calls @param nextFilter The filter to call next @param session The associated session
[ "Profile", "a", "SessionCreated", "event", ".", "This", "method", "will", "gather", "the", "following", "informations", ":", "-", "the", "method", "duration", "-", "the", "shortest", "execution", "time", "-", "the", "slowest", "execution", "time", "-", "the", ...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/statistic/ProfilerTimerFilter.java#L389-L400
pf4j/pf4j
pf4j/src/main/java/org/pf4j/util/DirectedGraph.java
DirectedGraph.addEdge
public void addEdge(V from, V to) { """ Add an edge to the graph; if either vertex does not exist, it's added. This implementation allows the creation of multi-edges and self-loops. """ addVertex(from); addVertex(to); neighbors.get(from).add(to); }
java
public void addEdge(V from, V to) { addVertex(from); addVertex(to); neighbors.get(from).add(to); }
[ "public", "void", "addEdge", "(", "V", "from", ",", "V", "to", ")", "{", "addVertex", "(", "from", ")", ";", "addVertex", "(", "to", ")", ";", "neighbors", ".", "get", "(", "from", ")", ".", "add", "(", "to", ")", ";", "}" ]
Add an edge to the graph; if either vertex does not exist, it's added. This implementation allows the creation of multi-edges and self-loops.
[ "Add", "an", "edge", "to", "the", "graph", ";", "if", "either", "vertex", "does", "not", "exist", "it", "s", "added", ".", "This", "implementation", "allows", "the", "creation", "of", "multi", "-", "edges", "and", "self", "-", "loops", "." ]
train
https://github.com/pf4j/pf4j/blob/6dd7a6069f0e2fbd842c81e2c8c388918b88ea81/pf4j/src/main/java/org/pf4j/util/DirectedGraph.java#L65-L69
gondor/kbop
src/main/java/org/pacesys/kbop/internal/AbstractKeyedObjectPool.java
AbstractKeyedObjectPool.getBlockingUntilAvailableOrTimeout
E getBlockingUntilAvailableOrTimeout(final PoolKey<K> key, final long timeout, final TimeUnit unit, final PoolWaitFuture<E> future) throws InterruptedException, TimeoutException { """ Internal: Blocks until the object to be borrowed based on the key is available or until the max timeout specified has lapsed. @p...
java
E getBlockingUntilAvailableOrTimeout(final PoolKey<K> key, final long timeout, final TimeUnit unit, final PoolWaitFuture<E> future) throws InterruptedException, TimeoutException { Date deadline = null; if (timeout > 0) { deadline = new Date(System.currentTimeMillis() + unit.toMillis(timeout)); } lock.lock()...
[ "E", "getBlockingUntilAvailableOrTimeout", "(", "final", "PoolKey", "<", "K", ">", "key", ",", "final", "long", "timeout", ",", "final", "TimeUnit", "unit", ",", "final", "PoolWaitFuture", "<", "E", ">", "future", ")", "throws", "InterruptedException", ",", "T...
Internal: Blocks until the object to be borrowed based on the key is available or until the max timeout specified has lapsed. @param key the Pool Key used to lookup the Object to borrow @param timeout the maximum time to wait @param unit the time unit of the timeout argument @param future the current future waiting on...
[ "Internal", ":", "Blocks", "until", "the", "object", "to", "be", "borrowed", "based", "on", "the", "key", "is", "available", "or", "until", "the", "max", "timeout", "specified", "has", "lapsed", "." ]
train
https://github.com/gondor/kbop/blob/a176fd845f1e146610f03a1cb3cb0d661ebf4faa/src/main/java/org/pacesys/kbop/internal/AbstractKeyedObjectPool.java#L146-L172
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/utils/FileUtilities.java
FileUtilities.deleteFileOrDir
public static boolean deleteFileOrDir( File filehandle ) { """ Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns false. @param filehandle @return true if all deletions were successful """ if (filehandle.isDirectory()) { ...
java
public static boolean deleteFileOrDir( File filehandle ) { if (filehandle.isDirectory()) { String[] children = filehandle.list(); for( int i = 0; i < children.length; i++ ) { boolean success = deleteFileOrDir(new File(filehandle, children[i])); if (!succe...
[ "public", "static", "boolean", "deleteFileOrDir", "(", "File", "filehandle", ")", "{", "if", "(", "filehandle", ".", "isDirectory", "(", ")", ")", "{", "String", "[", "]", "children", "=", "filehandle", ".", "list", "(", ")", ";", "for", "(", "int", "i...
Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns false. @param filehandle @return true if all deletions were successful
[ "Returns", "true", "if", "all", "deletions", "were", "successful", ".", "If", "a", "deletion", "fails", "the", "method", "stops", "attempting", "to", "delete", "and", "returns", "false", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/utils/FileUtilities.java#L183-L204
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/primitives/UnsignedLongs.java
UnsignedLongs.parseUnsignedLong
@CanIgnoreReturnValue public static long parseUnsignedLong(String string, int radix) { """ Returns the unsigned {@code long} value represented by a string with the given radix. @param s the string containing the unsigned {@code long} representation to be parsed. @param radix the radix to use while parsing {@...
java
@CanIgnoreReturnValue public static long parseUnsignedLong(String string, int radix) { checkNotNull(string); if (string.length() == 0) { throw new NumberFormatException("empty string"); } if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) { throw new NumberFormatException("ill...
[ "@", "CanIgnoreReturnValue", "public", "static", "long", "parseUnsignedLong", "(", "String", "string", ",", "int", "radix", ")", "{", "checkNotNull", "(", "string", ")", ";", "if", "(", "string", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "ne...
Returns the unsigned {@code long} value represented by a string with the given radix. @param s the string containing the unsigned {@code long} representation to be parsed. @param radix the radix to use while parsing {@code string} @throws NumberFormatException if the string does not contain a valid unsigned {@code lon...
[ "Returns", "the", "unsigned", "{", "@code", "long", "}", "value", "represented", "by", "a", "string", "with", "the", "given", "radix", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/primitives/UnsignedLongs.java#L298-L322
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java
POIUtils.getCell
public static Cell getCell(final Sheet sheet, final CellPosition address) { """ シートから任意アドレスのセルを取得する。 @since 1.4 @param sheet シートオブジェクト @param address セルのアドレス @return セル @throws IllegalArgumentException {@literal sheet == null or address == null.} """ ArgUtils.notNull(sheet, "sheet"); Arg...
java
public static Cell getCell(final Sheet sheet, final CellPosition address) { ArgUtils.notNull(sheet, "sheet"); ArgUtils.notNull(address, "address"); return getCell(sheet, address.getColumn(), address.getRow()); }
[ "public", "static", "Cell", "getCell", "(", "final", "Sheet", "sheet", ",", "final", "CellPosition", "address", ")", "{", "ArgUtils", ".", "notNull", "(", "sheet", ",", "\"sheet\"", ")", ";", "ArgUtils", ".", "notNull", "(", "address", ",", "\"address\"", ...
シートから任意アドレスのセルを取得する。 @since 1.4 @param sheet シートオブジェクト @param address セルのアドレス @return セル @throws IllegalArgumentException {@literal sheet == null or address == null.}
[ "シートから任意アドレスのセルを取得する。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java#L152-L156
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksInner.java
ServerCommunicationLinksInner.listByServerAsync
public Observable<List<ServerCommunicationLinkInner>> listByServerAsync(String resourceGroupName, String serverName) { """ Gets a list of server communication links. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API ...
java
public Observable<List<ServerCommunicationLinkInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ServerCommunicationLinkInner>>, List<ServerCommunicationLinkInner>>() { ...
[ "public", "Observable", "<", "List", "<", "ServerCommunicationLinkInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName...
Gets a list of server communication links. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Gets", "a", "list", "of", "server", "communication", "links", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksInner.java#L488-L495
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/util/xml/XmlUtils.java
XmlUtils.advanceReaderToNext
public static boolean advanceReaderToNext(XMLStreamReader xsr, String tag) throws javax.xml.stream.XMLStreamException { """ Advances the Stream Reader to the next occurrence of a user-specified tag. @param xsr The reader to advance. @param tag The tag to advance to. No brackets, just the name. @return ...
java
public static boolean advanceReaderToNext(XMLStreamReader xsr, String tag) throws javax.xml.stream.XMLStreamException { if (tag == null) { throw new IllegalArgumentException("Tag name can't be null"); } if (xsr == null) { throw new IllegalArgumentException("Stream Reader can't be nul...
[ "public", "static", "boolean", "advanceReaderToNext", "(", "XMLStreamReader", "xsr", ",", "String", "tag", ")", "throws", "javax", ".", "xml", ".", "stream", ".", "XMLStreamException", "{", "if", "(", "tag", "==", "null", ")", "{", "throw", "new", "IllegalAr...
Advances the Stream Reader to the next occurrence of a user-specified tag. @param xsr The reader to advance. @param tag The tag to advance to. No brackets, just the name. @return True if advanced successfully, false when the end of document was successfully reached. @throws javax.xml.stream.XMLStreamException In all c...
[ "Advances", "the", "Stream", "Reader", "to", "the", "next", "occurrence", "of", "a", "user", "-", "specified", "tag", "." ]
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/xml/XmlUtils.java#L256-L271
frostwire/frostwire-jlibtorrent
src/main/java/com/frostwire/jlibtorrent/TorrentBuilder.java
TorrentBuilder.addNode
public TorrentBuilder addNode(Pair<String, Integer> value) { """ This adds a DHT node to the torrent. This especially useful if you're creating a tracker less torrent. It can be used by clients to bootstrap their DHT node from. The node is a hostname and a port number where there is a DHT node running. You can ...
java
public TorrentBuilder addNode(Pair<String, Integer> value) { if (value != null) { this.nodes.add(value); } return this; }
[ "public", "TorrentBuilder", "addNode", "(", "Pair", "<", "String", ",", "Integer", ">", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "this", ".", "nodes", ".", "add", "(", "value", ")", ";", "}", "return", "this", ";", "}" ]
This adds a DHT node to the torrent. This especially useful if you're creating a tracker less torrent. It can be used by clients to bootstrap their DHT node from. The node is a hostname and a port number where there is a DHT node running. You can have any number of DHT nodes in a torrent. @param value @return
[ "This", "adds", "a", "DHT", "node", "to", "the", "torrent", ".", "This", "especially", "useful", "if", "you", "re", "creating", "a", "tracker", "less", "torrent", ".", "It", "can", "be", "used", "by", "clients", "to", "bootstrap", "their", "DHT", "node",...
train
https://github.com/frostwire/frostwire-jlibtorrent/blob/a29249a940d34aba8c4677d238b472ef01833506/src/main/java/com/frostwire/jlibtorrent/TorrentBuilder.java#L290-L295
EdwardRaff/JSAT
JSAT/src/jsat/io/CSV.java
CSV.readC
public static ClassificationDataSet readC(int classification_target, Reader reader, int lines_to_skip, Set<Integer> cat_cols) throws IOException { """ Reads in a CSV dataset as a classification dataset. Comments assumed to start with the "#" symbol. @param classification_target the column index (starting from ...
java
public static ClassificationDataSet readC(int classification_target, Reader reader, int lines_to_skip, Set<Integer> cat_cols) throws IOException { return readC(classification_target, reader, DEFAULT_DELIMITER, lines_to_skip, DEFAULT_COMMENT, cat_cols); }
[ "public", "static", "ClassificationDataSet", "readC", "(", "int", "classification_target", ",", "Reader", "reader", ",", "int", "lines_to_skip", ",", "Set", "<", "Integer", ">", "cat_cols", ")", "throws", "IOException", "{", "return", "readC", "(", "classification...
Reads in a CSV dataset as a classification dataset. Comments assumed to start with the "#" symbol. @param classification_target the column index (starting from zero) of the feature that will be the categorical target value @param reader the reader for the CSV content @param lines_to_skip the number of lines to skip wh...
[ "Reads", "in", "a", "CSV", "dataset", "as", "a", "classification", "dataset", ".", "Comments", "assumed", "to", "start", "with", "the", "#", "symbol", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/CSV.java#L172-L175
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java
FormatCache.getDateInstance
F getDateInstance(final int dateStyle, final TimeZone timeZone, final Locale locale) { """ package protected, for access from FastDateFormat; do not make public or protected """ return getDateTimeInstance(Integer.valueOf(dateStyle), null, timeZone, locale); }
java
F getDateInstance(final int dateStyle, final TimeZone timeZone, final Locale locale) { return getDateTimeInstance(Integer.valueOf(dateStyle), null, timeZone, locale); }
[ "F", "getDateInstance", "(", "final", "int", "dateStyle", ",", "final", "TimeZone", "timeZone", ",", "final", "Locale", "locale", ")", "{", "return", "getDateTimeInstance", "(", "Integer", ".", "valueOf", "(", "dateStyle", ")", ",", "null", ",", "timeZone", ...
package protected, for access from FastDateFormat; do not make public or protected
[ "package", "protected", "for", "access", "from", "FastDateFormat", ";", "do", "not", "make", "public", "or", "protected" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FormatCache.java#L131-L133
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/support/cache/api/CacheSetUtil.java
CacheSetUtil.values
public static <T> Single<Set<T>> values(CacheConfigBean cacheConfigBean, String key, Class<T> vClazz) { """ retrial the cached set @param cacheConfigBean the datasource configuration @param key the key @param vClazz the class for the element @param <T> generic type of the set...
java
public static <T> Single<Set<T>> values(CacheConfigBean cacheConfigBean, String key, Class<T> vClazz) { return values(cacheConfigBean, key) .map(values -> { Set<T> _values = new TreeSet<>(); if (values != null && !values.isEmpty()) { ...
[ "public", "static", "<", "T", ">", "Single", "<", "Set", "<", "T", ">", ">", "values", "(", "CacheConfigBean", "cacheConfigBean", ",", "String", "key", ",", "Class", "<", "T", ">", "vClazz", ")", "{", "return", "values", "(", "cacheConfigBean", ",", "k...
retrial the cached set @param cacheConfigBean the datasource configuration @param key the key @param vClazz the class for the element @param <T> generic type of the set @return the typed value set
[ "retrial", "the", "cached", "set" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/support/cache/api/CacheSetUtil.java#L157-L168
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/service/ClientConfigurationService.java
ClientConfigurationService.addCallback
private static boolean addCallback(String applicationId, DelayedCallback callback) { """ Add a delayed callback for the given application id. Returns whether this is the first request for the application id. @param applicationId application id @param callback callback @return true when first request for that...
java
private static boolean addCallback(String applicationId, DelayedCallback callback) { boolean isFirst = false; List<DelayedCallback> list = BACKLOG.get(applicationId); if (null == list) { list = new ArrayList<DelayedCallback>(); BACKLOG.put(applicationId, list); isFirst = true; } list.add(callback); ...
[ "private", "static", "boolean", "addCallback", "(", "String", "applicationId", ",", "DelayedCallback", "callback", ")", "{", "boolean", "isFirst", "=", "false", ";", "List", "<", "DelayedCallback", ">", "list", "=", "BACKLOG", ".", "get", "(", "applicationId", ...
Add a delayed callback for the given application id. Returns whether this is the first request for the application id. @param applicationId application id @param callback callback @return true when first request for that application id
[ "Add", "a", "delayed", "callback", "for", "the", "given", "application", "id", ".", "Returns", "whether", "this", "is", "the", "first", "request", "for", "the", "application", "id", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/service/ClientConfigurationService.java#L107-L117
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java
ServerStatusFile.getNextMessage
private ServerStatusMessage getNextMessage(BufferedReader reader) throws Exception { """ return the next message, or null if there are no more messages in the file """ boolean messageStarted = false; String line = reader.readLine(); while (line != null && !messageStarted) ...
java
private ServerStatusMessage getNextMessage(BufferedReader reader) throws Exception { boolean messageStarted = false; String line = reader.readLine(); while (line != null && !messageStarted) { if (line.equals(BEGIN_LINE)) { messageStarted = true; ...
[ "private", "ServerStatusMessage", "getNextMessage", "(", "BufferedReader", "reader", ")", "throws", "Exception", "{", "boolean", "messageStarted", "=", "false", ";", "String", "line", "=", "reader", ".", "readLine", "(", ")", ";", "while", "(", "line", "!=", "...
return the next message, or null if there are no more messages in the file
[ "return", "the", "next", "message", "or", "null", "if", "there", "are", "no", "more", "messages", "in", "the", "file" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/status/ServerStatusFile.java#L210-L248
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java
ScriptFreeTLV.setInitParameters
@Override public void setInitParameters(Map<java.lang.String, java.lang.Object> initParms) { """ Sets the values of the initialization parameters, as supplied in the TLD. @param initParms a mapping from the names of the initialization parameters to their values, as specified in the TLD. """ sup...
java
@Override public void setInitParameters(Map<java.lang.String, java.lang.Object> initParms) { super.setInitParameters(initParms); String declarationsParm = (String) initParms.get("allowDeclarations"); String scriptletsParm = (String) initParms.get("allowScriptlets"); String expression...
[ "@", "Override", "public", "void", "setInitParameters", "(", "Map", "<", "java", ".", "lang", ".", "String", ",", "java", ".", "lang", ".", "Object", ">", "initParms", ")", "{", "super", ".", "setInitParameters", "(", "initParms", ")", ";", "String", "de...
Sets the values of the initialization parameters, as supplied in the TLD. @param initParms a mapping from the names of the initialization parameters to their values, as specified in the TLD.
[ "Sets", "the", "values", "of", "the", "initialization", "parameters", "as", "supplied", "in", "the", "TLD", "." ]
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java#L68-L80
luuuis/jcalendar
src/main/java/com/toedter/calendar/JDateChooser.java
JDateChooser.main
public static void main(String[] s) { """ Creates a JFrame with a JDateChooser inside and can be used for testing. @param s The command line arguments """ JFrame frame = new JFrame("JDateChooser"); JDateChooser dateChooser = new JDateChooser(); // JDateChooser dateChooser = new JDateChooser(null, new...
java
public static void main(String[] s) { JFrame frame = new JFrame("JDateChooser"); JDateChooser dateChooser = new JDateChooser(); // JDateChooser dateChooser = new JDateChooser(null, new Date(), null, // null); // dateChooser.setLocale(new Locale("de")); // dateChooser.setDateFormatString("dd. MMMM yyyy"); ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "s", ")", "{", "JFrame", "frame", "=", "new", "JFrame", "(", "\"JDateChooser\"", ")", ";", "JDateChooser", "dateChooser", "=", "new", "JDateChooser", "(", ")", ";", "// JDateChooser dateChooser = new...
Creates a JFrame with a JDateChooser inside and can be used for testing. @param s The command line arguments
[ "Creates", "a", "JFrame", "with", "a", "JDateChooser", "inside", "and", "can", "be", "used", "for", "testing", "." ]
train
https://github.com/luuuis/jcalendar/blob/442e5bc319d92dee93400e6180ca74a5b6bd7775/src/main/java/com/toedter/calendar/JDateChooser.java#L563-L583
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCircuitPeeringsInner.java
ExpressRouteCircuitPeeringsInner.listAsync
public Observable<Page<ExpressRouteCircuitPeeringInner>> listAsync(final String resourceGroupName, final String circuitName) { """ Gets all peerings in a specified express route circuit. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @throws ...
java
public Observable<Page<ExpressRouteCircuitPeeringInner>> listAsync(final String resourceGroupName, final String circuitName) { return listWithServiceResponseAsync(resourceGroupName, circuitName) .map(new Func1<ServiceResponse<Page<ExpressRouteCircuitPeeringInner>>, Page<ExpressRouteCircuitPeeringInn...
[ "public", "Observable", "<", "Page", "<", "ExpressRouteCircuitPeeringInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "circuitName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "...
Gets all peerings in a specified express route circuit. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;ExpressRouteCircuitPeeringInner...
[ "Gets", "all", "peerings", "in", "a", "specified", "express", "route", "circuit", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCircuitPeeringsInner.java#L581-L589
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/TagGraphService.java
TagGraphService.feedTagStructureToGraph
private TagModel feedTagStructureToGraph(Tag tag, Set<Tag> visited, int level) { """ Creates and returns the TagModel in a graph as per given Tag; recursively creates the designated ("contained") tags. <p> If the Tag was already processed exists, returns the corresponding TagModel. Doesn't check if the TagMode...
java
private TagModel feedTagStructureToGraph(Tag tag, Set<Tag> visited, int level) { if (visited.contains(tag)) return this.getUniqueByProperty(TagModel.PROP_NAME, tag.getName(), true); visited.add(tag); LOG.fine(String.format("Creating TagModel for Tag: %s%s(%d) '%s' traits: %s"...
[ "private", "TagModel", "feedTagStructureToGraph", "(", "Tag", "tag", ",", "Set", "<", "Tag", ">", "visited", ",", "int", "level", ")", "{", "if", "(", "visited", ".", "contains", "(", "tag", ")", ")", "return", "this", ".", "getUniqueByProperty", "(", "T...
Creates and returns the TagModel in a graph as per given Tag; recursively creates the designated ("contained") tags. <p> If the Tag was already processed exists, returns the corresponding TagModel. Doesn't check if the TagModel for given tag name already exists, assuming this method is only called once.
[ "Creates", "and", "returns", "the", "TagModel", "in", "a", "graph", "as", "per", "given", "Tag", ";", "recursively", "creates", "the", "designated", "(", "contained", ")", "tags", ".", "<p", ">", "If", "the", "Tag", "was", "already", "processed", "exists",...
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/TagGraphService.java#L66-L89
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSockets.java
WebSockets.sendPong
public static void sendPong(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { """ Sends a complete pong message, invoking the callback when complete @param data The data to send @param wsChannel The web socket channel @param callback The c...
java
public static void sendPong(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(mergeBuffers(data), WebSocketFrameType.PONG, wsChannel, callback, null, timeoutmillis); }
[ "public", "static", "void", "sendPong", "(", "final", "ByteBuffer", "[", "]", "data", ",", "final", "WebSocketChannel", "wsChannel", ",", "final", "WebSocketCallback", "<", "Void", ">", "callback", ",", "long", "timeoutmillis", ")", "{", "sendInternal", "(", "...
Sends a complete pong message, invoking the callback when complete @param data The data to send @param wsChannel The web socket channel @param callback The callback to invoke on completion @param timeoutmillis the timeout in milliseconds
[ "Sends", "a", "complete", "pong", "message", "invoking", "the", "callback", "when", "complete" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L482-L484
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listSecretVersions
public PagedList<SecretItem> listSecretVersions(final String vaultBaseUrl, final String secretName, final Integer maxresults) { """ List the versions of the specified secret. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param secretName The name of the secret in the g...
java
public PagedList<SecretItem> listSecretVersions(final String vaultBaseUrl, final String secretName, final Integer maxresults) { return getSecretVersions(vaultBaseUrl, secretName, maxresults); }
[ "public", "PagedList", "<", "SecretItem", ">", "listSecretVersions", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "secretName", ",", "final", "Integer", "maxresults", ")", "{", "return", "getSecretVersions", "(", "vaultBaseUrl", ",", "secretName",...
List the versions of the specified secret. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param secretName The name of the secret in the given vault @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. @return the PagedLi...
[ "List", "the", "versions", "of", "the", "specified", "secret", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1262-L1265
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/core/UIResults.java
UIResults.getFormatter
public StringFormatter getFormatter() { """ return StringFormatter set-up for locale of request being processed. <p>deprecation recalled 2014-05-06.</p> @return StringFormatter localized to user request """ if (formatter == null) { ResourceBundle b = ResourceBundle.getBundle(UI_RESOURC...
java
public StringFormatter getFormatter() { if (formatter == null) { ResourceBundle b = ResourceBundle.getBundle(UI_RESOURCE_BUNDLE_NAME, new UTF8Control()); formatter = new StringFormatter(b, getLocale()); } return formatter; }
[ "public", "StringFormatter", "getFormatter", "(", ")", "{", "if", "(", "formatter", "==", "null", ")", "{", "ResourceBundle", "b", "=", "ResourceBundle", ".", "getBundle", "(", "UI_RESOURCE_BUNDLE_NAME", ",", "new", "UTF8Control", "(", ")", ")", ";", "formatte...
return StringFormatter set-up for locale of request being processed. <p>deprecation recalled 2014-05-06.</p> @return StringFormatter localized to user request
[ "return", "StringFormatter", "set", "-", "up", "for", "locale", "of", "request", "being", "processed", ".", "<p", ">", "deprecation", "recalled", "2014", "-", "05", "-", "06", ".", "<", "/", "p", ">" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java#L692-L698
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDConnectionDaoImpl.java
GeneratedDConnectionDaoImpl.queryByProviderUserId
public Iterable<DConnection> queryByProviderUserId(java.lang.String providerUserId) { """ query-by method for field providerUserId @param providerUserId the specified attribute @return an Iterable of DConnections for the specified providerUserId """ return queryByField(null, DConnectionMapper.Field.PROVI...
java
public Iterable<DConnection> queryByProviderUserId(java.lang.String providerUserId) { return queryByField(null, DConnectionMapper.Field.PROVIDERUSERID.getFieldName(), providerUserId); }
[ "public", "Iterable", "<", "DConnection", ">", "queryByProviderUserId", "(", "java", ".", "lang", ".", "String", "providerUserId", ")", "{", "return", "queryByField", "(", "null", ",", "DConnectionMapper", ".", "Field", ".", "PROVIDERUSERID", ".", "getFieldName", ...
query-by method for field providerUserId @param providerUserId the specified attribute @return an Iterable of DConnections for the specified providerUserId
[ "query", "-", "by", "method", "for", "field", "providerUserId" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDConnectionDaoImpl.java#L124-L126
OpenLiberty/open-liberty
dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java
ThreadPoolController.getThroughputDistribution
ThroughputDistribution getThroughputDistribution(int activeThreads, boolean create) { """ Get the throughput distribution data associated with the specified number of active threads. @param activeThreads the number of active threads when the data was collected @param create whether to create and return a n...
java
ThroughputDistribution getThroughputDistribution(int activeThreads, boolean create) { if (activeThreads < coreThreads) activeThreads = coreThreads; Integer threads = Integer.valueOf(activeThreads); ThroughputDistribution throughput = threadStats.get(threads); if ((throughput ...
[ "ThroughputDistribution", "getThroughputDistribution", "(", "int", "activeThreads", ",", "boolean", "create", ")", "{", "if", "(", "activeThreads", "<", "coreThreads", ")", "activeThreads", "=", "coreThreads", ";", "Integer", "threads", "=", "Integer", ".", "valueOf...
Get the throughput distribution data associated with the specified number of active threads. @param activeThreads the number of active threads when the data was collected @param create whether to create and return a new throughput distribution if none currently exists @return the data representing the throughput dis...
[ "Get", "the", "throughput", "distribution", "data", "associated", "with", "the", "specified", "number", "of", "active", "threads", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java#L752-L763
fuinorg/event-store-commons
eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java
ESHttpUtils.parseDocument
@NotNull public static Document parseDocument(@NotNull final DocumentBuilder builder, @NotNull final InputStream inputStream) { """ Parse the document and wraps checked exceptions into runtime exceptions. @param builder Builder to use. @param inputStream Input stream with XML. @return Docu...
java
@NotNull public static Document parseDocument(@NotNull final DocumentBuilder builder, @NotNull final InputStream inputStream) { Contract.requireArgNotNull("builder", builder); Contract.requireArgNotNull("inputStream", inputStream); try { return builder.parse(inputStre...
[ "@", "NotNull", "public", "static", "Document", "parseDocument", "(", "@", "NotNull", "final", "DocumentBuilder", "builder", ",", "@", "NotNull", "final", "InputStream", "inputStream", ")", "{", "Contract", ".", "requireArgNotNull", "(", "\"builder\"", ",", "build...
Parse the document and wraps checked exceptions into runtime exceptions. @param builder Builder to use. @param inputStream Input stream with XML. @return Document.
[ "Parse", "the", "document", "and", "wraps", "checked", "exceptions", "into", "runtime", "exceptions", "." ]
train
https://github.com/fuinorg/event-store-commons/blob/ea175582d8cda2b5a6d2fe52bbb2f1c183eee77c/eshttp/src/main/java/org/fuin/esc/eshttp/ESHttpUtils.java#L153-L163
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java
MmffAtomTypeMatcher.fixNCNTypes
private void fixNCNTypes(String[] symbs, int[][] graph) { """ Special case, 'NCN+' matches entries that the validation suite say should actually be 'NC=N'. We can achieve 100% compliance by checking if NCN+ is still next to CNN+ or CIM+ after aromatic types are assigned @param symbs symbolic types @param gra...
java
private void fixNCNTypes(String[] symbs, int[][] graph) { for (int v = 0; v < graph.length; v++) { if ("NCN+".equals(symbs[v])) { boolean foundCNN = false; for (int w : graph[v]) { foundCNN = foundCNN || "CNN+".equals(symbs[w]) || "CIM+".equals(sym...
[ "private", "void", "fixNCNTypes", "(", "String", "[", "]", "symbs", ",", "int", "[", "]", "[", "]", "graph", ")", "{", "for", "(", "int", "v", "=", "0", ";", "v", "<", "graph", ".", "length", ";", "v", "++", ")", "{", "if", "(", "\"NCN+\"", "...
Special case, 'NCN+' matches entries that the validation suite say should actually be 'NC=N'. We can achieve 100% compliance by checking if NCN+ is still next to CNN+ or CIM+ after aromatic types are assigned @param symbs symbolic types @param graph adjacency list graph
[ "Special", "case", "NCN", "+", "matches", "entries", "that", "the", "validation", "suite", "say", "should", "actually", "be", "NC", "=", "N", ".", "We", "can", "achieve", "100%", "compliance", "by", "checking", "if", "NCN", "+", "is", "still", "next", "t...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java#L149-L161
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/server/WebServiceEndpoint.java
WebServiceEndpoint.addMimeHeaders
private void addMimeHeaders(SoapMessage response, Message replyMessage) { """ Adds mime headers outside of SOAP envelope. Header entries that go to this header section must have internal http header prefix defined in {@link com.consol.citrus.ws.message.SoapMessageHeaders}. @param response the soap response messa...
java
private void addMimeHeaders(SoapMessage response, Message replyMessage) { for (Entry<String, Object> headerEntry : replyMessage.getHeaders().entrySet()) { if (headerEntry.getKey().toLowerCase().startsWith(SoapMessageHeaders.HTTP_PREFIX)) { String headerName = headerEntry.getKey().sub...
[ "private", "void", "addMimeHeaders", "(", "SoapMessage", "response", ",", "Message", "replyMessage", ")", "{", "for", "(", "Entry", "<", "String", ",", "Object", ">", "headerEntry", ":", "replyMessage", ".", "getHeaders", "(", ")", ".", "entrySet", "(", ")",...
Adds mime headers outside of SOAP envelope. Header entries that go to this header section must have internal http header prefix defined in {@link com.consol.citrus.ws.message.SoapMessageHeaders}. @param response the soap response message. @param replyMessage the internal reply message.
[ "Adds", "mime", "headers", "outside", "of", "SOAP", "envelope", ".", "Header", "entries", "that", "go", "to", "this", "header", "section", "must", "have", "internal", "http", "header", "prefix", "defined", "in", "{" ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/server/WebServiceEndpoint.java#L178-L194
Netflix/astyanax
astyanax-thrift/src/main/java/com/netflix/astyanax/thrift/ThriftClusterImpl.java
ThriftClusterImpl.getVersion
@Override public String getVersion() throws ConnectionException { """ Get the version from the cluster @return @throws OperationException """ return connectionPool.executeWithFailover( new AbstractOperationImpl<String>(tracerFactory.newTracer(CassandraOperationType.GET_VERSION))...
java
@Override public String getVersion() throws ConnectionException { return connectionPool.executeWithFailover( new AbstractOperationImpl<String>(tracerFactory.newTracer(CassandraOperationType.GET_VERSION)) { @Override public String internalExecute(Client...
[ "@", "Override", "public", "String", "getVersion", "(", ")", "throws", "ConnectionException", "{", "return", "connectionPool", ".", "executeWithFailover", "(", "new", "AbstractOperationImpl", "<", "String", ">", "(", "tracerFactory", ".", "newTracer", "(", "Cassandr...
Get the version from the cluster @return @throws OperationException
[ "Get", "the", "version", "from", "the", "cluster" ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-thrift/src/main/java/com/netflix/astyanax/thrift/ThriftClusterImpl.java#L130-L139
m-m-m/util
datatype/src/main/java/net/sf/mmm/util/datatype/api/color/GenericColor.java
GenericColor.valueOf
public static GenericColor valueOf(Red red, Green green, Blue blue, Alpha alpha) { """ Creates a {@link GenericColor} from the given {@link Segment}s of {@link ColorModel#RGB}. @param red is the {@link Red} part. @param green is the {@link Green} part. @param blue is the {@link Blue} part. @param alpha is th...
java
public static GenericColor valueOf(Red red, Green green, Blue blue, Alpha alpha) { Objects.requireNonNull(red, "red"); Objects.requireNonNull(green, "green"); Objects.requireNonNull(blue, "blue"); Objects.requireNonNull(alpha, "alpha"); GenericColor genericColor = new GenericColor(); genericCol...
[ "public", "static", "GenericColor", "valueOf", "(", "Red", "red", ",", "Green", "green", ",", "Blue", "blue", ",", "Alpha", "alpha", ")", "{", "Objects", ".", "requireNonNull", "(", "red", ",", "\"red\"", ")", ";", "Objects", ".", "requireNonNull", "(", ...
Creates a {@link GenericColor} from the given {@link Segment}s of {@link ColorModel#RGB}. @param red is the {@link Red} part. @param green is the {@link Green} part. @param blue is the {@link Blue} part. @param alpha is the {@link Alpha} value. @return the {@link GenericColor}.
[ "Creates", "a", "{", "@link", "GenericColor", "}", "from", "the", "given", "{", "@link", "Segment", "}", "s", "of", "{", "@link", "ColorModel#RGB", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/datatype/src/main/java/net/sf/mmm/util/datatype/api/color/GenericColor.java#L159-L206