repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
listlengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
irmen/Pyrolite
java/src/main/java/net/razorvine/pickle/PickleUtils.java
PickleUtils.readbytes_into
public static void readbytes_into(InputStream input, byte[] buffer, int offset, int length) throws IOException { while (length > 0) { int read = input.read(buffer, offset, length); if (read == -1) throw new IOException("expected more bytes in input stream"); offset += read; length -= read; } ...
java
public static void readbytes_into(InputStream input, byte[] buffer, int offset, int length) throws IOException { while (length > 0) { int read = input.read(buffer, offset, length); if (read == -1) throw new IOException("expected more bytes in input stream"); offset += read; length -= read; } ...
[ "public", "static", "void", "readbytes_into", "(", "InputStream", "input", ",", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "while", "(", "length", ">", "0", ")", "{", "int", "read", "=", "...
read a number of signed bytes into the specified location in an existing byte array
[ "read", "a", "number", "of", "signed", "bytes", "into", "the", "specified", "location", "in", "an", "existing", "byte", "array" ]
train
https://github.com/irmen/Pyrolite/blob/060bc3c9069cd31560b6da4f67280736fb2cdf63/java/src/main/java/net/razorvine/pickle/PickleUtils.java#L71-L79
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.service_serviceName_PUT
public void service_serviceName_PUT(String serviceName, OvhServiceIp body) throws IOException { String qPath = "/ip/service/{serviceName}"; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); }
java
public void service_serviceName_PUT(String serviceName, OvhServiceIp body) throws IOException { String qPath = "/ip/service/{serviceName}"; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "service_serviceName_PUT", "(", "String", "serviceName", ",", "OvhServiceIp", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/service/{serviceName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "serviceNa...
Alter this object properties REST: PUT /ip/service/{serviceName} @param body [required] New object properties @param serviceName [required] The internal name of your IP services API beta
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1153-L1157
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toNull
public static Object toNull(Object value, Object defaultValue) { if (value == null) return null; if (value instanceof String && Caster.toString(value, "").trim().length() == 0) return null; if (value instanceof Number && ((Number) value).intValue() == 0) return null; return defaultValue; }
java
public static Object toNull(Object value, Object defaultValue) { if (value == null) return null; if (value instanceof String && Caster.toString(value, "").trim().length() == 0) return null; if (value instanceof Number && ((Number) value).intValue() == 0) return null; return defaultValue; }
[ "public", "static", "Object", "toNull", "(", "Object", "value", ",", "Object", "defaultValue", ")", "{", "if", "(", "value", "==", "null", ")", "return", "null", ";", "if", "(", "value", "instanceof", "String", "&&", "Caster", ".", "toString", "(", "valu...
casts a Object to null @param value @param defaultValue @return to null from Object
[ "casts", "a", "Object", "to", "null" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L4428-L4433
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java
SignalUtil.logWaiting
static boolean logWaiting(String callerClass, String callerMethod, Object waitObj, long start, Object... extraArgs) { return logWaiting(log, callerClass, callerMethod, waitObj, start, extraArgs); }
java
static boolean logWaiting(String callerClass, String callerMethod, Object waitObj, long start, Object... extraArgs) { return logWaiting(log, callerClass, callerMethod, waitObj, start, extraArgs); }
[ "static", "boolean", "logWaiting", "(", "String", "callerClass", ",", "String", "callerMethod", ",", "Object", "waitObj", ",", "long", "start", ",", "Object", "...", "extraArgs", ")", "{", "return", "logWaiting", "(", "log", ",", "callerClass", ",", "callerMet...
Logs a warning message. If the elapsed time is greater than {@link #SIGNAL_LOG_QUIESCE_TIMEOUT_MINUTES} then the log message will indicate that wait logging for the thread is being quiesced, and a value of true is returned. Otherwise, false is returned. <p> This is a convenience method to call {@link #logWaiting(Logger...
[ "Logs", "a", "warning", "message", ".", "If", "the", "elapsed", "time", "is", "greater", "than", "{", "@link", "#SIGNAL_LOG_QUIESCE_TIMEOUT_MINUTES", "}", "then", "the", "log", "message", "will", "indicate", "that", "wait", "logging", "for", "the", "thread", "...
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L98-L100
jamesagnew/hapi-fhir
hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java
JaxRsMethodBindings.getMethodBindings
public static JaxRsMethodBindings getMethodBindings(AbstractJaxRsProvider theProvider, Class<? extends AbstractJaxRsProvider> theProviderClass) { if(!getClassBindings().containsKey(theProviderClass)) { JaxRsMethodBindings foundBindings = new JaxRsMethodBindings(theProvider, theProviderClass); getClassBindings()...
java
public static JaxRsMethodBindings getMethodBindings(AbstractJaxRsProvider theProvider, Class<? extends AbstractJaxRsProvider> theProviderClass) { if(!getClassBindings().containsKey(theProviderClass)) { JaxRsMethodBindings foundBindings = new JaxRsMethodBindings(theProvider, theProviderClass); getClassBindings()...
[ "public", "static", "JaxRsMethodBindings", "getMethodBindings", "(", "AbstractJaxRsProvider", "theProvider", ",", "Class", "<", "?", "extends", "AbstractJaxRsProvider", ">", "theProviderClass", ")", "{", "if", "(", "!", "getClassBindings", "(", ")", ".", "containsKey"...
Get the method bindings for the given class. If this class is not yet contained in the classBindings, they will be added for this class @param theProvider the implementation class @param theProviderClass the provider class @return the methodBindings for this class
[ "Get", "the", "method", "bindings", "for", "the", "given", "class", ".", "If", "this", "class", "is", "not", "yet", "contained", "in", "the", "classBindings", "they", "will", "be", "added", "for", "this", "class" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java#L136-L142
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Graphics.java
Graphics.clearAlphaMap
public void clearAlphaMap() { pushTransform(); GL.glLoadIdentity(); int originalMode = currentDrawingMode; setDrawMode(MODE_ALPHA_MAP); setColor(new Color(0,0,0,0)); fillRect(0, 0, screenWidth, screenHeight); setColor(currentColor); setDrawMode(originalMode); popTransform(); }
java
public void clearAlphaMap() { pushTransform(); GL.glLoadIdentity(); int originalMode = currentDrawingMode; setDrawMode(MODE_ALPHA_MAP); setColor(new Color(0,0,0,0)); fillRect(0, 0, screenWidth, screenHeight); setColor(currentColor); setDrawMode(originalMode); popTransform(); }
[ "public", "void", "clearAlphaMap", "(", ")", "{", "pushTransform", "(", ")", ";", "GL", ".", "glLoadIdentity", "(", ")", ";", "int", "originalMode", "=", "currentDrawingMode", ";", "setDrawMode", "(", "MODE_ALPHA_MAP", ")", ";", "setColor", "(", "new", "Colo...
Clear the state of the alpha map across the entire screen. This sets alpha to 0 everywhere, meaning in {@link Graphics#MODE_ALPHA_BLEND} nothing will be drawn.
[ "Clear", "the", "state", "of", "the", "alpha", "map", "across", "the", "entire", "screen", ".", "This", "sets", "alpha", "to", "0", "everywhere", "meaning", "in", "{" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Graphics.java#L218-L230
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.updateCustomPrebuiltEntityRoleAsync
public Observable<OperationStatus> updateCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) { return updateCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, enti...
java
public Observable<OperationStatus> updateCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) { return updateCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, enti...
[ "public", "Observable", "<", "OperationStatus", ">", "updateCustomPrebuiltEntityRoleAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ",", "UpdateCustomPrebuiltEntityRoleOptionalParameter", "updateCustomPrebuiltEntityRol...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId The entity ID. @param roleId The entity role ID. @param updateCustomPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws I...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13694-L13701
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/onesample/DurbinWatson.java
DurbinWatson.checkCriticalValue
public static boolean checkCriticalValue(double score, int n, int k, boolean is_twoTailed, double aLevel) { /* if(n<=200 && k<=20) { //Calculate it from tables //http://www3.nd.edu/~wevans1/econ30331/Durbin_Watson_tables.pdf } */ //Follows normal ...
java
public static boolean checkCriticalValue(double score, int n, int k, boolean is_twoTailed, double aLevel) { /* if(n<=200 && k<=20) { //Calculate it from tables //http://www3.nd.edu/~wevans1/econ30331/Durbin_Watson_tables.pdf } */ //Follows normal ...
[ "public", "static", "boolean", "checkCriticalValue", "(", "double", "score", ",", "int", "n", ",", "int", "k", ",", "boolean", "is_twoTailed", ",", "double", "aLevel", ")", "{", "/*\n if(n<=200 && k<=20) {\n //Calculate it from tables\n //http:/...
Checks the Critical Value to determine if the Hypothesis should be rejected @param score @param n @param k @param is_twoTailed @param aLevel @return
[ "Checks", "the", "Critical", "Value", "to", "determine", "if", "the", "Hypothesis", "should", "be", "rejected" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/onesample/DurbinWatson.java#L86-L111
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java
StandardRoadConnection.setPosition
void setPosition(Point2D<?, ?> position) { this.location = position == null ? null : new SoftReference<>(Point2d.convert(position)); }
java
void setPosition(Point2D<?, ?> position) { this.location = position == null ? null : new SoftReference<>(Point2d.convert(position)); }
[ "void", "setPosition", "(", "Point2D", "<", "?", ",", "?", ">", "position", ")", "{", "this", ".", "location", "=", "position", "==", "null", "?", "null", ":", "new", "SoftReference", "<>", "(", "Point2d", ".", "convert", "(", "position", ")", ")", "...
Set the temporary buffer of the position of the road connection. @param position a position. @since 4.0
[ "Set", "the", "temporary", "buffer", "of", "the", "position", "of", "the", "road", "connection", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L226-L228
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchSpaceImpl.java
MatchSpaceImpl.clear
public synchronized void clear(Identifier rootId, boolean enableCache) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry(this,cclass, "clear"); matchTree = null; matchTreeGeneration = 0; subExpr.clear(); // Now reinitialise the matchspace initialise(rootId,...
java
public synchronized void clear(Identifier rootId, boolean enableCache) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry(this,cclass, "clear"); matchTree = null; matchTreeGeneration = 0; subExpr.clear(); // Now reinitialise the matchspace initialise(rootId,...
[ "public", "synchronized", "void", "clear", "(", "Identifier", "rootId", ",", "boolean", "enableCache", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "tc", ".", "entry", "(", "...
Removes all objects from the MatchSpace, resetting it to the 'as new' condition.
[ "Removes", "all", "objects", "from", "the", "MatchSpace", "resetting", "it", "to", "the", "as", "new", "condition", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchSpaceImpl.java#L862-L874
spring-projects/spring-security-oauth
spring-security-oauth/src/main/java/org/springframework/security/oauth/common/OAuthCodec.java
OAuthCodec.oauthEncode
public static String oauthEncode(String value) { if (value == null) { return ""; } try { return new String(URLCodec.encodeUrl(SAFE_CHARACTERS, value.getBytes("UTF-8")), "US-ASCII"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
java
public static String oauthEncode(String value) { if (value == null) { return ""; } try { return new String(URLCodec.encodeUrl(SAFE_CHARACTERS, value.getBytes("UTF-8")), "US-ASCII"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
[ "public", "static", "String", "oauthEncode", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "\"\"", ";", "}", "try", "{", "return", "new", "String", "(", "URLCodec", ".", "encodeUrl", "(", "SAFE_CHARACTERS", ",", ...
Encode the specified value. @param value The value to encode. @return The encoded value.
[ "Encode", "the", "specified", "value", "." ]
train
https://github.com/spring-projects/spring-security-oauth/blob/bbae0027eceb2c74a21ac26bbc86142dc732ffbe/spring-security-oauth/src/main/java/org/springframework/security/oauth/common/OAuthCodec.java#L52-L63
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java
ClassPathTraversal.traverseJar
protected void traverseJar(File file, TraversalState state) { JarFile jar; JarEntry entry; Enumeration enm; if (isLoggingEnabled()) getLogger().log(Level.INFO, "Analyzing jar: " + file); if (!file.exists()) { getLogger().log(Level.WARNING, "Jar does not exist: " + file); retur...
java
protected void traverseJar(File file, TraversalState state) { JarFile jar; JarEntry entry; Enumeration enm; if (isLoggingEnabled()) getLogger().log(Level.INFO, "Analyzing jar: " + file); if (!file.exists()) { getLogger().log(Level.WARNING, "Jar does not exist: " + file); retur...
[ "protected", "void", "traverseJar", "(", "File", "file", ",", "TraversalState", "state", ")", "{", "JarFile", "jar", ";", "JarEntry", "entry", ";", "Enumeration", "enm", ";", "if", "(", "isLoggingEnabled", "(", ")", ")", "getLogger", "(", ")", ".", "log", ...
Fills the class cache with classes from the specified jar. @param file the jar to inspect @param state the traversal state
[ "Fills", "the", "class", "cache", "with", "classes", "from", "the", "specified", "jar", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassPathTraversal.java#L233-L259
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java
MLEDependencyGrammar.getStopProb
protected double getStopProb(IntDependency dependency) { short binDistance = distanceBin(dependency.distance); IntTaggedWord unknownHead = new IntTaggedWord(-1, dependency.head.tag); IntTaggedWord anyHead = new IntTaggedWord(ANY_WORD_INT, dependency.head.tag); IntDependency temp = new IntDependenc...
java
protected double getStopProb(IntDependency dependency) { short binDistance = distanceBin(dependency.distance); IntTaggedWord unknownHead = new IntTaggedWord(-1, dependency.head.tag); IntTaggedWord anyHead = new IntTaggedWord(ANY_WORD_INT, dependency.head.tag); IntDependency temp = new IntDependenc...
[ "protected", "double", "getStopProb", "(", "IntDependency", "dependency", ")", "{", "short", "binDistance", "=", "distanceBin", "(", "dependency", ".", "distance", ")", ";", "IntTaggedWord", "unknownHead", "=", "new", "IntTaggedWord", "(", "-", "1", ",", "depend...
Return the probability (as a real number between 0 and 1) of stopping rather than generating another argument at this position. @param dependency The dependency used as the basis for stopping on. Tags are assumed to be in the TagProjection space. @return The probability of generating this stop probability
[ "Return", "the", "probability", "(", "as", "a", "real", "number", "between", "0", "and", "1", ")", "of", "stopping", "rather", "than", "generating", "another", "argument", "at", "this", "position", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java#L716-L739
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.enableCookieBasedMatching
public static void enableCookieBasedMatching(String cookieMatchDomain, int delay) { cookieBasedMatchDomain_ = cookieMatchDomain; BranchStrongMatchHelper.getInstance().setStrongMatchUrlHitDelay(delay); }
java
public static void enableCookieBasedMatching(String cookieMatchDomain, int delay) { cookieBasedMatchDomain_ = cookieMatchDomain; BranchStrongMatchHelper.getInstance().setStrongMatchUrlHitDelay(delay); }
[ "public", "static", "void", "enableCookieBasedMatching", "(", "String", "cookieMatchDomain", ",", "int", "delay", ")", "{", "cookieBasedMatchDomain_", "=", "cookieMatchDomain", ";", "BranchStrongMatchHelper", ".", "getInstance", "(", ")", ".", "setStrongMatchUrlHitDelay",...
<p> Enabled Strong matching check using chrome cookies. This method should be called before Branch#getAutoInstance(Context).</p> @param cookieMatchDomain The domain for the url used to match the cookie (eg. example.app.link) @param delay Time in millisecond to wait for the strong match to check to finish b...
[ "<p", ">", "Enabled", "Strong", "matching", "check", "using", "chrome", "cookies", ".", "This", "method", "should", "be", "called", "before", "Branch#getAutoInstance", "(", "Context", ")", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1458-L1461
Coveros/selenified
src/main/java/com/coveros/selenified/application/Assert.java
Assert.cookieEquals
@Override public void cookieEquals(String cookieName, String expectedCookieValue) { assertEquals("Cookie Value Mismatch", expectedCookieValue, checkCookieEquals(cookieName, expectedCookieValue, 0, 0)); }
java
@Override public void cookieEquals(String cookieName, String expectedCookieValue) { assertEquals("Cookie Value Mismatch", expectedCookieValue, checkCookieEquals(cookieName, expectedCookieValue, 0, 0)); }
[ "@", "Override", "public", "void", "cookieEquals", "(", "String", "cookieName", ",", "String", "expectedCookieValue", ")", "{", "assertEquals", "(", "\"Cookie Value Mismatch\"", ",", "expectedCookieValue", ",", "checkCookieEquals", "(", "cookieName", ",", "expectedCooki...
Asserts that a cookies with the provided name has a value equal to the expected value. This information will be logged and recorded, with a screenshot for traceability and added debugging support. @param cookieName the name of the cookie @param expectedCookieValue the expected value of the cookie
[ "Asserts", "that", "a", "cookies", "with", "the", "provided", "name", "has", "a", "value", "equal", "to", "the", "expected", "value", ".", "This", "information", "will", "be", "logged", "and", "recorded", "with", "a", "screenshot", "for", "traceability", "an...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/Assert.java#L315-L318
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/interpreter/collection/CollectionInterpreter.java
CollectionInterpreter.addSurplusRow
protected void addSurplusRow( Example example, Example headers, Fixture rowFixtureAdapter) { Example row = example.addSibling(); for (int i = 0; i < headers.remainings(); i++) { ExpectedColumn column = (ExpectedColumn) columns[i]; Example cell = row.addChild(); ...
java
protected void addSurplusRow( Example example, Example headers, Fixture rowFixtureAdapter) { Example row = example.addSibling(); for (int i = 0; i < headers.remainings(); i++) { ExpectedColumn column = (ExpectedColumn) columns[i]; Example cell = row.addChild(); ...
[ "protected", "void", "addSurplusRow", "(", "Example", "example", ",", "Example", "headers", ",", "Fixture", "rowFixtureAdapter", ")", "{", "Example", "row", "=", "example", ".", "addSibling", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
<p>addSurplusRow.</p> @param example a {@link com.greenpepper.Example} object. @param headers a {@link com.greenpepper.Example} object. @param rowFixtureAdapter a {@link com.greenpepper.reflect.Fixture} object.
[ "<p", ">", "addSurplusRow", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/interpreter/collection/CollectionInterpreter.java#L158-L185
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.createUrl
public static URL createUrl(final URL baseUrl, final String path, final String filename) { checkNotNull("baseUrl", baseUrl); checkNotNull("filename", filename); try { String baseUrlStr = baseUrl.toString(); if (!baseUrlStr.endsWith(SLASH)) { baseUrlS...
java
public static URL createUrl(final URL baseUrl, final String path, final String filename) { checkNotNull("baseUrl", baseUrl); checkNotNull("filename", filename); try { String baseUrlStr = baseUrl.toString(); if (!baseUrlStr.endsWith(SLASH)) { baseUrlS...
[ "public", "static", "URL", "createUrl", "(", "final", "URL", "baseUrl", ",", "final", "String", "path", ",", "final", "String", "filename", ")", "{", "checkNotNull", "(", "\"baseUrl\"", ",", "baseUrl", ")", ";", "checkNotNull", "(", "\"filename\"", ",", "fil...
Creates an URL based on a directory a relative path and a filename. @param baseUrl Directory URL with or without slash ("/") at the end of the string - Cannot be <code>null</code>. @param path Relative path inside the base URL (with or without slash ("/") at the end of the string) - Can be <code>null</code> or an empt...
[ "Creates", "an", "URL", "based", "on", "a", "directory", "a", "relative", "path", "and", "a", "filename", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L473-L495
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/OneSelect.java
OneSelect.addLinkToSelectPart
public void addLinkToSelectPart(final String _linkTo) throws EFapsException { final Type type; // if a previous select exists it is based on the previous select, // else it is based on the basic table if (this.selectParts.size() > 0) { type = this.selectParts.get(...
java
public void addLinkToSelectPart(final String _linkTo) throws EFapsException { final Type type; // if a previous select exists it is based on the previous select, // else it is based on the basic table if (this.selectParts.size() > 0) { type = this.selectParts.get(...
[ "public", "void", "addLinkToSelectPart", "(", "final", "String", "_linkTo", ")", "throws", "EFapsException", "{", "final", "Type", "type", ";", "// if a previous select exists it is based on the previous select,", "// else it is based on the basic table", "if", "(", "this", "...
Add the name of the attribute the link must go to, evaluated from an <code>linkTo[ATTRIBUTENAME]</code> part of an select statement. @param _linkTo name of the attribute the link must go to @throws EFapsException the e faps exception
[ "Add", "the", "name", "of", "the", "attribute", "the", "link", "must", "go", "to", "evaluated", "from", "an", "<code", ">", "linkTo", "[", "ATTRIBUTENAME", "]", "<", "/", "code", ">", "part", "of", "an", "select", "statement", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L284-L297
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/core/internal/BaseRequest.java
BaseRequest.setHeaders
public void setHeaders(Map<String, List<String>> headerMap) { headers = new Headers.Builder(); for (Map.Entry<String, List<String>> e : headerMap.entrySet()) { for (String headerValue : e.getValue()) { addHeader(e.getKey(), headerValue); } } }
java
public void setHeaders(Map<String, List<String>> headerMap) { headers = new Headers.Builder(); for (Map.Entry<String, List<String>> e : headerMap.entrySet()) { for (String headerValue : e.getValue()) { addHeader(e.getKey(), headerValue); } } }
[ "public", "void", "setHeaders", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headerMap", ")", "{", "headers", "=", "new", "Headers", ".", "Builder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "List", "<...
Sets headers for this resource request. Overrides all headers previously added. @param headerMap A multimap containing the header names and corresponding values
[ "Sets", "headers", "for", "this", "resource", "request", ".", "Overrides", "all", "headers", "previously", "added", "." ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/core/internal/BaseRequest.java#L296-L304
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/SamlIdPObjectEncrypter.java
SamlIdPObjectEncrypter.getEncrypter
protected Encrypter getEncrypter(final Object samlObject, final SamlRegisteredService service, final SamlRegisteredServiceServiceProviderMetadataFacade adaptor, final KeyEncryptionParameters keyEncParams, ...
java
protected Encrypter getEncrypter(final Object samlObject, final SamlRegisteredService service, final SamlRegisteredServiceServiceProviderMetadataFacade adaptor, final KeyEncryptionParameters keyEncParams, ...
[ "protected", "Encrypter", "getEncrypter", "(", "final", "Object", "samlObject", ",", "final", "SamlRegisteredService", "service", ",", "final", "SamlRegisteredServiceServiceProviderMetadataFacade", "adaptor", ",", "final", "KeyEncryptionParameters", "keyEncParams", ",", "fina...
Gets encrypter. @param samlObject the saml object @param service the service @param adaptor the adaptor @param keyEncParams the key enc params @param dataEncParams the data enc params @return the encrypter
[ "Gets", "encrypter", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/SamlIdPObjectEncrypter.java#L143-L151
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.appendPropertyToBuilder
private void appendPropertyToBuilder(StringBuilder builder, String replicateOnWrite, String keyword) { String replicateOn_Write = CQLTranslator.getKeyword(keyword); builder.append(replicateOn_Write); builder.append(CQLTranslator.EQ_CLAUSE); builder.append(replicateOnWrite); b...
java
private void appendPropertyToBuilder(StringBuilder builder, String replicateOnWrite, String keyword) { String replicateOn_Write = CQLTranslator.getKeyword(keyword); builder.append(replicateOn_Write); builder.append(CQLTranslator.EQ_CLAUSE); builder.append(replicateOnWrite); b...
[ "private", "void", "appendPropertyToBuilder", "(", "StringBuilder", "builder", ",", "String", "replicateOnWrite", ",", "String", "keyword", ")", "{", "String", "replicateOn_Write", "=", "CQLTranslator", ".", "getKeyword", "(", "keyword", ")", ";", "builder", ".", ...
Append property to builder. @param builder the builder @param replicateOnWrite the replicate on write @param keyword the keyword
[ "Append", "property", "to", "builder", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2821-L2828
pravega/pravega
controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java
StreamMetadataTasks.createStream
@Task(name = "createStream", version = "1.0", resource = "{scope}/{stream}") public CompletableFuture<CreateStreamStatus.Status> createStream(String scope, String stream, StreamConfiguration config, long createTimestamp) { return execute( new Resource(scope, stream), new Seri...
java
@Task(name = "createStream", version = "1.0", resource = "{scope}/{stream}") public CompletableFuture<CreateStreamStatus.Status> createStream(String scope, String stream, StreamConfiguration config, long createTimestamp) { return execute( new Resource(scope, stream), new Seri...
[ "@", "Task", "(", "name", "=", "\"createStream\"", ",", "version", "=", "\"1.0\"", ",", "resource", "=", "\"{scope}/{stream}\"", ")", "public", "CompletableFuture", "<", "CreateStreamStatus", ".", "Status", ">", "createStream", "(", "String", "scope", ",", "Stri...
Create stream. @param scope scope. @param stream stream name. @param config stream configuration. @param createTimestamp creation timestamp. @return creation status.
[ "Create", "stream", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/task/Stream/StreamMetadataTasks.java#L155-L161
geomajas/geomajas-project-geometry
core/src/main/java/org/geomajas/geometry/service/BboxService.java
BboxService.intersects
public static boolean intersects(Bbox one, Bbox two) { if (two.getX() > one.getMaxX()) { return false; } if (two.getY() > one.getMaxY()) { return false; } if (two.getMaxX() < one.getX()) { return false; } if (two.getMaxY() < one.getY()) { return false; } return true; }
java
public static boolean intersects(Bbox one, Bbox two) { if (two.getX() > one.getMaxX()) { return false; } if (two.getY() > one.getMaxY()) { return false; } if (two.getMaxX() < one.getX()) { return false; } if (two.getMaxY() < one.getY()) { return false; } return true; }
[ "public", "static", "boolean", "intersects", "(", "Bbox", "one", ",", "Bbox", "two", ")", "{", "if", "(", "two", ".", "getX", "(", ")", ">", "one", ".", "getMaxX", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "two", ".", "getY", ...
Does one bounding box intersect another? @param one The first bounding box. @param two The second bounding box. @return true if the both bounding boxes intersect, false otherwise.
[ "Does", "one", "bounding", "box", "intersect", "another?" ]
train
https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/BboxService.java#L158-L172
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/asset/AssetVersionSpec.java
AssetVersionSpec.parse
public static AssetVersionSpec parse(String versionSpec) { Matcher matcher = VERSION_PATTERN.matcher(versionSpec); String name = null; String ver = null; String pkg = null; if (matcher.find()) { int start = matcher.start(); ver = versionSpec.substring(star...
java
public static AssetVersionSpec parse(String versionSpec) { Matcher matcher = VERSION_PATTERN.matcher(versionSpec); String name = null; String ver = null; String pkg = null; if (matcher.find()) { int start = matcher.start(); ver = versionSpec.substring(star...
[ "public", "static", "AssetVersionSpec", "parse", "(", "String", "versionSpec", ")", "{", "Matcher", "matcher", "=", "VERSION_PATTERN", ".", "matcher", "(", "versionSpec", ")", ";", "String", "name", "=", "null", ";", "String", "ver", "=", "null", ";", "Strin...
Smart Version Ranges: This is similar to the OSGi version spec. There are four supported syntaxes: - A specific version -- such as 1.2 -- can be specified. - Zero can be specified to always use the latest asset version. - A 'half-open' range -- such as [1.2,2) -- designates an inclusive lower limit and an exclusive up...
[ "Smart", "Version", "Ranges", ":", "This", "is", "similar", "to", "the", "OSGi", "version", "spec", ".", "There", "are", "four", "supported", "syntaxes", ":", "-", "A", "specific", "version", "--", "such", "as", "1", ".", "2", "--", "can", "be", "speci...
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/asset/AssetVersionSpec.java#L105-L128
OpenLiberty/open-liberty
dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java
ChecksumsManager.saveChecksumFile
public static void saveChecksumFile(File csFile, Properties csprops, String reason) { FileOutputStream fOut = null; try { fOut = new FileOutputStream(csFile); csprops.store(fOut, null); logger.log(Level.FINEST, "Successfully updated the checksum file " + csFile.getAbs...
java
public static void saveChecksumFile(File csFile, Properties csprops, String reason) { FileOutputStream fOut = null; try { fOut = new FileOutputStream(csFile); csprops.store(fOut, null); logger.log(Level.FINEST, "Successfully updated the checksum file " + csFile.getAbs...
[ "public", "static", "void", "saveChecksumFile", "(", "File", "csFile", ",", "Properties", "csprops", ",", "String", "reason", ")", "{", "FileOutputStream", "fOut", "=", "null", ";", "try", "{", "fOut", "=", "new", "FileOutputStream", "(", "csFile", ")", ";",...
Saves the checksum properties to csFile. @param csFile Output file @param csprops Checksum properties file @param reason the reason for saving the checksum file
[ "Saves", "the", "checksum", "properties", "to", "csFile", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/ChecksumsManager.java#L218-L229
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/SubFileIntegrityHandler.java
SubFileIntegrityHandler.init
public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords) { // For this to work right, the booking number field needs a listener to re-select this file whenever it changes super.init(record, null, recSubFile, true); m_strSubFile = strSubFile; m_bRemo...
java
public void init(Record record, Record recSubFile, String strSubFile, boolean bRemoveSubRecords) { // For this to work right, the booking number field needs a listener to re-select this file whenever it changes super.init(record, null, recSubFile, true); m_strSubFile = strSubFile; m_bRemo...
[ "public", "void", "init", "(", "Record", "record", ",", "Record", "recSubFile", ",", "String", "strSubFile", ",", "boolean", "bRemoveSubRecords", ")", "{", "// For this to work right, the booking number field needs a listener to re-select this file whenever it changes", "super", ...
Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param recordMain The main record to create a sub-query for. @param bRemoteSubRecords Remove sub-records on delete main?
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/SubFileIntegrityHandler.java#L91-L97
aws/aws-sdk-java
aws-java-sdk-codestar/src/main/java/com/amazonaws/services/codestar/model/TagProjectRequest.java
TagProjectRequest.withTags
public TagProjectRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public TagProjectRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "TagProjectRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags you want to add to the project. </p> @param tags The tags you want to add to the project. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "you", "want", "to", "add", "to", "the", "project", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-codestar/src/main/java/com/amazonaws/services/codestar/model/TagProjectRequest.java#L116-L119
drallgood/jpasskit
jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java
PKSigningInformationUtil.loadSigningInformationFromPKCS12AndIntermediateCertificate
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(final String keyPath,final String keyPassword, final String appleWWDRCAFilePath) throws IOException, CertificateException { try (InputStream walletCertStream = CertUtils.toInputStream(keyPath); Input...
java
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(final String keyPath,final String keyPassword, final String appleWWDRCAFilePath) throws IOException, CertificateException { try (InputStream walletCertStream = CertUtils.toInputStream(keyPath); Input...
[ "public", "PKSigningInformation", "loadSigningInformationFromPKCS12AndIntermediateCertificate", "(", "final", "String", "keyPath", ",", "final", "String", "keyPassword", ",", "final", "String", "appleWWDRCAFilePath", ")", "throws", "IOException", ",", "CertificateException", ...
Load all signing information necessary for pass generation from the filesystem or classpath. @param keyPath path to keystore (classpath or filesystem) @param keyPassword Password used to access the key store @param appleWWDRCAFilePath path to apple's WWDRCA certificate file (classpath or filesystem) @return a {@link P...
[ "Load", "all", "signing", "information", "necessary", "for", "pass", "generation", "from", "the", "filesystem", "or", "classpath", "." ]
train
https://github.com/drallgood/jpasskit/blob/63bfa8abbdb85c2d7596c60eed41ed8e374cbd01/jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java#L68-L79
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/StormSubmitter.java
StormSubmitter.submitTopologyWithProgressBar
public static void submitTopologyWithProgressBar(String name, Map stormConf, StormTopology topology, SubmitOptions opts) throws AlreadyAliveException, InvalidTopologyException { /** * progress bar is removed in jstorm */ submitTopology(name, stormConf, topology, opts); ...
java
public static void submitTopologyWithProgressBar(String name, Map stormConf, StormTopology topology, SubmitOptions opts) throws AlreadyAliveException, InvalidTopologyException { /** * progress bar is removed in jstorm */ submitTopology(name, stormConf, topology, opts); ...
[ "public", "static", "void", "submitTopologyWithProgressBar", "(", "String", "name", ",", "Map", "stormConf", ",", "StormTopology", "topology", ",", "SubmitOptions", "opts", ")", "throws", "AlreadyAliveException", ",", "InvalidTopologyException", "{", "/**\n * prog...
Submits a topology to run on the cluster with a progress bar. A topology runs forever or until explicitly killed. @param name the name of the storm. @param stormConf the topology-specific configuration. See {@link Config}. @param topology the processing to execute. @param opts to manipulate the starting of ...
[ "Submits", "a", "topology", "to", "run", "on", "the", "cluster", "with", "a", "progress", "bar", ".", "A", "topology", "runs", "forever", "or", "until", "explicitly", "killed", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/StormSubmitter.java#L194-L200
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java
NodeIndexer.addDoubleValue
protected void addDoubleValue(Document doc, String fieldName, Object internalValue) { double doubleVal = ((Double)internalValue).doubleValue(); doc.add(createFieldWithoutNorms(fieldName, DoubleField.doubleToString(doubleVal), PropertyType.DOUBLE)); }
java
protected void addDoubleValue(Document doc, String fieldName, Object internalValue) { double doubleVal = ((Double)internalValue).doubleValue(); doc.add(createFieldWithoutNorms(fieldName, DoubleField.doubleToString(doubleVal), PropertyType.DOUBLE)); }
[ "protected", "void", "addDoubleValue", "(", "Document", "doc", ",", "String", "fieldName", ",", "Object", "internalValue", ")", "{", "double", "doubleVal", "=", "(", "(", "Double", ")", "internalValue", ")", ".", "doubleValue", "(", ")", ";", "doc", ".", "...
Adds the double value to the document as the named field. The double value is converted to an indexable string value using the {@link DoubleField} class. @param doc The document to which to add the field @param fieldName The name of the field to add @param internalValue The value for the field to add to ...
[ "Adds", "the", "double", "value", "to", "the", "document", "as", "the", "named", "field", ".", "The", "double", "value", "is", "converted", "to", "an", "indexable", "string", "value", "using", "the", "{", "@link", "DoubleField", "}", "class", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/NodeIndexer.java#L760-L764
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/connectionmanager/AbstractConnectionManager.java
AbstractConnectionManager.getConnection
public Connection getConnection() { Connection connection; try { if (getLogger().isDebugEnabled()) { getLogger().debug("before: active : " + connectionPool.getNumActive() + " idle: " + connectionPool.getNumIdle()); } ...
java
public Connection getConnection() { Connection connection; try { if (getLogger().isDebugEnabled()) { getLogger().debug("before: active : " + connectionPool.getNumActive() + " idle: " + connectionPool.getNumIdle()); } ...
[ "public", "Connection", "getConnection", "(", ")", "{", "Connection", "connection", ";", "try", "{", "if", "(", "getLogger", "(", ")", ".", "isDebugEnabled", "(", ")", ")", "{", "getLogger", "(", ")", ".", "debug", "(", "\"before: active : \"", "+", "conne...
gets a connection from the pool. initializePool() must've been called before calling this method. If all connections are in use, this method will block, unless maxWait has been set. @return a connection.
[ "gets", "a", "connection", "from", "the", "pool", ".", "initializePool", "()", "must", "ve", "been", "called", "before", "calling", "this", "method", ".", "If", "all", "connections", "are", "in", "use", "this", "method", "will", "block", "unless", "maxWait",...
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/connectionmanager/AbstractConnectionManager.java#L212-L238
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java
SibRaConnection.createConsumerSession
@Override public ConsumerSession createConsumerSession( final SIDestinationAddress destAddr, final DestinationType destType, final SelectionCriteria criteria, final Reli...
java
@Override public ConsumerSession createConsumerSession( final SIDestinationAddress destAddr, final DestinationType destType, final SelectionCriteria criteria, final Reli...
[ "@", "Override", "public", "ConsumerSession", "createConsumerSession", "(", "final", "SIDestinationAddress", "destAddr", ",", "final", "DestinationType", "destType", ",", "final", "SelectionCriteria", "criteria", ",", "final", "Reliability", "reliability", ",", "final", ...
Creates a consumer session. Checks that the connection is valid and then delegates. Wraps the <code>ConsumerSession</code> returned from the delegate in a <code>SibRaConsumerSession</code>. @param destAddr the address of the destination @param destType the destination type @param criteria the selection criteria @param...
[ "Creates", "a", "consumer", "session", ".", "Checks", "that", "the", "connection", "is", "valid", "and", "then", "delegates", ".", "Wraps", "the", "<code", ">", "ConsumerSession<", "/", "code", ">", "returned", "from", "the", "delegate", "in", "a", "<code", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.common/src/com/ibm/ws/sib/ra/impl/SibRaConnection.java#L679-L703
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/av/MicrophoneEncoder.java
MicrophoneEncoder.getJitterFreePTS
private long getJitterFreePTS(long bufferPts, long bufferSamplesNum) { long correctedPts = 0; long bufferDuration = (1000000 * bufferSamplesNum) / (mEncoderCore.mSampleRate); bufferPts -= bufferDuration; // accounts for the delay of acquiring the audio buffer if (totalSamplesNum == 0) { ...
java
private long getJitterFreePTS(long bufferPts, long bufferSamplesNum) { long correctedPts = 0; long bufferDuration = (1000000 * bufferSamplesNum) / (mEncoderCore.mSampleRate); bufferPts -= bufferDuration; // accounts for the delay of acquiring the audio buffer if (totalSamplesNum == 0) { ...
[ "private", "long", "getJitterFreePTS", "(", "long", "bufferPts", ",", "long", "bufferSamplesNum", ")", "{", "long", "correctedPts", "=", "0", ";", "long", "bufferDuration", "=", "(", "1000000", "*", "bufferSamplesNum", ")", "/", "(", "mEncoderCore", ".", "mSam...
Ensures that each audio pts differs by a constant amount from the previous one. @param bufferPts presentation timestamp in us @param bufferSamplesNum the number of samples of the buffer's frame @return
[ "Ensures", "that", "each", "audio", "pts", "differs", "by", "a", "constant", "amount", "from", "the", "previous", "one", "." ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/av/MicrophoneEncoder.java#L207-L225
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/finder/policy/GenericPolicyFinderModule.java
GenericPolicyFinderModule.findPolicy
@Override public PolicyFinderResult findPolicy(EvaluationCtx context) { try { AbstractPolicy policy = m_policyManager.getPolicy(context); if (policy == null) { return new PolicyFinderResult(); } return new PolicyFinderResult(policy); ...
java
@Override public PolicyFinderResult findPolicy(EvaluationCtx context) { try { AbstractPolicy policy = m_policyManager.getPolicy(context); if (policy == null) { return new PolicyFinderResult(); } return new PolicyFinderResult(policy); ...
[ "@", "Override", "public", "PolicyFinderResult", "findPolicy", "(", "EvaluationCtx", "context", ")", "{", "try", "{", "AbstractPolicy", "policy", "=", "m_policyManager", ".", "getPolicy", "(", "context", ")", ";", "if", "(", "policy", "==", "null", ")", "{", ...
Finds a policy based on a request's context. If more than one policy matches, then this either returns an error or a new policy wrapping the multiple policies (depending on which constructor was used to construct this instance). @param context the representation of the request data @return the result of trying to find...
[ "Finds", "a", "policy", "based", "on", "a", "request", "s", "context", ".", "If", "more", "than", "one", "policy", "matches", "then", "this", "either", "returns", "an", "error", "or", "a", "new", "policy", "wrapping", "the", "multiple", "policies", "(", ...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/finder/policy/GenericPolicyFinderModule.java#L94-L115
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/validation/NamesAreUniqueValidationHelper.java
NamesAreUniqueValidationHelper.getDuplicateNameErrorMessage
public String getDuplicateNameErrorMessage(IEObjectDescription description, EClass clusterType, EStructuralFeature feature) { EObject object = description.getEObjectOrProxy(); String shortName = String.valueOf(feature != null ? object.eGet(feature) : "<unnamed>"); StringBuilder result = new StringBuilder(64); r...
java
public String getDuplicateNameErrorMessage(IEObjectDescription description, EClass clusterType, EStructuralFeature feature) { EObject object = description.getEObjectOrProxy(); String shortName = String.valueOf(feature != null ? object.eGet(feature) : "<unnamed>"); StringBuilder result = new StringBuilder(64); r...
[ "public", "String", "getDuplicateNameErrorMessage", "(", "IEObjectDescription", "description", ",", "EClass", "clusterType", ",", "EStructuralFeature", "feature", ")", "{", "EObject", "object", "=", "description", ".", "getEObjectOrProxy", "(", ")", ";", "String", "sh...
Build the error message for duplicated names. The default implementation will provider error messages of this form: <ul> <li>Duplicate Entity 'Sample'</li> <li>Duplicate Property 'Sample' in Entity 'EntityName'</li> </ul> If the container information will be helpful to locate the error or to understand the error it wil...
[ "Build", "the", "error", "message", "for", "duplicated", "names", ".", "The", "default", "implementation", "will", "provider", "error", "messages", "of", "this", "form", ":", "<ul", ">", "<li", ">", "Duplicate", "Entity", "Sample", "<", "/", "li", ">", "<l...
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/validation/NamesAreUniqueValidationHelper.java#L142-L171
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.splitByWholeSeparatorPreserveAllTokens
public static String[] splitByWholeSeparatorPreserveAllTokens(final String str, final String separator) { return splitByWholeSeparatorWorker(str, separator, -1, true); }
java
public static String[] splitByWholeSeparatorPreserveAllTokens(final String str, final String separator) { return splitByWholeSeparatorWorker(str, separator, -1, true); }
[ "public", "static", "String", "[", "]", "splitByWholeSeparatorPreserveAllTokens", "(", "final", "String", "str", ",", "final", "String", "separator", ")", "{", "return", "splitByWholeSeparatorWorker", "(", "str", ",", "separator", ",", "-", "1", ",", "true", ")"...
<p>Splits the provided text into an array, separator string specified. </p> <p>The separator is not included in the returned String array. Adjacent separators are treated as separators for empty tokens. For more control over the split use the StrTokenizer class.</p> <p>A {@code null} input String returns {@code null}...
[ "<p", ">", "Splits", "the", "provided", "text", "into", "an", "array", "separator", "string", "specified", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L3326-L3328
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/entry/JournalEntry.java
JournalEntry.addArgument
public void addArgument(String key, InputStream stream) throws JournalException { checkOpen(); if (stream == null) { arguments.put(key, null); } else { try { File tempFile = JournalHelper.copyToTempFile(stream); arguments.put(ke...
java
public void addArgument(String key, InputStream stream) throws JournalException { checkOpen(); if (stream == null) { arguments.put(key, null); } else { try { File tempFile = JournalHelper.copyToTempFile(stream); arguments.put(ke...
[ "public", "void", "addArgument", "(", "String", "key", ",", "InputStream", "stream", ")", "throws", "JournalException", "{", "checkOpen", "(", ")", ";", "if", "(", "stream", "==", "null", ")", "{", "arguments", ".", "put", "(", "key", ",", "null", ")", ...
If handed an InputStream as an argument, copy it to a temp file and store that File in the arguments map instead. If the InputStream is null, store null in the arguments map.
[ "If", "handed", "an", "InputStream", "as", "an", "argument", "copy", "it", "to", "a", "temp", "file", "and", "store", "that", "File", "in", "the", "arguments", "map", "instead", ".", "If", "the", "InputStream", "is", "null", "store", "null", "in", "the",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/entry/JournalEntry.java#L93-L106
OnyxDevTools/onyx-database-parent
onyx-database-examples/webservice-client/java-client/src/main/java/io/swagger/client/api/PersistenceApi.java
PersistenceApi.executeQueryPostAsync
public com.squareup.okhttp.Call executeQueryPostAsync(Query query, final ApiCallback<QueryResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) {...
java
public com.squareup.okhttp.Call executeQueryPostAsync(Query query, final ApiCallback<QueryResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) {...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "executeQueryPostAsync", "(", "Query", "query", ",", "final", "ApiCallback", "<", "QueryResponse", ">", "callback", ")", "throws", "ApiException", "{", "ProgressResponseBody", ".", "ProgressListener", "...
Execute Query (asynchronously) Execute query with defined criteria @param query Query defined with criteria (required) @param callback The callback to be executed when the API call finishes @return The request call @throws ApiException If fail to process the API call, e.g. serializing the request body object
[ "Execute", "Query", "(", "asynchronously", ")", "Execute", "query", "with", "defined", "criteria" ]
train
https://github.com/OnyxDevTools/onyx-database-parent/blob/474dfc273a094dbc2ca08fcc08a2858cd538c920/onyx-database-examples/webservice-client/java-client/src/main/java/io/swagger/client/api/PersistenceApi.java#L662-L687
jqno/equalsverifier
src/main/java/nl/jqno/equalsverifier/internal/prefabvalues/PrefabValues.java
PrefabValues.giveOther
public <T> T giveOther(TypeTag tag, T value) { Class<T> type = tag.getType(); if (value != null && !type.isAssignableFrom(value.getClass()) && !wraps(type, value.getClass())) { throw new ReflectionException("TypeTag does not match value."); } Tuple<T> tuple = giveTuple(tag);...
java
public <T> T giveOther(TypeTag tag, T value) { Class<T> type = tag.getType(); if (value != null && !type.isAssignableFrom(value.getClass()) && !wraps(type, value.getClass())) { throw new ReflectionException("TypeTag does not match value."); } Tuple<T> tuple = giveTuple(tag);...
[ "public", "<", "T", ">", "T", "giveOther", "(", "TypeTag", "tag", ",", "T", "value", ")", "{", "Class", "<", "T", ">", "type", "=", "tag", ".", "getType", "(", ")", ";", "if", "(", "value", "!=", "null", "&&", "!", "type", ".", "isAssignableFrom"...
Returns a prefabricated value of the specified type, that is different from the specified value. @param <T> The type of the value. @param tag A description of the desired type, including generic parameters. @param value A value that is different from the value that will be returned. @return A value that is different f...
[ "Returns", "a", "prefabricated", "value", "of", "the", "specified", "type", "that", "is", "different", "from", "the", "specified", "value", "." ]
train
https://github.com/jqno/equalsverifier/blob/25d73c9cb801c8b20b257d1d1283ac6e0585ef1d/src/main/java/nl/jqno/equalsverifier/internal/prefabvalues/PrefabValues.java#L104-L121
Squarespace/cldr
runtime/src/main/java/com/squarespace/cldr/MessageFormat.java
MessageFormat.emit
private void emit(int pos, int end, String arg) { while (pos < end) { char ch = format.charAt(pos); if (ch == '#') { buf.append(arg == null ? ch : arg); } else { buf.append(ch); } pos++; } }
java
private void emit(int pos, int end, String arg) { while (pos < end) { char ch = format.charAt(pos); if (ch == '#') { buf.append(arg == null ? ch : arg); } else { buf.append(ch); } pos++; } }
[ "private", "void", "emit", "(", "int", "pos", ",", "int", "end", ",", "String", "arg", ")", "{", "while", "(", "pos", "<", "end", ")", "{", "char", "ch", "=", "format", ".", "charAt", "(", "pos", ")", ";", "if", "(", "ch", "==", "'", "'", ")"...
Append characters from 'raw' in the range [pos, end) to the output buffer.
[ "Append", "characters", "from", "raw", "in", "the", "range", "[", "pos", "end", ")", "to", "the", "output", "buffer", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/runtime/src/main/java/com/squarespace/cldr/MessageFormat.java#L813-L823
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
AbstractDatabaseEngine.executePS
@Override public synchronized void executePS(final String name) throws DatabaseEngineException, ConnectionResetException { final PreparedStatementCapsule ps = stmts.get(name); if (ps == null) { throw new DatabaseEngineRuntimeException(String.format("PreparedStatement named '%s' does not ...
java
@Override public synchronized void executePS(final String name) throws DatabaseEngineException, ConnectionResetException { final PreparedStatementCapsule ps = stmts.get(name); if (ps == null) { throw new DatabaseEngineRuntimeException(String.format("PreparedStatement named '%s' does not ...
[ "@", "Override", "public", "synchronized", "void", "executePS", "(", "final", "String", "name", ")", "throws", "DatabaseEngineException", ",", "ConnectionResetException", "{", "final", "PreparedStatementCapsule", "ps", "=", "stmts", ".", "get", "(", "name", ")", "...
Executes the specified prepared statement. @param name The prepared statement name. @throws DatabaseEngineException If something goes wrong while executing. @throws ConnectionResetException If the connection is down and reestablishment occurs. If this happens, the user must reset the parameters and re-execute the que...
[ "Executes", "the", "specified", "prepared", "statement", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java#L1724-L1749
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/background/Parallax.java
Parallax.setScreenSize
public final void setScreenSize(int screenWidth, int screenHeight) { this.screenWidth = screenWidth; this.screenHeight = screenHeight; final int w = (int) Math.ceil(screenWidth / (surface.getWidth() * 0.6 * factH)) + 1; amplitude = (int) Math.ceil(w / 2.0) + 1; }
java
public final void setScreenSize(int screenWidth, int screenHeight) { this.screenWidth = screenWidth; this.screenHeight = screenHeight; final int w = (int) Math.ceil(screenWidth / (surface.getWidth() * 0.6 * factH)) + 1; amplitude = (int) Math.ceil(w / 2.0) + 1; }
[ "public", "final", "void", "setScreenSize", "(", "int", "screenWidth", ",", "int", "screenHeight", ")", "{", "this", ".", "screenWidth", "=", "screenWidth", ";", "this", ".", "screenHeight", "=", "screenHeight", ";", "final", "int", "w", "=", "(", "int", "...
Set the screen size. Used to know the parallax amplitude, and the overall surface to render in order to fill the screen. @param screenWidth The screen width. @param screenHeight The screen height.
[ "Set", "the", "screen", "size", ".", "Used", "to", "know", "the", "parallax", "amplitude", "and", "the", "overall", "surface", "to", "render", "in", "order", "to", "fill", "the", "screen", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/background/Parallax.java#L110-L116
alkacon/opencms-core
src/org/opencms/search/CmsSearchIndex.java
CmsSearchIndex.appendDateCreatedFilter
protected BooleanQuery.Builder appendDateCreatedFilter(BooleanQuery.Builder filter, long startTime, long endTime) { // create special optimized sub-filter for the date last modified search Query dateFilter = createDateRangeFilter(CmsSearchField.FIELD_DATE_CREATED_LOOKUP, startTime, endTime); if...
java
protected BooleanQuery.Builder appendDateCreatedFilter(BooleanQuery.Builder filter, long startTime, long endTime) { // create special optimized sub-filter for the date last modified search Query dateFilter = createDateRangeFilter(CmsSearchField.FIELD_DATE_CREATED_LOOKUP, startTime, endTime); if...
[ "protected", "BooleanQuery", ".", "Builder", "appendDateCreatedFilter", "(", "BooleanQuery", ".", "Builder", "filter", ",", "long", "startTime", ",", "long", "endTime", ")", "{", "// create special optimized sub-filter for the date last modified search", "Query", "dateFilter"...
Appends a date of creation filter to the given filter clause that matches the given time range.<p> If the start time is equal to {@link Long#MIN_VALUE} and the end time is equal to {@link Long#MAX_VALUE} than the original filter is left unchanged.<p> The original filter parameter is extended and also provided as retu...
[ "Appends", "a", "date", "of", "creation", "filter", "to", "the", "given", "filter", "clause", "that", "matches", "the", "given", "time", "range", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchIndex.java#L1310-L1320
ACRA/acra
acra-dialog/src/main/java/org/acra/dialog/BaseCrashReportDialog.java
BaseCrashReportDialog.sendCrash
protected final void sendCrash(@Nullable String comment, @Nullable String userEmail) { new Thread(() -> { final CrashReportPersister persister = new CrashReportPersister(); try { if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Add user comment to " + reportFile); ...
java
protected final void sendCrash(@Nullable String comment, @Nullable String userEmail) { new Thread(() -> { final CrashReportPersister persister = new CrashReportPersister(); try { if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Add user comment to " + reportFile); ...
[ "protected", "final", "void", "sendCrash", "(", "@", "Nullable", "String", "comment", ",", "@", "Nullable", "String", "userEmail", ")", "{", "new", "Thread", "(", "(", ")", "->", "{", "final", "CrashReportPersister", "persister", "=", "new", "CrashReportPersis...
Send crash report given user's comment and email address. @param comment Comment (may be null) provided by the user. @param userEmail Email address (may be null) provided by the client.
[ "Send", "crash", "report", "given", "user", "s", "comment", "and", "email", "address", "." ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-dialog/src/main/java/org/acra/dialog/BaseCrashReportDialog.java#L122-L138
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java
SdkUtils.getAssetFile
public static String getAssetFile(final Context context, final String assetName) { // if the file is not found create it and return that. // if we do not have a file we copy our asset out to create one. AssetManager assetManager = context.getAssets(); BufferedReader in = null; tr...
java
public static String getAssetFile(final Context context, final String assetName) { // if the file is not found create it and return that. // if we do not have a file we copy our asset out to create one. AssetManager assetManager = context.getAssets(); BufferedReader in = null; tr...
[ "public", "static", "String", "getAssetFile", "(", "final", "Context", "context", ",", "final", "String", "assetName", ")", "{", "// if the file is not found create it and return that.", "// if we do not have a file we copy our asset out to create one.", "AssetManager", "assetManag...
Helper method for reading an asset file into a string. @param context current context. @param assetName the asset name @return a string representation of a file in assets.
[ "Helper", "method", "for", "reading", "an", "asset", "file", "into", "a", "string", "." ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java#L453-L486
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.invokeVirtual
public MethodHandle invokeVirtual(MethodHandles.Lookup lookup, String name) throws NoSuchMethodException, IllegalAccessException { return invoke(lookup.findVirtual(type().parameterType(0), name, type().dropParameterTypes(0, 1))); }
java
public MethodHandle invokeVirtual(MethodHandles.Lookup lookup, String name) throws NoSuchMethodException, IllegalAccessException { return invoke(lookup.findVirtual(type().parameterType(0), name, type().dropParameterTypes(0, 1))); }
[ "public", "MethodHandle", "invokeVirtual", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "String", "name", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", "{", "return", "invoke", "(", "lookup", ".", "findVirtual", "(", "type", "(", ")...
Apply the chain of transforms and bind them to a virtual method specified using the end signature plus the given class and name. The method will be retrieved using the given Lookup and must match the end signature exactly. If the final handle's type does not exactly match the initial type for this Binder, an additiona...
[ "Apply", "the", "chain", "of", "transforms", "and", "bind", "them", "to", "a", "virtual", "method", "specified", "using", "the", "end", "signature", "plus", "the", "given", "class", "and", "name", ".", "The", "method", "will", "be", "retrieved", "using", "...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1254-L1256
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/ngmf/util/IOCase.java
IOCase.checkEndsWith
public boolean checkEndsWith(String str, String end) { int endLen = end.length(); return str.regionMatches(!sensitive, str.length() - endLen, end, 0, endLen); }
java
public boolean checkEndsWith(String str, String end) { int endLen = end.length(); return str.regionMatches(!sensitive, str.length() - endLen, end, 0, endLen); }
[ "public", "boolean", "checkEndsWith", "(", "String", "str", ",", "String", "end", ")", "{", "int", "endLen", "=", "end", ".", "length", "(", ")", ";", "return", "str", ".", "regionMatches", "(", "!", "sensitive", ",", "str", ".", "length", "(", ")", ...
Checks if one string ends with another using the case-sensitivity rule. <p> This method mimics {@link String#endsWith} but takes case-sensitivity into account. @param str the string to check, not null @param end the end to compare against, not null @return true if equal using the case rules @throws NullPointerExcept...
[ "Checks", "if", "one", "string", "ends", "with", "another", "using", "the", "case", "-", "sensitivity", "rule", ".", "<p", ">", "This", "method", "mimics", "{", "@link", "String#endsWith", "}", "but", "takes", "case", "-", "sensitivity", "into", "account", ...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/ngmf/util/IOCase.java#L193-L196
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/Jsr250Utils.java
Jsr250Utils.safeInvokeMethod
private static void safeInvokeMethod(Object obj, Method aMethod, Logger log) throws Exception { boolean accessible = aMethod.isAccessible(); try { if(!accessible) { aMethod.setAccessible(true); } if(Modifier.isStatic(aMethod.getModifiers())) { log.debug("Invoking static m...
java
private static void safeInvokeMethod(Object obj, Method aMethod, Logger log) throws Exception { boolean accessible = aMethod.isAccessible(); try { if(!accessible) { aMethod.setAccessible(true); } if(Modifier.isStatic(aMethod.getModifiers())) { log.debug("Invoking static m...
[ "private", "static", "void", "safeInvokeMethod", "(", "Object", "obj", ",", "Method", "aMethod", ",", "Logger", "log", ")", "throws", "Exception", "{", "boolean", "accessible", "=", "aMethod", ".", "isAccessible", "(", ")", ";", "try", "{", "if", "(", "!",...
Invokes a method safely on a Object regardless of accessibility (Unless not allowed with security settings). @param obj @param aMethod @param log @throws Exception
[ "Invokes", "a", "method", "safely", "on", "a", "Object", "regardless", "of", "accessibility", "(", "Unless", "not", "allowed", "with", "security", "settings", ")", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/Jsr250Utils.java#L113-L132
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.updateString
public void updateString(int columnIndex, String x) throws SQLException { startUpdate(columnIndex); preparedStatement.setParameter(columnIndex, x); }
java
public void updateString(int columnIndex, String x) throws SQLException { startUpdate(columnIndex); preparedStatement.setParameter(columnIndex, x); }
[ "public", "void", "updateString", "(", "int", "columnIndex", ",", "String", "x", ")", "throws", "SQLException", "{", "startUpdate", "(", "columnIndex", ")", ";", "preparedStatement", ".", "setParameter", "(", "columnIndex", ",", "x", ")", ";", "}" ]
<!-- start generic documentation --> Updates the designated column with a <code>String</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...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Updates", "the", "designated", "column", "with", "a", "<code", ">", "String<", "/", "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#L2917-L2920
haraldk/TwelveMonkeys
imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/ImageReaderBase.java
ImageReaderBase.setInput
@Override public void setInput(final Object input, final boolean seekForwardOnly, final boolean ignoreMetadata) { resetMembers(); super.setInput(input, seekForwardOnly, ignoreMetadata); if (input instanceof ImageInputStream) { imageInput = (ImageInputStream) input; } ...
java
@Override public void setInput(final Object input, final boolean seekForwardOnly, final boolean ignoreMetadata) { resetMembers(); super.setInput(input, seekForwardOnly, ignoreMetadata); if (input instanceof ImageInputStream) { imageInput = (ImageInputStream) input; } ...
[ "@", "Override", "public", "void", "setInput", "(", "final", "Object", "input", ",", "final", "boolean", "seekForwardOnly", ",", "final", "boolean", "ignoreMetadata", ")", "{", "resetMembers", "(", ")", ";", "super", ".", "setInput", "(", "input", ",", "seek...
Overrides {@code setInput}, to allow easy access to the input, in case it is an {@code ImageInputStream}. @param input the {@code ImageInputStream} or other {@code Object} to use for future decoding. @param seekForwardOnly if {@code true}, images and metadata may only be read in ascending order from this input source....
[ "Overrides", "{", "@code", "setInput", "}", "to", "allow", "easy", "access", "to", "the", "input", "in", "case", "it", "is", "an", "{", "@code", "ImageInputStream", "}", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/imageio/imageio-core/src/main/java/com/twelvemonkeys/imageio/ImageReaderBase.java#L106-L117
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/parser/RtfParser.java
RtfParser.importRtfDocument
public void importRtfDocument(InputStream readerIn, RtfDocument rtfDoc) throws IOException { if(readerIn == null || rtfDoc == null) return; this.init(TYPE_IMPORT_FULL, rtfDoc, readerIn, this.document, null); this.setCurrentDestination(RtfDestinationMgr.DESTINATION_NULL); this.groupLevel = 0; try { th...
java
public void importRtfDocument(InputStream readerIn, RtfDocument rtfDoc) throws IOException { if(readerIn == null || rtfDoc == null) return; this.init(TYPE_IMPORT_FULL, rtfDoc, readerIn, this.document, null); this.setCurrentDestination(RtfDestinationMgr.DESTINATION_NULL); this.groupLevel = 0; try { th...
[ "public", "void", "importRtfDocument", "(", "InputStream", "readerIn", ",", "RtfDocument", "rtfDoc", ")", "throws", "IOException", "{", "if", "(", "readerIn", "==", "null", "||", "rtfDoc", "==", "null", ")", "return", ";", "this", ".", "init", "(", "TYPE_IMP...
Imports a complete RTF document. @param readerIn The Reader to read the RTF document from. @param rtfDoc The RtfDocument to add the imported document to. @throws IOException On I/O errors. @since 2.1.3
[ "Imports", "a", "complete", "RTF", "document", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/parser/RtfParser.java#L482-L497
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java
MapBasedXPathVariableResolverQName.addUniqueVariable
@Nonnull public EChange addUniqueVariable (@Nonnull final QName aName, @Nonnull final Object aValue) { ValueEnforcer.notNull (aName, "Name"); ValueEnforcer.notNull (aValue, "Value"); if (m_aMap.containsKey (aName)) return EChange.UNCHANGED; m_aMap.put (aName, aValue); return EChange.CHANG...
java
@Nonnull public EChange addUniqueVariable (@Nonnull final QName aName, @Nonnull final Object aValue) { ValueEnforcer.notNull (aName, "Name"); ValueEnforcer.notNull (aValue, "Value"); if (m_aMap.containsKey (aName)) return EChange.UNCHANGED; m_aMap.put (aName, aValue); return EChange.CHANG...
[ "@", "Nonnull", "public", "EChange", "addUniqueVariable", "(", "@", "Nonnull", "final", "QName", "aName", ",", "@", "Nonnull", "final", "Object", "aValue", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aName", ",", "\"Name\"", ")", ";", "ValueEnforcer", "...
Add a new variable. @param aName The qualified name of the variable @param aValue The value to be used. @return {@link EChange}
[ "Add", "a", "new", "variable", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathVariableResolverQName.java#L93-L103
line/armeria
core/src/main/java/com/linecorp/armeria/common/AbstractRequestContextBuilder.java
AbstractRequestContextBuilder.requestStartTime
public final B requestStartTime(long requestStartTimeNanos, long requestStartTimeMicros) { this.requestStartTimeNanos = requestStartTimeNanos; this.requestStartTimeMicros = requestStartTimeMicros; requestStartTimeSet = true; return self(); }
java
public final B requestStartTime(long requestStartTimeNanos, long requestStartTimeMicros) { this.requestStartTimeNanos = requestStartTimeNanos; this.requestStartTimeMicros = requestStartTimeMicros; requestStartTimeSet = true; return self(); }
[ "public", "final", "B", "requestStartTime", "(", "long", "requestStartTimeNanos", ",", "long", "requestStartTimeMicros", ")", "{", "this", ".", "requestStartTimeNanos", "=", "requestStartTimeNanos", ";", "this", ".", "requestStartTimeMicros", "=", "requestStartTimeMicros"...
Sets the request start time of the request. @param requestStartTimeNanos the {@link System#nanoTime()} value when the request started. @param requestStartTimeMicros the number of microseconds since the epoch when the request started.
[ "Sets", "the", "request", "start", "time", "of", "the", "request", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/AbstractRequestContextBuilder.java#L383-L388
abego/treelayout
org.abego.treelayout/src/main/java/org/abego/treelayout/TreeLayout.java
TreeLayout.secondWalk
private void secondWalk(TreeNode v, double m, int level, double levelStart) { // construct the position from the prelim and the level information // The rootLocation affects the way how x and y are changed and in what // direction. double levelChangeSign = getLevelChangeSign(); boolean levelChangeOnYAxis = i...
java
private void secondWalk(TreeNode v, double m, int level, double levelStart) { // construct the position from the prelim and the level information // The rootLocation affects the way how x and y are changed and in what // direction. double levelChangeSign = getLevelChangeSign(); boolean levelChangeOnYAxis = i...
[ "private", "void", "secondWalk", "(", "TreeNode", "v", ",", "double", "m", ",", "int", "level", ",", "double", "levelStart", ")", "{", "// construct the position from the prelim and the level information", "// The rootLocation affects the way how x and y are changed and in what",...
In difference to the original algorithm we also pass in extra level information. @param v @param m @param level @param levelStart
[ "In", "difference", "to", "the", "original", "algorithm", "we", "also", "pass", "in", "extra", "level", "information", "." ]
train
https://github.com/abego/treelayout/blob/aa73af5803c6ec30db0b4ad192c7cba55d0862d2/org.abego.treelayout/src/main/java/org/abego/treelayout/TreeLayout.java#L642-L684
knowm/XChange
xchange-exx/src/main/java/org/knowm/xchange/exx/EXXAdapters.java
EXXAdapters.adaptOrderBook
public static OrderBook adaptOrderBook(EXXOrderbook exxOrderbook, CurrencyPair currencyPair) { List<LimitOrder> asks = new ArrayList<LimitOrder>(); List<LimitOrder> bids = new ArrayList<LimitOrder>(); for (BigDecimal[] exxAsk : exxOrderbook.getAsks()) { asks.add(new LimitOrder(OrderType.ASK, exxAsk[1...
java
public static OrderBook adaptOrderBook(EXXOrderbook exxOrderbook, CurrencyPair currencyPair) { List<LimitOrder> asks = new ArrayList<LimitOrder>(); List<LimitOrder> bids = new ArrayList<LimitOrder>(); for (BigDecimal[] exxAsk : exxOrderbook.getAsks()) { asks.add(new LimitOrder(OrderType.ASK, exxAsk[1...
[ "public", "static", "OrderBook", "adaptOrderBook", "(", "EXXOrderbook", "exxOrderbook", ",", "CurrencyPair", "currencyPair", ")", "{", "List", "<", "LimitOrder", ">", "asks", "=", "new", "ArrayList", "<", "LimitOrder", ">", "(", ")", ";", "List", "<", "LimitOr...
Adapts a to a OrderBook Object @param currencyPair (e.g. BTC/USD) @param timeScale polled order books provide a timestamp in seconds, stream in ms @return The XChange OrderBook
[ "Adapts", "a", "to", "a", "OrderBook", "Object" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-exx/src/main/java/org/knowm/xchange/exx/EXXAdapters.java#L113-L126
RKumsher/utils
src/main/java/com/github/rkumsher/date/RandomDateUtils.java
RandomDateUtils.randomLocalTime
public static LocalTime randomLocalTime(LocalTime startInclusive, LocalTime endExclusive) { checkArgument(startInclusive != null, "Start must be non-null"); checkArgument(endExclusive != null, "End must be non-null"); long nanoOfDay = random(NANO_OF_DAY, startInclusive.toNanoOfDay(), endExclusive.toNanoOfDa...
java
public static LocalTime randomLocalTime(LocalTime startInclusive, LocalTime endExclusive) { checkArgument(startInclusive != null, "Start must be non-null"); checkArgument(endExclusive != null, "End must be non-null"); long nanoOfDay = random(NANO_OF_DAY, startInclusive.toNanoOfDay(), endExclusive.toNanoOfDa...
[ "public", "static", "LocalTime", "randomLocalTime", "(", "LocalTime", "startInclusive", ",", "LocalTime", "endExclusive", ")", "{", "checkArgument", "(", "startInclusive", "!=", "null", ",", "\"Start must be non-null\"", ")", ";", "checkArgument", "(", "endExclusive", ...
Returns a random {@link LocalTime} within the specified range. @param startInclusive the earliest {@link LocalTime} that can be returned @param endExclusive the upper bound (not included) @return the random {@link LocalTime} @throws IllegalArgumentException if startInclusive or endExclusive are null or if endExclusive...
[ "Returns", "a", "random", "{", "@link", "LocalTime", "}", "within", "the", "specified", "range", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/date/RandomDateUtils.java#L534-L539
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/TimingHandler.java
TimingHandler.stopStartTimer
public long stopStartTimer(long _expiryTime, Entry<K,V> e) { if ((_expiryTime > 0 && _expiryTime < Long.MAX_VALUE) || _expiryTime < 0) { throw new IllegalArgumentException("invalid expiry time, cache is not initialized with expiry: " + Util.formatMillis(_expiryTime)); } return _expiryTime == 0 ? Entry...
java
public long stopStartTimer(long _expiryTime, Entry<K,V> e) { if ((_expiryTime > 0 && _expiryTime < Long.MAX_VALUE) || _expiryTime < 0) { throw new IllegalArgumentException("invalid expiry time, cache is not initialized with expiry: " + Util.formatMillis(_expiryTime)); } return _expiryTime == 0 ? Entry...
[ "public", "long", "stopStartTimer", "(", "long", "_expiryTime", ",", "Entry", "<", "K", ",", "V", ">", "e", ")", "{", "if", "(", "(", "_expiryTime", ">", "0", "&&", "_expiryTime", "<", "Long", ".", "MAX_VALUE", ")", "||", "_expiryTime", "<", "0", ")"...
Convert expiry value to the entry field value, essentially maps 0 to {@link Entry#EXPIRED} since 0 is a virgin entry. Restart the timer if needed. @param _expiryTime calculated expiry time @return sanitized nextRefreshTime for storage in the entry.
[ "Convert", "expiry", "value", "to", "the", "entry", "field", "value", "essentially", "maps", "0", "to", "{", "@link", "Entry#EXPIRED", "}", "since", "0", "is", "a", "virgin", "entry", ".", "Restart", "the", "timer", "if", "needed", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/TimingHandler.java#L157-L162
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/Record.java
Record.setHandle
public Record setHandle(Object bookmark, int iHandleType) throws DBException { return (Record)this.getTable().setHandle(bookmark, iHandleType); }
java
public Record setHandle(Object bookmark, int iHandleType) throws DBException { return (Record)this.getTable().setHandle(bookmark, iHandleType); }
[ "public", "Record", "setHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "return", "(", "Record", ")", "this", ".", "getTable", "(", ")", ".", "setHandle", "(", "bookmark", ",", "iHandleType", ")", ";", "}" ...
Reposition to this record Using this bookmark. <br>NOTE: This is a table method, it is included here in Record for convience!!! @param bookmark The handle to use to position the record. @param iHandleType The type of handle bookmark is. @exception DBException FILE_NOT_OPEN. @return <code>valid record</code> - record f...
[ "Reposition", "to", "this", "record", "Using", "this", "bookmark", ".", "<br", ">", "NOTE", ":", "This", "is", "a", "table", "method", "it", "is", "included", "here", "in", "Record", "for", "convience!!!" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/Record.java#L2604-L2607
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/MessageBuilder.java
MessageBuilder.replaceLast
public MessageBuilder replaceLast(String target, String replacement) { int index = builder.lastIndexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
java
public MessageBuilder replaceLast(String target, String replacement) { int index = builder.lastIndexOf(target); if (index != -1) { builder.replace(index, index + target.length(), replacement); } return this; }
[ "public", "MessageBuilder", "replaceLast", "(", "String", "target", ",", "String", "replacement", ")", "{", "int", "index", "=", "builder", ".", "lastIndexOf", "(", "target", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "builder", ".", "replac...
Replaces the last substring that matches the target string with the specified replacement string. @param target the sequence of char values to be replaced @param replacement the replacement sequence of char values @return The MessageBuilder instance. Useful for chaining.
[ "Replaces", "the", "last", "substring", "that", "matches", "the", "target", "string", "with", "the", "specified", "replacement", "string", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/MessageBuilder.java#L430-L438
apache/incubator-heron
heron/healthmgr/src/java/org/apache/heron/healthmgr/sensors/BufferSizeSensor.java
BufferSizeSensor.fetch
@Override public Collection<Measurement> fetch() { Collection<Measurement> result = new ArrayList<>(); Instant now = context.checkpoint(); List<String> boltComponents = physicalPlanProvider.getBoltNames(); Duration duration = getDuration(); for (String component : boltComponents) { String[...
java
@Override public Collection<Measurement> fetch() { Collection<Measurement> result = new ArrayList<>(); Instant now = context.checkpoint(); List<String> boltComponents = physicalPlanProvider.getBoltNames(); Duration duration = getDuration(); for (String component : boltComponents) { String[...
[ "@", "Override", "public", "Collection", "<", "Measurement", ">", "fetch", "(", ")", "{", "Collection", "<", "Measurement", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "Instant", "now", "=", "context", ".", "checkpoint", "(", ")", ";", ...
The buffer size as provided by tracker @return buffer size measurements
[ "The", "buffer", "size", "as", "provided", "by", "tracker" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/healthmgr/src/java/org/apache/heron/healthmgr/sensors/BufferSizeSensor.java#L61-L93
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildFieldInfo
public void buildFieldInfo(XMLNode node, Content fieldsContentTree) { if(configuration.nocomment){ return; } VariableElement field = (VariableElement)currentMember; TypeElement te = utils.getEnclosingTypeElement(currentMember); // Process default Serializable field. ...
java
public void buildFieldInfo(XMLNode node, Content fieldsContentTree) { if(configuration.nocomment){ return; } VariableElement field = (VariableElement)currentMember; TypeElement te = utils.getEnclosingTypeElement(currentMember); // Process default Serializable field. ...
[ "public", "void", "buildFieldInfo", "(", "XMLNode", "node", ",", "Content", "fieldsContentTree", ")", "{", "if", "(", "configuration", ".", "nocomment", ")", "{", "return", ";", "}", "VariableElement", "field", "=", "(", "VariableElement", ")", "currentMember", ...
Build the field information. @param node the XML element that specifies which components to document @param fieldsContentTree content tree to which the documentation will be added
[ "Build", "the", "field", "information", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L530-L545
facebookarchive/hadoop-20
src/core/org/apache/hadoop/net/InetSocketAddressFactory.java
InetSocketAddressFactory.createWithResolveRetry
public static InetSocketAddress createWithResolveRetry( String hostname, int port, int delayMillis, int maxAttempt ) { InetSocketAddress socketAddress; int attempts = 0; do { socketAddress = new InetSocketAddress(hostname, port); // if dns failed, try one more time if (s...
java
public static InetSocketAddress createWithResolveRetry( String hostname, int port, int delayMillis, int maxAttempt ) { InetSocketAddress socketAddress; int attempts = 0; do { socketAddress = new InetSocketAddress(hostname, port); // if dns failed, try one more time if (s...
[ "public", "static", "InetSocketAddress", "createWithResolveRetry", "(", "String", "hostname", ",", "int", "port", ",", "int", "delayMillis", ",", "int", "maxAttempt", ")", "{", "InetSocketAddress", "socketAddress", ";", "int", "attempts", "=", "0", ";", "do", "{...
Utility function to create an InetSocketAddress that has been resolved. Retries with a small sleep in between @param hostname - host @param port - port @param delayMillis - millis to sleep between attempts @param maxAttempt - max total attempts to retry @return InetSocketAddress, may be unresolved if all attempts fail
[ "Utility", "function", "to", "create", "an", "InetSocketAddress", "that", "has", "been", "resolved", ".", "Retries", "with", "a", "small", "sleep", "in", "between" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/net/InetSocketAddressFactory.java#L43-L76
eBay/parallec
src/main/java/io/parallec/core/util/PcStringUtils.java
PcStringUtils.getAggregatedResultHuman
public static String getAggregatedResultHuman(Map<String, LinkedHashSet<String>> aggregateResultMap){ StringBuilder res = new StringBuilder(); for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap .entrySet()) { LinkedHashSet<String> valueSet = entry.getValue...
java
public static String getAggregatedResultHuman(Map<String, LinkedHashSet<String>> aggregateResultMap){ StringBuilder res = new StringBuilder(); for (Entry<String, LinkedHashSet<String>> entry : aggregateResultMap .entrySet()) { LinkedHashSet<String> valueSet = entry.getValue...
[ "public", "static", "String", "getAggregatedResultHuman", "(", "Map", "<", "String", ",", "LinkedHashSet", "<", "String", ">", ">", "aggregateResultMap", ")", "{", "StringBuilder", "res", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Entry", "<", ...
Get the aggregated result human readable string for easy display. @param aggregateResultMap the aggregate result map @return the aggregated result human
[ "Get", "the", "aggregated", "result", "human", "readable", "string", "for", "easy", "display", "." ]
train
https://github.com/eBay/parallec/blob/1b4f1628f34fedfb06b24c33a5372d64d3df0952/src/main/java/io/parallec/core/util/PcStringUtils.java#L76-L92
GistLabs/mechanize
src/main/java/com/gistlabs/mechanize/requestor/RequestBuilder.java
RequestBuilder.set
public RequestBuilder<Resource> set(final String name, final File file) { return set(name, file != null ? new FileBody(file) : null); }
java
public RequestBuilder<Resource> set(final String name, final File file) { return set(name, file != null ? new FileBody(file) : null); }
[ "public", "RequestBuilder", "<", "Resource", ">", "set", "(", "final", "String", "name", ",", "final", "File", "file", ")", "{", "return", "set", "(", "name", ",", "file", "!=", "null", "?", "new", "FileBody", "(", "file", ")", ":", "null", ")", ";",...
Adds a file to the request also making the request to become a multi-part post request or removes any file registered under the given name if the file value is null.
[ "Adds", "a", "file", "to", "the", "request", "also", "making", "the", "request", "to", "become", "a", "multi", "-", "part", "post", "request", "or", "removes", "any", "file", "registered", "under", "the", "given", "name", "if", "the", "file", "value", "i...
train
https://github.com/GistLabs/mechanize/blob/32ddd0774439a4c08513c05d7ac7416a3899efed/src/main/java/com/gistlabs/mechanize/requestor/RequestBuilder.java#L127-L129
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/PippoSettings.java
PippoSettings.getFloat
public float getFloat(String name, float defaultValue) { try { String value = getString(name, null); if (!StringUtils.isNullOrEmpty(value)) { return Float.parseFloat(value.trim()); } } catch (NumberFormatException e) { log.warn("Failed to p...
java
public float getFloat(String name, float defaultValue) { try { String value = getString(name, null); if (!StringUtils.isNullOrEmpty(value)) { return Float.parseFloat(value.trim()); } } catch (NumberFormatException e) { log.warn("Failed to p...
[ "public", "float", "getFloat", "(", "String", "name", ",", "float", "defaultValue", ")", "{", "try", "{", "String", "value", "=", "getString", "(", "name", ",", "null", ")", ";", "if", "(", "!", "StringUtils", ".", "isNullOrEmpty", "(", "value", ")", "...
Returns the float value for the specified name. If the name does not exist or the value for the name can not be interpreted as a float, the defaultValue is returned. @param name @param defaultValue @return name value or defaultValue
[ "Returns", "the", "float", "value", "for", "the", "specified", "name", ".", "If", "the", "name", "does", "not", "exist", "or", "the", "value", "for", "the", "name", "can", "not", "be", "interpreted", "as", "a", "float", "the", "defaultValue", "is", "retu...
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/PippoSettings.java#L541-L553
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/provider/ChaiConfiguration.java
ChaiConfiguration.newConfiguration
public static ChaiConfiguration newConfiguration( final List<String> ldapURLs, final String bindDN, final String bindPassword ) { return new ChaiConfigurationBuilder( ldapURLs, bindDN, bindPassword ).build(); }
java
public static ChaiConfiguration newConfiguration( final List<String> ldapURLs, final String bindDN, final String bindPassword ) { return new ChaiConfigurationBuilder( ldapURLs, bindDN, bindPassword ).build(); }
[ "public", "static", "ChaiConfiguration", "newConfiguration", "(", "final", "List", "<", "String", ">", "ldapURLs", ",", "final", "String", "bindDN", ",", "final", "String", "bindPassword", ")", "{", "return", "new", "ChaiConfigurationBuilder", "(", "ldapURLs", ","...
Construct a default {@code ChaiConfiguration}. @param bindDN ldap bind DN, in ldap fully qualified syntax. Also used as the DN of the returned ChaiUser. @param bindPassword password for the bind DN. @param ldapURLs ldap server and port in url format, example: <i>ldap://127.0.0.1:389</i> @return A new {@cod...
[ "Construct", "a", "default", "{", "@code", "ChaiConfiguration", "}", "." ]
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/provider/ChaiConfiguration.java#L94-L101
EdwardRaff/JSAT
JSAT/src/jsat/DataSet.java
DataSet.cvSet
public List<Type> cvSet(int folds, Random rand) { double[] splits = new double[folds]; Arrays.fill(splits, 1.0/folds); return randomSplit(rand, splits); }
java
public List<Type> cvSet(int folds, Random rand) { double[] splits = new double[folds]; Arrays.fill(splits, 1.0/folds); return randomSplit(rand, splits); }
[ "public", "List", "<", "Type", ">", "cvSet", "(", "int", "folds", ",", "Random", "rand", ")", "{", "double", "[", "]", "splits", "=", "new", "double", "[", "folds", "]", ";", "Arrays", ".", "fill", "(", "splits", ",", "1.0", "/", "folds", ")", ";...
Creates <tt>folds</tt> data sets that contain data from this data set. The data points in each set will be random. These are meant for cross validation @param folds the number of cross validation sets to create. Should be greater then 1 @param rand the source of randomness @return the list of data sets.
[ "Creates", "<tt", ">", "folds<", "/", "tt", ">", "data", "sets", "that", "contain", "data", "from", "this", "data", "set", ".", "The", "data", "points", "in", "each", "set", "will", "be", "random", ".", "These", "are", "meant", "for", "cross", "validat...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/DataSet.java#L580-L585
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java
OpenShiftManagedClustersInner.createOrUpdateAsync
public Observable<OpenShiftManagedClusterInner> createOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<OpenShiftManagedClusterInner>, Op...
java
public Observable<OpenShiftManagedClusterInner> createOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<OpenShiftManagedClusterInner>, Op...
[ "public", "Observable", "<", "OpenShiftManagedClusterInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "OpenShiftManagedClusterInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "r...
Creates or updates an OpenShift managed cluster. Creates or updates a OpenShift managed cluster with the specified configuration for agents and OpenShift version. @param resourceGroupName The name of the resource group. @param resourceName The name of the OpenShift managed cluster resource. @param parameters Parameter...
[ "Creates", "or", "updates", "an", "OpenShift", "managed", "cluster", ".", "Creates", "or", "updates", "a", "OpenShift", "managed", "cluster", "with", "the", "specified", "configuration", "for", "agents", "and", "OpenShift", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java#L473-L480
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/JsonFixture.java
JsonFixture.setJsonPathTo
public void setJsonPathTo(String path, Object value) { Object cleanValue = cleanupValue(value); String jsonPath = getPathExpr(path); String newContent = getPathHelper().updateJsonPathWithValue(content, jsonPath, cleanValue); content = newContent; }
java
public void setJsonPathTo(String path, Object value) { Object cleanValue = cleanupValue(value); String jsonPath = getPathExpr(path); String newContent = getPathHelper().updateJsonPathWithValue(content, jsonPath, cleanValue); content = newContent; }
[ "public", "void", "setJsonPathTo", "(", "String", "path", ",", "Object", "value", ")", "{", "Object", "cleanValue", "=", "cleanupValue", "(", "value", ")", ";", "String", "jsonPath", "=", "getPathExpr", "(", "path", ")", ";", "String", "newContent", "=", "...
Update a value in a the content by supplied jsonPath @param path the jsonPath to locate the key whose value needs changing @param value the new value to set
[ "Update", "a", "value", "in", "a", "the", "content", "by", "supplied", "jsonPath" ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/JsonFixture.java#L107-L112
dbracewell/mango
src/main/java/com/davidbracewell/conversion/Val.java
Val.asSet
public <T> Set<T> asSet(Class<T> itemType) { return asCollection(Set.class, itemType); }
java
public <T> Set<T> asSet(Class<T> itemType) { return asCollection(Set.class, itemType); }
[ "public", "<", "T", ">", "Set", "<", "T", ">", "asSet", "(", "Class", "<", "T", ">", "itemType", ")", "{", "return", "asCollection", "(", "Set", ".", "class", ",", "itemType", ")", ";", "}" ]
Converts the object to a Set @param <T> the type parameter @param itemType The class of the item in the Set @return The object as a Set
[ "Converts", "the", "object", "to", "a", "Set" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/conversion/Val.java#L762-L764
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/util/TypeReferences.java
TypeReferences.findDeclaredType
public JvmType findDeclaredType(String typeName, Notifier context) { if (typeName == null) throw new NullPointerException("typeName"); if (context == null) throw new NullPointerException("context"); ResourceSet resourceSet = EcoreUtil2.getResourceSet(context); if (resourceSet == null) return null; //...
java
public JvmType findDeclaredType(String typeName, Notifier context) { if (typeName == null) throw new NullPointerException("typeName"); if (context == null) throw new NullPointerException("context"); ResourceSet resourceSet = EcoreUtil2.getResourceSet(context); if (resourceSet == null) return null; //...
[ "public", "JvmType", "findDeclaredType", "(", "String", "typeName", ",", "Notifier", "context", ")", "{", "if", "(", "typeName", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"typeName\"", ")", ";", "if", "(", "context", "==", "null", ")"...
looks up a JVMType corresponding to the given {@link Class}. This method ignores any Jvm types created in non- {@link TypeResource} in the given context's resourceSet, but goes straight to the Java-layer, using a {@link IJvmTypeProvider}. @return the JvmType with the same qualified name as the given {@link Class} obje...
[ "looks", "up", "a", "JVMType", "corresponding", "to", "the", "given", "{", "@link", "Class", "}", ".", "This", "method", "ignores", "any", "Jvm", "types", "created", "in", "non", "-", "{", "@link", "TypeResource", "}", "in", "the", "given", "context", "s...
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/util/TypeReferences.java#L244-L262
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.newHashMap
public static <K, V> HashMap<K, V> newHashMap(boolean isOrder) { return newHashMap(DEFAULT_INITIAL_CAPACITY, isOrder); }
java
public static <K, V> HashMap<K, V> newHashMap(boolean isOrder) { return newHashMap(DEFAULT_INITIAL_CAPACITY, isOrder); }
[ "public", "static", "<", "K", ",", "V", ">", "HashMap", "<", "K", ",", "V", ">", "newHashMap", "(", "boolean", "isOrder", ")", "{", "return", "newHashMap", "(", "DEFAULT_INITIAL_CAPACITY", ",", "isOrder", ")", ";", "}" ]
新建一个HashMap @param <K> Key类型 @param <V> Value类型 @param isOrder Map的Key是否有序,有序返回 {@link LinkedHashMap},否则返回 {@link HashMap} @return HashMap对象
[ "新建一个HashMap" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L106-L108
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.findXMethod
@Deprecated public static XMethod findXMethod(JavaClass[] classList, String methodName, String methodSig) { return findXMethod(classList, methodName, methodSig, ANY_METHOD); }
java
@Deprecated public static XMethod findXMethod(JavaClass[] classList, String methodName, String methodSig) { return findXMethod(classList, methodName, methodSig, ANY_METHOD); }
[ "@", "Deprecated", "public", "static", "XMethod", "findXMethod", "(", "JavaClass", "[", "]", "classList", ",", "String", "methodName", ",", "String", "methodSig", ")", "{", "return", "findXMethod", "(", "classList", ",", "methodName", ",", "methodSig", ",", "A...
Find XMethod for method in given list of classes, searching the classes in order. @param classList list of classes in which to search @param methodName the name of the method @param methodSig the signature of the method @return the XMethod, or null if no such method exists in the class
[ "Find", "XMethod", "for", "method", "in", "given", "list", "of", "classes", "searching", "the", "classes", "in", "order", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L667-L670
networknt/light-4j
security/src/main/java/com/networknt/security/JwtHelper.java
JwtHelper.verifyJwt
@Deprecated public static JwtClaims verifyJwt(String jwt, boolean ignoreExpiry) throws InvalidJwtException, ExpiredTokenException { return verifyJwt(jwt, ignoreExpiry, true); }
java
@Deprecated public static JwtClaims verifyJwt(String jwt, boolean ignoreExpiry) throws InvalidJwtException, ExpiredTokenException { return verifyJwt(jwt, ignoreExpiry, true); }
[ "@", "Deprecated", "public", "static", "JwtClaims", "verifyJwt", "(", "String", "jwt", ",", "boolean", "ignoreExpiry", ")", "throws", "InvalidJwtException", ",", "ExpiredTokenException", "{", "return", "verifyJwt", "(", "jwt", ",", "ignoreExpiry", ",", "true", ")"...
Verify JWT token format and signature. If ignoreExpiry is true, skip expiry verification, otherwise verify the expiry before signature verification. In most cases, we need to verify the expiry of the jwt token. The only time we need to ignore expiry verification is in SPA middleware handlers which need to verify csrf ...
[ "Verify", "JWT", "token", "format", "and", "signature", ".", "If", "ignoreExpiry", "is", "true", "skip", "expiry", "verification", "otherwise", "verify", "the", "expiry", "before", "signature", "verification", "." ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/security/src/main/java/com/networknt/security/JwtHelper.java#L176-L179
rometools/rome
rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java
MediaModuleGenerator.generatePeerLinks
private void generatePeerLinks(final Metadata m, final Element e) { for (final PeerLink peerLink : m.getPeerLinks()) { final Element peerLinkElement = new Element("peerLink", NS); addNotNullAttribute(peerLinkElement, "type", peerLink.getType()); addNotNullAttribute(peerLinkEl...
java
private void generatePeerLinks(final Metadata m, final Element e) { for (final PeerLink peerLink : m.getPeerLinks()) { final Element peerLinkElement = new Element("peerLink", NS); addNotNullAttribute(peerLinkElement, "type", peerLink.getType()); addNotNullAttribute(peerLinkEl...
[ "private", "void", "generatePeerLinks", "(", "final", "Metadata", "m", ",", "final", "Element", "e", ")", "{", "for", "(", "final", "PeerLink", "peerLink", ":", "m", ".", "getPeerLinks", "(", ")", ")", "{", "final", "Element", "peerLinkElement", "=", "new"...
Generation of peerLink tags. @param m source @param e element to attach new element to
[ "Generation", "of", "peerLink", "tags", "." ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L414-L423
pushtorefresh/storio
storio-common/src/main/java/com/pushtorefresh/storio3/internal/Checks.java
Checks.checkNotNull
public static void checkNotNull(@Nullable Object object, @NonNull String message) { if (object == null) { throw new NullPointerException(message); } }
java
public static void checkNotNull(@Nullable Object object, @NonNull String message) { if (object == null) { throw new NullPointerException(message); } }
[ "public", "static", "void", "checkNotNull", "(", "@", "Nullable", "Object", "object", ",", "@", "NonNull", "String", "message", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "message", ")", ";", "}", ...
Checks that passed reference is not null, throws {@link NullPointerException} with passed message if reference is null @param object to check @param message exception message if object is null
[ "Checks", "that", "passed", "reference", "is", "not", "null", "throws", "{", "@link", "NullPointerException", "}", "with", "passed", "message", "if", "reference", "is", "null" ]
train
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-common/src/main/java/com/pushtorefresh/storio3/internal/Checks.java#L24-L28
tvesalainen/util
util/src/main/java/org/vesalainen/math/BezierCurve.java
BezierCurve.secondDerivative
private ParameterizedOperator secondDerivative(double... controlPoints) { if (controlPoints.length != 2*length) { throw new IllegalArgumentException("control-points length not "+length); } return secondDerivative(controlPoints, 0); }
java
private ParameterizedOperator secondDerivative(double... controlPoints) { if (controlPoints.length != 2*length) { throw new IllegalArgumentException("control-points length not "+length); } return secondDerivative(controlPoints, 0); }
[ "private", "ParameterizedOperator", "secondDerivative", "(", "double", "...", "controlPoints", ")", "{", "if", "(", "controlPoints", ".", "length", "!=", "2", "*", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"control-points length not \"", ...
Create second derivative function for fixed control points. @param controlPoints @return
[ "Create", "second", "derivative", "function", "for", "fixed", "control", "points", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/BezierCurve.java#L143-L150
google/closure-compiler
src/com/google/javascript/jscomp/TypeCheck.java
TypeCheck.visitGetProp
private void visitGetProp(NodeTraversal t, Node n) { // obj.prop or obj.method() // Lots of types can appear on the left, a call to a void function can // never be on the left. getPropertyType will decide what is acceptable // and what isn't. Node property = n.getLastChild(); Node objNode = n.ge...
java
private void visitGetProp(NodeTraversal t, Node n) { // obj.prop or obj.method() // Lots of types can appear on the left, a call to a void function can // never be on the left. getPropertyType will decide what is acceptable // and what isn't. Node property = n.getLastChild(); Node objNode = n.ge...
[ "private", "void", "visitGetProp", "(", "NodeTraversal", "t", ",", "Node", "n", ")", "{", "// obj.prop or obj.method()", "// Lots of types can appear on the left, a call to a void function can", "// never be on the left. getPropertyType will decide what is acceptable", "// and what isn't...
Visits a GETPROP node. @param t The node traversal object that supplies context, such as the scope chain to use in name lookups as well as error reporting. @param n The node being visited.
[ "Visits", "a", "GETPROP", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L1943-L1959
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsErrorDialog.java
CmsErrorDialog.handleException
public static void handleException(Throwable t) { String message; StackTraceElement[] trace; String cause = null; String className; if (t instanceof CmsRpcException) { CmsRpcException ex = (CmsRpcException)t; message = ex.getOriginalMessage(); ...
java
public static void handleException(Throwable t) { String message; StackTraceElement[] trace; String cause = null; String className; if (t instanceof CmsRpcException) { CmsRpcException ex = (CmsRpcException)t; message = ex.getOriginalMessage(); ...
[ "public", "static", "void", "handleException", "(", "Throwable", "t", ")", "{", "String", "message", ";", "StackTraceElement", "[", "]", "trace", ";", "String", "cause", "=", "null", ";", "String", "className", ";", "if", "(", "t", "instanceof", "CmsRpcExcep...
Handles the exception by logging the exception to the server log and displaying an error dialog on the client.<p> @param t the throwable
[ "Handles", "the", "exception", "by", "logging", "the", "exception", "to", "the", "server", "log", "and", "displaying", "an", "error", "dialog", "on", "the", "client", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsErrorDialog.java#L196-L229
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/android/Facebook.java
Facebook.validateServiceIntent
private boolean validateServiceIntent(Context context, Intent intent) { ResolveInfo resolveInfo = context.getPackageManager().resolveService(intent, 0); if (resolveInfo == null) { return false; } return validateAppSignatureForPackage(context, resolveInfo.serviceInfo.packageN...
java
private boolean validateServiceIntent(Context context, Intent intent) { ResolveInfo resolveInfo = context.getPackageManager().resolveService(intent, 0); if (resolveInfo == null) { return false; } return validateAppSignatureForPackage(context, resolveInfo.serviceInfo.packageN...
[ "private", "boolean", "validateServiceIntent", "(", "Context", "context", ",", "Intent", "intent", ")", "{", "ResolveInfo", "resolveInfo", "=", "context", ".", "getPackageManager", "(", ")", ".", "resolveService", "(", "intent", ",", "0", ")", ";", "if", "(", ...
Helper to validate a service intent by resolving and checking the provider's package signature. @param context @param intent @return true if the service intent resolution happens successfully and the signatures match.
[ "Helper", "to", "validate", "a", "service", "intent", "by", "resolving", "and", "checking", "the", "provider", "s", "package", "signature", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/android/Facebook.java#L372-L379
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java
SimpleRandomSampling.minimumSampleSizeForGivenDandMaximumRisk
public static int minimumSampleSizeForGivenDandMaximumRisk(double d, double aLevel, double populationStd, int populationN) { if(populationN<=0 || aLevel<=0 || d<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double a = 1.0 - aLevel/2.0; ...
java
public static int minimumSampleSizeForGivenDandMaximumRisk(double d, double aLevel, double populationStd, int populationN) { if(populationN<=0 || aLevel<=0 || d<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double a = 1.0 - aLevel/2.0; ...
[ "public", "static", "int", "minimumSampleSizeForGivenDandMaximumRisk", "(", "double", "d", ",", "double", "aLevel", ",", "double", "populationStd", ",", "int", "populationN", ")", "{", "if", "(", "populationN", "<=", "0", "||", "aLevel", "<=", "0", "||", "d", ...
Returns the minimum required sample size when we set a predefined limit d and a maximum probability Risk a for finite population size @param d @param aLevel @param populationStd @param populationN @return
[ "Returns", "the", "minimum", "required", "sample", "size", "when", "we", "set", "a", "predefined", "limit", "d", "and", "a", "maximum", "probability", "Risk", "a", "for", "finite", "population", "size" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java#L296-L314
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ApplicationSecurityGroupsInner.java
ApplicationSecurityGroupsInner.beginCreateOrUpdateAsync
public Observable<ApplicationSecurityGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1<Servi...
java
public Observable<ApplicationSecurityGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1<Servi...
[ "public", "Observable", "<", "ApplicationSecurityGroupInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "applicationSecurityGroupName", ",", "ApplicationSecurityGroupInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServic...
Creates or updates an application security group. @param resourceGroupName The name of the resource group. @param applicationSecurityGroupName The name of the application security group. @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. @throws IllegalArgumentException t...
[ "Creates", "or", "updates", "an", "application", "security", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ApplicationSecurityGroupsInner.java#L453-L460
skuzzle/semantic-version
src/main/java/de/skuzzle/semantic/Version.java
Version.parseVersion
public static final Version parseVersion(String versionString) { require(versionString != null, "versionString is null"); return parse(versionString, false); }
java
public static final Version parseVersion(String versionString) { require(versionString != null, "versionString is null"); return parse(versionString, false); }
[ "public", "static", "final", "Version", "parseVersion", "(", "String", "versionString", ")", "{", "require", "(", "versionString", "!=", "null", ",", "\"versionString is null\"", ")", ";", "return", "parse", "(", "versionString", ",", "false", ")", ";", "}" ]
Tries to parse the provided String as a semantic version. If the string does not conform to the semantic version specification, a {@link VersionFormatException} will be thrown. @param versionString The String to parse. @return The parsed version. @throws VersionFormatException If the String is no valid version @throws...
[ "Tries", "to", "parse", "the", "provided", "String", "as", "a", "semantic", "version", ".", "If", "the", "string", "does", "not", "conform", "to", "the", "semantic", "version", "specification", "a", "{", "@link", "VersionFormatException", "}", "will", "be", ...
train
https://github.com/skuzzle/semantic-version/blob/2ddb66fb80244cd7f67c77ed5f8072d1132ad933/src/main/java/de/skuzzle/semantic/Version.java#L1373-L1376
VoltDB/voltdb
src/frontend/org/voltdb/VoltDB.java
VoltDB.crashLocalVoltDB
public static void crashLocalVoltDB(String errMsg, boolean stackTrace, Throwable thrown) { crashLocalVoltDB(errMsg, stackTrace, thrown, true); }
java
public static void crashLocalVoltDB(String errMsg, boolean stackTrace, Throwable thrown) { crashLocalVoltDB(errMsg, stackTrace, thrown, true); }
[ "public", "static", "void", "crashLocalVoltDB", "(", "String", "errMsg", ",", "boolean", "stackTrace", ",", "Throwable", "thrown", ")", "{", "crashLocalVoltDB", "(", "errMsg", ",", "stackTrace", ",", "thrown", ",", "true", ")", ";", "}" ]
Exit the process with an error message, optionally with a stack trace.
[ "Exit", "the", "process", "with", "an", "error", "message", "optionally", "with", "a", "stack", "trace", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltDB.java#L1254-L1256
alexvasilkov/GestureViews
sample/src/main/java/com/alexvasilkov/gestures/sample/demo/DemoActivity.java
DemoActivity.applyFullPagerState
private void applyFullPagerState(float position, boolean isLeaving) { views.fullBackground.setVisibility(position == 0f ? View.INVISIBLE : View.VISIBLE); views.fullBackground.setAlpha(position); views.pagerToolbar.setVisibility(position == 0f ? View.INVISIBLE : View.VISIBLE); views.page...
java
private void applyFullPagerState(float position, boolean isLeaving) { views.fullBackground.setVisibility(position == 0f ? View.INVISIBLE : View.VISIBLE); views.fullBackground.setAlpha(position); views.pagerToolbar.setVisibility(position == 0f ? View.INVISIBLE : View.VISIBLE); views.page...
[ "private", "void", "applyFullPagerState", "(", "float", "position", ",", "boolean", "isLeaving", ")", "{", "views", ".", "fullBackground", ".", "setVisibility", "(", "position", "==", "0f", "?", "View", ".", "INVISIBLE", ":", "View", ".", "VISIBLE", ")", ";"...
Applying pager image animation state: fading out toolbar, title and background.
[ "Applying", "pager", "image", "animation", "state", ":", "fading", "out", "toolbar", "title", "and", "background", "." ]
train
https://github.com/alexvasilkov/GestureViews/blob/f0a4c266e31dcad23bd0d9013531bc1c501b9c9f/sample/src/main/java/com/alexvasilkov/gestures/sample/demo/DemoActivity.java#L266-L279
sporniket/core
sporniket-core-io/src/main/java/com/sporniket/libre/io/FileTools.java
FileTools.createReaderForInputStream
public static Reader createReaderForInputStream(InputStream source, String encoding) throws FileNotFoundException, UnsupportedEncodingException { return (IS_EMPTY.test(encoding)) ? new InputStreamReader(source) : new InputStreamReader(source, encoding); }
java
public static Reader createReaderForInputStream(InputStream source, String encoding) throws FileNotFoundException, UnsupportedEncodingException { return (IS_EMPTY.test(encoding)) ? new InputStreamReader(source) : new InputStreamReader(source, encoding); }
[ "public", "static", "Reader", "createReaderForInputStream", "(", "InputStream", "source", ",", "String", "encoding", ")", "throws", "FileNotFoundException", ",", "UnsupportedEncodingException", "{", "return", "(", "IS_EMPTY", ".", "test", "(", "encoding", ")", ")", ...
Instanciate a Reader for a InputStream using the given encoding. @param source source stream. @param encoding <code>null</code> or empty for using system encoding. @return the reader. @throws FileNotFoundException if there is a problem to deal with. @throws UnsupportedEncodingException if there is a problem to deal wi...
[ "Instanciate", "a", "Reader", "for", "a", "InputStream", "using", "the", "given", "encoding", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-io/src/main/java/com/sporniket/libre/io/FileTools.java#L191-L195
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/util/SwitchSubScreenHandler.java
SwitchSubScreenHandler.init
public void init(BaseField field, BasePanel screenParent, BasePanel subScreen) { super.init(field); m_iCurrentScreenNo = -1; m_screenParent = screenParent; this.setCurrentSubScreen(subScreen); }
java
public void init(BaseField field, BasePanel screenParent, BasePanel subScreen) { super.init(field); m_iCurrentScreenNo = -1; m_screenParent = screenParent; this.setCurrentSubScreen(subScreen); }
[ "public", "void", "init", "(", "BaseField", "field", ",", "BasePanel", "screenParent", ",", "BasePanel", "subScreen", ")", "{", "super", ".", "init", "(", "field", ")", ";", "m_iCurrentScreenNo", "=", "-", "1", ";", "m_screenParent", "=", "screenParent", ";"...
Constructor. @param field The basefield owner of this listener (usually null and set on setOwner()). @param screenParent The parent screen of this sub-screen. @param subScreen The current sub-screen.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/util/SwitchSubScreenHandler.java#L68-L74
morfologik/morfologik-stemming
morfologik-fsa/src/main/java/morfologik/fsa/FSA.java
FSA.visitInPreOrder
public <T extends StateVisitor> T visitInPreOrder(T v, int node) { visitInPreOrder(v, node, new BitSet()); return v; }
java
public <T extends StateVisitor> T visitInPreOrder(T v, int node) { visitInPreOrder(v, node, new BitSet()); return v; }
[ "public", "<", "T", "extends", "StateVisitor", ">", "T", "visitInPreOrder", "(", "T", "v", ",", "int", "node", ")", "{", "visitInPreOrder", "(", "v", ",", "node", ",", "new", "BitSet", "(", ")", ")", ";", "return", "v", ";", "}" ]
Visits all states in preorder. Returning false from {@link StateVisitor#accept(int)} skips traversal of all sub-states of a given state. @param v Visitor to receive traversal calls. @param <T> A subclass of {@link StateVisitor}. @param node Identifier of the node. @return Returns the argument (for access to anonymous ...
[ "Visits", "all", "states", "in", "preorder", ".", "Returning", "false", "from", "{", "@link", "StateVisitor#accept", "(", "int", ")", "}", "skips", "traversal", "of", "all", "sub", "-", "states", "of", "a", "given", "state", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-fsa/src/main/java/morfologik/fsa/FSA.java#L263-L266
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-core/src/com/amazon/ask/util/UserAgentUtils.java
UserAgentUtils.getUserAgent
public static String getUserAgent(String customUserAgent) { Properties systemProperties; try { systemProperties = System.getProperties(); } catch (SecurityException e) { logger.debug("Unable to determine JVM version due to security restrictions."); systemPrope...
java
public static String getUserAgent(String customUserAgent) { Properties systemProperties; try { systemProperties = System.getProperties(); } catch (SecurityException e) { logger.debug("Unable to determine JVM version due to security restrictions."); systemPrope...
[ "public", "static", "String", "getUserAgent", "(", "String", "customUserAgent", ")", "{", "Properties", "systemProperties", ";", "try", "{", "systemProperties", "=", "System", ".", "getProperties", "(", ")", ";", "}", "catch", "(", "SecurityException", "e", ")",...
Returns the user agent string. Format is "(SDK name)/(SDK version) (Language)/(Language version)" Custom user agent will be appended to the end of the standard user agent. @param customUserAgent custom user agent to append to end of standard user agent @return user agent string
[ "Returns", "the", "user", "agent", "string", ".", "Format", "is", "(", "SDK", "name", ")", "/", "(", "SDK", "version", ")", "(", "Language", ")", "/", "(", "Language", "version", ")", "Custom", "user", "agent", "will", "be", "appended", "to", "the", ...
train
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-core/src/com/amazon/ask/util/UserAgentUtils.java#L45-L54
OpenBEL/openbel-framework
org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java
Term.replaceParameters
private static void replaceParameters(Term t, StringBuilder b) { FunctionEnum f = t.getFunctionEnum(); String fx = f.getShortestForm(); b.append(fx).append("("); if (hasItems(t.getFunctionArguments())) { for (BELObject bo : t.getFunctionArguments()) { if (Term...
java
private static void replaceParameters(Term t, StringBuilder b) { FunctionEnum f = t.getFunctionEnum(); String fx = f.getShortestForm(); b.append(fx).append("("); if (hasItems(t.getFunctionArguments())) { for (BELObject bo : t.getFunctionArguments()) { if (Term...
[ "private", "static", "void", "replaceParameters", "(", "Term", "t", ",", "StringBuilder", "b", ")", "{", "FunctionEnum", "f", "=", "t", ".", "getFunctionEnum", "(", ")", ";", "String", "fx", "=", "f", ".", "getShortestForm", "(", ")", ";", "b", ".", "a...
Builds a {@link String term string} where {@link Parameter parameters} are replaced with {@code #} characters. @param t {@link Term} @param b {@link StringBuilder}
[ "Builds", "a", "{", "@link", "String", "term", "string", "}", "where", "{", "@link", "Parameter", "parameters", "}", "are", "replaced", "with", "{", "@code", "#", "}", "characters", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/Term.java#L592-L615
JetBrains/xodus
vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java
VirtualFileSystem.readFile
public VfsInputStream readFile(@NotNull final Transaction txn, @NotNull final File file) { return new VfsInputStream(this, txn, file.getDescriptor()); }
java
public VfsInputStream readFile(@NotNull final Transaction txn, @NotNull final File file) { return new VfsInputStream(this, txn, file.getDescriptor()); }
[ "public", "VfsInputStream", "readFile", "(", "@", "NotNull", "final", "Transaction", "txn", ",", "@", "NotNull", "final", "File", "file", ")", "{", "return", "new", "VfsInputStream", "(", "this", ",", "txn", ",", "file", ".", "getDescriptor", "(", ")", ")"...
Returns {@linkplain InputStream} to read contents of the specified file from the beginning. @param txn {@linkplain Transaction} instance @param file {@linkplain File} instance @return {@linkplain java.io.InputStream} to read contents of the specified file from the beginning @see #readFile(Transaction, long) @see #rea...
[ "Returns", "{", "@linkplain", "InputStream", "}", "to", "read", "contents", "of", "the", "specified", "file", "from", "the", "beginning", "." ]
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java#L412-L414
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java
HexUtil.toHexString
public static String toHexString(byte[] bytes, int offset, int length) { if (bytes == null) { return ""; } assertOffsetLengthValid(offset, length, bytes.length); // each byte is 2 chars in string StringBuilder buffer = new StringBuilder(length * 2); appendHexS...
java
public static String toHexString(byte[] bytes, int offset, int length) { if (bytes == null) { return ""; } assertOffsetLengthValid(offset, length, bytes.length); // each byte is 2 chars in string StringBuilder buffer = new StringBuilder(length * 2); appendHexS...
[ "public", "static", "String", "toHexString", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "bytes", "==", "null", ")", "{", "return", "\"\"", ";", "}", "assertOffsetLengthValid", "(", "offset", ",", "l...
Creates a String from a byte array with each byte in a "Big Endian" hexidecimal format. For example, a byte 0x34 will return a String "34". A byte array of { 0x34, 035 } would return "3435". @param buffer The StringBuilder the byte array in hexidecimal format will be appended to. If the buffer is null, this method wi...
[ "Creates", "a", "String", "from", "a", "byte", "array", "with", "each", "byte", "in", "a", "Big", "Endian", "hexidecimal", "format", ".", "For", "example", "a", "byte", "0x34", "will", "return", "a", "String", "34", ".", "A", "byte", "array", "of", "{"...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java#L65-L74
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/util/UndoUtils.java
UndoUtils.defaultUndoManager
public static <PS, SEG, S> UndoManager defaultUndoManager(GenericStyledArea<PS, SEG, S> area) { return area.isPreserveStyle() ? richTextUndoManager(area) : plainTextUndoManager(area); }
java
public static <PS, SEG, S> UndoManager defaultUndoManager(GenericStyledArea<PS, SEG, S> area) { return area.isPreserveStyle() ? richTextUndoManager(area) : plainTextUndoManager(area); }
[ "public", "static", "<", "PS", ",", "SEG", ",", "S", ">", "UndoManager", "defaultUndoManager", "(", "GenericStyledArea", "<", "PS", ",", "SEG", ",", "S", ">", "area", ")", "{", "return", "area", ".", "isPreserveStyle", "(", ")", "?", "richTextUndoManager",...
Constructs an UndoManager with an unlimited history: if {@link GenericStyledArea#isPreserveStyle() the area's preserveStyle flag is true}, the returned UndoManager can undo/redo multiple {@link RichTextChange}s; otherwise, it can undo/redo multiple {@link PlainTextChange}s.
[ "Constructs", "an", "UndoManager", "with", "an", "unlimited", "history", ":", "if", "{" ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/util/UndoUtils.java#L32-L36
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java
CommerceWishListItemPersistenceImpl.removeByCW_CPI
@Override public void removeByCW_CPI(long commerceWishListId, String CPInstanceUuid) { for (CommerceWishListItem commerceWishListItem : findByCW_CPI( commerceWishListId, CPInstanceUuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishListItem); } }
java
@Override public void removeByCW_CPI(long commerceWishListId, String CPInstanceUuid) { for (CommerceWishListItem commerceWishListItem : findByCW_CPI( commerceWishListId, CPInstanceUuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishListItem); } }
[ "@", "Override", "public", "void", "removeByCW_CPI", "(", "long", "commerceWishListId", ",", "String", "CPInstanceUuid", ")", "{", "for", "(", "CommerceWishListItem", "commerceWishListItem", ":", "findByCW_CPI", "(", "commerceWishListId", ",", "CPInstanceUuid", ",", "...
Removes all the commerce wish list items where commerceWishListId = &#63; and CPInstanceUuid = &#63; from the database. @param commerceWishListId the commerce wish list ID @param CPInstanceUuid the cp instance uuid
[ "Removes", "all", "the", "commerce", "wish", "list", "items", "where", "commerceWishListId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java#L2226-L2233
landawn/AbacusUtil
src/com/landawn/abacus/util/PropertiesUtil.java
PropertiesUtil.xml2Java
public static void xml2Java(String xml, String srcPath, String packageName, String className, boolean isPublicField) { xml2Java(IOUtil.string2InputStream(xml), srcPath, packageName, className, isPublicField); }
java
public static void xml2Java(String xml, String srcPath, String packageName, String className, boolean isPublicField) { xml2Java(IOUtil.string2InputStream(xml), srcPath, packageName, className, isPublicField); }
[ "public", "static", "void", "xml2Java", "(", "String", "xml", ",", "String", "srcPath", ",", "String", "packageName", ",", "String", "className", ",", "boolean", "isPublicField", ")", "{", "xml2Java", "(", "IOUtil", ".", "string2InputStream", "(", "xml", ")", ...
Generate java code by the specified xml. @param xml @param srcPath @param packageName @param className @param isPublicField
[ "Generate", "java", "code", "by", "the", "specified", "xml", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/PropertiesUtil.java#L824-L826
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/meta/StorageDir.java
StorageDir.resizeTempBlockMeta
public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) throws InvalidWorkerStateException { long oldSize = tempBlockMeta.getBlockSize(); if (newSize > oldSize) { reserveSpace(newSize - oldSize, false); tempBlockMeta.setBlockSize(newSize); } else if (newSize < oldSize) {...
java
public void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize) throws InvalidWorkerStateException { long oldSize = tempBlockMeta.getBlockSize(); if (newSize > oldSize) { reserveSpace(newSize - oldSize, false); tempBlockMeta.setBlockSize(newSize); } else if (newSize < oldSize) {...
[ "public", "void", "resizeTempBlockMeta", "(", "TempBlockMeta", "tempBlockMeta", ",", "long", "newSize", ")", "throws", "InvalidWorkerStateException", "{", "long", "oldSize", "=", "tempBlockMeta", ".", "getBlockSize", "(", ")", ";", "if", "(", "newSize", ">", "oldS...
Changes the size of a temp block. @param tempBlockMeta the metadata of the temp block to resize @param newSize the new size after change in bytes @throws InvalidWorkerStateException when newSize is smaller than oldSize
[ "Changes", "the", "size", "of", "a", "temp", "block", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/meta/StorageDir.java#L372-L381
apache/incubator-heron
heron/api/src/java/org/apache/heron/api/Config.java
Config.setContainerDiskRequested
@Deprecated public static void setContainerDiskRequested(Map<String, Object> conf, long nbytes) { setContainerDiskRequested(conf, ByteAmount.fromBytes(nbytes)); }
java
@Deprecated public static void setContainerDiskRequested(Map<String, Object> conf, long nbytes) { setContainerDiskRequested(conf, ByteAmount.fromBytes(nbytes)); }
[ "@", "Deprecated", "public", "static", "void", "setContainerDiskRequested", "(", "Map", "<", "String", ",", "Object", ">", "conf", ",", "long", "nbytes", ")", "{", "setContainerDiskRequested", "(", "conf", ",", "ByteAmount", ".", "fromBytes", "(", "nbytes", ")...
Users should use the version of this method at uses ByteAmount @deprecated use setContainerDiskRequested(Map&lt;String, Object&gt; conf, ByteAmount nbytes)
[ "Users", "should", "use", "the", "version", "of", "this", "method", "at", "uses", "ByteAmount" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/api/src/java/org/apache/heron/api/Config.java#L465-L468
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/Utils.java
Utils.join
@SuppressWarnings({"rawtypes", "unchecked"}) public static String join(final Collection<?> col, final String separator, final ElementConverter elementConverter) { if(col == null) { return ""; } final int size = col.size(); if(size == 0) { return "";...
java
@SuppressWarnings({"rawtypes", "unchecked"}) public static String join(final Collection<?> col, final String separator, final ElementConverter elementConverter) { if(col == null) { return ""; } final int size = col.size(); if(size == 0) { return "";...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "static", "String", "join", "(", "final", "Collection", "<", "?", ">", "col", ",", "final", "String", "separator", ",", "final", "ElementConverter", "elementConverter", ...
Collectionの要素を指定した区切り文字で繋げて1つの文字列とする。 @param col 結合対象のコレクション @param separator 区切り文字 @param elementConverter 要素を変換するクラス。 @return 結合した文字列
[ "Collectionの要素を指定した区切り文字で繋げて1つの文字列とする。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/Utils.java#L162-L187
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/VoiceApi.java
VoiceApi.sendUserEventWithHttpInfo
public ApiResponse<ApiSuccessResponse> sendUserEventWithHttpInfo(SendUserEventData userEventData) throws ApiException { com.squareup.okhttp.Call call = sendUserEventValidateBeforeCall(userEventData, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); return ap...
java
public ApiResponse<ApiSuccessResponse> sendUserEventWithHttpInfo(SendUserEventData userEventData) throws ApiException { com.squareup.okhttp.Call call = sendUserEventValidateBeforeCall(userEventData, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); return ap...
[ "public", "ApiResponse", "<", "ApiSuccessResponse", ">", "sendUserEventWithHttpInfo", "(", "SendUserEventData", "userEventData", ")", "throws", "ApiException", "{", "com", ".", "squareup", ".", "okhttp", ".", "Call", "call", "=", "sendUserEventValidateBeforeCall", "(", ...
Send a userEvent event to T-Server Send EventUserEvent to T-Server with the provided attached data. For details about EventUserEvent, refer to the [*Genesys Events and Models Reference Manual*](https://docs.genesys.com/Documentation/System). @param userEventData The data to send. This is an array of objects with the pr...
[ "Send", "a", "userEvent", "event", "to", "T", "-", "Server", "Send", "EventUserEvent", "to", "T", "-", "Server", "with", "the", "provided", "attached", "data", ".", "For", "details", "about", "EventUserEvent", "refer", "to", "the", "[", "*", "Genesys", "Ev...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L3497-L3501
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java
TableBuilder.getRow
public TableRow getRow(final Table table, final TableAppender appender, final String pos) throws FastOdsException, IOException { final int row = this.positionUtil.getPosition(pos).getRow(); return this.getRow(table, appender, row); }
java
public TableRow getRow(final Table table, final TableAppender appender, final String pos) throws FastOdsException, IOException { final int row = this.positionUtil.getPosition(pos).getRow(); return this.getRow(table, appender, row); }
[ "public", "TableRow", "getRow", "(", "final", "Table", "table", ",", "final", "TableAppender", "appender", ",", "final", "String", "pos", ")", "throws", "FastOdsException", ",", "IOException", "{", "final", "int", "row", "=", "this", ".", "positionUtil", ".", ...
get a row from a table @param table the table @param appender the appender @param pos a pos, e.G. A5 @return the table row @throws FastOdsException if the index is invalid @throws IOException if an I/O error occurs
[ "get", "a", "row", "from", "a", "table" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L252-L256