repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ObjectFactory.java
ObjectFactory.createObject
static Object createObject(String factoryId, String fallbackClassName) throws ConfigurationError { """ Finds the implementation Class object in the specified order. The specified order is the following: <ol> <li>query the system property using <code>System.getProperty</code> <li>read <code>META-INF/se...
java
static Object createObject(String factoryId, String fallbackClassName) throws ConfigurationError { return createObject(factoryId, null, fallbackClassName); }
[ "static", "Object", "createObject", "(", "String", "factoryId", ",", "String", "fallbackClassName", ")", "throws", "ConfigurationError", "{", "return", "createObject", "(", "factoryId", ",", "null", ",", "fallbackClassName", ")", ";", "}" ]
Finds the implementation Class object in the specified order. The specified order is the following: <ol> <li>query the system property using <code>System.getProperty</code> <li>read <code>META-INF/services/<i>factoryId</i></code> file <li>use fallback classname </ol> @return instance of factory, never null @param fa...
[ "Finds", "the", "implementation", "Class", "object", "in", "the", "specified", "order", ".", "The", "specified", "order", "is", "the", "following", ":", "<ol", ">", "<li", ">", "query", "the", "system", "property", "using", "<code", ">", "System", ".", "ge...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ObjectFactory.java#L100-L103
baratine/baratine
framework/src/main/java/com/caucho/v5/bartender/pod/PodsManagerAutoPodImpl.java
PodsManagerAutoPodImpl.isPrimaryServer
private boolean isPrimaryServer(ServerHeartbeat server, UpdatePod update) { """ /* private ArrayList<ServerHeartbeat> allocateServersForPod(PodConfig pod, Comparator<ServerPodsCost> cmp) { ArrayList<ServerPodsCost> serverCostList = new ArrayList<>(); for (ServerHeartbeat server : getCluster().getServers())...
java
private boolean isPrimaryServer(ServerHeartbeat server, UpdatePod update) { int index = getServerIndex(server, update); if (index < 0) { return false; } for (int i = 0; i < update.getNodeCount(); i++) { UpdateNode node = update.getNode(i); int primary = node.getServe...
[ "private", "boolean", "isPrimaryServer", "(", "ServerHeartbeat", "server", ",", "UpdatePod", "update", ")", "{", "int", "index", "=", "getServerIndex", "(", "server", ",", "update", ")", ";", "if", "(", "index", "<", "0", ")", "{", "return", "false", ";", ...
/* private ArrayList<ServerHeartbeat> allocateServersForPod(PodConfig pod, Comparator<ServerPodsCost> cmp) { ArrayList<ServerPodsCost> serverCostList = new ArrayList<>(); for (ServerHeartbeat server : getCluster().getServers()) { if (! isServerAlloc(server, pod)) { continue; } ServerPodsCost serverCost = new ServerPo...
[ "/", "*", "private", "ArrayList<ServerHeartbeat", ">", "allocateServersForPod", "(", "PodConfig", "pod", "Comparator<ServerPodsCost", ">", "cmp", ")", "{", "ArrayList<ServerPodsCost", ">", "serverCostList", "=", "new", "ArrayList<", ">", "()", ";" ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/bartender/pod/PodsManagerAutoPodImpl.java#L394-L413
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java
CommonsOJBLockManager.atomicGetOrCreateLock
public OJBLock atomicGetOrCreateLock(Object resourceId, Object isolationId) { """ Either gets an existing lock on the specified resource or creates one if none exists. This methods guarantees to do this atomically. @param resourceId the resource to get or create the lock on @param isolationId the isolation l...
java
public OJBLock atomicGetOrCreateLock(Object resourceId, Object isolationId) { synchronized(globalLocks) { MultiLevelLock lock = getLock(resourceId); if(lock == null) { lock = createLock(resourceId, isolationId); } r...
[ "public", "OJBLock", "atomicGetOrCreateLock", "(", "Object", "resourceId", ",", "Object", "isolationId", ")", "{", "synchronized", "(", "globalLocks", ")", "{", "MultiLevelLock", "lock", "=", "getLock", "(", "resourceId", ")", ";", "if", "(", "lock", "==", "nu...
Either gets an existing lock on the specified resource or creates one if none exists. This methods guarantees to do this atomically. @param resourceId the resource to get or create the lock on @param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}. @return the lock for the specified re...
[ "Either", "gets", "an", "existing", "lock", "on", "the", "specified", "resource", "or", "creates", "one", "if", "none", "exists", ".", "This", "methods", "guarantees", "to", "do", "this", "atomically", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/locking/CommonsOJBLockManager.java#L148-L159
libgdx/packr
src/main/java/com/badlogicgames/packr/PackrConfig.java
PackrConfig.validate
void validate() throws IOException { """ Sanity checks for configuration settings. Because users like to break stuff. """ validate(platform, "platform"); validate(jdk, "JDK"); validate(executable, "executable name"); validate(mainClass, "main class"); validate(outDir, "output folder"); if (outDir....
java
void validate() throws IOException { validate(platform, "platform"); validate(jdk, "JDK"); validate(executable, "executable name"); validate(mainClass, "main class"); validate(outDir, "output folder"); if (outDir.exists()) { if (new File(".").equals(outDir)) { throw new IOException("Output directory...
[ "void", "validate", "(", ")", "throws", "IOException", "{", "validate", "(", "platform", ",", "\"platform\"", ")", ";", "validate", "(", "jdk", ",", "\"JDK\"", ")", ";", "validate", "(", "executable", ",", "\"executable name\"", ")", ";", "validate", "(", ...
Sanity checks for configuration settings. Because users like to break stuff.
[ "Sanity", "checks", "for", "configuration", "settings", ".", "Because", "users", "like", "to", "break", "stuff", "." ]
train
https://github.com/libgdx/packr/blob/4dd00a1fb5075dc1b6cd84f46bfdd918eb3d50e9/src/main/java/com/badlogicgames/packr/PackrConfig.java#L252-L271
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.A_ID
public static HtmlTree A_ID(String id, Content body) { """ Generates an HTML anchor tag with id attribute and a body. @param id id for the anchor tag @param body body for the anchor tag @return an HtmlTree object """ HtmlTree htmltree = new HtmlTree(HtmlTag.A); htmltree.addAttr(HtmlAttr.ID...
java
public static HtmlTree A_ID(String id, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.A); htmltree.addAttr(HtmlAttr.ID, nullCheck(id)); htmltree.addContent(nullCheck(body)); return htmltree; }
[ "public", "static", "HtmlTree", "A_ID", "(", "String", "id", ",", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "A", ")", ";", "htmltree", ".", "addAttr", "(", "HtmlAttr", ".", "ID", ",", "nullCheck", ...
Generates an HTML anchor tag with id attribute and a body. @param id id for the anchor tag @param body body for the anchor tag @return an HtmlTree object
[ "Generates", "an", "HTML", "anchor", "tag", "with", "id", "attribute", "and", "a", "body", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L260-L265
wnameless/rubycollect4j
src/main/java/net/sf/rubycollect4j/RubyObject.java
RubyObject.send
@SuppressWarnings("unchecked") public static <E> E send(Object o, String methodName, byte arg) { """ Executes a method of any Object by Java reflection. @param o an Object @param methodName name of the method @param arg a byte @return the result of the method called """ try { Method method...
java
@SuppressWarnings("unchecked") public static <E> E send(Object o, String methodName, byte arg) { try { Method method = o.getClass().getMethod(methodName, byte.class); return (E) method.invoke(o, arg); } catch (Exception e) { return send(o, methodName, (Object) arg); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "E", ">", "E", "send", "(", "Object", "o", ",", "String", "methodName", ",", "byte", "arg", ")", "{", "try", "{", "Method", "method", "=", "o", ".", "getClass", "(", ")", "....
Executes a method of any Object by Java reflection. @param o an Object @param methodName name of the method @param arg a byte @return the result of the method called
[ "Executes", "a", "method", "of", "any", "Object", "by", "Java", "reflection", "." ]
train
https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyObject.java#L126-L134
structurizr/java
structurizr-core/src/com/structurizr/model/DeploymentNode.java
DeploymentNode.addDeploymentNode
public DeploymentNode addDeploymentNode(String name, String description, String technology, int instances, Map<String, String> properties) { """ Adds a child deployment node. @param name the name of the deployment node @param description a short description @param technology the technology @par...
java
public DeploymentNode addDeploymentNode(String name, String description, String technology, int instances, Map<String, String> properties) { DeploymentNode deploymentNode = getModel().addDeploymentNode(this, this.getEnvironment(), name, description, technology, instances, properties); if (deploymentNode...
[ "public", "DeploymentNode", "addDeploymentNode", "(", "String", "name", ",", "String", "description", ",", "String", "technology", ",", "int", "instances", ",", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "DeploymentNode", "deploymentNode", ...
Adds a child deployment node. @param name the name of the deployment node @param description a short description @param technology the technology @param instances the number of instances @param properties a Map (String,String) describing name=value properties @return a DeploymentNode object
[ "Adds", "a", "child", "deployment", "node", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/model/DeploymentNode.java#L92-L98
canhnt/sne-xacml
sne-xacml/src/main/java/nl/uva/sne/midd/builders/MIDDCombiner.java
MIDDCombiner.combineIDD
@SuppressWarnings("rawtypes") private AbstractNode combineIDD(ExternalNode3 n1, InternalNode<?> n2) throws MIDDException { """ Combine two MIDDs: an external node with an internal node. <p/> Algorithm: set of intervals: n2.intervals U (*\{n2.intervals}) - with i = *\{n2.intervals}, n.children[0] = n1, n.int...
java
@SuppressWarnings("rawtypes") private AbstractNode combineIDD(ExternalNode3 n1, InternalNode<?> n2) throws MIDDException { List<Interval> intervals = n2.getIntervals(); List<Interval<?>> complementIntervals = IntervalUtils.complement(intervals); // clone new node from n2 Internal...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "private", "AbstractNode", "combineIDD", "(", "ExternalNode3", "n1", ",", "InternalNode", "<", "?", ">", "n2", ")", "throws", "MIDDException", "{", "List", "<", "Interval", ">", "intervals", "=", "n2", ".", ...
Combine two MIDDs: an external node with an internal node. <p/> Algorithm: set of intervals: n2.intervals U (*\{n2.intervals}) - with i = *\{n2.intervals}, n.children[0] = n1, n.intervals[0] = *\{n1.intervals} - with (i : n2.intervals), n.children[i] = n2.children[i], n.intervals[i] = n1.interval[i] <p/> 2012.11.13 - M...
[ "Combine", "two", "MIDDs", ":", "an", "external", "node", "with", "an", "internal", "node", ".", "<p", "/", ">", "Algorithm", ":", "set", "of", "intervals", ":", "n2", ".", "intervals", "U", "(", "*", "\\", "{", "n2", ".", "intervals", "}", ")", "-...
train
https://github.com/canhnt/sne-xacml/blob/7ffca16bf558d2c3ee16181d926f066ab1de75b2/sne-xacml/src/main/java/nl/uva/sne/midd/builders/MIDDCombiner.java#L165-L191
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/format/AddressDivisionBase.java
AddressDivisionBase.getBytes
@Override public byte[] getBytes(byte bytes[], int index) { """ Gets the value for the lowest address in the range represented by this address division. <p> If the value fits in the specified array at the specified index, the same array is returned with the value copied at the specified index. Otherwise, a new...
java
@Override public byte[] getBytes(byte bytes[], int index) { byte cached[] = lowerBytes; if(cached == null) { lowerBytes = cached = getBytesImpl(true); } return getBytes(bytes, index, cached); }
[ "@", "Override", "public", "byte", "[", "]", "getBytes", "(", "byte", "bytes", "[", "]", ",", "int", "index", ")", "{", "byte", "cached", "[", "]", "=", "lowerBytes", ";", "if", "(", "cached", "==", "null", ")", "{", "lowerBytes", "=", "cached", "=...
Gets the value for the lowest address in the range represented by this address division. <p> If the value fits in the specified array at the specified index, the same array is returned with the value copied at the specified index. Otherwise, a new array is allocated and returned with the value copied at the specified i...
[ "Gets", "the", "value", "for", "the", "lowest", "address", "in", "the", "range", "represented", "by", "this", "address", "division", ".", "<p", ">", "If", "the", "value", "fits", "in", "the", "specified", "array", "at", "the", "specified", "index", "the", ...
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/format/AddressDivisionBase.java#L175-L182
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/ClientAsynchEventThreadPool.java
ClientAsynchEventThreadPool.dispatchCommsException
public void dispatchCommsException(SICoreConnection conn, ProxyQueueConversationGroup proxyQueueConversationGroup, SIConnectionLostException exception) { """ Dispatches the exception to be sent to the connection event listeners on a thread...
java
public void dispatchCommsException(SICoreConnection conn, ProxyQueueConversationGroup proxyQueueConversationGroup, SIConnectionLostException exception) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this...
[ "public", "void", "dispatchCommsException", "(", "SICoreConnection", "conn", ",", "ProxyQueueConversationGroup", "proxyQueueConversationGroup", ",", "SIConnectionLostException", "exception", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", ...
Dispatches the exception to be sent to the connection event listeners on a thread. @param conn @param exception
[ "Dispatches", "the", "exception", "to", "be", "sent", "to", "the", "connection", "event", "listeners", "on", "a", "thread", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/ClientAsynchEventThreadPool.java#L168-L179
spockframework/spock
spock-core/src/main/java/spock/mock/DetachedMockFactory.java
DetachedMockFactory.Stub
@Override public <T> T Stub(Map<String, Object> options, Class<T> type) { """ Creates a stub with the specified options and type. The mock name will be the types simple name. Example: <pre> def person = Stub(Person, name: "myPerson") // type is Person.class, name is "myPerson" </pre> @param options op...
java
@Override public <T> T Stub(Map<String, Object> options, Class<T> type) { return createMock(inferNameFromType(type), type, MockNature.STUB, options); }
[ "@", "Override", "public", "<", "T", ">", "T", "Stub", "(", "Map", "<", "String", ",", "Object", ">", "options", ",", "Class", "<", "T", ">", "type", ")", "{", "return", "createMock", "(", "inferNameFromType", "(", "type", ")", ",", "type", ",", "M...
Creates a stub with the specified options and type. The mock name will be the types simple name. Example: <pre> def person = Stub(Person, name: "myPerson") // type is Person.class, name is "myPerson" </pre> @param options optional options for creating the stub @param type the interface or class type of the stub @par...
[ "Creates", "a", "stub", "with", "the", "specified", "options", "and", "type", ".", "The", "mock", "name", "will", "be", "the", "types", "simple", "name", "." ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/spock/mock/DetachedMockFactory.java#L104-L107
apache/incubator-gobblin
gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/zip/ZipFileConfigStore.java
ZipFileConfigStore.getOwnConfig
@Override public Config getOwnConfig(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException { """ Retrieves the {@link Config} for the given {@link ConfigKeyPath}. Similar to {@link SimpleHadoopFilesystemConfigStore#getOwnConfig} """ Preconditions.checkNotNull(configKey, "configKey...
java
@Override public Config getOwnConfig(ConfigKeyPath configKey, String version) throws VersionDoesNotExistException { Preconditions.checkNotNull(configKey, "configKey cannot be null!"); Preconditions.checkArgument(version.equals(getCurrentVersion())); Path datasetDir = getDatasetDirForKey(configKey); P...
[ "@", "Override", "public", "Config", "getOwnConfig", "(", "ConfigKeyPath", "configKey", ",", "String", "version", ")", "throws", "VersionDoesNotExistException", "{", "Preconditions", ".", "checkNotNull", "(", "configKey", ",", "\"configKey cannot be null!\"", ")", ";", ...
Retrieves the {@link Config} for the given {@link ConfigKeyPath}. Similar to {@link SimpleHadoopFilesystemConfigStore#getOwnConfig}
[ "Retrieves", "the", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/zip/ZipFileConfigStore.java#L169-L191
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/HostProcess.java
HostProcess.notifyNewMessage
public void notifyNewMessage(Plugin plugin, HttpMessage message) { """ Notifies that the given {@code plugin} sent (and received) the given HTTP message. @param plugin the plugin that sent the message @param message the message sent @throws IllegalArgumentException if the given {@code plugin} is {@code null}....
java
public void notifyNewMessage(Plugin plugin, HttpMessage message) { parentScanner.notifyNewMessage(message); notifyNewMessage(plugin); }
[ "public", "void", "notifyNewMessage", "(", "Plugin", "plugin", ",", "HttpMessage", "message", ")", "{", "parentScanner", ".", "notifyNewMessage", "(", "message", ")", ";", "notifyNewMessage", "(", "plugin", ")", ";", "}" ]
Notifies that the given {@code plugin} sent (and received) the given HTTP message. @param plugin the plugin that sent the message @param message the message sent @throws IllegalArgumentException if the given {@code plugin} is {@code null}. @since 2.5.0 @see #notifyNewMessage(Plugin)
[ "Notifies", "that", "the", "given", "{", "@code", "plugin", "}", "sent", "(", "and", "received", ")", "the", "given", "HTTP", "message", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/HostProcess.java#L734-L737
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/runtime/AbstractEJBRuntime.java
AbstractEJBRuntime.bindInterfaces
protected void bindInterfaces(NameSpaceBinder<?> binder, BeanMetaData bmd) throws Exception { """ Bind all local and remote interfaces for a bean to all binding locations. @param binder the namespace binder @param bmd the bean @param homeSet the remote and local home wrappers, or <tt>null</tt> if deferred in...
java
protected void bindInterfaces(NameSpaceBinder<?> binder, BeanMetaData bmd) throws Exception { HomeWrapperSet homeSet = null; EJSHome home = bmd.homeRecord.getHome(); if (home != null) { homeSet = home.getWrapperSet(); } int numRemoteInterfaces = countInterfaces(bmd, ...
[ "protected", "void", "bindInterfaces", "(", "NameSpaceBinder", "<", "?", ">", "binder", ",", "BeanMetaData", "bmd", ")", "throws", "Exception", "{", "HomeWrapperSet", "homeSet", "=", "null", ";", "EJSHome", "home", "=", "bmd", ".", "homeRecord", ".", "getHome"...
Bind all local and remote interfaces for a bean to all binding locations. @param binder the namespace binder @param bmd the bean @param homeSet the remote and local home wrappers, or <tt>null</tt> if deferred initialization bindings should be used
[ "Bind", "all", "local", "and", "remote", "interfaces", "for", "a", "bean", "to", "all", "binding", "locations", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/runtime/AbstractEJBRuntime.java#L851-L864
alb-i986/selenium-tinafw
src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java
PageHelper.loopFindOrRefresh
public static WebElement loopFindOrRefresh(int maxRefreshes, By locator, WebDriver driver) { """ Implicitly wait for an element. Then, if the element cannot be found, refresh the page. Try finding the element again, reiterating for maxRefreshes times or until the element is found. Finally, return the element. ...
java
public static WebElement loopFindOrRefresh(int maxRefreshes, By locator, WebDriver driver) { for (int i = 0; i < maxRefreshes; i++) { WebElement element; try { // implicitly wait element = driver.findElement(locator); // if no exception is thrown, then we can exit the loop return element; } c...
[ "public", "static", "WebElement", "loopFindOrRefresh", "(", "int", "maxRefreshes", ",", "By", "locator", ",", "WebDriver", "driver", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "maxRefreshes", ";", "i", "++", ")", "{", "WebElement", "eleme...
Implicitly wait for an element. Then, if the element cannot be found, refresh the page. Try finding the element again, reiterating for maxRefreshes times or until the element is found. Finally, return the element. @param maxRefreshes max num of iterations of the loop @param locator the locator for the element we want ...
[ "Implicitly", "wait", "for", "an", "element", ".", "Then", "if", "the", "element", "cannot", "be", "found", "refresh", "the", "page", ".", "Try", "finding", "the", "element", "again", "reiterating", "for", "maxRefreshes", "times", "or", "until", "the", "elem...
train
https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java#L131-L146
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java
StreamHelper.readStreamLines
public static void readStreamLines (@WillClose @Nullable final InputStream aIS, @Nonnull @Nonempty final Charset aCharset, @Nonnegative final int nLinesToSkip, final int nLinesToRead, ...
java
public static void readStreamLines (@WillClose @Nullable final InputStream aIS, @Nonnull @Nonempty final Charset aCharset, @Nonnegative final int nLinesToSkip, final int nLinesToRead, ...
[ "public", "static", "void", "readStreamLines", "(", "@", "WillClose", "@", "Nullable", "final", "InputStream", "aIS", ",", "@", "Nonnull", "@", "Nonempty", "final", "Charset", "aCharset", ",", "@", "Nonnegative", "final", "int", "nLinesToSkip", ",", "final", "...
Read the content of the passed stream line by line and invoking a callback on all matching lines. @param aIS The input stream to read from. May be <code>null</code>. @param aCharset The character set to use. May not be <code>null</code>. @param nLinesToSkip The 0-based index of the first line to read. Pass in 0 to ind...
[ "Read", "the", "content", "of", "the", "passed", "stream", "line", "by", "line", "and", "invoking", "a", "callback", "on", "all", "matching", "lines", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/StreamHelper.java#L1213-L1249
forge/javaee-descriptors
impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/webfragment30/WebFragmentDescriptorImpl.java
WebFragmentDescriptorImpl.addNamespace
public WebFragmentDescriptor addNamespace(String name, String value) { """ Adds a new namespace @return the current instance of <code>WebFragmentDescriptor</code> """ model.attribute(name, value); return this; }
java
public WebFragmentDescriptor addNamespace(String name, String value) { model.attribute(name, value); return this; }
[ "public", "WebFragmentDescriptor", "addNamespace", "(", "String", "name", ",", "String", "value", ")", "{", "model", ".", "attribute", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a new namespace @return the current instance of <code>WebFragmentDescriptor</code>
[ "Adds", "a", "new", "namespace" ]
train
https://github.com/forge/javaee-descriptors/blob/cb914330a1a0b04bfc1d0f199bd9cde3bbf0b3ed/impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/webfragment30/WebFragmentDescriptorImpl.java#L142-L146
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/math/NumberUtils.java
NumberUtils.createBigInteger
public static BigInteger createBigInteger(final String str) { """ <p>Convert a <code>String</code> to a <code>BigInteger</code>; since 3.2 it handles hex (0x or #) and octal (0) notations.</p> <p>Returns <code>null</code> if the string is <code>null</code>.</p> @param str a <code>String</code> to convert, ...
java
public static BigInteger createBigInteger(final String str) { if (str == null) { return null; } int pos = 0; // offset within string int radix = 10; boolean negate = false; // need to negate later? if (str.startsWith("-")) { negate = true; ...
[ "public", "static", "BigInteger", "createBigInteger", "(", "final", "String", "str", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "null", ";", "}", "int", "pos", "=", "0", ";", "// offset within string", "int", "radix", "=", "10", ";", ...
<p>Convert a <code>String</code> to a <code>BigInteger</code>; since 3.2 it handles hex (0x or #) and octal (0) notations.</p> <p>Returns <code>null</code> if the string is <code>null</code>.</p> @param str a <code>String</code> to convert, may be null @return converted <code>BigInteger</code> (or null if the input ...
[ "<p", ">", "Convert", "a", "<code", ">", "String<", "/", "code", ">", "to", "a", "<code", ">", "BigInteger<", "/", "code", ">", ";", "since", "3", ".", "2", "it", "handles", "hex", "(", "0x", "or", "#", ")", "and", "octal", "(", "0", ")", "nota...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/math/NumberUtils.java#L747-L771
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.ensureColumns
protected List ensureColumns(List columns, List existingColumns, StringBuffer buf) { """ Builds the Join for columns if they are not found among the existingColumns. These <b>columns are added to the statement</b> using a column-alias "ojb_col_x", x being the number of existing columns @param columns the list o...
java
protected List ensureColumns(List columns, List existingColumns, StringBuffer buf) { if (columns == null || columns.isEmpty()) { return existingColumns; } Iterator iter = columns.iterator(); int ojb_col = existingColumns.size() + 1; while (iter...
[ "protected", "List", "ensureColumns", "(", "List", "columns", ",", "List", "existingColumns", ",", "StringBuffer", "buf", ")", "{", "if", "(", "columns", "==", "null", "||", "columns", ".", "isEmpty", "(", ")", ")", "{", "return", "existingColumns", ";", "...
Builds the Join for columns if they are not found among the existingColumns. These <b>columns are added to the statement</b> using a column-alias "ojb_col_x", x being the number of existing columns @param columns the list of columns represented by Criteria.Field to ensure @param existingColumns the list of column names...
[ "Builds", "the", "Join", "for", "columns", "if", "they", "are", "not", "found", "among", "the", "existingColumns", ".", "These", "<b", ">", "columns", "are", "added", "to", "the", "statement<", "/", "b", ">", "using", "a", "column", "-", "alias", "ojb_co...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L508-L532
Azure/azure-sdk-for-java
redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java
RedisInner.regenerateKey
public RedisAccessKeysInner regenerateKey(String resourceGroupName, String name, RedisKeyType keyType) { """ Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @...
java
public RedisAccessKeysInner regenerateKey(String resourceGroupName, String name, RedisKeyType keyType) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, name, keyType).toBlocking().single().body(); }
[ "public", "RedisAccessKeysInner", "regenerateKey", "(", "String", "resourceGroupName", ",", "String", "name", ",", "RedisKeyType", "keyType", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "keyType", ")", ".", ...
Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param keyType The Redis access key to regenerate. Possible values include: 'Primary', 'Secondary' @throws IllegalArgum...
[ "Regenerate", "Redis", "cache", "s", "access", "keys", ".", "This", "operation", "requires", "write", "permission", "to", "the", "cache", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java#L1149-L1151
spring-projects/spring-mobile
spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/SiteSwitcherHandlerInterceptor.java
SiteSwitcherHandlerInterceptor.urlPath
public static SiteSwitcherHandlerInterceptor urlPath(String mobilePath, String rootPath) { """ Creates a site switcher that redirects to a path on the current domain for normal site requests that either originate from a mobile device or indicate a mobile site preference. Allows you to configure a root path for a...
java
public static SiteSwitcherHandlerInterceptor urlPath(String mobilePath, String rootPath) { return new SiteSwitcherHandlerInterceptor(StandardSiteSwitcherHandlerFactory.urlPath(mobilePath, rootPath)); }
[ "public", "static", "SiteSwitcherHandlerInterceptor", "urlPath", "(", "String", "mobilePath", ",", "String", "rootPath", ")", "{", "return", "new", "SiteSwitcherHandlerInterceptor", "(", "StandardSiteSwitcherHandlerFactory", ".", "urlPath", "(", "mobilePath", ",", "rootPa...
Creates a site switcher that redirects to a path on the current domain for normal site requests that either originate from a mobile device or indicate a mobile site preference. Allows you to configure a root path for an application. For example, if your app is running at <code>https://www.domain.com/myapp</code>, then ...
[ "Creates", "a", "site", "switcher", "that", "redirects", "to", "a", "path", "on", "the", "current", "domain", "for", "normal", "site", "requests", "that", "either", "originate", "from", "a", "mobile", "device", "or", "indicate", "a", "mobile", "site", "prefe...
train
https://github.com/spring-projects/spring-mobile/blob/a402cbcaf208e24288b957f44c9984bd6e8bf064/spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/SiteSwitcherHandlerInterceptor.java#L219-L221
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufProxy.java
ProtobufProxy.dynamicCodeGenerate
public static void dynamicCodeGenerate(OutputStream os, Class cls, Charset charset, ICodeGenerator codeGenerator) throws IOException { """ To generate a protobuf proxy java source code for target class. @param os to generate java source code @param cls target class @param charset charset type @pa...
java
public static void dynamicCodeGenerate(OutputStream os, Class cls, Charset charset, ICodeGenerator codeGenerator) throws IOException { if (cls == null) { throw new NullPointerException("Parameter 'cls' is null"); } if (os == null) { throw new NullPointerExcept...
[ "public", "static", "void", "dynamicCodeGenerate", "(", "OutputStream", "os", ",", "Class", "cls", ",", "Charset", "charset", ",", "ICodeGenerator", "codeGenerator", ")", "throws", "IOException", "{", "if", "(", "cls", "==", "null", ")", "{", "throw", "new", ...
To generate a protobuf proxy java source code for target class. @param os to generate java source code @param cls target class @param charset charset type @param codeGenerator the code generator @throws IOException in case of any io relative exception.
[ "To", "generate", "a", "protobuf", "proxy", "java", "source", "code", "for", "target", "class", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufProxy.java#L144-L158
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.isAscii
private static boolean isAscii(ByteBuf buf, int index, int length) { """ Returns {@code true} if the specified {@link ByteBuf} starting at {@code index} with {@code length} is valid ASCII text, otherwise return {@code false}. @param buf The given {@link ByteBuf}. @param index The start index of the specif...
java
private static boolean isAscii(ByteBuf buf, int index, int length) { return buf.forEachByte(index, length, FIND_NON_ASCII) == -1; }
[ "private", "static", "boolean", "isAscii", "(", "ByteBuf", "buf", ",", "int", "index", ",", "int", "length", ")", "{", "return", "buf", ".", "forEachByte", "(", "index", ",", "length", ",", "FIND_NON_ASCII", ")", "==", "-", "1", ";", "}" ]
Returns {@code true} if the specified {@link ByteBuf} starting at {@code index} with {@code length} is valid ASCII text, otherwise return {@code false}. @param buf The given {@link ByteBuf}. @param index The start index of the specified buffer. @param length The length of the specified buffer.
[ "Returns", "{", "@code", "true", "}", "if", "the", "specified", "{", "@link", "ByteBuf", "}", "starting", "at", "{", "@code", "index", "}", "with", "{", "@code", "length", "}", "is", "valid", "ASCII", "text", "otherwise", "return", "{", "@code", "false",...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L1269-L1271
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/CloudantClient.java
CloudantClient.generateApiKey
public ApiKey generateApiKey() { """ Use the authorization feature to generate new API keys to access your data. An API key is similar to a username/password pair for granting others access to your data. <P>Example usage: </P> <pre> {@code ApiKey key = client.generateApiKey(); System.out.println(key); } <...
java
public ApiKey generateApiKey() { URI uri = new URIBase(getBaseUri()).path("_api").path("v2").path("api_keys").build(); InputStream response = couchDbClient.post(uri, null); return getResponse(response, ApiKey.class, getGson()); }
[ "public", "ApiKey", "generateApiKey", "(", ")", "{", "URI", "uri", "=", "new", "URIBase", "(", "getBaseUri", "(", ")", ")", ".", "path", "(", "\"_api\"", ")", ".", "path", "(", "\"v2\"", ")", ".", "path", "(", "\"api_keys\"", ")", ".", "build", "(", ...
Use the authorization feature to generate new API keys to access your data. An API key is similar to a username/password pair for granting others access to your data. <P>Example usage: </P> <pre> {@code ApiKey key = client.generateApiKey(); System.out.println(key); } </pre> <P> Example output: </P> <pre> {@code key: is...
[ "Use", "the", "authorization", "feature", "to", "generate", "new", "API", "keys", "to", "access", "your", "data", ".", "An", "API", "key", "is", "similar", "to", "a", "username", "/", "password", "pair", "for", "granting", "others", "access", "to", "your",...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/CloudantClient.java#L167-L171
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/MapFixture.java
MapFixture.setIntValueForIn
public void setIntValueForIn(int value, String name, Map<String, Object> map) { """ Stores integer value in map. @param value value to be passed. @param name name to use this value for. @param map map to store value in. """ setValueForIn(Integer.valueOf(value), name, map); }
java
public void setIntValueForIn(int value, String name, Map<String, Object> map) { setValueForIn(Integer.valueOf(value), name, map); }
[ "public", "void", "setIntValueForIn", "(", "int", "value", ",", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "setValueForIn", "(", "Integer", ".", "valueOf", "(", "value", ")", ",", "name", ",", "map", ")", ";", "...
Stores integer value in map. @param value value to be passed. @param name name to use this value for. @param map map to store value in.
[ "Stores", "integer", "value", "in", "map", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/MapFixture.java#L55-L57
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.queryTransactionByID
public TransactionInfo queryTransactionByID(Peer peer, String txID) throws ProposalException, InvalidArgumentException { """ Query for a Fabric Transaction given its transactionID <STRONG>This method may not be thread safe if client context is changed!</STRONG> @param txID the ID of the transaction @param...
java
public TransactionInfo queryTransactionByID(Peer peer, String txID) throws ProposalException, InvalidArgumentException { return queryTransactionByID(Collections.singleton(peer), txID, client.getUserContext()); }
[ "public", "TransactionInfo", "queryTransactionByID", "(", "Peer", "peer", ",", "String", "txID", ")", "throws", "ProposalException", ",", "InvalidArgumentException", "{", "return", "queryTransactionByID", "(", "Collections", ".", "singleton", "(", "peer", ")", ",", ...
Query for a Fabric Transaction given its transactionID <STRONG>This method may not be thread safe if client context is changed!</STRONG> @param txID the ID of the transaction @param peer the peer to send the request to @return a {@link TransactionInfo} @throws ProposalException @throws InvalidArgumentException
[ "Query", "for", "a", "Fabric", "Transaction", "given", "its", "transactionID" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3196-L3198
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
JavaTokenizer.lexError
protected void lexError(int pos, String key, Object... args) { """ Report an error at the given position using the provided arguments. """ log.error(pos, key, args); tk = TokenKind.ERROR; errPos = pos; }
java
protected void lexError(int pos, String key, Object... args) { log.error(pos, key, args); tk = TokenKind.ERROR; errPos = pos; }
[ "protected", "void", "lexError", "(", "int", "pos", ",", "String", "key", ",", "Object", "...", "args", ")", "{", "log", ".", "error", "(", "pos", ",", "key", ",", "args", ")", ";", "tk", "=", "TokenKind", ".", "ERROR", ";", "errPos", "=", "pos", ...
Report an error at the given position using the provided arguments.
[ "Report", "an", "error", "at", "the", "given", "position", "using", "the", "provided", "arguments", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java#L130-L134
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/JFapUtils.java
JFapUtils.copyWsByteBuffer
public static int copyWsByteBuffer(WsByteBuffer src, WsByteBuffer dst, int amount) { """ Copies up to 'amount' bytes from 'src' to 'dst'. Returns the number of bytes actually copied. """ int amountCopied = amount; int dstRemaining = dst.remaining(); int srcRemaining = src.remaining(); ...
java
public static int copyWsByteBuffer(WsByteBuffer src, WsByteBuffer dst, int amount) { int amountCopied = amount; int dstRemaining = dst.remaining(); int srcRemaining = src.remaining(); if (amountCopied > dstRemaining) amountCopied = dstRemaining; if (amountCopied > srcRemaining) amountC...
[ "public", "static", "int", "copyWsByteBuffer", "(", "WsByteBuffer", "src", ",", "WsByteBuffer", "dst", ",", "int", "amount", ")", "{", "int", "amountCopied", "=", "amount", ";", "int", "dstRemaining", "=", "dst", ".", "remaining", "(", ")", ";", "int", "sr...
Copies up to 'amount' bytes from 'src' to 'dst'. Returns the number of bytes actually copied.
[ "Copies", "up", "to", "amount", "bytes", "from", "src", "to", "dst", ".", "Returns", "the", "number", "of", "bytes", "actually", "copied", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/JFapUtils.java#L88-L106
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.rescaleImageAndEncodeAsBase64
@Nonnull public static String rescaleImageAndEncodeAsBase64(@Nonnull final File file, final int maxSize) throws IOException { """ Load and encode image into Base64 from file. @param file image file @param maxSize max size of image, if less or zero then don't rescale @return image @throws IOException if any...
java
@Nonnull public static String rescaleImageAndEncodeAsBase64(@Nonnull final File file, final int maxSize) throws IOException { final Image image = ImageIO.read(file); if (image == null) { throw new IllegalArgumentException("Can't load image file : " + file); //NOI18N } return rescaleImageAndEncod...
[ "@", "Nonnull", "public", "static", "String", "rescaleImageAndEncodeAsBase64", "(", "@", "Nonnull", "final", "File", "file", ",", "final", "int", "maxSize", ")", "throws", "IOException", "{", "final", "Image", "image", "=", "ImageIO", ".", "read", "(", "file",...
Load and encode image into Base64 from file. @param file image file @param maxSize max size of image, if less or zero then don't rescale @return image @throws IOException if any error during conversion or loading @since 1.4.0
[ "Load", "and", "encode", "image", "into", "Base64", "from", "file", "." ]
train
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L301-L308
keenlabs/KeenClient-Java
core/src/main/java/io/keen/client/java/KeenClient.java
KeenClient.sendQueuedEventsAsync
public void sendQueuedEventsAsync(final KeenProject project, final KeenCallback callback) { """ Asynchronously sends all queued events for the given project. This method will request that the Keen client's {@link java.util.concurrent.Executor} executes the publish operation. @param project The project for whi...
java
public void sendQueuedEventsAsync(final KeenProject project, final KeenCallback callback) { if (!isActive) { handleLibraryInactive(callback); return; } if (project == null && defaultProject == null) { handleFailure(null, new IllegalStateException("No project...
[ "public", "void", "sendQueuedEventsAsync", "(", "final", "KeenProject", "project", ",", "final", "KeenCallback", "callback", ")", "{", "if", "(", "!", "isActive", ")", "{", "handleLibraryInactive", "(", "callback", ")", ";", "return", ";", "}", "if", "(", "p...
Asynchronously sends all queued events for the given project. This method will request that the Keen client's {@link java.util.concurrent.Executor} executes the publish operation. @param project The project for which to send queued events. If a default project has been set on the client this parameter may be null, in...
[ "Asynchronously", "sends", "all", "queued", "events", "for", "the", "given", "project", ".", "This", "method", "will", "request", "that", "the", "Keen", "client", "s", "{", "@link", "java", ".", "util", ".", "concurrent", ".", "Executor", "}", "executes", ...
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/core/src/main/java/io/keen/client/java/KeenClient.java#L448-L473
k3po/k3po
driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/tcp/TcpBootstrapFactorySpi.java
TcpBootstrapFactorySpi.newClientBootstrap
@Override public synchronized ClientBootstrap newClientBootstrap() throws Exception { """ Returns a {@link ClientBootstrap} instance for the named transport. """ ClientSocketChannelFactory clientChannelFactory = this.clientChannelFactory; if (clientChannelFactory == null) { Ex...
java
@Override public synchronized ClientBootstrap newClientBootstrap() throws Exception { ClientSocketChannelFactory clientChannelFactory = this.clientChannelFactory; if (clientChannelFactory == null) { Executor bossExecutor = executorServiceFactory.newExecutorService("boss.client"); ...
[ "@", "Override", "public", "synchronized", "ClientBootstrap", "newClientBootstrap", "(", ")", "throws", "Exception", "{", "ClientSocketChannelFactory", "clientChannelFactory", "=", "this", ".", "clientChannelFactory", ";", "if", "(", "clientChannelFactory", "==", "null", ...
Returns a {@link ClientBootstrap} instance for the named transport.
[ "Returns", "a", "{" ]
train
https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/bootstrap/tcp/TcpBootstrapFactorySpi.java#L95-L119
virgo47/javasimon
core/src/main/java/org/javasimon/callback/logging/LogTemplates.java
LogTemplates.toSLF4J
public static <C> SLF4JLogTemplate<C> toSLF4J(String loggerName, String levelName) { """ Produces a concrete log template which logs messages into a SLF4J Logger. @param loggerName Logger name @param levelName Level name (info, debug, warn, etc.) @return Logger """ return toSLF4J(loggerName, levelName,...
java
public static <C> SLF4JLogTemplate<C> toSLF4J(String loggerName, String levelName) { return toSLF4J(loggerName, levelName, null); }
[ "public", "static", "<", "C", ">", "SLF4JLogTemplate", "<", "C", ">", "toSLF4J", "(", "String", "loggerName", ",", "String", "levelName", ")", "{", "return", "toSLF4J", "(", "loggerName", ",", "levelName", ",", "null", ")", ";", "}" ]
Produces a concrete log template which logs messages into a SLF4J Logger. @param loggerName Logger name @param levelName Level name (info, debug, warn, etc.) @return Logger
[ "Produces", "a", "concrete", "log", "template", "which", "logs", "messages", "into", "a", "SLF4J", "Logger", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/logging/LogTemplates.java#L92-L94
jakenjarvis/Android-OrmLiteContentProvider
ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java
OrmLiteDefaultContentProvider.onUpdateCompleted
protected void onUpdateCompleted(int result, Uri uri, MatcherPattern target, UpdateParameters parameter) { """ This method is called after the onUpdate processing has been handled. If you're a need, you can override this method. @param result This is the return value of onUpdate method. @param uri This is the...
java
protected void onUpdateCompleted(int result, Uri uri, MatcherPattern target, UpdateParameters parameter) { this.getContext().getContentResolver().notifyChange(uri, null); }
[ "protected", "void", "onUpdateCompleted", "(", "int", "result", ",", "Uri", "uri", ",", "MatcherPattern", "target", ",", "UpdateParameters", "parameter", ")", "{", "this", ".", "getContext", "(", ")", ".", "getContentResolver", "(", ")", ".", "notifyChange", "...
This method is called after the onUpdate processing has been handled. If you're a need, you can override this method. @param result This is the return value of onUpdate method. @param uri This is the Uri of target. @param target This is identical to the argument of onUpdate method. It is MatcherPattern objects that mat...
[ "This", "method", "is", "called", "after", "the", "onUpdate", "processing", "has", "been", "handled", ".", "If", "you", "re", "a", "need", "you", "can", "override", "this", "method", "." ]
train
https://github.com/jakenjarvis/Android-OrmLiteContentProvider/blob/8f102f0743b308c9f58d43639e98f832fd951985/ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java#L334-L336
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT
public void installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT(String templateName, String schemeName, String name, OvhHardwareRaid body) throws IOException { """ Alter this object properties REST: PUT /me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareR...
java
public void installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT(String templateName, String schemeName, String name, OvhHardwareRaid body) throws IOException { String qPath = "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name}"; StringBuilder sb =...
[ "public", "void", "installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT", "(", "String", "templateName", ",", "String", "schemeName", ",", "String", "name", ",", "OvhHardwareRaid", "body", ")", "throws", "IOException", "{", "String", "qPath", "...
Alter this object properties REST: PUT /me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name} @param body [required] New object properties @param templateName [required] This template name @param schemeName [required] name of this partitioning scheme @param name [required] Hardware RA...
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3524-L3528
esigate/esigate
esigate-core/src/main/java/org/esigate/util/UriUtils.java
UriUtils.concatPath
public static URI concatPath(URI base, String relPath) { """ Concatenates 2 {@link URI} by taking the beginning of the first (up to the path) and the end of the other (starting from the path). While concatenating, checks that there is no doubled "/" character between the path fragments. @param base the base ...
java
public static URI concatPath(URI base, String relPath) { String resultPath = base.getPath() + StringUtils.stripStart(relPath, "/"); try { return new URI(base.getScheme(), base.getUserInfo(), base.getHost(), base.getPort(), resultPath, null, null); } catch (URISyntaxException e) { ...
[ "public", "static", "URI", "concatPath", "(", "URI", "base", ",", "String", "relPath", ")", "{", "String", "resultPath", "=", "base", ".", "getPath", "(", ")", "+", "StringUtils", ".", "stripStart", "(", "relPath", ",", "\"/\"", ")", ";", "try", "{", "...
Concatenates 2 {@link URI} by taking the beginning of the first (up to the path) and the end of the other (starting from the path). While concatenating, checks that there is no doubled "/" character between the path fragments. @param base the base uri @param relPath the path to concatenate with the base uri @return th...
[ "Concatenates", "2", "{", "@link", "URI", "}", "by", "taking", "the", "beginning", "of", "the", "first", "(", "up", "to", "the", "path", ")", "and", "the", "end", "of", "the", "other", "(", "starting", "from", "the", "path", ")", ".", "While", "conca...
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/util/UriUtils.java#L326-L333
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/recommenders/Recommenders.java
Recommenders.visibleIf
public static ConfigDef.Recommender visibleIf(String configKey, Object value) { """ Method is used to return a recommender that will mark a ConfigItem as visible if the configKey is set to the specified value. @param configKey The setting to retrieve the value from. @param value The expected value. @retu...
java
public static ConfigDef.Recommender visibleIf(String configKey, Object value) { return new VisibleIfRecommender(configKey, value, ValidValuesCallback.EMPTY); }
[ "public", "static", "ConfigDef", ".", "Recommender", "visibleIf", "(", "String", "configKey", ",", "Object", "value", ")", "{", "return", "new", "VisibleIfRecommender", "(", "configKey", ",", "value", ",", "ValidValuesCallback", ".", "EMPTY", ")", ";", "}" ]
Method is used to return a recommender that will mark a ConfigItem as visible if the configKey is set to the specified value. @param configKey The setting to retrieve the value from. @param value The expected value. @return recommender
[ "Method", "is", "used", "to", "return", "a", "recommender", "that", "will", "mark", "a", "ConfigItem", "as", "visible", "if", "the", "configKey", "is", "set", "to", "the", "specified", "value", "." ]
train
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/recommenders/Recommenders.java#L36-L38
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/util/StringHelper.java
StringHelper.parseString
public static String parseString(String inputStr, char startingChar, char endingChar, String key) { """ Method which parses the input String to send back the value corresponding to the input key. For eg: If the inputStr is "TradingPartnerKey=5; OWNER=L3; CBTN=3036240004; RTI=105" startingChar is '=', endingChar...
java
public static String parseString(String inputStr, char startingChar, char endingChar, String key) { if (null == inputStr || null == key) { return null; } int matchedStartingIndex = inputStr.indexOf(key + startingChar); if (-1 == matchedStartingIndex) { return null...
[ "public", "static", "String", "parseString", "(", "String", "inputStr", ",", "char", "startingChar", ",", "char", "endingChar", ",", "String", "key", ")", "{", "if", "(", "null", "==", "inputStr", "||", "null", "==", "key", ")", "{", "return", "null", ";...
Method which parses the input String to send back the value corresponding to the input key. For eg: If the inputStr is "TradingPartnerKey=5; OWNER=L3; CBTN=3036240004; RTI=105" startingChar is '=', endingChar = ';' & key = "TradingPartnerKey" Then the response String will be "5" @param inputStr The input String to be p...
[ "Method", "which", "parses", "the", "input", "String", "to", "send", "back", "the", "value", "corresponding", "to", "the", "input", "key", ".", "For", "eg", ":", "If", "the", "inputStr", "is", "TradingPartnerKey", "=", "5", ";", "OWNER", "=", "L3", ";", ...
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/util/StringHelper.java#L1045-L1059
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddInputShapes.java
AddInputShapes.validateTimestampProtocol
private void validateTimestampProtocol(String protocolString, String timestampFormat, String shape2) { """ Throw exception if timestamp is provided for non-json protocol """ if (!StringUtils.isNullOrEmpty(timestampFormat) && isNonJsonProtocol(protocolString)) { throw new IllegalArgumentExce...
java
private void validateTimestampProtocol(String protocolString, String timestampFormat, String shape2) { if (!StringUtils.isNullOrEmpty(timestampFormat) && isNonJsonProtocol(protocolString)) { throw new IllegalArgumentException(String.format( "Shape %s has timestamp format provided. Ti...
[ "private", "void", "validateTimestampProtocol", "(", "String", "protocolString", ",", "String", "timestampFormat", ",", "String", "shape2", ")", "{", "if", "(", "!", "StringUtils", ".", "isNullOrEmpty", "(", "timestampFormat", ")", "&&", "isNonJsonProtocol", "(", ...
Throw exception if timestamp is provided for non-json protocol
[ "Throw", "exception", "if", "timestamp", "is", "provided", "for", "non", "-", "json", "protocol" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddInputShapes.java#L123-L131
Impetus/Kundera
src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/OracleNoSQLClient.java
OracleNoSQLClient.onPersist
@Override protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders) { """ On persist. @param entityMetadata the entity metadata @param entity the entity @param id the id @param rlHolders the rl holders """ KunderaCoreUtils.printQuery...
java
@Override protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders) { KunderaCoreUtils.printQuery( "Persist data into " + entityMetadata.getSchema() + "." + entityMetadata.getTableName() + " for " + id, showQuery); ...
[ "@", "Override", "protected", "void", "onPersist", "(", "EntityMetadata", "entityMetadata", ",", "Object", "entity", ",", "Object", "id", ",", "List", "<", "RelationHolder", ">", "rlHolders", ")", "{", "KunderaCoreUtils", ".", "printQuery", "(", "\"Persist data in...
On persist. @param entityMetadata the entity metadata @param entity the entity @param id the id @param rlHolders the rl holders
[ "On", "persist", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/OracleNoSQLClient.java#L352-L362
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/DualInputSemanticProperties.java
DualInputSemanticProperties.addForwardedField1
public void addForwardedField1(int sourceField, int destinationField) { """ Adds, to the existing information, a field that is forwarded directly from the source record(s) in the first input to the destination record(s). @param sourceField the position in the source record(s) from the first input @param dest...
java
public void addForwardedField1(int sourceField, int destinationField) { FieldSet fs; if((fs = this.forwardedFields1.get(sourceField)) != null) { fs.add(destinationField); } else { fs = new FieldSet(destinationField); this.forwardedFields1.put(sourceField, fs); } }
[ "public", "void", "addForwardedField1", "(", "int", "sourceField", ",", "int", "destinationField", ")", "{", "FieldSet", "fs", ";", "if", "(", "(", "fs", "=", "this", ".", "forwardedFields1", ".", "get", "(", "sourceField", ")", ")", "!=", "null", ")", "...
Adds, to the existing information, a field that is forwarded directly from the source record(s) in the first input to the destination record(s). @param sourceField the position in the source record(s) from the first input @param destinationField the position in the destination record(s)
[ "Adds", "to", "the", "existing", "information", "a", "field", "that", "is", "forwarded", "directly", "from", "the", "source", "record", "(", "s", ")", "in", "the", "first", "input", "to", "the", "destination", "record", "(", "s", ")", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/api/common/operators/DualInputSemanticProperties.java#L65-L73
sundrio/sundrio
codegen/src/main/java/io/sundr/codegen/utils/TypeUtils.java
TypeUtils.hasMethod
public static boolean hasMethod(TypeDef typeDef, String method) { """ Check if method exists on the specified type. @param typeDef The type. @param method The method name. @return True if method is found, false otherwise. """ return unrollHierarchy(typeDef) .stream() .flat...
java
public static boolean hasMethod(TypeDef typeDef, String method) { return unrollHierarchy(typeDef) .stream() .flatMap(h -> h.getMethods().stream()) .filter(m -> method.equals(m.getName())) .findAny() .isPresent(); }
[ "public", "static", "boolean", "hasMethod", "(", "TypeDef", "typeDef", ",", "String", "method", ")", "{", "return", "unrollHierarchy", "(", "typeDef", ")", ".", "stream", "(", ")", ".", "flatMap", "(", "h", "->", "h", ".", "getMethods", "(", ")", ".", ...
Check if method exists on the specified type. @param typeDef The type. @param method The method name. @return True if method is found, false otherwise.
[ "Check", "if", "method", "exists", "on", "the", "specified", "type", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/codegen/src/main/java/io/sundr/codegen/utils/TypeUtils.java#L398-L405
line/armeria
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
ArmeriaHttpUtil.toArmeria
public static HttpHeaders toArmeria(io.netty.handler.codec.http.HttpHeaders inHeaders) { """ Converts the specified Netty HTTP/1 headers into Armeria HTTP/2 headers. """ if (inHeaders.isEmpty()) { return HttpHeaders.EMPTY_HEADERS; } final HttpHeaders out = new DefaultHttpHe...
java
public static HttpHeaders toArmeria(io.netty.handler.codec.http.HttpHeaders inHeaders) { if (inHeaders.isEmpty()) { return HttpHeaders.EMPTY_HEADERS; } final HttpHeaders out = new DefaultHttpHeaders(true, inHeaders.size()); toArmeria(inHeaders, out); return out; ...
[ "public", "static", "HttpHeaders", "toArmeria", "(", "io", ".", "netty", ".", "handler", ".", "codec", ".", "http", ".", "HttpHeaders", "inHeaders", ")", "{", "if", "(", "inHeaders", ".", "isEmpty", "(", ")", ")", "{", "return", "HttpHeaders", ".", "EMPT...
Converts the specified Netty HTTP/1 headers into Armeria HTTP/2 headers.
[ "Converts", "the", "specified", "Netty", "HTTP", "/", "1", "headers", "into", "Armeria", "HTTP", "/", "2", "headers", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java#L564-L572
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/queue/QueueData.java
QueueData.addSlice
public synchronized void addSlice(CommsByteBuffer bufferContainingSlice, boolean last) { """ This method will add a data slice to the list of slices for this message. @param bufferContainingSlice @param last """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "a...
java
public synchronized void addSlice(CommsByteBuffer bufferContainingSlice, boolean last) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "addSlice", new Object[]{bufferContainingSlice, last}); slices.add(bufferContainingSlice.getDataSlice()); // ...
[ "public", "synchronized", "void", "addSlice", "(", "CommsByteBuffer", "bufferContainingSlice", ",", "boolean", "last", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", ...
This method will add a data slice to the list of slices for this message. @param bufferContainingSlice @param last
[ "This", "method", "will", "add", "a", "data", "slice", "to", "the", "list", "of", "slices", "for", "this", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/proxyqueue/queue/QueueData.java#L161-L180
knowm/XChange
xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXMarketDataService.java
ANXMarketDataService.getOrderBook
@Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { """ Get market depth from exchange @param args Optional arguments. Exchange-specific. This implementation assumes: absent or "full" -> get full OrderBook "partial" -> get partial OrderBook @return The Ord...
java
@Override public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException { // Request data ANXDepthWrapper anxDepthWrapper = null; if (args != null && args.length > 0) { if (args[0] instanceof String) { if ("full" == args[0]) { anxDepthWrapper = getANX...
[ "@", "Override", "public", "OrderBook", "getOrderBook", "(", "CurrencyPair", "currencyPair", ",", "Object", "...", "args", ")", "throws", "IOException", "{", "// Request data", "ANXDepthWrapper", "anxDepthWrapper", "=", "null", ";", "if", "(", "args", "!=", "null"...
Get market depth from exchange @param args Optional arguments. Exchange-specific. This implementation assumes: absent or "full" -> get full OrderBook "partial" -> get partial OrderBook @return The OrderBook @throws java.io.IOException
[ "Get", "market", "depth", "from", "exchange" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/service/ANXMarketDataService.java#L52-L88
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/AbstractPrintQuery.java
AbstractPrintQuery.addSelect
public AbstractPrintQuery addSelect(final String... _selectStmts) throws EFapsException { """ Add an select to the PrintQuery. A select is something like: <code>class[Emperador_Products_ClassFloorLaminate].linkto[SurfaceAttrId].attribute[Value]</code> <br> The use of the key words like "class" etc is ma...
java
public AbstractPrintQuery addSelect(final String... _selectStmts) throws EFapsException { if (isMarked4execute()) { for (final String selectStmt : _selectStmts) { final OneSelect oneselect = new OneSelect(this, selectStmt); this.allSelects.add(oneselect); ...
[ "public", "AbstractPrintQuery", "addSelect", "(", "final", "String", "...", "_selectStmts", ")", "throws", "EFapsException", "{", "if", "(", "isMarked4execute", "(", ")", ")", "{", "for", "(", "final", "String", "selectStmt", ":", "_selectStmts", ")", "{", "fi...
Add an select to the PrintQuery. A select is something like: <code>class[Emperador_Products_ClassFloorLaminate].linkto[SurfaceAttrId].attribute[Value]</code> <br> The use of the key words like "class" etc is mandatory. Contrary to {@link #addPhrase(String, String)} the values will not be parsed! The values will not be ...
[ "Add", "an", "select", "to", "the", "PrintQuery", ".", "A", "select", "is", "something", "like", ":", "<code", ">", "class", "[", "Emperador_Products_ClassFloorLaminate", "]", ".", "linkto", "[", "SurfaceAttrId", "]", ".", "attribute", "[", "Value", "]", "<"...
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L702-L714
bullhorn/sdk-rest
src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java
StandardBullhornData.handleGetMultipleEntities
protected <L extends ListWrapper<T>, T extends BullhornEntity> L handleGetMultipleEntities(Class<T> type, Set<Integer> idList, Set<String> fieldSet, EntityParams params) { """ Makes the "entity" api call for getting multiple entities. <p> <p> HTTP Method: GET @param type @param idList @param fieldSet @par...
java
protected <L extends ListWrapper<T>, T extends BullhornEntity> L handleGetMultipleEntities(Class<T> type, Set<Integer> idList, Set<String> fieldSet, EntityParams params) { String ids = idList.stream().map(id -> String.valueOf(id)).collect(Collectors.joining(",")); Map<String, String> uriVariables = rest...
[ "protected", "<", "L", "extends", "ListWrapper", "<", "T", ">", ",", "T", "extends", "BullhornEntity", ">", "L", "handleGetMultipleEntities", "(", "Class", "<", "T", ">", "type", ",", "Set", "<", "Integer", ">", "idList", ",", "Set", "<", "String", ">", ...
Makes the "entity" api call for getting multiple entities. <p> <p> HTTP Method: GET @param type @param idList @param fieldSet @param params @param <L> @param <T> @return
[ "Makes", "the", "entity", "api", "call", "for", "getting", "multiple", "entities", ".", "<p", ">", "<p", ">", "HTTP", "Method", ":", "GET" ]
train
https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java#L881-L898
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/naming/SingletonInitialContextFactory.java
SingletonInitialContextFactory.getInstance
public static synchronized Context getInstance( Hashtable<?, ?> environment ) { """ Return the {@link Context} singleton instance. If no such context has been configured, this method will configured the singletone using the supplied environment. @param environment the environment for the naming context; may be...
java
public static synchronized Context getInstance( Hashtable<?, ?> environment ) { if (SINGLETON == null) SINGLETON = new SingletonInitialContext(environment); return SINGLETON; }
[ "public", "static", "synchronized", "Context", "getInstance", "(", "Hashtable", "<", "?", ",", "?", ">", "environment", ")", "{", "if", "(", "SINGLETON", "==", "null", ")", "SINGLETON", "=", "new", "SingletonInitialContext", "(", "environment", ")", ";", "re...
Return the {@link Context} singleton instance. If no such context has been configured, this method will configured the singletone using the supplied environment. @param environment the environment for the naming context; may be null or empty @return the singleton context; never null @see #getInitialContext(Hashtable) ...
[ "Return", "the", "{", "@link", "Context", "}", "singleton", "instance", ".", "If", "no", "such", "context", "has", "been", "configured", "this", "method", "will", "configured", "the", "singletone", "using", "the", "supplied", "environment", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/naming/SingletonInitialContextFactory.java#L73-L76
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java
CommandLineApplication.addOption
public final void addOption(String shortOpt, String longOpt, String desc) { """ Adds a command-line option. This is only useful before calling {@link #start() start}. @param shortOpt Short, one character option (e.g., {@code -t}) @param longOpt Long, one or two word option (e.g., {@code --long-option}) @para...
java
public final void addOption(String shortOpt, String longOpt, String desc) { cliOptions.addOption(new Option(shortOpt, longOpt, false, desc)); }
[ "public", "final", "void", "addOption", "(", "String", "shortOpt", ",", "String", "longOpt", ",", "String", "desc", ")", "{", "cliOptions", ".", "addOption", "(", "new", "Option", "(", "shortOpt", ",", "longOpt", ",", "false", ",", "desc", ")", ")", ";",...
Adds a command-line option. This is only useful before calling {@link #start() start}. @param shortOpt Short, one character option (e.g., {@code -t}) @param longOpt Long, one or two word option (e.g., {@code --long-option}) @param desc Option description (e.g., {@code does something great})
[ "Adds", "a", "command", "-", "line", "option", ".", "This", "is", "only", "useful", "before", "calling", "{", "@link", "#start", "()", "start", "}", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/CommandLineApplication.java#L385-L387
betfair/cougar
cougar-codegen-plugin/src/main/java/com/betfair/cougar/codegen/IdlToDSMojo.java
IdlToDSMojo.prepXsdXsl
private void prepXsdXsl() throws MojoExecutionException { """ Read a wsdl.xsl (stylesheet) from a resource, and write it to a working directory. @return the on-disk wsdl.xsl file """ try { xsdXsl = new File(getBaseDir(), xsdXslFile); initOutputDir(xsdXsl.getParentFile()); ...
java
private void prepXsdXsl() throws MojoExecutionException { try { xsdXsl = new File(getBaseDir(), xsdXslFile); initOutputDir(xsdXsl.getParentFile()); writeXsdStylesheet(xsdXsl); } catch (Exception e) { throw new MojoExecutionException("Failed to write local ...
[ "private", "void", "prepXsdXsl", "(", ")", "throws", "MojoExecutionException", "{", "try", "{", "xsdXsl", "=", "new", "File", "(", "getBaseDir", "(", ")", ",", "xsdXslFile", ")", ";", "initOutputDir", "(", "xsdXsl", ".", "getParentFile", "(", ")", ")", ";"...
Read a wsdl.xsl (stylesheet) from a resource, and write it to a working directory. @return the on-disk wsdl.xsl file
[ "Read", "a", "wsdl", ".", "xsl", "(", "stylesheet", ")", "from", "a", "resource", "and", "write", "it", "to", "a", "working", "directory", "." ]
train
https://github.com/betfair/cougar/blob/08d1fe338fbd0e8572a9c2305bb5796402d5b1f5/cougar-codegen-plugin/src/main/java/com/betfair/cougar/codegen/IdlToDSMojo.java#L333-L341
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedInstanceKeysInner.java
ManagedInstanceKeysInner.listByInstanceAsync
public Observable<Page<ManagedInstanceKeyInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName, final String filter) { """ Gets a list of managed instance keys. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value fr...
java
public Observable<Page<ManagedInstanceKeyInner>> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName, final String filter) { return listByInstanceWithServiceResponseAsync(resourceGroupName, managedInstanceName, filter) .map(new Func1<ServiceResponse<Page<ManagedInsta...
[ "public", "Observable", "<", "Page", "<", "ManagedInstanceKeyInner", ">", ">", "listByInstanceAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "managedInstanceName", ",", "final", "String", "filter", ")", "{", "return", "listByInstanceWithS...
Gets a list of managed instance keys. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param filter An OData filter expression that filters eleme...
[ "Gets", "a", "list", "of", "managed", "instance", "keys", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedInstanceKeysInner.java#L263-L271
albfernandez/itext2
src/main/java/com/lowagie/text/xml/xmp/XmpReader.java
XmpReader.setNodeText
public boolean setNodeText(Document domDocument, Node n, String value) { """ Sets the text of this node. All the child's node are deleted and a new child text node is created. @param domDocument the <CODE>Document</CODE> that contains the node @param n the <CODE>Node</CODE> to add the text to @param value the ...
java
public boolean setNodeText(Document domDocument, Node n, String value) { if (n == null) return false; Node nc = null; while ((nc = n.getFirstChild()) != null) { n.removeChild(nc); } n.appendChild(domDocument.createTextNode(value)); return t...
[ "public", "boolean", "setNodeText", "(", "Document", "domDocument", ",", "Node", "n", ",", "String", "value", ")", "{", "if", "(", "n", "==", "null", ")", "return", "false", ";", "Node", "nc", "=", "null", ";", "while", "(", "(", "nc", "=", "n", "....
Sets the text of this node. All the child's node are deleted and a new child text node is created. @param domDocument the <CODE>Document</CODE> that contains the node @param n the <CODE>Node</CODE> to add the text to @param value the text to add
[ "Sets", "the", "text", "of", "this", "node", ".", "All", "the", "child", "s", "node", "are", "deleted", "and", "a", "new", "child", "text", "node", "is", "created", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/xml/xmp/XmpReader.java#L162-L171
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipCall.java
SipCall.sendIncomingCallResponse
public boolean sendIncomingCallResponse(int statusCode, String reasonPhrase, int expires) { """ This method sends a basic response to a previously received INVITE request. The response is constructed based on the parameters passed in. Call this method after waitForIncomingCall() returns true. Call this method mu...
java
public boolean sendIncomingCallResponse(int statusCode, String reasonPhrase, int expires) { return sendIncomingCallResponse(statusCode, reasonPhrase, expires, null, null, null); }
[ "public", "boolean", "sendIncomingCallResponse", "(", "int", "statusCode", ",", "String", "reasonPhrase", ",", "int", "expires", ")", "{", "return", "sendIncomingCallResponse", "(", "statusCode", ",", "reasonPhrase", ",", "expires", ",", "null", ",", "null", ",", ...
This method sends a basic response to a previously received INVITE request. The response is constructed based on the parameters passed in. Call this method after waitForIncomingCall() returns true. Call this method multiple times to send multiple responses to the received INVITE. The INVITE being responded to must be t...
[ "This", "method", "sends", "a", "basic", "response", "to", "a", "previously", "received", "INVITE", "request", ".", "The", "response", "is", "constructed", "based", "on", "the", "parameters", "passed", "in", ".", "Call", "this", "method", "after", "waitForInco...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipCall.java#L985-L987
marvinlabs/android-intents
library/src/main/java/com/marvinlabs/intents/GeoIntents.java
GeoIntents.newMapsIntent
public static Intent newMapsIntent(float latitude, float longitude, String placeName) { """ Intent that should allow opening a map showing the given location (if it exists) @param latitude The latitude of the center of the map @param longitude The longitude of the center of the map @param placeName The name ...
java
public static Intent newMapsIntent(float latitude, float longitude, String placeName) { StringBuilder sb = new StringBuilder(); sb.append("geo:"); sb.append(latitude); sb.append(","); sb.append(longitude); if (!TextUtils.isEmpty(placeName)) { sb.append("?q="...
[ "public", "static", "Intent", "newMapsIntent", "(", "float", "latitude", ",", "float", "longitude", ",", "String", "placeName", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "\"geo:\"", ")", ";", "sb...
Intent that should allow opening a map showing the given location (if it exists) @param latitude The latitude of the center of the map @param longitude The longitude of the center of the map @param placeName The name to show on the marker @return the intent
[ "Intent", "that", "should", "allow", "opening", "a", "map", "showing", "the", "given", "location", "(", "if", "it", "exists", ")" ]
train
https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/GeoIntents.java#L70-L89
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/event/EventDispatcher.java
EventDispatcher.publishExpiredQuietly
public void publishExpiredQuietly(Cache<K, V> cache, K key, V value) { """ Publishes a expire event for the entry to all of the interested listeners. This method does not register the synchronous listener's future with {@link #awaitSynchronous()}. @param cache the cache where the entry expired @param key the ...
java
public void publishExpiredQuietly(Cache<K, V> cache, K key, V value) { publish(cache, EventType.EXPIRED, key, value, /* newValue */ null, /* quiet */ true); }
[ "public", "void", "publishExpiredQuietly", "(", "Cache", "<", "K", ",", "V", ">", "cache", ",", "K", "key", ",", "V", "value", ")", "{", "publish", "(", "cache", ",", "EventType", ".", "EXPIRED", ",", "key", ",", "value", ",", "/* newValue */", "null",...
Publishes a expire event for the entry to all of the interested listeners. This method does not register the synchronous listener's future with {@link #awaitSynchronous()}. @param cache the cache where the entry expired @param key the entry's key @param value the entry's value
[ "Publishes", "a", "expire", "event", "for", "the", "entry", "to", "all", "of", "the", "interested", "listeners", ".", "This", "method", "does", "not", "register", "the", "synchronous", "listener", "s", "future", "with", "{", "@link", "#awaitSynchronous", "()",...
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/event/EventDispatcher.java#L171-L173
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/images/ImageGenerator.java
ImageGenerator.addFeaturePath
public void addFeaturePath( String featurePath, String filter ) { """ Add a new feature file path. <p>The order will be considered. First paths are drawn first.</p> @param featurePath the path to add. """ if (!featurePaths.contains(featurePath)) { featurePaths.add(featurePath); ...
java
public void addFeaturePath( String featurePath, String filter ) { if (!featurePaths.contains(featurePath)) { featurePaths.add(featurePath); if (filter == null) { filter = ""; } featureFilter.add(filter); } }
[ "public", "void", "addFeaturePath", "(", "String", "featurePath", ",", "String", "filter", ")", "{", "if", "(", "!", "featurePaths", ".", "contains", "(", "featurePath", ")", ")", "{", "featurePaths", ".", "add", "(", "featurePath", ")", ";", "if", "(", ...
Add a new feature file path. <p>The order will be considered. First paths are drawn first.</p> @param featurePath the path to add.
[ "Add", "a", "new", "feature", "file", "path", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/images/ImageGenerator.java#L184-L192
alkacon/opencms-core
src/org/opencms/publish/CmsPublishManager.java
CmsPublishManager.getRelatedResourcesToPublish
public CmsPublishList getRelatedResourcesToPublish(CmsObject cms, CmsPublishList publishList) throws CmsException { """ Returns a new publish list that contains the unpublished resources related to all resources in the given publish list, the related resources exclude all resources in the given publish list and ...
java
public CmsPublishList getRelatedResourcesToPublish(CmsObject cms, CmsPublishList publishList) throws CmsException { return m_securityManager.getRelatedResourcesToPublish( cms.getRequestContext(), publishList, CmsRelationFilter.TARGETS.filterStrong()); }
[ "public", "CmsPublishList", "getRelatedResourcesToPublish", "(", "CmsObject", "cms", ",", "CmsPublishList", "publishList", ")", "throws", "CmsException", "{", "return", "m_securityManager", ".", "getRelatedResourcesToPublish", "(", "cms", ".", "getRequestContext", "(", ")...
Returns a new publish list that contains the unpublished resources related to all resources in the given publish list, the related resources exclude all resources in the given publish list and also locked (by other users) resources.<p> @param cms the cms request context @param publishList the publish list to exclude f...
[ "Returns", "a", "new", "publish", "list", "that", "contains", "the", "unpublished", "resources", "related", "to", "all", "resources", "in", "the", "given", "publish", "list", "the", "related", "resources", "exclude", "all", "resources", "in", "the", "given", "...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/publish/CmsPublishManager.java#L428-L434
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/AppUtil.java
AppUtil.startDialer
public static void startDialer(@NonNull final Context context, final long phoneNumber) { """ Starts the dialer in order to call a specific phone number. The call has to be manually started by the user. If an error occurs while starting the dialer, an {@link ActivityNotFoundException} will be thrown. @param co...
java
public static void startDialer(@NonNull final Context context, final long phoneNumber) { startDialer(context, Long.toString(phoneNumber)); }
[ "public", "static", "void", "startDialer", "(", "@", "NonNull", "final", "Context", "context", ",", "final", "long", "phoneNumber", ")", "{", "startDialer", "(", "context", ",", "Long", ".", "toString", "(", "phoneNumber", ")", ")", ";", "}" ]
Starts the dialer in order to call a specific phone number. The call has to be manually started by the user. If an error occurs while starting the dialer, an {@link ActivityNotFoundException} will be thrown. @param context The context, the dialer should be started from, as an instance of the class {@link Context}. The...
[ "Starts", "the", "dialer", "in", "order", "to", "call", "a", "specific", "phone", "number", ".", "The", "call", "has", "to", "be", "manually", "started", "by", "the", "user", ".", "If", "an", "error", "occurs", "while", "starting", "the", "dialer", "an",...
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/AppUtil.java#L336-L338
abola/CrawlerPack
src/main/java/com/github/abola/crawler/CrawlerPack.java
CrawlerPack.detectCharset
private String detectCharset(byte[] content, Integer offset) { """ Detecting real content encoding @param content @param offset @return real charset encoding """ log.debug("detectCharset: offset=" + offset); // detect failed if( offset > content.length ) return null; Univer...
java
private String detectCharset(byte[] content, Integer offset){ log.debug("detectCharset: offset=" + offset); // detect failed if( offset > content.length ) return null; UniversalDetector detector = new UniversalDetector(null); detector.handleData(content, offset, content.length ...
[ "private", "String", "detectCharset", "(", "byte", "[", "]", "content", ",", "Integer", "offset", ")", "{", "log", ".", "debug", "(", "\"detectCharset: offset=\"", "+", "offset", ")", ";", "// detect failed", "if", "(", "offset", ">", "content", ".", "length...
Detecting real content encoding @param content @param offset @return real charset encoding
[ "Detecting", "real", "content", "encoding" ]
train
https://github.com/abola/CrawlerPack/blob/a7b7703b7fad519994dc04a9c51d90adc11d618f/src/main/java/com/github/abola/crawler/CrawlerPack.java#L404-L417
azkaban/azkaban
az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopSparkJob.java
HadoopSparkJob.getSparkLibDir
private String getSparkLibDir(final String sparkHome) { """ Given the dir path of Spark Home, return the dir path of Spark lib. It is either sparkHome/lib or sparkHome/jars based on the version of Spark chosen by user. @param sparkHome dir path of Spark Home @return dir path of Spark lib """ // spark...
java
private String getSparkLibDir(final String sparkHome) { // sparkHome should have already been checked when this method is invoked final File homeDir = new File(sparkHome); File libDir = new File(homeDir, "lib"); if (libDir.exists()) { return libDir.getAbsolutePath(); } else { libDir = ne...
[ "private", "String", "getSparkLibDir", "(", "final", "String", "sparkHome", ")", "{", "// sparkHome should have already been checked when this method is invoked", "final", "File", "homeDir", "=", "new", "File", "(", "sparkHome", ")", ";", "File", "libDir", "=", "new", ...
Given the dir path of Spark Home, return the dir path of Spark lib. It is either sparkHome/lib or sparkHome/jars based on the version of Spark chosen by user. @param sparkHome dir path of Spark Home @return dir path of Spark lib
[ "Given", "the", "dir", "path", "of", "Spark", "Home", "return", "the", "dir", "path", "of", "Spark", "lib", ".", "It", "is", "either", "sparkHome", "/", "lib", "or", "sparkHome", "/", "jars", "based", "on", "the", "version", "of", "Spark", "chosen", "b...
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-hadoop-jobtype-plugin/src/main/java/azkaban/jobtype/HadoopSparkJob.java#L569-L583
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltCompiler.java
VoltCompiler.getCachedStatement
Statement getCachedStatement(String keyPrefix, String sql) { """ Look for a match from the previous catalog that matches the key + sql """ String key = keyPrefix + sql; Statement candidate = m_previousCatalogStmts.get(key); if (candidate == null) { ++m_stmtCacheMisses; ...
java
Statement getCachedStatement(String keyPrefix, String sql) { String key = keyPrefix + sql; Statement candidate = m_previousCatalogStmts.get(key); if (candidate == null) { ++m_stmtCacheMisses; return null; } // check that no underlying tables have been mo...
[ "Statement", "getCachedStatement", "(", "String", "keyPrefix", ",", "String", "sql", ")", "{", "String", "key", "=", "keyPrefix", "+", "sql", ";", "Statement", "candidate", "=", "m_previousCatalogStmts", ".", "get", "(", "key", ")", ";", "if", "(", "candidat...
Look for a match from the previous catalog that matches the key + sql
[ "Look", "for", "a", "match", "from", "the", "previous", "catalog", "that", "matches", "the", "key", "+", "sql" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompiler.java#L2292-L2321
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetricsRegistry.java
GobblinMetricsRegistry.getMetricContext
public MetricContext getMetricContext(State state, Class<?> klazz, List<Tag<?>> tags) { """ <p> Creates {@link org.apache.gobblin.metrics.MetricContext}. Tries to read the name of the parent context from key "metrics.context.name" at state, and tries to get the parent context by name from the {@link org.apache....
java
public MetricContext getMetricContext(State state, Class<?> klazz, List<Tag<?>> tags) { int randomId = new Random().nextInt(Integer.MAX_VALUE); List<Tag<?>> generatedTags = Lists.newArrayList(); if (!klazz.isAnonymousClass()) { generatedTags.add(new Tag<>("class", klazz.getCanonicalName())); } ...
[ "public", "MetricContext", "getMetricContext", "(", "State", "state", ",", "Class", "<", "?", ">", "klazz", ",", "List", "<", "Tag", "<", "?", ">", ">", "tags", ")", "{", "int", "randomId", "=", "new", "Random", "(", ")", ".", "nextInt", "(", "Intege...
<p> Creates {@link org.apache.gobblin.metrics.MetricContext}. Tries to read the name of the parent context from key "metrics.context.name" at state, and tries to get the parent context by name from the {@link org.apache.gobblin.metrics.MetricContext} registry (the parent context must be registered). </p> <p> Automatic...
[ "<p", ">", "Creates", "{", "@link", "org", ".", "apache", ".", "gobblin", ".", "metrics", ".", "MetricContext", "}", ".", "Tries", "to", "read", "the", "name", "of", "the", "parent", "context", "from", "key", "metrics", ".", "context", ".", "name", "at...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetricsRegistry.java#L134-L151
samskivert/samskivert
src/main/java/com/samskivert/jdbc/BaseLiaison.java
BaseLiaison.fetchLastInsertedId
protected int fetchLastInsertedId (Connection conn, String table, String column) throws SQLException { """ Requests the last inserted id for the specified table and column. This is used if a JDBC driver does not support {@code getGeneratedKeys} or an attempt to use that failed. """ throw new S...
java
protected int fetchLastInsertedId (Connection conn, String table, String column) throws SQLException { throw new SQLException( "Unable to obtain last inserted id [table=" + table + ", column=" + column + "]"); }
[ "protected", "int", "fetchLastInsertedId", "(", "Connection", "conn", ",", "String", "table", ",", "String", "column", ")", "throws", "SQLException", "{", "throw", "new", "SQLException", "(", "\"Unable to obtain last inserted id [table=\"", "+", "table", "+", "\", col...
Requests the last inserted id for the specified table and column. This is used if a JDBC driver does not support {@code getGeneratedKeys} or an attempt to use that failed.
[ "Requests", "the", "last", "inserted", "id", "for", "the", "specified", "table", "and", "column", ".", "This", "is", "used", "if", "a", "JDBC", "driver", "does", "not", "support", "{" ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/jdbc/BaseLiaison.java#L62-L67
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.rotateLocalY
public Matrix4x3d rotateLocalY(double ang, Matrix4x3d dest) { """ Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a ...
java
public Matrix4x3d rotateLocalY(double ang, Matrix4x3d dest) { double sin = Math.sin(ang); double cos = Math.cosFromSin(sin, ang); double nm00 = cos * m00 + sin * m02; double nm02 = -sin * m00 + cos * m02; double nm10 = cos * m10 + sin * m12; double nm12 = -sin * m10 + c...
[ "public", "Matrix4x3d", "rotateLocalY", "(", "double", "ang", ",", "Matrix4x3d", "dest", ")", "{", "double", "sin", "=", "Math", ".", "sin", "(", "ang", ")", ";", "double", "cos", "=", "Math", ".", "cosFromSin", "(", "sin", ",", "ang", ")", ";", "dou...
Pre-multiply a rotation around the Y axis to this matrix by rotating the given amount of radians about the Y axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the ...
[ "Pre", "-", "multiply", "a", "rotation", "around", "the", "Y", "axis", "to", "this", "matrix", "by", "rotating", "the", "given", "amount", "of", "radians", "about", "the", "Y", "axis", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L3664-L3689
sdaschner/jaxrs-analyzer
src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/javadoc/JavaDocParserVisitor.java
JavaDocParserVisitor.calculateMethodIdentifier
private MethodIdentifier calculateMethodIdentifier(MethodDeclaration method) { """ <b>Note:</b> This will not return the actual identifier but only the simple names of the types (return type &amp; parameter types). Doing a full type resolving with all imports adds too much complexity at this point. This is a bes...
java
private MethodIdentifier calculateMethodIdentifier(MethodDeclaration method) { String[] parameters = method.getParameters().stream() .map(p -> p.getType().asString()) .map(p -> p.replace('.', '/')) .toArray(String[]::new); String returnType = method.getTyp...
[ "private", "MethodIdentifier", "calculateMethodIdentifier", "(", "MethodDeclaration", "method", ")", "{", "String", "[", "]", "parameters", "=", "method", ".", "getParameters", "(", ")", ".", "stream", "(", ")", ".", "map", "(", "p", "->", "p", ".", "getType...
<b>Note:</b> This will not return the actual identifier but only the simple names of the types (return type &amp; parameter types). Doing a full type resolving with all imports adds too much complexity at this point. This is a best-effort approach.
[ "<b", ">", "Note", ":", "<", "/", "b", ">", "This", "will", "not", "return", "the", "actual", "identifier", "but", "only", "the", "simple", "names", "of", "the", "types", "(", "return", "type", "&amp", ";", "parameter", "types", ")", ".", "Doing", "a...
train
https://github.com/sdaschner/jaxrs-analyzer/blob/4ac62942202d05632977d6c14d3cd7e2d27e2b9b/src/main/java/com/sebastian_daschner/jaxrs_analyzer/analysis/javadoc/JavaDocParserVisitor.java#L171-L182
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractController.java
AbstractController.callCommand
protected Wave callCommand(final Class<? extends CommandBean<? extends WaveBean>> commandClass, final WaveBean waveBean, final WaveBean... waveBeans) { """ Redirect to {@link Model#callCommand(Class, WaveBean)}. @param commandClass the command class to call @param waveBean the WaveBean that holds all required ...
java
protected Wave callCommand(final Class<? extends CommandBean<? extends WaveBean>> commandClass, final WaveBean waveBean, final WaveBean... waveBeans) { return model().callCommand(commandClass, waveBean, waveBeans); }
[ "protected", "Wave", "callCommand", "(", "final", "Class", "<", "?", "extends", "CommandBean", "<", "?", "extends", "WaveBean", ">", ">", "commandClass", ",", "final", "WaveBean", "waveBean", ",", "final", "WaveBean", "...", "waveBeans", ")", "{", "return", ...
Redirect to {@link Model#callCommand(Class, WaveBean)}. @param commandClass the command class to call @param waveBean the WaveBean that holds all required data @param waveBeans the extra Wave Beans that holds all other required data @param <WB> the type of the wave bean to used @return the wave created and sent to J...
[ "Redirect", "to", "{", "@link", "Model#callCommand", "(", "Class", "WaveBean", ")", "}", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractController.java#L283-L285
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java
DiscordApiImpl.forEachCachedMessageWhere
public void forEachCachedMessageWhere(Predicate<Message> filter, Consumer<Message> action) { """ Execute a task for every message in cache that satisfied a given condition. @param filter The condition on which to execute the code. @param action The action to be applied to the messages. """ synchron...
java
public void forEachCachedMessageWhere(Predicate<Message> filter, Consumer<Message> action) { synchronized (messages) { messages.values().stream() .map(Reference::get) .filter(Objects::nonNull) .filter(filter) .forEach(ac...
[ "public", "void", "forEachCachedMessageWhere", "(", "Predicate", "<", "Message", ">", "filter", ",", "Consumer", "<", "Message", ">", "action", ")", "{", "synchronized", "(", "messages", ")", "{", "messages", ".", "values", "(", ")", ".", "stream", "(", ")...
Execute a task for every message in cache that satisfied a given condition. @param filter The condition on which to execute the code. @param action The action to be applied to the messages.
[ "Execute", "a", "task", "for", "every", "message", "in", "cache", "that", "satisfied", "a", "given", "condition", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java#L1409-L1417
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.chunkedUploadCommon
private <E extends Throwable> HttpRequestor.Response chunkedUploadCommon(String[] params, long chunkSize, DbxStreamWriter<E> writer) throws DbxException, E { """ Internal function called by both chunkedUploadFirst and chunkedUploadAppend. """ String apiPath = "1/chunked_upload"; ArrayL...
java
private <E extends Throwable> HttpRequestor.Response chunkedUploadCommon(String[] params, long chunkSize, DbxStreamWriter<E> writer) throws DbxException, E { String apiPath = "1/chunked_upload"; ArrayList<HttpRequestor.Header> headers = new ArrayList<HttpRequestor.Header>(); headers...
[ "private", "<", "E", "extends", "Throwable", ">", "HttpRequestor", ".", "Response", "chunkedUploadCommon", "(", "String", "[", "]", "params", ",", "long", "chunkSize", ",", "DbxStreamWriter", "<", "E", ">", "writer", ")", "throws", "DbxException", ",", "E", ...
Internal function called by both chunkedUploadFirst and chunkedUploadAppend.
[ "Internal", "function", "called", "by", "both", "chunkedUploadFirst", "and", "chunkedUploadAppend", "." ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L930-L968
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/InvalidationAuditDaemon.java
InvalidationAuditDaemon.filterEntry
public CacheEntry filterEntry(String cacheName, CacheEntry cacheEntry) { """ This ensures the specified CacheEntrys have not been invalidated. @param cacheEntry The unfiltered CacheEntry. @return The filtered CacheEntry. """ InvalidationTableList invalidationTableList = getInvalidationTableList(cacheN...
java
public CacheEntry filterEntry(String cacheName, CacheEntry cacheEntry) { InvalidationTableList invalidationTableList = getInvalidationTableList(cacheName); try { invalidationTableList.readWriteLock.readLock().lock(); return internalFilterEntry(cacheName, invalidationTableList, cacheEntry); } finally { ...
[ "public", "CacheEntry", "filterEntry", "(", "String", "cacheName", ",", "CacheEntry", "cacheEntry", ")", "{", "InvalidationTableList", "invalidationTableList", "=", "getInvalidationTableList", "(", "cacheName", ")", ";", "try", "{", "invalidationTableList", ".", "readWr...
This ensures the specified CacheEntrys have not been invalidated. @param cacheEntry The unfiltered CacheEntry. @return The filtered CacheEntry.
[ "This", "ensures", "the", "specified", "CacheEntrys", "have", "not", "been", "invalidated", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/InvalidationAuditDaemon.java#L153-L162
foundation-runtime/logging
logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationLogger.java
FoundationLogger.forcedLog
protected void forcedLog(Marker marker, String fqcn, Priority level, Object message, Throwable t) { """ This method creates a new logging event and logs the event without further checks. """ callAppenders(new FoundationLof4jLoggingEvent(marker, fqcn, this, level, message, t)); }
java
protected void forcedLog(Marker marker, String fqcn, Priority level, Object message, Throwable t) { callAppenders(new FoundationLof4jLoggingEvent(marker, fqcn, this, level, message, t)); }
[ "protected", "void", "forcedLog", "(", "Marker", "marker", ",", "String", "fqcn", ",", "Priority", "level", ",", "Object", "message", ",", "Throwable", "t", ")", "{", "callAppenders", "(", "new", "FoundationLof4jLoggingEvent", "(", "marker", ",", "fqcn", ",", ...
This method creates a new logging event and logs the event without further checks.
[ "This", "method", "creates", "a", "new", "logging", "event", "and", "logs", "the", "event", "without", "further", "checks", "." ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-log4j/src/main/java/com/cisco/oss/foundation/logging/FoundationLogger.java#L1200-L1202
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedStorageAccount
public DeletedStorageBundle getDeletedStorageAccount(String vaultBaseUrl, String storageAccountName) { """ Gets the specified deleted storage account. The Get Deleted Storage Account operation returns the specified deleted storage account along with its attributes. This operation requires the storage/get permissi...
java
public DeletedStorageBundle getDeletedStorageAccount(String vaultBaseUrl, String storageAccountName) { return getDeletedStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName).toBlocking().single().body(); }
[ "public", "DeletedStorageBundle", "getDeletedStorageAccount", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ")", "{", "return", "getDeletedStorageAccountWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "storageAccountName", ")", ".", "toBlocking", "(...
Gets the specified deleted storage account. The Get Deleted Storage Account operation returns the specified deleted storage account along with its attributes. This operation requires the storage/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName T...
[ "Gets", "the", "specified", "deleted", "storage", "account", ".", "The", "Get", "Deleted", "Storage", "Account", "operation", "returns", "the", "specified", "deleted", "storage", "account", "along", "with", "its", "attributes", ".", "This", "operation", "requires"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L9257-L9259
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java
Serializer.registerAbstract
public Serializer registerAbstract(Class<?> abstractType, TypeSerializerFactory factory) { """ Registers an abstract type serializer for the given abstract type. <p> Abstract serializers allow abstract types to be serialized without explicitly registering a concrete type. The concept of abstract serializers dif...
java
public Serializer registerAbstract(Class<?> abstractType, TypeSerializerFactory factory) { registry.registerAbstract(abstractType, factory); return this; }
[ "public", "Serializer", "registerAbstract", "(", "Class", "<", "?", ">", "abstractType", ",", "TypeSerializerFactory", "factory", ")", "{", "registry", ".", "registerAbstract", "(", "abstractType", ",", "factory", ")", ";", "return", "this", ";", "}" ]
Registers an abstract type serializer for the given abstract type. <p> Abstract serializers allow abstract types to be serialized without explicitly registering a concrete type. The concept of abstract serializers differs from {@link #registerDefault(Class, TypeSerializerFactory) default serializers} in that abstract s...
[ "Registers", "an", "abstract", "type", "serializer", "for", "the", "given", "abstract", "type", ".", "<p", ">", "Abstract", "serializers", "allow", "abstract", "types", "to", "be", "serialized", "without", "explicitly", "registering", "a", "concrete", "type", "....
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java#L529-L532
aoindustries/aocode-public
src/main/java/com/aoindustries/io/FilesystemIterator.java
FilesystemIterator.getNextFiles
public int getNextFiles(final File[] files, final int batchSize) throws IOException { """ Gets the next files, up to batchSize. @return the number of files in the array, zero (0) indicates iteration has completed @throws java.io.IOException """ int c=0; while(c<batchSize) { File file=getNextFile(); ...
java
public int getNextFiles(final File[] files, final int batchSize) throws IOException { int c=0; while(c<batchSize) { File file=getNextFile(); if(file==null) break; files[c++]=file; } return c; }
[ "public", "int", "getNextFiles", "(", "final", "File", "[", "]", "files", ",", "final", "int", "batchSize", ")", "throws", "IOException", "{", "int", "c", "=", "0", ";", "while", "(", "c", "<", "batchSize", ")", "{", "File", "file", "=", "getNextFile",...
Gets the next files, up to batchSize. @return the number of files in the array, zero (0) indicates iteration has completed @throws java.io.IOException
[ "Gets", "the", "next", "files", "up", "to", "batchSize", "." ]
train
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/io/FilesystemIterator.java#L260-L268
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_dynHost_login_POST
public OvhDynHostLogin zone_zoneName_dynHost_login_POST(String zoneName, String loginSuffix, String password, String subDomain) throws IOException { """ Create a new DynHost login REST: POST /domain/zone/{zoneName}/dynHost/login @param password [required] Password of the login @param subDomain [required] Subd...
java
public OvhDynHostLogin zone_zoneName_dynHost_login_POST(String zoneName, String loginSuffix, String password, String subDomain) throws IOException { String qPath = "/domain/zone/{zoneName}/dynHost/login"; StringBuilder sb = path(qPath, zoneName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody...
[ "public", "OvhDynHostLogin", "zone_zoneName_dynHost_login_POST", "(", "String", "zoneName", ",", "String", "loginSuffix", ",", "String", "password", ",", "String", "subDomain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/dynHost/l...
Create a new DynHost login REST: POST /domain/zone/{zoneName}/dynHost/login @param password [required] Password of the login @param subDomain [required] Subdomain that the login will be allowed to update (use * to allow all) @param loginSuffix [required] Suffix that will be concatenated to the zoneName to create the l...
[ "Create", "a", "new", "DynHost", "login" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L514-L523
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.parseDefaulting
public DateTimeFormatterBuilder parseDefaulting(TemporalField field, long value) { """ Appends a default value for a field to the formatter for use in parsing. <p> This appends an instruction to the builder to inject a default value into the parsed result. This is especially useful in conjunction with optional...
java
public DateTimeFormatterBuilder parseDefaulting(TemporalField field, long value) { Jdk8Methods.requireNonNull(field, "field"); appendInternal(new DefaultingParser(field, value)); return this; }
[ "public", "DateTimeFormatterBuilder", "parseDefaulting", "(", "TemporalField", "field", ",", "long", "value", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "field", ",", "\"field\"", ")", ";", "appendInternal", "(", "new", "DefaultingParser", "(", "field", ...
Appends a default value for a field to the formatter for use in parsing. <p> This appends an instruction to the builder to inject a default value into the parsed result. This is especially useful in conjunction with optional parts of the formatter. <p> For example, consider a formatter that parses the year, followed by...
[ "Appends", "a", "default", "value", "for", "a", "field", "to", "the", "formatter", "for", "use", "in", "parsing", ".", "<p", ">", "This", "appends", "an", "instruction", "to", "the", "builder", "to", "inject", "a", "default", "value", "into", "the", "par...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L322-L326
samskivert/samskivert
src/main/java/com/samskivert/servlet/SiteResourceLoader.java
SiteResourceLoader.getBundle
protected SiteResourceBundle getBundle (int siteId) throws IOException { """ Obtains the site-specific jar file for the specified site. This should only be called when the lock for this site is held. """ // look up the site resource bundle for this site SiteResourceBundle bundle = _bun...
java
protected SiteResourceBundle getBundle (int siteId) throws IOException { // look up the site resource bundle for this site SiteResourceBundle bundle = _bundles.get(siteId); // if we haven't got one, create one if (bundle == null) { // obtain the string identifier...
[ "protected", "SiteResourceBundle", "getBundle", "(", "int", "siteId", ")", "throws", "IOException", "{", "// look up the site resource bundle for this site", "SiteResourceBundle", "bundle", "=", "_bundles", ".", "get", "(", "siteId", ")", ";", "// if we haven't got one, cre...
Obtains the site-specific jar file for the specified site. This should only be called when the lock for this site is held.
[ "Obtains", "the", "site", "-", "specific", "jar", "file", "for", "the", "specified", "site", ".", "This", "should", "only", "be", "called", "when", "the", "lock", "for", "this", "site", "is", "held", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/SiteResourceLoader.java#L200-L220
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportEncoder.java
ExportEncoder.encodeGeographyPoint
static public void encodeGeographyPoint(final FastSerializer fs, GeographyPointValue value) throws IOException { """ Encode a GEOGRAPHY_POINT according to the Export encoding specification. @param fs The serializer to serialize to @throws IOException """ final int length = GeographyPointValue....
java
static public void encodeGeographyPoint(final FastSerializer fs, GeographyPointValue value) throws IOException { final int length = GeographyPointValue.getLengthInBytes(); ByteBuffer bb = ByteBuffer.allocate(length); bb.order(ByteOrder.nativeOrder()); value.flattenToBuffer(bb); ...
[ "static", "public", "void", "encodeGeographyPoint", "(", "final", "FastSerializer", "fs", ",", "GeographyPointValue", "value", ")", "throws", "IOException", "{", "final", "int", "length", "=", "GeographyPointValue", ".", "getLengthInBytes", "(", ")", ";", "ByteBuffe...
Encode a GEOGRAPHY_POINT according to the Export encoding specification. @param fs The serializer to serialize to @throws IOException
[ "Encode", "a", "GEOGRAPHY_POINT", "according", "to", "the", "Export", "encoding", "specification", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportEncoder.java#L315-L326
RestComm/jain-slee.sip
examples/sip-wake-up/sbb/src/main/java/org/mobicents/slee/examples/wakeup/WakeUpSbb.java
WakeUpSbb.onMessageEvent
public void onMessageEvent(javax.sip.RequestEvent event, ActivityContextInterface aci) { """ Event handler for the SIP MESSAGE from the UA @param event @param aci """ final Request request = event.getRequest(); try { // message body should be *FIRST_TOKEN<timer value in // seconds>MIDDLE_TOKE...
java
public void onMessageEvent(javax.sip.RequestEvent event, ActivityContextInterface aci) { final Request request = event.getRequest(); try { // message body should be *FIRST_TOKEN<timer value in // seconds>MIDDLE_TOKEN<msg to send back to UA>LAST_TOKEN* final String body = new String(request.getRawConten...
[ "public", "void", "onMessageEvent", "(", "javax", ".", "sip", ".", "RequestEvent", "event", ",", "ActivityContextInterface", "aci", ")", "{", "final", "Request", "request", "=", "event", ".", "getRequest", "(", ")", ";", "try", "{", "// message body should be *F...
Event handler for the SIP MESSAGE from the UA @param event @param aci
[ "Event", "handler", "for", "the", "SIP", "MESSAGE", "from", "the", "UA" ]
train
https://github.com/RestComm/jain-slee.sip/blob/2c173af0a760cb0ea13fe0ffa58c0f82b14731f9/examples/sip-wake-up/sbb/src/main/java/org/mobicents/slee/examples/wakeup/WakeUpSbb.java#L236-L301
legsem/legstar.avro
legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java
Cob2AvroJob.setInputKeyRecordType
public static void setInputKeyRecordType(Job job, Class<? extends CobolComplexType> cobolType) { """ Sets the job input key mainframe record type. @param job The job to configure. @param cobolType The input key mainframe record type. """ job.getConfiguration().setClass(CONF_INPUT_KEY_RECORD_TYPE, cob...
java
public static void setInputKeyRecordType(Job job, Class<? extends CobolComplexType> cobolType) { job.getConfiguration().setClass(CONF_INPUT_KEY_RECORD_TYPE, cobolType, CobolComplexType.class); }
[ "public", "static", "void", "setInputKeyRecordType", "(", "Job", "job", ",", "Class", "<", "?", "extends", "CobolComplexType", ">", "cobolType", ")", "{", "job", ".", "getConfiguration", "(", ")", ".", "setClass", "(", "CONF_INPUT_KEY_RECORD_TYPE", ",", "cobolTy...
Sets the job input key mainframe record type. @param job The job to configure. @param cobolType The input key mainframe record type.
[ "Sets", "the", "job", "input", "key", "mainframe", "record", "type", "." ]
train
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L60-L62
audit4j/audit4j-core
src/main/java/org/audit4j/core/Configuration.java
Configuration.addProperty
public void addProperty(String key, String value) { """ Adds the property. @param key the key @param value the value @since 2.2.0 """ if (null == properties) { properties = new HashMap<>(); } properties.put(key, value); }
java
public void addProperty(String key, String value) { if (null == properties) { properties = new HashMap<>(); } properties.put(key, value); }
[ "public", "void", "addProperty", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "null", "==", "properties", ")", "{", "properties", "=", "new", "HashMap", "<>", "(", ")", ";", "}", "properties", ".", "put", "(", "key", ",", "value...
Adds the property. @param key the key @param value the value @since 2.2.0
[ "Adds", "the", "property", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/Configuration.java#L212-L217
apache/reef
lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/api/VortexAggregateFuture.java
VortexAggregateFuture.failedTasklets
private void failedTasklets(final Exception exception, final List<Integer> taskletIds) throws InterruptedException { """ Create and queue result for failed Tasklets that are expected and invokes callback. """ final List<TInput> inputs = getInputs(taskletIds); final AggregateResult failure = new ...
java
private void failedTasklets(final Exception exception, final List<Integer> taskletIds) throws InterruptedException { final List<TInput> inputs = getInputs(taskletIds); final AggregateResult failure = new AggregateResult(exception, inputs); if (callbackHandler != null) { executor.execute(new Ru...
[ "private", "void", "failedTasklets", "(", "final", "Exception", "exception", ",", "final", "List", "<", "Integer", ">", "taskletIds", ")", "throws", "InterruptedException", "{", "final", "List", "<", "TInput", ">", "inputs", "=", "getInputs", "(", "taskletIds", ...
Create and queue result for failed Tasklets that are expected and invokes callback.
[ "Create", "and", "queue", "result", "for", "failed", "Tasklets", "that", "are", "expected", "and", "invokes", "callback", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-applications/reef-vortex/src/main/java/org/apache/reef/vortex/api/VortexAggregateFuture.java#L193-L209
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/tabView/TabViewRenderer.java
TabViewRenderer.drawClearDiv
private static void drawClearDiv(ResponseWriter writer, UIComponent tabView) throws IOException { """ Draw a clear div @param writer @param tabView @throws IOException """ writer.startElement("div", tabView); writer.writeAttribute("style", "clear:both;", "style"); writer.endElement("div"); }
java
private static void drawClearDiv(ResponseWriter writer, UIComponent tabView) throws IOException { writer.startElement("div", tabView); writer.writeAttribute("style", "clear:both;", "style"); writer.endElement("div"); }
[ "private", "static", "void", "drawClearDiv", "(", "ResponseWriter", "writer", ",", "UIComponent", "tabView", ")", "throws", "IOException", "{", "writer", ".", "startElement", "(", "\"div\"", ",", "tabView", ")", ";", "writer", ".", "writeAttribute", "(", "\"styl...
Draw a clear div @param writer @param tabView @throws IOException
[ "Draw", "a", "clear", "div" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/tabView/TabViewRenderer.java#L276-L280
Azure/autorest-clientruntime-for-java
azure-arm-client-runtime/src/main/java/com/microsoft/azure/arm/dag/DAGraph.java
DAGraph.merge
private void merge(Map<String, NodeT> source, Map<String, NodeT> target) { """ Copies entries in the source map to target map. @param source source map @param target target map """ for (Map.Entry<String, NodeT> entry : source.entrySet()) { String key = entry.getKey(); if (!t...
java
private void merge(Map<String, NodeT> source, Map<String, NodeT> target) { for (Map.Entry<String, NodeT> entry : source.entrySet()) { String key = entry.getKey(); if (!target.containsKey(key)) { target.put(key, entry.getValue()); } } }
[ "private", "void", "merge", "(", "Map", "<", "String", ",", "NodeT", ">", "source", ",", "Map", "<", "String", ",", "NodeT", ">", "target", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "NodeT", ">", "entry", ":", "source", ".", ...
Copies entries in the source map to target map. @param source source map @param target target map
[ "Copies", "entries", "in", "the", "source", "map", "to", "target", "map", "." ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-arm-client-runtime/src/main/java/com/microsoft/azure/arm/dag/DAGraph.java#L252-L259
lucee/Lucee
core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java
RamResourceCore.getChild
public RamResourceCore getChild(String name, boolean caseSensitive) { """ returns a child that match given name @param name @return matching child """ if (children == null) return null; RamResourceCore child; for (int i = children.size() - 1; i >= 0; i--) { child = (RamResourceCore) children.get(i...
java
public RamResourceCore getChild(String name, boolean caseSensitive) { if (children == null) return null; RamResourceCore child; for (int i = children.size() - 1; i >= 0; i--) { child = (RamResourceCore) children.get(i); if (child != null && (caseSensitive ? child.getName().equals(name) : child.getName().e...
[ "public", "RamResourceCore", "getChild", "(", "String", "name", ",", "boolean", "caseSensitive", ")", "{", "if", "(", "children", "==", "null", ")", "return", "null", ";", "RamResourceCore", "child", ";", "for", "(", "int", "i", "=", "children", ".", "size...
returns a child that match given name @param name @return matching child
[ "returns", "a", "child", "that", "match", "given", "name" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/type/ram/RamResourceCore.java#L204-L213
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/annotations/CitrusAnnotations.java
CitrusAnnotations.injectAll
public static final void injectAll(final Object target, final Citrus citrusFramework) { """ Creates new Citrus test context and injects all supported components and endpoints to target object using annotations. @param target """ injectAll(target, citrusFramework, citrusFramework.createTestContext()); ...
java
public static final void injectAll(final Object target, final Citrus citrusFramework) { injectAll(target, citrusFramework, citrusFramework.createTestContext()); }
[ "public", "static", "final", "void", "injectAll", "(", "final", "Object", "target", ",", "final", "Citrus", "citrusFramework", ")", "{", "injectAll", "(", "target", ",", "citrusFramework", ",", "citrusFramework", ".", "createTestContext", "(", ")", ")", ";", "...
Creates new Citrus test context and injects all supported components and endpoints to target object using annotations. @param target
[ "Creates", "new", "Citrus", "test", "context", "and", "injects", "all", "supported", "components", "and", "endpoints", "to", "target", "object", "using", "annotations", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/annotations/CitrusAnnotations.java#L60-L62
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java
PatternBox.modifiedPESimple
public static Pattern modifiedPESimple() { """ Pattern for an EntityReference has distinct PhysicalEntities associated with both left and right of a Conversion. @return the pattern """ Pattern p = new Pattern(EntityReference.class, "modified ER"); p.add(erToPE(), "modified ER", "first PE"); p.add(parti...
java
public static Pattern modifiedPESimple() { Pattern p = new Pattern(EntityReference.class, "modified ER"); p.add(erToPE(), "modified ER", "first PE"); p.add(participatesInConv(), "first PE", "Conversion"); p.add(new ConversionSide(ConversionSide.Type.OTHER_SIDE), "first PE", "Conversion", "second PE"); p.add(...
[ "public", "static", "Pattern", "modifiedPESimple", "(", ")", "{", "Pattern", "p", "=", "new", "Pattern", "(", "EntityReference", ".", "class", ",", "\"modified ER\"", ")", ";", "p", ".", "add", "(", "erToPE", "(", ")", ",", "\"modified ER\"", ",", "\"first...
Pattern for an EntityReference has distinct PhysicalEntities associated with both left and right of a Conversion. @return the pattern
[ "Pattern", "for", "an", "EntityReference", "has", "distinct", "PhysicalEntities", "associated", "with", "both", "left", "and", "right", "of", "a", "Conversion", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L795-L804
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Parsers.java
Parsers.sequence
public static <T> Parser<T> sequence(Parser<?> p1, Parser<T> p2) { """ A {@link Parser} that runs 2 parser objects sequentially. {@code p1} is executed, if it succeeds, {@code p2} is executed. """ return sequence(p1, p2, InternalFunctors.<Object, T>lastOfTwo()); }
java
public static <T> Parser<T> sequence(Parser<?> p1, Parser<T> p2) { return sequence(p1, p2, InternalFunctors.<Object, T>lastOfTwo()); }
[ "public", "static", "<", "T", ">", "Parser", "<", "T", ">", "sequence", "(", "Parser", "<", "?", ">", "p1", ",", "Parser", "<", "T", ">", "p2", ")", "{", "return", "sequence", "(", "p1", ",", "p2", ",", "InternalFunctors", ".", "<", "Object", ","...
A {@link Parser} that runs 2 parser objects sequentially. {@code p1} is executed, if it succeeds, {@code p2} is executed.
[ "A", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Parsers.java#L219-L221
lessthanoptimal/BoofCV
main/boofcv-io/src/main/java/boofcv/io/image/ConvertBufferedImage.java
ConvertBufferedImage.convertFromSingle
public static <T extends ImageGray<T>> T convertFromSingle(BufferedImage src, T dst, Class<T> type) { """ Converts a buffered image into an image of the specified type. In a 'dst' image is provided it will be used for output, otherwise a new image will be created. """ if (type == GrayU8.class) { return ...
java
public static <T extends ImageGray<T>> T convertFromSingle(BufferedImage src, T dst, Class<T> type) { if (type == GrayU8.class) { return (T) convertFrom(src, (GrayU8) dst); } else if( GrayI16.class.isAssignableFrom(type) ) { return (T) convertFrom(src, (GrayI16) dst,(Class)type); } else if (type == GrayF32....
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "T", "convertFromSingle", "(", "BufferedImage", "src", ",", "T", "dst", ",", "Class", "<", "T", ">", "type", ")", "{", "if", "(", "type", "==", "GrayU8", ".", "class", ")", "...
Converts a buffered image into an image of the specified type. In a 'dst' image is provided it will be used for output, otherwise a new image will be created.
[ "Converts", "a", "buffered", "image", "into", "an", "image", "of", "the", "specified", "type", ".", "In", "a", "dst", "image", "is", "provided", "it", "will", "be", "used", "for", "output", "otherwise", "a", "new", "image", "will", "be", "created", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-io/src/main/java/boofcv/io/image/ConvertBufferedImage.java#L343-L353
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/GameService.java
GameService.setClientReceivedGameMessage
public Object setClientReceivedGameMessage(long gameId, String argument) { """ Unknown? @param gameId The id of the game @param argument Unknown @return Unknown """ return client.sendRpcAndWait(SERVICE, "setClientReceivedGameMessage", gameId, argument); }
java
public Object setClientReceivedGameMessage(long gameId, String argument) { return client.sendRpcAndWait(SERVICE, "setClientReceivedGameMessage", gameId, argument); }
[ "public", "Object", "setClientReceivedGameMessage", "(", "long", "gameId", ",", "String", "argument", ")", "{", "return", "client", ".", "sendRpcAndWait", "(", "SERVICE", ",", "\"setClientReceivedGameMessage\"", ",", "gameId", ",", "argument", ")", ";", "}" ]
Unknown? @param gameId The id of the game @param argument Unknown @return Unknown
[ "Unknown?" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/GameService.java#L143-L145
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java
ConcurrentLinkedHashMap.makeRetired
void makeRetired(Node<K, V> node) { """ Atomically transitions the node from the <tt>alive</tt> state to the <tt>retired</tt> state, if a valid transition. @param node the entry in the page replacement policy """ for (;;) { final WeightedValue<V> current = node.get(); if (!c...
java
void makeRetired(Node<K, V> node) { for (;;) { final WeightedValue<V> current = node.get(); if (!current.isAlive()) { return; } final WeightedValue<V> retired = new WeightedValue<V>(current.value, -current.weight); if (node.compareAndSe...
[ "void", "makeRetired", "(", "Node", "<", "K", ",", "V", ">", "node", ")", "{", "for", "(", ";", ";", ")", "{", "final", "WeightedValue", "<", "V", ">", "current", "=", "node", ".", "get", "(", ")", ";", "if", "(", "!", "current", ".", "isAlive"...
Atomically transitions the node from the <tt>alive</tt> state to the <tt>retired</tt> state, if a valid transition. @param node the entry in the page replacement policy
[ "Atomically", "transitions", "the", "node", "from", "the", "<tt", ">", "alive<", "/", "tt", ">", "state", "to", "the", "<tt", ">", "retired<", "/", "tt", ">", "state", "if", "a", "valid", "transition", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java#L498-L509
jboss/jboss-el-api_spec
src/main/java/javax/el/ELContext.java
ELContext.setPropertyResolved
public void setPropertyResolved(Object base, Object property) { """ Called to indicate that a <code>ELResolver</code> has successfully resolved a given (base, property) pair and to notify the {@link EvaluationListener}s. <p>The {@link CompositeELResolver} checks this property to determine whether it should c...
java
public void setPropertyResolved(Object base, Object property) { setPropertyResolved(true); // Don't set the variable here, for 2.2 users // ELContext may be overridden or delegated. notifyPropertyResolved(base, property); }
[ "public", "void", "setPropertyResolved", "(", "Object", "base", ",", "Object", "property", ")", "{", "setPropertyResolved", "(", "true", ")", ";", "// Don't set the variable here, for 2.2 users", "// ELContext may be overridden or delegated.", "notifyPropertyResolved", "(", "...
Called to indicate that a <code>ELResolver</code> has successfully resolved a given (base, property) pair and to notify the {@link EvaluationListener}s. <p>The {@link CompositeELResolver} checks this property to determine whether it should consider or skip other component resolvers.</p> @see CompositeELResolver @para...
[ "Called", "to", "indicate", "that", "a", "<code", ">", "ELResolver<", "/", "code", ">", "has", "successfully", "resolved", "a", "given", "(", "base", "property", ")", "pair", "and", "to", "notify", "the", "{", "@link", "EvaluationListener", "}", "s", "." ]
train
https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L157-L161
googleapis/google-cloud-java
google-cloud-examples/src/main/java/com/google/cloud/examples/compute/v1/ComputeExample.java
ComputeExample.insertNewAddressUsingRequest
private static void insertNewAddressUsingRequest(AddressClient client, String newAddressName) throws InterruptedException, ExecutionException { """ Use an InsertAddressHttpRequest object to make an addresses.insert method call. """ // Begin samplegen code for insertAddress(). ProjectRegionName re...
java
private static void insertNewAddressUsingRequest(AddressClient client, String newAddressName) throws InterruptedException, ExecutionException { // Begin samplegen code for insertAddress(). ProjectRegionName region = ProjectRegionName.of(PROJECT_NAME, REGION); Address address = Address.newBuilder().bui...
[ "private", "static", "void", "insertNewAddressUsingRequest", "(", "AddressClient", "client", ",", "String", "newAddressName", ")", "throws", "InterruptedException", ",", "ExecutionException", "{", "// Begin samplegen code for insertAddress().", "ProjectRegionName", "region", "=...
Use an InsertAddressHttpRequest object to make an addresses.insert method call.
[ "Use", "an", "InsertAddressHttpRequest", "object", "to", "make", "an", "addresses", ".", "insert", "method", "call", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-examples/src/main/java/com/google/cloud/examples/compute/v1/ComputeExample.java#L85-L100
modelmapper/modelmapper
core/src/main/java/org/modelmapper/convention/InexactMatcher.java
InexactMatcher.matchSourcePropertyName
DestTokensMatcher matchSourcePropertyName(Tokens destTokens, int destStartIndex) { """ Returns the numbers of match counts for each {@code sourceTokens} that were matched to{@code destTokens} starting at {@code destStartIndex}. """ int[] matchedTokens = new int[sourceTokens.size()]; for (int sourceInd...
java
DestTokensMatcher matchSourcePropertyName(Tokens destTokens, int destStartIndex) { int[] matchedTokens = new int[sourceTokens.size()]; for (int sourceIndex = 0; sourceIndex < sourceTokens.size(); sourceIndex++) { Tokens srcTokens = sourceTokens.get(sourceIndex); matchedTokens[sourceIndex] = matchTok...
[ "DestTokensMatcher", "matchSourcePropertyName", "(", "Tokens", "destTokens", ",", "int", "destStartIndex", ")", "{", "int", "[", "]", "matchedTokens", "=", "new", "int", "[", "sourceTokens", ".", "size", "(", ")", "]", ";", "for", "(", "int", "sourceIndex", ...
Returns the numbers of match counts for each {@code sourceTokens} that were matched to{@code destTokens} starting at {@code destStartIndex}.
[ "Returns", "the", "numbers", "of", "match", "counts", "for", "each", "{" ]
train
https://github.com/modelmapper/modelmapper/blob/491d165ded9dc9aba7ce8b56984249e1a1363204/core/src/main/java/org/modelmapper/convention/InexactMatcher.java#L106-L113
twilio/twilio-java
src/main/java/com/twilio/rest/flexapi/v1/FlexFlowReader.java
FlexFlowReader.nextPage
@Override public Page<FlexFlow> nextPage(final Page<FlexFlow> page, final TwilioRestClient client) { """ Retrieve the next page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Next Page """ ...
java
@Override public Page<FlexFlow> nextPage(final Page<FlexFlow> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getNextPageUrl( Domains.FLEXAPI.toString(), client.getRegion() ...
[ "@", "Override", "public", "Page", "<", "FlexFlow", ">", "nextPage", "(", "final", "Page", "<", "FlexFlow", ">", "page", ",", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ".", "GET", ",", ...
Retrieve the next page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Next Page
[ "Retrieve", "the", "next", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/flexapi/v1/FlexFlowReader.java#L92-L103
app55/app55-java
src/support/java/com/googlecode/openbeans/DefaultPersistenceDelegate.java
DefaultPersistenceDelegate.mutatesTo
@Override protected boolean mutatesTo(Object o1, Object o2) { """ Determines whether one object mutates to the other object. If this <code>DefaultPersistenceDelegate</code> is constructed with one or more property names, and the class of <code>o1</code> overrides the "equals(Object)" method, then <code>o2</code>...
java
@Override protected boolean mutatesTo(Object o1, Object o2) { if (this.propertyNames.length > 0) { if (BeansUtils.declaredEquals(o1.getClass())) { return o1.equals(o2); } } return super.mutatesTo(o1, o2); }
[ "@", "Override", "protected", "boolean", "mutatesTo", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "if", "(", "this", ".", "propertyNames", ".", "length", ">", "0", ")", "{", "if", "(", "BeansUtils", ".", "declaredEquals", "(", "o1", ".", "getCl...
Determines whether one object mutates to the other object. If this <code>DefaultPersistenceDelegate</code> is constructed with one or more property names, and the class of <code>o1</code> overrides the "equals(Object)" method, then <code>o2</code> is considered to mutate to <code>o1</code> if <code>o1</code> equals to ...
[ "Determines", "whether", "one", "object", "mutates", "to", "the", "other", "object", ".", "If", "this", "<code", ">", "DefaultPersistenceDelegate<", "/", "code", ">", "is", "constructed", "with", "one", "or", "more", "property", "names", "and", "the", "class",...
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/com/googlecode/openbeans/DefaultPersistenceDelegate.java#L281-L292
simonpercic/CollectionHelper
collectionhelper/src/main/java/com/github/simonpercic/collectionhelper/CollectionHelper.java
CollectionHelper.singleIndexOf
public static <T> int singleIndexOf(Collection<T> items, Predicate<T> predicate) { """ Returns the index of the only element in a collection that matches the given predicate. Returns {#NOT_FOUND_INDEX} if no element matches the given predicate. Throws a {@link InvalidOperationException} if there is more than 1 e...
java
public static <T> int singleIndexOf(Collection<T> items, Predicate<T> predicate) { int result = NOT_FOUND_INDEX; if (!isEmpty(items)) { int index = 0; for (T item : items) { if (predicate.apply(item)) { if (result == NOT_FOUND_INDEX) { ...
[ "public", "static", "<", "T", ">", "int", "singleIndexOf", "(", "Collection", "<", "T", ">", "items", ",", "Predicate", "<", "T", ">", "predicate", ")", "{", "int", "result", "=", "NOT_FOUND_INDEX", ";", "if", "(", "!", "isEmpty", "(", "items", ")", ...
Returns the index of the only element in a collection that matches the given predicate. Returns {#NOT_FOUND_INDEX} if no element matches the given predicate. Throws a {@link InvalidOperationException} if there is more than 1 element matching the predicate. @param items source items @param predicate predicate function ...
[ "Returns", "the", "index", "of", "the", "only", "element", "in", "a", "collection", "that", "matches", "the", "given", "predicate", ".", "Returns", "{", "#NOT_FOUND_INDEX", "}", "if", "no", "element", "matches", "the", "given", "predicate", ".", "Throws", "a...
train
https://github.com/simonpercic/CollectionHelper/blob/2425390ac14f3b6c0a7b04464cf5670060f2dc54/collectionhelper/src/main/java/com/github/simonpercic/collectionhelper/CollectionHelper.java#L234-L253
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java
HadoopUtils.setGroup
public static void setGroup(FileSystem fs, Path path, String group) throws IOException { """ Set the group associated with a given path. @param fs the {@link FileSystem} instance used to perform the file operation @param path the given path @param group the group associated with the path @throws IOException ...
java
public static void setGroup(FileSystem fs, Path path, String group) throws IOException { fs.setOwner(path, fs.getFileStatus(path).getOwner(), group); }
[ "public", "static", "void", "setGroup", "(", "FileSystem", "fs", ",", "Path", "path", ",", "String", "group", ")", "throws", "IOException", "{", "fs", ".", "setOwner", "(", "path", ",", "fs", ".", "getFileStatus", "(", "path", ")", ".", "getOwner", "(", ...
Set the group associated with a given path. @param fs the {@link FileSystem} instance used to perform the file operation @param path the given path @param group the group associated with the path @throws IOException
[ "Set", "the", "group", "associated", "with", "a", "given", "path", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L779-L781
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/util/Jsr250Utils.java
Jsr250Utils.preDestroy
public static void preDestroy(Object obj, Logger log) throws Exception { """ Calls all @PreDestroy methods on the object passed in called in order from child class to super class. @param obj The instance to inspect for Annotated methods and call them. @param log @throws Exception """ List<Method> meth...
java
public static void preDestroy(Object obj, Logger log) throws Exception { List<Method> methodsToRun = getAnnotatedMethodsFromChildToParent(obj.getClass(), PreDestroy.class, log); for(Method aMethod : methodsToRun) { safeInvokeMethod(obj, aMethod, log); } }
[ "public", "static", "void", "preDestroy", "(", "Object", "obj", ",", "Logger", "log", ")", "throws", "Exception", "{", "List", "<", "Method", ">", "methodsToRun", "=", "getAnnotatedMethodsFromChildToParent", "(", "obj", ".", "getClass", "(", ")", ",", "PreDest...
Calls all @PreDestroy methods on the object passed in called in order from child class to super class. @param obj The instance to inspect for Annotated methods and call them. @param log @throws Exception
[ "Calls", "all", "@PreDestroy", "methods", "on", "the", "object", "passed", "in", "called", "in", "order", "from", "child", "class", "to", "super", "class", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/util/Jsr250Utils.java#L86-L91
wonderpush/wonderpush-android-sdk
sdk/src/main/java/com/wonderpush/sdk/WonderPushRestClient.java
WonderPushRestClient.requestForUser
protected static void requestForUser(String userId, HttpMethod method, String resource, RequestParams params, ResponseHandler responseHandler) { """ A request @param userId The userId to perform this request for @param method The HTTP method to use @param resource The resource path, starting with / @param...
java
protected static void requestForUser(String userId, HttpMethod method, String resource, RequestParams params, ResponseHandler responseHandler) { requestAuthenticated(new Request(userId, method, resource, params, responseHandler)); }
[ "protected", "static", "void", "requestForUser", "(", "String", "userId", ",", "HttpMethod", "method", ",", "String", "resource", ",", "RequestParams", "params", ",", "ResponseHandler", "responseHandler", ")", "{", "requestAuthenticated", "(", "new", "Request", "(",...
A request @param userId The userId to perform this request for @param method The HTTP method to use @param resource The resource path, starting with / @param params AsyncHttpClient request parameters @param responseHandler An AsyncHttpClient response handler
[ "A", "request" ]
train
https://github.com/wonderpush/wonderpush-android-sdk/blob/ba0a1568f705cdd6206639bfab1e5cf529084b59/sdk/src/main/java/com/wonderpush/sdk/WonderPushRestClient.java#L73-L75
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/Num.java
Num.isEqual
public boolean isEqual(Object value, boolean autoscale) { """ Scale both value to scale of number which have minimum scale. @param value @param autoscale @return """ Num numA = this; Num numB = null; if (value instanceof Num) numB = (Num) value; else numB = new Num(value); int minSc...
java
public boolean isEqual(Object value, boolean autoscale) { Num numA = this; Num numB = null; if (value instanceof Num) numB = (Num) value; else numB = new Num(value); int minScale = numA.remainderSize(); int bScale = numB.remainderSize(); if (bScale < minScale) minScale = bScale; ...
[ "public", "boolean", "isEqual", "(", "Object", "value", ",", "boolean", "autoscale", ")", "{", "Num", "numA", "=", "this", ";", "Num", "numB", "=", "null", ";", "if", "(", "value", "instanceof", "Num", ")", "numB", "=", "(", "Num", ")", "value", ";",...
Scale both value to scale of number which have minimum scale. @param value @param autoscale @return
[ "Scale", "both", "value", "to", "scale", "of", "number", "which", "have", "minimum", "scale", "." ]
train
https://github.com/d-sauer/JCalcAPI/blob/36ae1f9adfe611a6f1bd8ef87cf1dc0ec88ac035/src/main/java/org/jdice/calc/Num.java#L697-L711
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.getPendingCertificateSigningRequestAsync
public ServiceFuture<String> getPendingCertificateSigningRequestAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<String> serviceCallback) { """ Gets the pending certificate signing request response. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @p...
java
public ServiceFuture<String> getPendingCertificateSigningRequestAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<String> serviceCallback) { return ServiceFuture.fromResponse( getPendingCertificateSigningRequestWithServiceResponseAsync(vaultBaseUrl, certificate...
[ "public", "ServiceFuture", "<", "String", ">", "getPendingCertificateSigningRequestAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "final", "ServiceCallback", "<", "String", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", ...
Gets the pending certificate signing request response. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param certificateName The name of the certificate @param serviceCallback the async ServiceCallback to handle successful and failed responses. @return the {@link ServiceFuture} object
[ "Gets", "the", "pending", "certificate", "signing", "request", "response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1817-L1822