repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java
ElementPlugin.registerProperty
public void registerProperty(Object instance, String propertyName, boolean override) { if (registeredProperties == null) { registeredProperties = new HashMap<>(); } if (instance == null) { registeredProperties.remove(propertyName); } else { Object old...
java
public void registerProperty(Object instance, String propertyName, boolean override) { if (registeredProperties == null) { registeredProperties = new HashMap<>(); } if (instance == null) { registeredProperties.remove(propertyName); } else { Object old...
[ "public", "void", "registerProperty", "(", "Object", "instance", ",", "String", "propertyName", ",", "boolean", "override", ")", "{", "if", "(", "registeredProperties", "==", "null", ")", "{", "registeredProperties", "=", "new", "HashMap", "<>", "(", ")", ";",...
Registers a named property to the container. Using this, a plugin can expose a property for serialization and deserialization. @param instance The object instance holding the property accessors. If null, any existing registration will be removed. @param propertyName Name of property to register. @param override If the...
[ "Registers", "a", "named", "property", "to", "the", "container", ".", "Using", "this", "a", "plugin", "can", "expose", "a", "property", "for", "serialization", "and", "deserialization", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java#L768-L794
crawljax/crawljax
core/src/main/java/com/crawljax/util/XPathHelper.java
XPathHelper.evaluateXpathExpression
public static NodeList evaluateXpathExpression(String domStr, String xpathExpr) throws XPathExpressionException, IOException { Document dom = DomUtils.asDocument(domStr); return evaluateXpathExpression(dom, xpathExpr); }
java
public static NodeList evaluateXpathExpression(String domStr, String xpathExpr) throws XPathExpressionException, IOException { Document dom = DomUtils.asDocument(domStr); return evaluateXpathExpression(dom, xpathExpr); }
[ "public", "static", "NodeList", "evaluateXpathExpression", "(", "String", "domStr", ",", "String", "xpathExpr", ")", "throws", "XPathExpressionException", ",", "IOException", "{", "Document", "dom", "=", "DomUtils", ".", "asDocument", "(", "domStr", ")", ";", "ret...
Returns the list of nodes which match the expression xpathExpr in the String domStr. @return the list of nodes which match the query @throws XPathExpressionException @throws IOException
[ "Returns", "the", "list", "of", "nodes", "which", "match", "the", "expression", "xpathExpr", "in", "the", "String", "domStr", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/util/XPathHelper.java#L112-L116
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLConnection.java
URLConnection.skipForward
static private long skipForward(InputStream is, long toSkip) throws IOException { long eachSkip = 0; long skipped = 0; while (skipped != toSkip) { eachSkip = is.skip(toSkip - skipped); // check if EOF is reached if (eachSkip <= 0) { ...
java
static private long skipForward(InputStream is, long toSkip) throws IOException { long eachSkip = 0; long skipped = 0; while (skipped != toSkip) { eachSkip = is.skip(toSkip - skipped); // check if EOF is reached if (eachSkip <= 0) { ...
[ "static", "private", "long", "skipForward", "(", "InputStream", "is", ",", "long", "toSkip", ")", "throws", "IOException", "{", "long", "eachSkip", "=", "0", ";", "long", "skipped", "=", "0", ";", "while", "(", "skipped", "!=", "toSkip", ")", "{", "eachS...
Skips through the specified number of bytes from the stream until either EOF is reached, or the specified number of bytes have been skipped
[ "Skips", "through", "the", "specified", "number", "of", "bytes", "from", "the", "stream", "until", "either", "EOF", "is", "reached", "or", "the", "specified", "number", "of", "bytes", "have", "been", "skipped" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLConnection.java#L1759-L1779
joniles/mpxj
src/main/java/net/sf/mpxj/turboproject/PEPUtility.java
PEPUtility.getFinishDate
public static final Date getFinishDate(byte[] data, int offset) { Date result; long days = getShort(data, offset); if (days == 0x8000) { result = null; } else { result = DateHelper.getDateFromLong(EPOCH + ((days - 1) * DateHelper.MS_PER_DAY)); } ...
java
public static final Date getFinishDate(byte[] data, int offset) { Date result; long days = getShort(data, offset); if (days == 0x8000) { result = null; } else { result = DateHelper.getDateFromLong(EPOCH + ((days - 1) * DateHelper.MS_PER_DAY)); } ...
[ "public", "static", "final", "Date", "getFinishDate", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "{", "Date", "result", ";", "long", "days", "=", "getShort", "(", "data", ",", "offset", ")", ";", "if", "(", "days", "==", "0x8000", ")",...
Retrieve a finish date. @param data byte array @param offset offset into byte array @return finish date
[ "Retrieve", "a", "finish", "date", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/PEPUtility.java#L144-L159
EsotericSoftware/reflectasm
src/com/esotericsoftware/reflectasm/MethodAccess.java
MethodAccess.getIndex
public int getIndex (String methodName, Class... paramTypes) { for (int i = 0, n = methodNames.length; i < n; i++) if (methodNames[i].equals(methodName) && Arrays.equals(paramTypes, parameterTypes[i])) return i; throw new IllegalArgumentException("Unable to find non-private method: " + methodName + " " + Arra...
java
public int getIndex (String methodName, Class... paramTypes) { for (int i = 0, n = methodNames.length; i < n; i++) if (methodNames[i].equals(methodName) && Arrays.equals(paramTypes, parameterTypes[i])) return i; throw new IllegalArgumentException("Unable to find non-private method: " + methodName + " " + Arra...
[ "public", "int", "getIndex", "(", "String", "methodName", ",", "Class", "...", "paramTypes", ")", "{", "for", "(", "int", "i", "=", "0", ",", "n", "=", "methodNames", ".", "length", ";", "i", "<", "n", ";", "i", "++", ")", "if", "(", "methodNames",...
Returns the index of the first method with the specified name and param types.
[ "Returns", "the", "index", "of", "the", "first", "method", "with", "the", "specified", "name", "and", "param", "types", "." ]
train
https://github.com/EsotericSoftware/reflectasm/blob/c86a421c5bec16fd82a22a39b85910568d3c7bf4/src/com/esotericsoftware/reflectasm/MethodAccess.java#L55-L59
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.invokeMethod
public static Object invokeMethod(Object object, String method, Object arguments) { return InvokerHelper.invokeMethod(object, method, arguments); }
java
public static Object invokeMethod(Object object, String method, Object arguments) { return InvokerHelper.invokeMethod(object, method, arguments); }
[ "public", "static", "Object", "invokeMethod", "(", "Object", "object", ",", "String", "method", ",", "Object", "arguments", ")", "{", "return", "InvokerHelper", ".", "invokeMethod", "(", "object", ",", "method", ",", "arguments", ")", ";", "}" ]
Provide a dynamic method invocation method which can be overloaded in classes to implement dynamic proxies easily. @param object any Object @param method the name of the method to call @param arguments the arguments to use @return the result of the method call @since 1.0
[ "Provide", "a", "dynamic", "method", "invocation", "method", "which", "can", "be", "overloaded", "in", "classes", "to", "implement", "dynamic", "proxies", "easily", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L1088-L1090
m-m-m/util
pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java
AbstractPojoPathNavigator.convertList
@SuppressWarnings({ "unchecked", "rawtypes" }) protected Object convertList(CachingPojoPath currentPath, PojoPathContext context, PojoPathState state, Object arrayOrCollection) { Object arrayOrList = arrayOrCollection; if (arrayOrCollection instanceof Collection) { if (!(arrayOrCollection instanceof Li...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) protected Object convertList(CachingPojoPath currentPath, PojoPathContext context, PojoPathState state, Object arrayOrCollection) { Object arrayOrList = arrayOrCollection; if (arrayOrCollection instanceof Collection) { if (!(arrayOrCollection instanceof Li...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "protected", "Object", "convertList", "(", "CachingPojoPath", "currentPath", ",", "PojoPathContext", "context", ",", "PojoPathState", "state", ",", "Object", "arrayOrCollection", ")", ...
This method converts the given {@code arrayOrCollection} to a {@link List} as necessary. @param currentPath is the current {@link CachingPojoPath} that lead to {@code arrayOrCollection}. @param context is the {@link PojoPathContext context} for this operation. @param state is the {@link #createState(Object, String, Po...
[ "This", "method", "converts", "the", "given", "{", "@code", "arrayOrCollection", "}", "to", "a", "{", "@link", "List", "}", "as", "necessary", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java#L846-L869
ehcache/ehcache3
transactions/src/main/java/org/ehcache/transactions/xa/txmgr/btm/BitronixXAResourceRegistry.java
BitronixXAResourceRegistry.registerXAResource
@Override public void registerXAResource(String uniqueName, XAResource xaResource) { Ehcache3XAResourceProducer xaResourceProducer = producers.get(uniqueName); if (xaResourceProducer == null) { xaResourceProducer = new Ehcache3XAResourceProducer(); xaResourceProducer.setUniqueName(uniqueName); ...
java
@Override public void registerXAResource(String uniqueName, XAResource xaResource) { Ehcache3XAResourceProducer xaResourceProducer = producers.get(uniqueName); if (xaResourceProducer == null) { xaResourceProducer = new Ehcache3XAResourceProducer(); xaResourceProducer.setUniqueName(uniqueName); ...
[ "@", "Override", "public", "void", "registerXAResource", "(", "String", "uniqueName", ",", "XAResource", "xaResource", ")", "{", "Ehcache3XAResourceProducer", "xaResourceProducer", "=", "producers", ".", "get", "(", "uniqueName", ")", ";", "if", "(", "xaResourceProd...
Register an XAResource of a cache with BTM. The first time a XAResource is registered a new EhCacheXAResourceProducer is created to hold it. @param uniqueName the uniqueName of this XAResourceProducer, usually the cache's name @param xaResource the XAResource to be registered
[ "Register", "an", "XAResource", "of", "a", "cache", "with", "BTM", ".", "The", "first", "time", "a", "XAResource", "is", "registered", "a", "new", "EhCacheXAResourceProducer", "is", "created", "to", "hold", "it", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/transactions/src/main/java/org/ehcache/transactions/xa/txmgr/btm/BitronixXAResourceRegistry.java#L40-L59
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseResult.java
PutIntegrationResponseResult.withResponseTemplates
public PutIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
java
public PutIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
[ "public", "PutIntegrationResponseResult", "withResponseTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseTemplates", ")", "{", "setResponseTemplates", "(", "responseTemplates", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the templates used to transform the integration response body. Response templates are represented as a key/value map, with a content-type as the key and a template as the value. </p> @param responseTemplates Specifies the templates used to transform the integration response body. Response templates are r...
[ "<p", ">", "Specifies", "the", "templates", "used", "to", "transform", "the", "integration", "response", "body", ".", "Response", "templates", "are", "represented", "as", "a", "key", "/", "value", "map", "with", "a", "content", "-", "type", "as", "the", "k...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutIntegrationResponseResult.java#L351-L354
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java
Related.asTargetWith
public static Related asTargetWith(CanonicalPath entityPath, String relationship) { return new Related(entityPath, relationship, EntityRole.TARGET); }
java
public static Related asTargetWith(CanonicalPath entityPath, String relationship) { return new Related(entityPath, relationship, EntityRole.TARGET); }
[ "public", "static", "Related", "asTargetWith", "(", "CanonicalPath", "entityPath", ",", "String", "relationship", ")", "{", "return", "new", "Related", "(", "entityPath", ",", "relationship", ",", "EntityRole", ".", "TARGET", ")", ";", "}" ]
Specifies a filter for entities that are targets of a relationship with the specified entity. @param entityPath the entity that is the source of the relationship @param relationship the name of the relationship @return a new "related" filter instance
[ "Specifies", "a", "filter", "for", "entities", "that", "are", "targets", "of", "a", "relationship", "with", "the", "specified", "entity", "." ]
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java#L100-L102
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getLastToken
@Nullable public static String getLastToken (@Nullable final String sStr, @Nullable final String sSearch) { if (StringHelper.hasNoText (sSearch)) return sStr; final int nIndex = getLastIndexOf (sStr, sSearch); return nIndex == StringHelper.STRING_NOT_FOUND ? sStr : sStr.substring (nIndex + getLeng...
java
@Nullable public static String getLastToken (@Nullable final String sStr, @Nullable final String sSearch) { if (StringHelper.hasNoText (sSearch)) return sStr; final int nIndex = getLastIndexOf (sStr, sSearch); return nIndex == StringHelper.STRING_NOT_FOUND ? sStr : sStr.substring (nIndex + getLeng...
[ "@", "Nullable", "public", "static", "String", "getLastToken", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nullable", "final", "String", "sSearch", ")", "{", "if", "(", "StringHelper", ".", "hasNoText", "(", "sSearch", ")", ")", "return", "...
Get the last token from (and excluding) the separating string. @param sStr The string to search. May be <code>null</code>. @param sSearch The search string. May be <code>null</code>. @return The passed string if no such separator token was found.
[ "Get", "the", "last", "token", "from", "(", "and", "excluding", ")", "the", "separating", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L5154-L5161
nantesnlp/uima-tokens-regex
src/main/java/fr/univnantes/lina/uima/tkregex/model/automata/AutomatonInstance.java
AutomatonInstance.doClone
public AutomatonInstance doClone() { AutomatonInstance clone = new AutomatonInstance(this.automatonEng, this.current, this.instanceId, this.safeGuard); clone.failed = this.failed; clone.transitionCount = this.transitionCount; clone.failCount = this.failCount; clone.iterateCount = this.iterateCount; clone.ba...
java
public AutomatonInstance doClone() { AutomatonInstance clone = new AutomatonInstance(this.automatonEng, this.current, this.instanceId, this.safeGuard); clone.failed = this.failed; clone.transitionCount = this.transitionCount; clone.failCount = this.failCount; clone.iterateCount = this.iterateCount; clone.ba...
[ "public", "AutomatonInstance", "doClone", "(", ")", "{", "AutomatonInstance", "clone", "=", "new", "AutomatonInstance", "(", "this", ".", "automatonEng", ",", "this", ".", "current", ",", "this", ".", "instanceId", ",", "this", ".", "safeGuard", ")", ";", "c...
Creates a clone of the current automatonEng instance for iteration alternative purposes. @return
[ "Creates", "a", "clone", "of", "the", "current", "automatonEng", "instance", "for", "iteration", "alternative", "purposes", "." ]
train
https://github.com/nantesnlp/uima-tokens-regex/blob/15c97c09007af9c33c7bddf8e74d5829d04623e2/src/main/java/fr/univnantes/lina/uima/tkregex/model/automata/AutomatonInstance.java#L74-L86
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/MultipleAlignmentJmolDisplay.java
MultipleAlignmentJmolDisplay.showMultipleAligmentPanel
public static void showMultipleAligmentPanel(MultipleAlignment multAln, AbstractAlignmentJmol jmol) throws StructureException { MultipleAligPanel me = new MultipleAligPanel(multAln, jmol); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setTitle(jmol.getTitle());...
java
public static void showMultipleAligmentPanel(MultipleAlignment multAln, AbstractAlignmentJmol jmol) throws StructureException { MultipleAligPanel me = new MultipleAligPanel(multAln, jmol); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setTitle(jmol.getTitle());...
[ "public", "static", "void", "showMultipleAligmentPanel", "(", "MultipleAlignment", "multAln", ",", "AbstractAlignmentJmol", "jmol", ")", "throws", "StructureException", "{", "MultipleAligPanel", "me", "=", "new", "MultipleAligPanel", "(", "multAln", ",", "jmol", ")", ...
Creates a new Frame with the MultipleAlignment Sequence Panel. The panel can communicate with the Jmol 3D visualization by selecting the aligned residues of every structure. @param multAln @param jmol @throws StructureException
[ "Creates", "a", "new", "Frame", "with", "the", "MultipleAlignment", "Sequence", "Panel", ".", "The", "panel", "can", "communicate", "with", "the", "Jmol", "3D", "visualization", "by", "selecting", "the", "aligned", "residues", "of", "every", "structure", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/MultipleAlignmentJmolDisplay.java#L105-L137
sculptor/sculptor
sculptor-framework/sculptor-framework-main/src/main/java/org/sculptor/framework/accessimpl/jpa/JpaHelper.java
JpaHelper.findField
public static Field findField(Class<?> clazz, String name) { Class<?> entityClass = clazz; while (!Object.class.equals(entityClass) && entityClass != null) { Field[] fields = entityClass.getDeclaredFields(); for (Field field : fields) { if (name.equals(field....
java
public static Field findField(Class<?> clazz, String name) { Class<?> entityClass = clazz; while (!Object.class.equals(entityClass) && entityClass != null) { Field[] fields = entityClass.getDeclaredFields(); for (Field field : fields) { if (name.equals(field....
[ "public", "static", "Field", "findField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "name", ")", "{", "Class", "<", "?", ">", "entityClass", "=", "clazz", ";", "while", "(", "!", "Object", ".", "class", ".", "equals", "(", "entityClass", "...
tries to find a field by a field name @param clazz type @param name name of the field @return
[ "tries", "to", "find", "a", "field", "by", "a", "field", "name" ]
train
https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-framework/sculptor-framework-main/src/main/java/org/sculptor/framework/accessimpl/jpa/JpaHelper.java#L114-L126
Netflix/conductor
core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java
ServiceUtils.checkNotNullOrEmpty
public static void checkNotNullOrEmpty(Map<?, ?> map, String errorMessage) { if(map == null || map.isEmpty()) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
java
public static void checkNotNullOrEmpty(Map<?, ?> map, String errorMessage) { if(map == null || map.isEmpty()) { throw new ApplicationException(ApplicationException.Code.INVALID_INPUT, errorMessage); } }
[ "public", "static", "void", "checkNotNullOrEmpty", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "String", "errorMessage", ")", "{", "if", "(", "map", "==", "null", "||", "map", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "ApplicationExcepti...
This method checks if the input map is valid or not. @param map input of type {@link Map} @param errorMessage The exception message use if the map is empty or null @throws com.netflix.conductor.core.execution.ApplicationException if input map is not valid
[ "This", "method", "checks", "if", "the", "input", "map", "is", "valid", "or", "not", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/service/utils/ServiceUtils.java#L75-L79
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java
CommerceNotificationQueueEntryPersistenceImpl.findByLtS
@Override public List<CommerceNotificationQueueEntry> findByLtS(Date sentDate, int start, int end, OrderByComparator<CommerceNotificationQueueEntry> orderByComparator) { return findByLtS(sentDate, start, end, orderByComparator, true); }
java
@Override public List<CommerceNotificationQueueEntry> findByLtS(Date sentDate, int start, int end, OrderByComparator<CommerceNotificationQueueEntry> orderByComparator) { return findByLtS(sentDate, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationQueueEntry", ">", "findByLtS", "(", "Date", "sentDate", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommerceNotificationQueueEntry", ">", "orderByComparator", ")", "{", "return"...
Returns an ordered range of all the commerce notification queue entries where sentDate &lt; &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers t...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "notification", "queue", "entries", "where", "sentDate", "&lt", ";", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java#L1722-L1727
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryInterestPointAlgs.java
FactoryInterestPointAlgs.harrisLaplace
public static <T extends ImageGray<T>, D extends ImageGray<D>> FeatureLaplacePyramid<T, D> harrisLaplace(int extractRadius, float detectThreshold, int maxFeatures, Class<T> imageType, Class<D> derivType) { GradientCornerIntensity<D> harris = FactoryIntensityPointAl...
java
public static <T extends ImageGray<T>, D extends ImageGray<D>> FeatureLaplacePyramid<T, D> harrisLaplace(int extractRadius, float detectThreshold, int maxFeatures, Class<T> imageType, Class<D> derivType) { GradientCornerIntensity<D> harris = FactoryIntensityPointAl...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "FeatureLaplacePyramid", "<", "T", ",", "D", ">", "harrisLaplace", "(", "int", "extractRadius", ",", "float", "detectThreshold", ",",...
Creates a {@link FeatureLaplacePyramid} which is uses the Harris corner detector. @param extractRadius Size of the feature used to detect the corners. @param detectThreshold Minimum corner intensity required @param maxFeatures Max number of features that can be found. @param imageType Type of input image. ...
[ "Creates", "a", "{", "@link", "FeatureLaplacePyramid", "}", "which", "is", "uses", "the", "Harris", "corner", "detector", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryInterestPointAlgs.java#L144-L161
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ListApi.java
ListApi.getNullableString
public static String getNullableString(final List list, final Integer... path) { return getNullable(list, String.class, path); }
java
public static String getNullableString(final List list, final Integer... path) { return getNullable(list, String.class, path); }
[ "public", "static", "String", "getNullableString", "(", "final", "List", "list", ",", "final", "Integer", "...", "path", ")", "{", "return", "getNullable", "(", "list", ",", "String", ".", "class", ",", "path", ")", ";", "}" ]
Get string value by path. @param list subject @param path nodes to walk in map @return value
[ "Get", "string", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ListApi.java#L160-L162
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.beginCreateOrUpdate
public VirtualNetworkInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).toBlocking().single().body(); }
java
public VirtualNetworkInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).toBlocking().single().body(); }
[ "public", "VirtualNetworkInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "VirtualNetworkInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualN...
Creates or updates a virtual network in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param parameters Parameters supplied to the create or update virtual network operation @throws IllegalArgumentException thrown if pa...
[ "Creates", "or", "updates", "a", "virtual", "network", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L531-L533
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.purgeDeletedSecret
public void purgeDeletedSecret(String vaultBaseUrl, String secretName) { purgeDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName).toBlocking().single().body(); }
java
public void purgeDeletedSecret(String vaultBaseUrl, String secretName) { purgeDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName).toBlocking().single().body(); }
[ "public", "void", "purgeDeletedSecret", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ")", "{", "purgeDeletedSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "bod...
Permanently deletes the specified secret. The purge deleted secret operation removes the secret permanently, without the possibility of recovery. This operation can only be enabled on a soft-delete enabled vault. This operation requires the secrets/purge permission. @param vaultBaseUrl The vault name, for example http...
[ "Permanently", "deletes", "the", "specified", "secret", ".", "The", "purge", "deleted", "secret", "operation", "removes", "the", "secret", "permanently", "without", "the", "possibility", "of", "recovery", ".", "This", "operation", "can", "only", "be", "enabled", ...
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#L4730-L4732
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/GeometryDeserializer.java
GeometryDeserializer.asMultiLineString
private MultiLineString asMultiLineString(List<List<List>> coords, CrsId crsId) throws IOException { if (coords == null || coords.isEmpty()) { throw new IOException("A multilinestring requires at least one line string"); } LineString[] lineStrings = new LineString[coords.size()]; ...
java
private MultiLineString asMultiLineString(List<List<List>> coords, CrsId crsId) throws IOException { if (coords == null || coords.isEmpty()) { throw new IOException("A multilinestring requires at least one line string"); } LineString[] lineStrings = new LineString[coords.size()]; ...
[ "private", "MultiLineString", "asMultiLineString", "(", "List", "<", "List", "<", "List", ">", ">", "coords", ",", "CrsId", "crsId", ")", "throws", "IOException", "{", "if", "(", "coords", "==", "null", "||", "coords", ".", "isEmpty", "(", ")", ")", "{",...
Parses the JSON as a MultiLineString geometry @param coords the coordinates of a multlinestring (which is a list of coordinates of linestrings) @param crsId @return an instance of multilinestring @throws IOException if the given json does not correspond to a multilinestring or can be parsed as such
[ "Parses", "the", "JSON", "as", "a", "MultiLineString", "geometry" ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/GeometryDeserializer.java#L236-L245
threerings/nenya
core/src/main/java/com/threerings/cast/CharacterComponent.java
CharacterComponent.getFrames
public ActionFrames getFrames (String action, String type) { return _frameProvider.getFrames(this, action, type); }
java
public ActionFrames getFrames (String action, String type) { return _frameProvider.getFrames(this, action, type); }
[ "public", "ActionFrames", "getFrames", "(", "String", "action", ",", "String", "type", ")", "{", "return", "_frameProvider", ".", "getFrames", "(", "this", ",", "action", ",", "type", ")", ";", "}" ]
Returns the image frames for the specified action animation or null if no animation for the specified action is available for this component. @param type null for the normal action frames or one of the custom action sub-types: {@link StandardActions#SHADOW_TYPE}, etc.
[ "Returns", "the", "image", "frames", "for", "the", "specified", "action", "animation", "or", "null", "if", "no", "animation", "for", "the", "specified", "action", "is", "available", "for", "this", "component", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/cast/CharacterComponent.java#L74-L77
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
AuthenticationAPIClient.getProfileAfter
public ProfileRequest getProfileAfter(@NonNull AuthenticationRequest authenticationRequest) { final ParameterizableRequest<UserProfile, AuthenticationException> profileRequest = profileRequest(); return new ProfileRequest(authenticationRequest, profileRequest); }
java
public ProfileRequest getProfileAfter(@NonNull AuthenticationRequest authenticationRequest) { final ParameterizableRequest<UserProfile, AuthenticationException> profileRequest = profileRequest(); return new ProfileRequest(authenticationRequest, profileRequest); }
[ "public", "ProfileRequest", "getProfileAfter", "(", "@", "NonNull", "AuthenticationRequest", "authenticationRequest", ")", "{", "final", "ParameterizableRequest", "<", "UserProfile", ",", "AuthenticationException", ">", "profileRequest", "=", "profileRequest", "(", ")", "...
Fetch the user's profile after it's authenticated by a login request. If the login request fails, the returned request will fail @param authenticationRequest that will authenticate a user with Auth0 and return a {@link Credentials} @return a {@link ProfileRequest} that first logins and the fetches the profile
[ "Fetch", "the", "user", "s", "profile", "after", "it", "s", "authenticated", "by", "a", "login", "request", ".", "If", "the", "login", "request", "fails", "the", "returned", "request", "will", "fail" ]
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java#L1027-L1030
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.putUnauthorizedRedirectUrlIntoFlowScope
public static void putUnauthorizedRedirectUrlIntoFlowScope(final RequestContext context, final URI url) { context.getFlowScope().put(PARAMETER_UNAUTHORIZED_REDIRECT_URL, url); }
java
public static void putUnauthorizedRedirectUrlIntoFlowScope(final RequestContext context, final URI url) { context.getFlowScope().put(PARAMETER_UNAUTHORIZED_REDIRECT_URL, url); }
[ "public", "static", "void", "putUnauthorizedRedirectUrlIntoFlowScope", "(", "final", "RequestContext", "context", ",", "final", "URI", "url", ")", "{", "context", ".", "getFlowScope", "(", ")", ".", "put", "(", "PARAMETER_UNAUTHORIZED_REDIRECT_URL", ",", "url", ")",...
Adds the unauthorized redirect url to the flow scope. @param context the request context @param url the uri to redirect the flow
[ "Adds", "the", "unauthorized", "redirect", "url", "to", "the", "flow", "scope", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L249-L251
Red5/red5-io
src/main/java/org/red5/io/matroska/parser/TagCrawler.java
TagCrawler.addHandler
public TagCrawler addHandler(String name, TagHandler handler) { handlers.put(name, handler); return this; }
java
public TagCrawler addHandler(String name, TagHandler handler) { handlers.put(name, handler); return this; }
[ "public", "TagCrawler", "addHandler", "(", "String", "name", ",", "TagHandler", "handler", ")", "{", "handlers", ".", "put", "(", "name", ",", "handler", ")", ";", "return", "this", ";", "}" ]
Method to add {@link TagHandler} @param name - unique name of tag handler @param handler - handler @return - this for chaining
[ "Method", "to", "add", "{", "@link", "TagHandler", "}" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/matroska/parser/TagCrawler.java#L60-L63
igniterealtime/Smack
smack-java7/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java
XmppHostnameVerifier.matchWildCards
private static boolean matchWildCards(String name, String template) { int wildcardIndex = template.indexOf("*"); if (wildcardIndex == -1) { return name.equals(template); } boolean isBeginning = true; String beforeWildcard; String afterWildcard = template; ...
java
private static boolean matchWildCards(String name, String template) { int wildcardIndex = template.indexOf("*"); if (wildcardIndex == -1) { return name.equals(template); } boolean isBeginning = true; String beforeWildcard; String afterWildcard = template; ...
[ "private", "static", "boolean", "matchWildCards", "(", "String", "name", ",", "String", "template", ")", "{", "int", "wildcardIndex", "=", "template", ".", "indexOf", "(", "\"*\"", ")", ";", "if", "(", "wildcardIndex", "==", "-", "1", ")", "{", "return", ...
Returns true if the name matches against the template that may contain the wildcard char '*'. @param name @param template @return true if <code>name</code> matches <code>template</code>.
[ "Returns", "true", "if", "the", "name", "matches", "against", "the", "template", "that", "may", "contain", "the", "wildcard", "char", "*", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-java7/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java#L210-L234
google/closure-templates
java/src/com/google/template/soy/soytree/TagName.java
TagName.checkOpenTagClosesOptional
public static boolean checkOpenTagClosesOptional(TagName openTag, TagName optionalOpenTag) { checkArgument(optionalOpenTag.isDefinitelyOptional(), "Open tag is not optional."); if (!(openTag.isStatic() && optionalOpenTag.isStatic())) { return false; } String optionalTagName = optionalOpenTag.getSt...
java
public static boolean checkOpenTagClosesOptional(TagName openTag, TagName optionalOpenTag) { checkArgument(optionalOpenTag.isDefinitelyOptional(), "Open tag is not optional."); if (!(openTag.isStatic() && optionalOpenTag.isStatic())) { return false; } String optionalTagName = optionalOpenTag.getSt...
[ "public", "static", "boolean", "checkOpenTagClosesOptional", "(", "TagName", "openTag", ",", "TagName", "optionalOpenTag", ")", "{", "checkArgument", "(", "optionalOpenTag", ".", "isDefinitelyOptional", "(", ")", ",", "\"Open tag is not optional.\"", ")", ";", "if", "...
Checks if the given open tag can implicitly close the given optional tag. <p>This implements the content model described in https://www.w3.org/TR/html5/syntax.html#optional-tags. <p><b>Note:</b>If {@code this} is a dynamic tag, then this test alsways returns {@code false} because the tag name can't be determined at p...
[ "Checks", "if", "the", "given", "open", "tag", "can", "implicitly", "close", "the", "given", "optional", "tag", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/soytree/TagName.java#L314-L322
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurebandwidth5x.java
br_configurebandwidth5x.configurebandwidth5x
public static br_configurebandwidth5x configurebandwidth5x(nitro_service client, br_configurebandwidth5x resource) throws Exception { return ((br_configurebandwidth5x[]) resource.perform_operation(client, "configurebandwidth5x"))[0]; }
java
public static br_configurebandwidth5x configurebandwidth5x(nitro_service client, br_configurebandwidth5x resource) throws Exception { return ((br_configurebandwidth5x[]) resource.perform_operation(client, "configurebandwidth5x"))[0]; }
[ "public", "static", "br_configurebandwidth5x", "configurebandwidth5x", "(", "nitro_service", "client", ",", "br_configurebandwidth5x", "resource", ")", "throws", "Exception", "{", "return", "(", "(", "br_configurebandwidth5x", "[", "]", ")", "resource", ".", "perform_op...
<pre> Use this operation to configure Repeater bandwidth of devices of version 5.x or earlier. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "configure", "Repeater", "bandwidth", "of", "devices", "of", "version", "5", ".", "x", "or", "earlier", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurebandwidth5x.java#L189-L192
signalapp/libsignal-service-java
java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageReceiver.java
SignalServiceMessageReceiver.createMessagePipe
public SignalServiceMessagePipe createMessagePipe() { WebSocketConnection webSocket = new WebSocketConnection(urls.getSignalServiceUrls()[0].getUrl(), urls.getSignalServiceUrls()[0].getTrustStore(), ...
java
public SignalServiceMessagePipe createMessagePipe() { WebSocketConnection webSocket = new WebSocketConnection(urls.getSignalServiceUrls()[0].getUrl(), urls.getSignalServiceUrls()[0].getTrustStore(), ...
[ "public", "SignalServiceMessagePipe", "createMessagePipe", "(", ")", "{", "WebSocketConnection", "webSocket", "=", "new", "WebSocketConnection", "(", "urls", ".", "getSignalServiceUrls", "(", ")", "[", "0", "]", ".", "getUrl", "(", ")", ",", "urls", ".", "getSig...
Creates a pipe for receiving SignalService messages. Callers must call {@link SignalServiceMessagePipe#shutdown()} when finished with the pipe. @return A SignalServiceMessagePipe for receiving Signal Service messages.
[ "Creates", "a", "pipe", "for", "receiving", "SignalService", "messages", "." ]
train
https://github.com/signalapp/libsignal-service-java/blob/64f1150c5e4062d67d31c9a2a9c3a0237d022902/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageReceiver.java#L146-L153
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/form/elements/JQMSlider.java
JQMSlider.setValue
@Override public void setValue(Double value, boolean fireEvents) { Double old = getValue(); if (old == value || old != null && old.equals(value)) return; internVal = value; setInputValueAttr(value); ignoreChange = true; try { refresh(input.getElement().get...
java
@Override public void setValue(Double value, boolean fireEvents) { Double old = getValue(); if (old == value || old != null && old.equals(value)) return; internVal = value; setInputValueAttr(value); ignoreChange = true; try { refresh(input.getElement().get...
[ "@", "Override", "public", "void", "setValue", "(", "Double", "value", ",", "boolean", "fireEvents", ")", "{", "Double", "old", "=", "getValue", "(", ")", ";", "if", "(", "old", "==", "value", "||", "old", "!=", "null", "&&", "old", ".", "equals", "(...
Sets the value of the slider to the given value @param value the new value of the slider, must be in the range of the slider
[ "Sets", "the", "value", "of", "the", "slider", "to", "the", "given", "value" ]
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/form/elements/JQMSlider.java#L481-L494
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.getDefaultInstance
@SuppressWarnings("WeakerAccess") public static @Nullable CleverTapAPI getDefaultInstance(Context context) { // For Google Play Store/Android Studio tracking sdkVersion = BuildConfig.SDK_VERSION_STRING; if (defaultConfig == null) { ManifestInfo manifest = ManifestInfo.getInstance...
java
@SuppressWarnings("WeakerAccess") public static @Nullable CleverTapAPI getDefaultInstance(Context context) { // For Google Play Store/Android Studio tracking sdkVersion = BuildConfig.SDK_VERSION_STRING; if (defaultConfig == null) { ManifestInfo manifest = ManifestInfo.getInstance...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "static", "@", "Nullable", "CleverTapAPI", "getDefaultInstance", "(", "Context", "context", ")", "{", "// For Google Play Store/Android Studio tracking", "sdkVersion", "=", "BuildConfig", ".", "SDK_VERSION_STR...
Returns the default shared instance of the CleverTap SDK. @param context The Android context @return The {@link CleverTapAPI} object
[ "Returns", "the", "default", "shared", "instance", "of", "the", "CleverTap", "SDK", "." ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L485-L505
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java
AbstractSequenceClassifier.classifyDocumentStdin
public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter) throws IOException { BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding)); String line; String text = ""; String eol = "\n"; String sentence = "<s>"; int blankLin...
java
public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter) throws IOException { BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding)); String line; String text = ""; String eol = "\n"; String sentence = "<s>"; int blankLin...
[ "public", "boolean", "classifyDocumentStdin", "(", "DocumentReaderAndWriter", "<", "IN", ">", "readerWriter", ")", "throws", "IOException", "{", "BufferedReader", "is", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "System", ".", "in", ",", "...
Classify stdin by documents seperated by 3 blank line @param readerWriter @return boolean reached end of IO @throws IOException
[ "Classify", "stdin", "by", "documents", "seperated", "by", "3", "blank", "line" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L973-L1005
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/PrefHelper.java
PrefHelper.setCreditCount
public void setCreditCount(String bucket, int count) { ArrayList<String> buckets = getBuckets(); if (!buckets.contains(bucket)) { buckets.add(bucket); setBuckets(buckets); } setInteger(KEY_CREDIT_BASE + bucket, count); }
java
public void setCreditCount(String bucket, int count) { ArrayList<String> buckets = getBuckets(); if (!buckets.contains(bucket)) { buckets.add(bucket); setBuckets(buckets); } setInteger(KEY_CREDIT_BASE + bucket, count); }
[ "public", "void", "setCreditCount", "(", "String", "bucket", ",", "int", "count", ")", "{", "ArrayList", "<", "String", ">", "buckets", "=", "getBuckets", "(", ")", ";", "if", "(", "!", "buckets", ".", "contains", "(", "bucket", ")", ")", "{", "buckets...
<p>Sets the credit count for the default bucket to the specified {@link Integer}, in preferences.</p> <p> <p><b>Note:</b> This does not set the actual value of the bucket itself on the Branch server, but only the cached value as stored in preferences for the current app. The age of that value should be checked before b...
[ "<p", ">", "Sets", "the", "credit", "count", "for", "the", "default", "bucket", "to", "the", "specified", "{", "@link", "Integer", "}", "in", "preferences", ".", "<", "/", "p", ">", "<p", ">", "<p", ">", "<b", ">", "Note", ":", "<", "/", "b", ">"...
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/PrefHelper.java#L774-L781
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/RangeTombstoneList.java
RangeTombstoneList.searchDeletionTime
public DeletionTime searchDeletionTime(Composite name) { int idx = searchInternal(name, 0); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
java
public DeletionTime searchDeletionTime(Composite name) { int idx = searchInternal(name, 0); return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]); }
[ "public", "DeletionTime", "searchDeletionTime", "(", "Composite", "name", ")", "{", "int", "idx", "=", "searchInternal", "(", "name", ",", "0", ")", ";", "return", "idx", "<", "0", "?", "null", ":", "new", "DeletionTime", "(", "markedAts", "[", "idx", "]...
Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one), or null if {@code name} is not covered by any tombstone.
[ "Returns", "the", "DeletionTime", "for", "the", "tombstone", "overlapping", "{" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/RangeTombstoneList.java#L258-L262
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java
FaultToleranceStateFactory.createAsyncBulkheadState
public AsyncBulkheadState createAsyncBulkheadState(ScheduledExecutorService executorService, BulkheadPolicy policy, MetricRecorder metricRecorder) { if (policy == null) { return new AsyncBulkheadStateNullImpl(executorService); } else { return new AsyncBulkheadStateImpl(executorSe...
java
public AsyncBulkheadState createAsyncBulkheadState(ScheduledExecutorService executorService, BulkheadPolicy policy, MetricRecorder metricRecorder) { if (policy == null) { return new AsyncBulkheadStateNullImpl(executorService); } else { return new AsyncBulkheadStateImpl(executorSe...
[ "public", "AsyncBulkheadState", "createAsyncBulkheadState", "(", "ScheduledExecutorService", "executorService", ",", "BulkheadPolicy", "policy", ",", "MetricRecorder", "metricRecorder", ")", "{", "if", "(", "policy", "==", "null", ")", "{", "return", "new", "AsyncBulkhe...
Create an object implementing an asynchronous Bulkhead <p> If {@code null} is passed for the policy, the returned object will still run submitted tasks asynchronously, but will not apply any bulkhead logic. @param executorProvider the policy executor provider @param executorService the executor to use to asynchronous...
[ "Create", "an", "object", "implementing", "an", "asynchronous", "Bulkhead", "<p", ">", "If", "{", "@code", "null", "}", "is", "passed", "for", "the", "policy", "the", "returned", "object", "will", "still", "run", "submitted", "tasks", "asynchronously", "but", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L114-L120
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/StringUtils.java
StringUtils.search
public static int search(String str, String keyw) { int strLen = str.length(); int keywLen = keyw.length(); int pos = 0; int cnt = 0; if (keywLen == 0) { return 0; } while ((pos = str.indexOf(keyw, pos)) != -1) { pos += keywLen; ...
java
public static int search(String str, String keyw) { int strLen = str.length(); int keywLen = keyw.length(); int pos = 0; int cnt = 0; if (keywLen == 0) { return 0; } while ((pos = str.indexOf(keyw, pos)) != -1) { pos += keywLen; ...
[ "public", "static", "int", "search", "(", "String", "str", ",", "String", "keyw", ")", "{", "int", "strLen", "=", "str", ".", "length", "(", ")", ";", "int", "keywLen", "=", "keyw", ".", "length", "(", ")", ";", "int", "pos", "=", "0", ";", "int"...
Returns the number of times the specified string was found in the target string, or 0 if there is no specified string. @param str the target string @param keyw the string to find @return the number of times the specified string was found
[ "Returns", "the", "number", "of", "times", "the", "specified", "string", "was", "found", "in", "the", "target", "string", "or", "0", "if", "there", "is", "no", "specified", "string", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/StringUtils.java#L533-L549
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.formatAnnotationSpecSetName
@Deprecated public static final String formatAnnotationSpecSetName(String project, String annotationSpecSet) { return ANNOTATION_SPEC_SET_PATH_TEMPLATE.instantiate( "project", project, "annotation_spec_set", annotationSpecSet); }
java
@Deprecated public static final String formatAnnotationSpecSetName(String project, String annotationSpecSet) { return ANNOTATION_SPEC_SET_PATH_TEMPLATE.instantiate( "project", project, "annotation_spec_set", annotationSpecSet); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatAnnotationSpecSetName", "(", "String", "project", ",", "String", "annotationSpecSet", ")", "{", "return", "ANNOTATION_SPEC_SET_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",", ...
Formats a string containing the fully-qualified path to represent a annotation_spec_set resource. @deprecated Use the {@link AnnotationSpecSetName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "annotation_spec_set", "resource", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L162-L167
Mthwate/DatLib
src/main/java/com/mthwate/datlib/HashUtils.java
HashUtils.sha224Hex
public static String sha224Hex(String data, Charset charset) throws NoSuchAlgorithmException { return sha224Hex(data.getBytes(charset)); }
java
public static String sha224Hex(String data, Charset charset) throws NoSuchAlgorithmException { return sha224Hex(data.getBytes(charset)); }
[ "public", "static", "String", "sha224Hex", "(", "String", "data", ",", "Charset", "charset", ")", "throws", "NoSuchAlgorithmException", "{", "return", "sha224Hex", "(", "data", ".", "getBytes", "(", "charset", ")", ")", ";", "}" ]
Hashes a string using the SHA-224 algorithm. Returns a hexadecimal result. @since 1.1 @param data the string to hash @param charset the charset of the string @return the hexadecimal SHA-224 hash of the string @throws NoSuchAlgorithmException the algorithm is not supported by existing providers
[ "Hashes", "a", "string", "using", "the", "SHA", "-", "224", "algorithm", ".", "Returns", "a", "hexadecimal", "result", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/HashUtils.java#L360-L362
ykrasik/jaci
jaci-core/src/main/java/com/github/ykrasik/jaci/path/ParsedPath.java
ParsedPath.toDirectory
public static ParsedPath toDirectory(String rawPath) { final String path = rawPath.trim(); if (path.isEmpty()) { // TODO: Is This legal? return EMPTY; } if ("/".equals(path)) { // TODO: Is this special case needed? return ROOT; } ...
java
public static ParsedPath toDirectory(String rawPath) { final String path = rawPath.trim(); if (path.isEmpty()) { // TODO: Is This legal? return EMPTY; } if ("/".equals(path)) { // TODO: Is this special case needed? return ROOT; } ...
[ "public", "static", "ParsedPath", "toDirectory", "(", "String", "rawPath", ")", "{", "final", "String", "path", "=", "rawPath", ".", "trim", "(", ")", ";", "if", "(", "path", ".", "isEmpty", "(", ")", ")", "{", "// TODO: Is This legal?", "return", "EMPTY",...
Create a path that is expected to represent a path to a directory. This means that if the path ends with a delimiter '/', it is considered the same as if it didn't. i.e. path/to and path/to/ are considered the same - a path with 2 elements: 'path' and 'to'. @param rawPath Path to parse. @return A {@link ParsedPath} ou...
[ "Create", "a", "path", "that", "is", "expected", "to", "represent", "a", "path", "to", "a", "directory", ".", "This", "means", "that", "if", "the", "path", "ends", "with", "a", "delimiter", "/", "it", "is", "considered", "the", "same", "as", "if", "it"...
train
https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-core/src/main/java/com/github/ykrasik/jaci/path/ParsedPath.java#L150-L168
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ProxiedFileSystemCache.java
ProxiedFileSystemCache.getProxiedFileSystem
@Deprecated public static FileSystem getProxiedFileSystem(@NonNull final String userNameToProxyAs, Properties properties, URI fsURI) throws IOException { return getProxiedFileSystem(userNameToProxyAs, properties, fsURI, new Configuration()); }
java
@Deprecated public static FileSystem getProxiedFileSystem(@NonNull final String userNameToProxyAs, Properties properties, URI fsURI) throws IOException { return getProxiedFileSystem(userNameToProxyAs, properties, fsURI, new Configuration()); }
[ "@", "Deprecated", "public", "static", "FileSystem", "getProxiedFileSystem", "(", "@", "NonNull", "final", "String", "userNameToProxyAs", ",", "Properties", "properties", ",", "URI", "fsURI", ")", "throws", "IOException", "{", "return", "getProxiedFileSystem", "(", ...
Gets a {@link FileSystem} that can perform any operations allowed by the specified userNameToProxyAs. @param userNameToProxyAs The name of the user the super user should proxy as @param properties {@link java.util.Properties} containing initialization properties. @param fsURI The {@link URI} for the {@link FileSystem}...
[ "Gets", "a", "{", "@link", "FileSystem", "}", "that", "can", "perform", "any", "operations", "allowed", "by", "the", "specified", "userNameToProxyAs", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ProxiedFileSystemCache.java#L74-L78
treasure-data/td-client-java
src/main/java/com/treasuredata/client/TDHttpClient.java
TDHttpClient.submitRequest
public <Result> Result submitRequest(TDApiRequest apiRequest, Optional<String> apiKeyCache, TDHttpRequestHandler<Result> handler) throws TDClientException { RequestContext requestContext = new RequestContext(config, apiRequest, apiKeyCache); try { return submitRequest(request...
java
public <Result> Result submitRequest(TDApiRequest apiRequest, Optional<String> apiKeyCache, TDHttpRequestHandler<Result> handler) throws TDClientException { RequestContext requestContext = new RequestContext(config, apiRequest, apiKeyCache); try { return submitRequest(request...
[ "public", "<", "Result", ">", "Result", "submitRequest", "(", "TDApiRequest", "apiRequest", ",", "Optional", "<", "String", ">", "apiKeyCache", ",", "TDHttpRequestHandler", "<", "Result", ">", "handler", ")", "throws", "TDClientException", "{", "RequestContext", "...
A low-level method to submit a TD API request. @param apiRequest @param apiKeyCache @param handler @param <Result> @return @throws TDClientException
[ "A", "low", "-", "level", "method", "to", "submit", "a", "TD", "API", "request", "." ]
train
https://github.com/treasure-data/td-client-java/blob/2769cbcf0e787d457344422cfcdde467399bd684/src/main/java/com/treasuredata/client/TDHttpClient.java#L455-L472
Gagravarr/VorbisJava
core/src/main/java/org/gagravarr/ogg/IOUtils.java
IOUtils.writeUTF8WithLength
public static void writeUTF8WithLength(OutputStream out, String str) throws IOException { byte[] s = str.getBytes(UTF8); writeInt4(out, s.length); out.write(s); }
java
public static void writeUTF8WithLength(OutputStream out, String str) throws IOException { byte[] s = str.getBytes(UTF8); writeInt4(out, s.length); out.write(s); }
[ "public", "static", "void", "writeUTF8WithLength", "(", "OutputStream", "out", ",", "String", "str", ")", "throws", "IOException", "{", "byte", "[", "]", "s", "=", "str", ".", "getBytes", "(", "UTF8", ")", ";", "writeInt4", "(", "out", ",", "s", ".", "...
Writes out a 4 byte integer of the length (in bytes!) of the String, followed by the String (as UTF-8)
[ "Writes", "out", "a", "4", "byte", "integer", "of", "the", "length", "(", "in", "bytes!", ")", "of", "the", "String", "followed", "by", "the", "String", "(", "as", "UTF", "-", "8", ")" ]
train
https://github.com/Gagravarr/VorbisJava/blob/22b4d645b00386d59d17a336a2bc9d54db08df16/core/src/main/java/org/gagravarr/ogg/IOUtils.java#L370-L374
google/closure-compiler
src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java
JsDocInfoParser.extractBlockComment
private ExtractionInfo extractBlockComment(JsDocToken token) { return extractMultilineComment(token, getWhitespaceOption(WhitespaceOption.TRIM), false, false); }
java
private ExtractionInfo extractBlockComment(JsDocToken token) { return extractMultilineComment(token, getWhitespaceOption(WhitespaceOption.TRIM), false, false); }
[ "private", "ExtractionInfo", "extractBlockComment", "(", "JsDocToken", "token", ")", "{", "return", "extractMultilineComment", "(", "token", ",", "getWhitespaceOption", "(", "WhitespaceOption", ".", "TRIM", ")", ",", "false", ",", "false", ")", ";", "}" ]
Extracts the top-level block comment from the JsDoc comment, if any. This method differs from the extractMultilineTextualBlock in that it terminates under different conditions (it doesn't have the same prechecks), it does not first read in the remaining of the current line and its conditions for ignoring the "*" (STAR)...
[ "Extracts", "the", "top", "-", "level", "block", "comment", "from", "the", "JsDoc", "comment", "if", "any", ".", "This", "method", "differs", "from", "the", "extractMultilineTextualBlock", "in", "that", "it", "terminates", "under", "different", "conditions", "("...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java#L1753-L1755
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDConnectionDaoImpl.java
GeneratedDConnectionDaoImpl.queryByExpireTime
public Iterable<DConnection> queryByExpireTime(java.util.Date expireTime) { return queryByField(null, DConnectionMapper.Field.EXPIRETIME.getFieldName(), expireTime); }
java
public Iterable<DConnection> queryByExpireTime(java.util.Date expireTime) { return queryByField(null, DConnectionMapper.Field.EXPIRETIME.getFieldName(), expireTime); }
[ "public", "Iterable", "<", "DConnection", ">", "queryByExpireTime", "(", "java", ".", "util", ".", "Date", "expireTime", ")", "{", "return", "queryByField", "(", "null", ",", "DConnectionMapper", ".", "Field", ".", "EXPIRETIME", ".", "getFieldName", "(", ")", ...
query-by method for field expireTime @param expireTime the specified attribute @return an Iterable of DConnections for the specified expireTime
[ "query", "-", "by", "method", "for", "field", "expireTime" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDConnectionDaoImpl.java#L88-L90
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPOut.java
JBBPOut.BeginBin
public static JBBPOut BeginBin(final JBBPByteOrder byteOrder, final JBBPBitOrder bitOrder) { return new JBBPOut(new ByteArrayOutputStream(), byteOrder, bitOrder); }
java
public static JBBPOut BeginBin(final JBBPByteOrder byteOrder, final JBBPBitOrder bitOrder) { return new JBBPOut(new ByteArrayOutputStream(), byteOrder, bitOrder); }
[ "public", "static", "JBBPOut", "BeginBin", "(", "final", "JBBPByteOrder", "byteOrder", ",", "final", "JBBPBitOrder", "bitOrder", ")", "{", "return", "new", "JBBPOut", "(", "new", "ByteArrayOutputStream", "(", ")", ",", "byteOrder", ",", "bitOrder", ")", ";", "...
Start a DSL session for defined both byte outOrder and bit outOrder parameters. @param byteOrder the byte outOrder to be used for the session @param bitOrder the bit outOrder to be used for the session @return the new DSL session generated with the parameters and inside byte array stream.
[ "Start", "a", "DSL", "session", "for", "defined", "both", "byte", "outOrder", "and", "bit", "outOrder", "parameters", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPOut.java#L107-L109
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java
PackageSummaryBuilder.buildPackageDoc
public void buildPackageDoc(XMLNode node, Content contentTree) throws DocletException { contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree); packageWriter.printDocument(contentTr...
java
public void buildPackageDoc(XMLNode node, Content contentTree) throws DocletException { contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree); packageWriter.printDocument(contentTr...
[ "public", "void", "buildPackageDoc", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "DocletException", "{", "contentTree", "=", "packageWriter", ".", "getPackageHeader", "(", "utils", ".", "getPackageName", "(", "packageElement", ")", ")", "...
Build the package documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "package", "documentation", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java#L133-L139
google/closure-compiler
src/com/google/javascript/jscomp/MinimizeExitPoints.java
MinimizeExitPoints.tryMinimizeSwitchCaseExits
void tryMinimizeSwitchCaseExits(Node n, Token exitType, @Nullable String labelName) { checkState(NodeUtil.isSwitchCase(n)); checkState(n != n.getParent().getLastChild()); Node block = n.getLastChild(); Node maybeBreak = block.getLastChild(); if (maybeBreak == null || !maybeBreak.isBreak() || maybeB...
java
void tryMinimizeSwitchCaseExits(Node n, Token exitType, @Nullable String labelName) { checkState(NodeUtil.isSwitchCase(n)); checkState(n != n.getParent().getLastChild()); Node block = n.getLastChild(); Node maybeBreak = block.getLastChild(); if (maybeBreak == null || !maybeBreak.isBreak() || maybeB...
[ "void", "tryMinimizeSwitchCaseExits", "(", "Node", "n", ",", "Token", "exitType", ",", "@", "Nullable", "String", "labelName", ")", "{", "checkState", "(", "NodeUtil", ".", "isSwitchCase", "(", "n", ")", ")", ";", "checkState", "(", "n", "!=", "n", ".", ...
Attempt to remove explicit exits from switch cases that also occur implicitly after the switch.
[ "Attempt", "to", "remove", "explicit", "exits", "from", "switch", "cases", "that", "also", "occur", "implicitly", "after", "the", "switch", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/MinimizeExitPoints.java#L219-L242
pressgang-ccms/PressGangCCMSDatasourceProviders
rest-provider/src/main/java/org/jboss/pressgang/ccms/provider/RESTPropertyTagProvider.java
RESTPropertyTagProvider.getRESTPropertyTagRevisions
public RESTPropertyTagCollectionV1 getRESTPropertyTagRevisions(int id, Integer revision) { try { RESTPropertyTagV1 propertyTag = null; if (getRESTEntityCache().containsKeyValue(RESTPropertyTagV1.class, id, revision)) { propertyTag = getRESTEntityCache().get(RESTPropertyTa...
java
public RESTPropertyTagCollectionV1 getRESTPropertyTagRevisions(int id, Integer revision) { try { RESTPropertyTagV1 propertyTag = null; if (getRESTEntityCache().containsKeyValue(RESTPropertyTagV1.class, id, revision)) { propertyTag = getRESTEntityCache().get(RESTPropertyTa...
[ "public", "RESTPropertyTagCollectionV1", "getRESTPropertyTagRevisions", "(", "int", "id", ",", "Integer", "revision", ")", "{", "try", "{", "RESTPropertyTagV1", "propertyTag", "=", "null", ";", "if", "(", "getRESTEntityCache", "(", ")", ".", "containsKeyValue", "(",...
/*@Override public UpdateableCollectionWrapper<PropertyCategoryWrapper> getPropertyTagCategories(int id, final Integer revision) { try { RESTPropertyTagV1 propertyTag = null; Check the cache first if (getRESTEntityCache().containsKeyValue(RESTPropertyTagV1.class, id, revision)) { propertyTag = getRESTEntityCache().get(...
[ "/", "*", "@Override", "public", "UpdateableCollectionWrapper<PropertyCategoryWrapper", ">", "getPropertyTagCategories", "(", "int", "id", "final", "Integer", "revision", ")", "{", "try", "{", "RESTPropertyTagV1", "propertyTag", "=", "null", ";", "Check", "the", "cach...
train
https://github.com/pressgang-ccms/PressGangCCMSDatasourceProviders/blob/e47588adad0dcd55608b197b37825a512bc8fd25/rest-provider/src/main/java/org/jboss/pressgang/ccms/provider/RESTPropertyTagProvider.java#L135-L164
ziccardi/jnrpe
jcheck_nrpe/src/main/java/it/jnrpe/client/JNRPEClient.java
JNRPEClient.sendCommand
public final ReturnValue sendCommand(final String sCommandName, final String... arguments) throws JNRPEClientException { return sendRequest(new JNRPERequest(sCommandName, arguments)); }
java
public final ReturnValue sendCommand(final String sCommandName, final String... arguments) throws JNRPEClientException { return sendRequest(new JNRPERequest(sCommandName, arguments)); }
[ "public", "final", "ReturnValue", "sendCommand", "(", "final", "String", "sCommandName", ",", "final", "String", "...", "arguments", ")", "throws", "JNRPEClientException", "{", "return", "sendRequest", "(", "new", "JNRPERequest", "(", "sCommandName", ",", "arguments...
Inovoke a command installed in JNRPE. @param sCommandName The name of the command to be invoked @param arguments The arguments to pass to the command (will substitute the $ARGSx$ parameters) @return The value returned by the server @throws JNRPEClientException Thrown on any communication error.
[ "Inovoke", "a", "command", "installed", "in", "JNRPE", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jcheck_nrpe/src/main/java/it/jnrpe/client/JNRPEClient.java#L226-L228
apache/flink
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java
JDBCInputFormat.nextRecord
@Override public Row nextRecord(Row row) throws IOException { try { if (!hasNext) { return null; } for (int pos = 0; pos < row.getArity(); pos++) { row.setField(pos, resultSet.getObject(pos + 1)); } //update hasNext after we've read the record hasNext = resultSet.next(); return row; } ...
java
@Override public Row nextRecord(Row row) throws IOException { try { if (!hasNext) { return null; } for (int pos = 0; pos < row.getArity(); pos++) { row.setField(pos, resultSet.getObject(pos + 1)); } //update hasNext after we've read the record hasNext = resultSet.next(); return row; } ...
[ "@", "Override", "public", "Row", "nextRecord", "(", "Row", "row", ")", "throws", "IOException", "{", "try", "{", "if", "(", "!", "hasNext", ")", "{", "return", "null", ";", "}", "for", "(", "int", "pos", "=", "0", ";", "pos", "<", "row", ".", "g...
Stores the next resultSet row in a tuple. @param row row to be reused. @return row containing next {@link Row} @throws java.io.IOException
[ "Stores", "the", "next", "resultSet", "row", "in", "a", "tuple", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java#L289-L306
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertNotVoidType
public static void assertNotVoidType(final Field field, Class<? extends Annotation> annotation) { if ((field.getClass().equals(Void.class)) && (field.getClass().equals(Void.TYPE))) { throw annotation == null ? MESSAGES.fieldCannotBeOfPrimitiveOrVoidType(field) : MESSAGES.fieldCannotBeOfPrimitive...
java
public static void assertNotVoidType(final Field field, Class<? extends Annotation> annotation) { if ((field.getClass().equals(Void.class)) && (field.getClass().equals(Void.TYPE))) { throw annotation == null ? MESSAGES.fieldCannotBeOfPrimitiveOrVoidType(field) : MESSAGES.fieldCannotBeOfPrimitive...
[ "public", "static", "void", "assertNotVoidType", "(", "final", "Field", "field", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "if", "(", "(", "field", ".", "getClass", "(", ")", ".", "equals", "(", "Void", ".", "class", ...
Asserts field isn't of void type. @param field to validate @param annotation annotation to propagate in exception message
[ "Asserts", "field", "isn", "t", "of", "void", "type", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L152-L158
antopen/alipay-sdk-java
src/main/java/com/alipay/api/internal/util/XmlUtils.java
XmlUtils.getEncoding
private static String getEncoding(String text) { String result = "UTF-8";//默认编码格式 String xml = text.trim(); if (xml.startsWith("<?xml")) { int end = xml.indexOf("?>"); String sub = xml.substring(0, end); StringTokenizer tokens = new StringTokenizer(sub, " =\...
java
private static String getEncoding(String text) { String result = "UTF-8";//默认编码格式 String xml = text.trim(); if (xml.startsWith("<?xml")) { int end = xml.indexOf("?>"); String sub = xml.substring(0, end); StringTokenizer tokens = new StringTokenizer(sub, " =\...
[ "private", "static", "String", "getEncoding", "(", "String", "text", ")", "{", "String", "result", "=", "\"UTF-8\"", ";", "//默认编码格式", "String", "xml", "=", "text", ".", "trim", "(", ")", ";", "if", "(", "xml", ".", "startsWith", "(", "\"<?xml\"", ")", ...
Gets the encoding pattern from given XML file. @param text the context of the XML file @return the encoding pattern string of given XML file
[ "Gets", "the", "encoding", "pattern", "from", "given", "XML", "file", "." ]
train
https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/XmlUtils.java#L166-L189
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java
FineUploader5Session.setCustomHeaders
@Nonnull public FineUploader5Session setCustomHeaders (@Nullable final Map <String, String> aCustomHeaders) { m_aSessionCustomHeaders.setAll (aCustomHeaders); return this; }
java
@Nonnull public FineUploader5Session setCustomHeaders (@Nullable final Map <String, String> aCustomHeaders) { m_aSessionCustomHeaders.setAll (aCustomHeaders); return this; }
[ "@", "Nonnull", "public", "FineUploader5Session", "setCustomHeaders", "(", "@", "Nullable", "final", "Map", "<", "String", ",", "String", ">", "aCustomHeaders", ")", "{", "m_aSessionCustomHeaders", ".", "setAll", "(", "aCustomHeaders", ")", ";", "return", "this", ...
Any additional headers you would like included with the GET request sent to your server. Ignored in IE9 and IE8 if the endpoint is cross-origin. @param aCustomHeaders Custom headers to be set. @return this
[ "Any", "additional", "headers", "you", "would", "like", "included", "with", "the", "GET", "request", "sent", "to", "your", "server", ".", "Ignored", "in", "IE9", "and", "IE8", "if", "the", "endpoint", "is", "cross", "-", "origin", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java#L64-L69
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java
BoxApiMetadata.getAddFolderMetadataRequest
public BoxRequestsMetadata.AddItemMetadata getAddFolderMetadataRequest(String id, LinkedHashMap<String, Object> values, String scope, String template) { BoxRequestsMetadata.AddItemMetadata request = new BoxRequestsMetadata.AddItemMetadata(values, getFolderMetadataUrl(id, scope, template), mSession); ret...
java
public BoxRequestsMetadata.AddItemMetadata getAddFolderMetadataRequest(String id, LinkedHashMap<String, Object> values, String scope, String template) { BoxRequestsMetadata.AddItemMetadata request = new BoxRequestsMetadata.AddItemMetadata(values, getFolderMetadataUrl(id, scope, template), mSession); ret...
[ "public", "BoxRequestsMetadata", ".", "AddItemMetadata", "getAddFolderMetadataRequest", "(", "String", "id", ",", "LinkedHashMap", "<", "String", ",", "Object", ">", "values", ",", "String", "scope", ",", "String", "template", ")", "{", "BoxRequestsMetadata", ".", ...
Gets a request that adds metadata to a folder @param id id of the folder to add metadata to @param values mapping of the template keys to their values @param scope currently only global and enterprise scopes are supported @param template metadata template to use @return request to add metadata to a folder
[ "Gets", "a", "request", "that", "adds", "metadata", "to", "a", "folder" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiMetadata.java#L129-L132
steveash/jopenfst
src/main/java/com/github/steveash/jopenfst/operations/Compose.java
Compose.makeFilter
private static MutableFst makeFilter(WriteableSymbolTable table, Semiring semiring, String eps1, String eps2) { MutableFst filter = new MutableFst(semiring, table, table); // State 0 MutableState s0 = filter.newStartState(); s0.setFinalWeight(semiring.one()); MutableState s1 = filter.newState(); ...
java
private static MutableFst makeFilter(WriteableSymbolTable table, Semiring semiring, String eps1, String eps2) { MutableFst filter = new MutableFst(semiring, table, table); // State 0 MutableState s0 = filter.newStartState(); s0.setFinalWeight(semiring.one()); MutableState s1 = filter.newState(); ...
[ "private", "static", "MutableFst", "makeFilter", "(", "WriteableSymbolTable", "table", ",", "Semiring", "semiring", ",", "String", "eps1", ",", "String", "eps2", ")", "{", "MutableFst", "filter", "=", "new", "MutableFst", "(", "semiring", ",", "table", ",", "t...
Get a filter to use for avoiding multiple epsilon paths in the resulting Fst See: M. Mohri, "Weighted automata algorithms", Handbook of Weighted Automata. Springer, pp. 213-250, 2009. @param table the filter's input/output symbols @param semiring the semiring to use in the operation
[ "Get", "a", "filter", "to", "use", "for", "avoiding", "multiple", "epsilon", "paths", "in", "the", "resulting", "Fst" ]
train
https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/operations/Compose.java#L190-L219
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4Request.java
AwsSigner4Request.canonicalHeaders
private static String canonicalHeaders(Map<String, String> headers) { StringBuilder canonical = new StringBuilder(); for (Map.Entry<String, String> header : headers.entrySet()) { canonical.append(header.getKey()).append(':').append(header.getValue()).append('\n'); } return ca...
java
private static String canonicalHeaders(Map<String, String> headers) { StringBuilder canonical = new StringBuilder(); for (Map.Entry<String, String> header : headers.entrySet()) { canonical.append(header.getKey()).append(':').append(header.getValue()).append('\n'); } return ca...
[ "private", "static", "String", "canonicalHeaders", "(", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "StringBuilder", "canonical", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ...
Create canonical header set. The headers are ordered by name. @param headers The set of headers to sign @return The signing value from headers. Headers are separated with newline. Each header is formatted name:value with each header value whitespace trimmed and minimized
[ "Create", "canonical", "header", "set", ".", "The", "headers", "are", "ordered", "by", "name", "." ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4Request.java#L193-L199
real-logic/agrona
agrona/src/main/java/org/agrona/concurrent/status/AtomicCounter.java
AtomicCounter.compareAndSet
public boolean compareAndSet(final long expectedValue, final long updateValue) { return UnsafeAccess.UNSAFE.compareAndSwapLong(byteArray, addressOffset, expectedValue, updateValue); }
java
public boolean compareAndSet(final long expectedValue, final long updateValue) { return UnsafeAccess.UNSAFE.compareAndSwapLong(byteArray, addressOffset, expectedValue, updateValue); }
[ "public", "boolean", "compareAndSet", "(", "final", "long", "expectedValue", ",", "final", "long", "updateValue", ")", "{", "return", "UnsafeAccess", ".", "UNSAFE", ".", "compareAndSwapLong", "(", "byteArray", ",", "addressOffset", ",", "expectedValue", ",", "upda...
Compare the current value to expected and if true then set to the update value atomically. @param expectedValue for the counter. @param updateValue for the counter. @return true if successful otherwise false.
[ "Compare", "the", "current", "value", "to", "expected", "and", "if", "true", "then", "set", "to", "the", "update", "value", "atomically", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/concurrent/status/AtomicCounter.java#L185-L188
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/MetaModelBuilder.java
MetaModelBuilder.processInternal
private AbstractManagedType<X> processInternal(Class<X> clazz, boolean isIdClass) { if (managedTypes.get(clazz) == null) { return buildManagedType(clazz, isIdClass); } else { return (AbstractManagedType<X>) managedTypes.get(clazz); } }
java
private AbstractManagedType<X> processInternal(Class<X> clazz, boolean isIdClass) { if (managedTypes.get(clazz) == null) { return buildManagedType(clazz, isIdClass); } else { return (AbstractManagedType<X>) managedTypes.get(clazz); } }
[ "private", "AbstractManagedType", "<", "X", ">", "processInternal", "(", "Class", "<", "X", ">", "clazz", ",", "boolean", "isIdClass", ")", "{", "if", "(", "managedTypes", ".", "get", "(", "clazz", ")", "==", "null", ")", "{", "return", "buildManagedType",...
Process. @param clazz the clazz @return the abstract managed type
[ "Process", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/MetaModelBuilder.java#L817-L827
demidenko05/beigesoft-accounting
src/main/java/org/beigesoft/accounting/service/SrvLedger.java
SrvLedger.loadString
public final String loadString(final String pFileName) throws IOException { URL urlFile = SrvLedger.class .getResource(pFileName); if (urlFile != null) { InputStream inputStream = null; try { inputStream = SrvLedger.class.getResourceAsStream(pFileName); byte[] bArray = ...
java
public final String loadString(final String pFileName) throws IOException { URL urlFile = SrvLedger.class .getResource(pFileName); if (urlFile != null) { InputStream inputStream = null; try { inputStream = SrvLedger.class.getResourceAsStream(pFileName); byte[] bArray = ...
[ "public", "final", "String", "loadString", "(", "final", "String", "pFileName", ")", "throws", "IOException", "{", "URL", "urlFile", "=", "SrvLedger", ".", "class", ".", "getResource", "(", "pFileName", ")", ";", "if", "(", "urlFile", "!=", "null", ")", "{...
<p>Load string file (usually SQL query).</p> @param pFileName file name @return String usually SQL query @throws IOException - IO exception
[ "<p", ">", "Load", "string", "file", "(", "usually", "SQL", "query", ")", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-accounting/blob/e6f423949008218ddd05953b078f1ea8805095c1/src/main/java/org/beigesoft/accounting/service/SrvLedger.java#L282-L300
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildDeleteRequest
public HttpRequest buildDeleteRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.DELETE, url, null); }
java
public HttpRequest buildDeleteRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.DELETE, url, null); }
[ "public", "HttpRequest", "buildDeleteRequest", "(", "GenericUrl", "url", ")", "throws", "IOException", "{", "return", "buildRequest", "(", "HttpMethods", ".", "DELETE", ",", "url", ",", "null", ")", ";", "}" ]
Builds a {@code DELETE} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request
[ "Builds", "a", "{", "@code", "DELETE", "}", "request", "for", "the", "given", "URL", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L106-L108
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java
CompactDecimalFormat.getInstance
public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) { return new CompactDecimalFormat(ULocale.forLocale(locale), style); }
java
public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) { return new CompactDecimalFormat(ULocale.forLocale(locale), style); }
[ "public", "static", "CompactDecimalFormat", "getInstance", "(", "Locale", "locale", ",", "CompactStyle", "style", ")", "{", "return", "new", "CompactDecimalFormat", "(", "ULocale", ".", "forLocale", "(", "locale", ")", ",", "style", ")", ";", "}" ]
Create a CompactDecimalFormat appropriate for a locale. The result may be affected by the number system in the locale, such as ar-u-nu-latn. @param locale the desired locale @param style the compact style
[ "Create", "a", "CompactDecimalFormat", "appropriate", "for", "a", "locale", ".", "The", "result", "may", "be", "affected", "by", "the", "number", "system", "in", "the", "locale", "such", "as", "ar", "-", "u", "-", "nu", "-", "latn", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java#L112-L114
twilio/twilio-java
src/main/java/com/twilio/base/Reader.java
Reader.nextPage
public Page<T> nextPage(final Page<T> page) { return nextPage(page, Twilio.getRestClient()); }
java
public Page<T> nextPage(final Page<T> page) { return nextPage(page, Twilio.getRestClient()); }
[ "public", "Page", "<", "T", ">", "nextPage", "(", "final", "Page", "<", "T", ">", "page", ")", "{", "return", "nextPage", "(", "page", ",", "Twilio", ".", "getRestClient", "(", ")", ")", ";", "}" ]
Fetch the following page of resources. @param page current page of resources @return Page containing the next pageSize of resources
[ "Fetch", "the", "following", "page", "of", "resources", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/base/Reader.java#L101-L103
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java
ProcessGroovyMethods.waitForOrKill
public static void waitForOrKill(Process self, long numberOfMillis) { ProcessRunner runnable = new ProcessRunner(self); Thread thread = new Thread(runnable); thread.start(); runnable.waitForOrKill(numberOfMillis); }
java
public static void waitForOrKill(Process self, long numberOfMillis) { ProcessRunner runnable = new ProcessRunner(self); Thread thread = new Thread(runnable); thread.start(); runnable.waitForOrKill(numberOfMillis); }
[ "public", "static", "void", "waitForOrKill", "(", "Process", "self", ",", "long", "numberOfMillis", ")", "{", "ProcessRunner", "runnable", "=", "new", "ProcessRunner", "(", "self", ")", ";", "Thread", "thread", "=", "new", "Thread", "(", "runnable", ")", ";"...
Wait for the process to finish during a certain amount of time, otherwise stops the process. @param self a Process @param numberOfMillis the number of milliseconds to wait before stopping the process @since 1.0
[ "Wait", "for", "the", "process", "to", "finish", "during", "a", "certain", "amount", "of", "time", "otherwise", "stops", "the", "process", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java#L139-L144
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/DxfUtils.java
DxfUtils.feature2Dxf
public static String feature2Dxf( FeatureMate featureMate, String layerName, String elevationAttrName, boolean suffix, boolean force2CoordsToLine ) { Geometry g = featureMate.getGeometry(); if (EGeometryType.isPoint(g)) { return point2Dxf(featureMate, layerName, elevationAttrNam...
java
public static String feature2Dxf( FeatureMate featureMate, String layerName, String elevationAttrName, boolean suffix, boolean force2CoordsToLine ) { Geometry g = featureMate.getGeometry(); if (EGeometryType.isPoint(g)) { return point2Dxf(featureMate, layerName, elevationAttrNam...
[ "public", "static", "String", "feature2Dxf", "(", "FeatureMate", "featureMate", ",", "String", "layerName", ",", "String", "elevationAttrName", ",", "boolean", "suffix", ",", "boolean", "force2CoordsToLine", ")", "{", "Geometry", "g", "=", "featureMate", ".", "get...
Write a {@link SimpleFeature} to dxf string. @param featureMate the feature to convert. @param layerName the layer name in case none is in the attributes. @param elevationAttrName the attribute defining elevation or <code>null</code>. @param suffix <code>true</code> if suffix is needed. @param force2CoordsToLine if <c...
[ "Write", "a", "{", "@link", "SimpleFeature", "}", "to", "dxf", "string", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/DxfUtils.java#L74-L96
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.notEmpty
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class }) public static <T extends Iterable<?>> T notEmpty(@Nonnull final T iterable, @Nullable final String name) { notNull(iterable, name); notEmpty(iterable, !iterable.iterator().hasNext(), name); return iterable; }
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class }) public static <T extends Iterable<?>> T notEmpty(@Nonnull final T iterable, @Nullable final String name) { notNull(iterable, name); notEmpty(iterable, !iterable.iterator().hasNext(), name); return iterable; }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalEmptyArgumentException", ".", "class", "}", ")", "public", "static", "<", "T", "extends", "Iterable", "<", "?", ">", ">", "T", "notEmpty", "(", "@", ...
Ensures that a passed iterable as a parameter of the calling method is not empty. <p> The following example describes how to use it. <pre> &#064;ArgumentsChecked public setIterable(Iterable&lt;String&gt; iterable) { this.iterable = Check.notEmpty(iterable, &quot;iterable&quot;); } </pre> @param iterable an iterable ...
[ "Ensures", "that", "a", "passed", "iterable", "as", "a", "parameter", "of", "the", "calling", "method", "is", "not", "empty", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2178-L2184
apache/groovy
src/main/java/org/codehaus/groovy/tools/LoaderConfiguration.java
LoaderConfiguration.addClassPath
public void addClassPath(String path) { String[] paths = path.split(File.pathSeparator); for (String cpPath : paths) { // Check to support wild card classpath if (cpPath.endsWith("*")) { File dir = new File(cpPath.substring(0, cpPath.length() - 1)); ...
java
public void addClassPath(String path) { String[] paths = path.split(File.pathSeparator); for (String cpPath : paths) { // Check to support wild card classpath if (cpPath.endsWith("*")) { File dir = new File(cpPath.substring(0, cpPath.length() - 1)); ...
[ "public", "void", "addClassPath", "(", "String", "path", ")", "{", "String", "[", "]", "paths", "=", "path", ".", "split", "(", "File", ".", "pathSeparator", ")", ";", "for", "(", "String", "cpPath", ":", "paths", ")", "{", "// Check to support wild card c...
Adds a classpath to this configuration. It expects a string with multiple paths, separated by the system dependent path separator. Expands wildcards, e.g. dir/* into all the jars in dir. @param path the path as a path separator delimited string @see java.io.File#pathSeparator
[ "Adds", "a", "classpath", "to", "this", "configuration", ".", "It", "expects", "a", "string", "with", "multiple", "paths", "separated", "by", "the", "system", "dependent", "path", "separator", ".", "Expands", "wildcards", "e", ".", "g", ".", "dir", "/", "*...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/tools/LoaderConfiguration.java#L303-L319
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/util/encoding/HttpEncodingTools.java
HttpEncodingTools.concatenateAndUriEncode
public static String concatenateAndUriEncode(Collection<?> list, String delimiter) { Collection<String> escaped = new ArrayList<String>(); if (list != null) { for (Object object : list) { escaped.add(encode(object.toString())); } } return StringUt...
java
public static String concatenateAndUriEncode(Collection<?> list, String delimiter) { Collection<String> escaped = new ArrayList<String>(); if (list != null) { for (Object object : list) { escaped.add(encode(object.toString())); } } return StringUt...
[ "public", "static", "String", "concatenateAndUriEncode", "(", "Collection", "<", "?", ">", "list", ",", "String", "delimiter", ")", "{", "Collection", "<", "String", ">", "escaped", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "if", "(", "...
Encodes each string value of the list and concatenates the results using the supplied delimiter. @param list To be encoded and concatenated. @param delimiter Separator for concatenation. @return Concatenated and encoded string representation.
[ "Encodes", "each", "string", "value", "of", "the", "list", "and", "concatenates", "the", "results", "using", "the", "supplied", "delimiter", "." ]
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/util/encoding/HttpEncodingTools.java#L115-L124
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/translate/Translate.java
Translate.translateVertexValues
public static <K, OLD, NEW> DataSet<Vertex<K, NEW>> translateVertexValues(DataSet<Vertex<K, OLD>> vertices, TranslateFunction<OLD, NEW> translator) { return translateVertexValues(vertices, translator, PARALLELISM_DEFAULT); }
java
public static <K, OLD, NEW> DataSet<Vertex<K, NEW>> translateVertexValues(DataSet<Vertex<K, OLD>> vertices, TranslateFunction<OLD, NEW> translator) { return translateVertexValues(vertices, translator, PARALLELISM_DEFAULT); }
[ "public", "static", "<", "K", ",", "OLD", ",", "NEW", ">", "DataSet", "<", "Vertex", "<", "K", ",", "NEW", ">", ">", "translateVertexValues", "(", "DataSet", "<", "Vertex", "<", "K", ",", "OLD", ">", ">", "vertices", ",", "TranslateFunction", "<", "O...
Translate {@link Vertex} values using the given {@link TranslateFunction}. @param vertices input vertices @param translator implements conversion from {@code OLD} to {@code NEW} @param <K> vertex ID type @param <OLD> old vertex value type @param <NEW> new vertex value type @return translated vertices
[ "Translate", "{", "@link", "Vertex", "}", "values", "using", "the", "given", "{", "@link", "TranslateFunction", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/asm/translate/Translate.java#L221-L223
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getSecretsWithServiceResponseAsync
public Observable<ServiceResponse<Page<SecretItem>>> getSecretsWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults) { return getSecretsSinglePageAsync(vaultBaseUrl, maxresults) .concatMap(new Func1<ServiceResponse<Page<SecretItem>>, Observable<ServiceResponse<Page<SecretItem...
java
public Observable<ServiceResponse<Page<SecretItem>>> getSecretsWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults) { return getSecretsSinglePageAsync(vaultBaseUrl, maxresults) .concatMap(new Func1<ServiceResponse<Page<SecretItem>>, Observable<ServiceResponse<Page<SecretItem...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "SecretItem", ">", ">", ">", "getSecretsWithServiceResponseAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "return", "getSecretsSinglePageAsync", "(", ...
List secrets in a specified key vault. The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list permission. @param vaultBaseU...
[ "List", "secrets", "in", "a", "specified", "key", "vault", ".", "The", "Get", "Secrets", "operation", "is", "applicable", "to", "the", "entire", "vault", ".", "However", "only", "the", "base", "secret", "identifier", "and", "its", "attributes", "are", "provi...
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#L4094-L4106
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.subtractInPlace
public static <E> void subtractInPlace(Counter<E> target, Counter<E> arg) { for (E key : arg.keySet()) { target.decrementCount(key, arg.getCount(key)); } }
java
public static <E> void subtractInPlace(Counter<E> target, Counter<E> arg) { for (E key : arg.keySet()) { target.decrementCount(key, arg.getCount(key)); } }
[ "public", "static", "<", "E", ">", "void", "subtractInPlace", "(", "Counter", "<", "E", ">", "target", ",", "Counter", "<", "E", ">", "arg", ")", "{", "for", "(", "E", "key", ":", "arg", ".", "keySet", "(", ")", ")", "{", "target", ".", "decremen...
Sets each value of target to be target[k]-arg[k] for all keys k in target.
[ "Sets", "each", "value", "of", "target", "to", "be", "target", "[", "k", "]", "-", "arg", "[", "k", "]", "for", "all", "keys", "k", "in", "target", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L391-L395
petergeneric/stdlib
guice/common/src/main/java/com/peterphi/std/guice/common/serviceprops/jaxbref/JAXBResourceFactory.java
JAXBResourceFactory.getOnce
public <T> T getOnce(final Class<T> clazz, final String name) { return new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz).get(); }
java
public <T> T getOnce(final Class<T> clazz, final String name) { return new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz).get(); }
[ "public", "<", "T", ">", "T", "getOnce", "(", "final", "Class", "<", "T", ">", "clazz", ",", "final", "String", "name", ")", "{", "return", "new", "JAXBNamedResourceFactory", "<", "T", ">", "(", "this", ".", "config", ",", "this", ".", "factory", ","...
Resolve the JAXB resource once without caching anything @param clazz @param name @param <T> @return
[ "Resolve", "the", "JAXB", "resource", "once", "without", "caching", "anything" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/common/src/main/java/com/peterphi/std/guice/common/serviceprops/jaxbref/JAXBResourceFactory.java#L89-L92
btaz/data-util
src/main/java/com/btaz/util/unit/ResourceUtil.java
ResourceUtil.writeStringToTempFile
public static File writeStringToTempFile(String prefix, String suffix, String data) throws IOException { File testFile = File.createTempFile(prefix, suffix); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream( testFile.getAbsoluteFile(), false),DataUt...
java
public static File writeStringToTempFile(String prefix, String suffix, String data) throws IOException { File testFile = File.createTempFile(prefix, suffix); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream( testFile.getAbsoluteFile(), false),DataUt...
[ "public", "static", "File", "writeStringToTempFile", "(", "String", "prefix", ",", "String", "suffix", ",", "String", "data", ")", "throws", "IOException", "{", "File", "testFile", "=", "File", ".", "createTempFile", "(", "prefix", ",", "suffix", ")", ";", "...
This method writes all data from a string to a temp file. The file will be automatically deleted on JVM shutdown. @param prefix file prefix i.e. "abc" in abc.txt @param suffix file suffix i.e. ".txt" in abc.txt @param data string containing the data to write to the file @return <code>File</code> object @throws IOExcept...
[ "This", "method", "writes", "all", "data", "from", "a", "string", "to", "a", "temp", "file", ".", "The", "file", "will", "be", "automatically", "deleted", "on", "JVM", "shutdown", "." ]
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/unit/ResourceUtil.java#L94-L103
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.updateSlot
private boolean updateSlot(SlotID slotId, AllocationID allocationId, JobID jobId) { final TaskManagerSlot slot = slots.get(slotId); if (slot != null) { final TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId()); if (taskManagerRegistration != null) { updat...
java
private boolean updateSlot(SlotID slotId, AllocationID allocationId, JobID jobId) { final TaskManagerSlot slot = slots.get(slotId); if (slot != null) { final TaskManagerRegistration taskManagerRegistration = taskManagerRegistrations.get(slot.getInstanceId()); if (taskManagerRegistration != null) { updat...
[ "private", "boolean", "updateSlot", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ",", "JobID", "jobId", ")", "{", "final", "TaskManagerSlot", "slot", "=", "slots", ".", "get", "(", "slotId", ")", ";", "if", "(", "slot", "!=", "null", ")", ...
Updates a slot with the given allocation id. @param slotId to update @param allocationId specifying the current allocation of the slot @param jobId specifying the job to which the slot is allocated @return True if the slot could be updated; otherwise false
[ "Updates", "a", "slot", "with", "the", "given", "allocation", "id", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L604-L623
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java
GVRShaderData.setFloat
public void setFloat(String key, float value) { checkKeyIsUniform(key); checkFloatNotNaNOrInfinity("value", value); NativeShaderData.setFloat(getNative(), key, value); }
java
public void setFloat(String key, float value) { checkKeyIsUniform(key); checkFloatNotNaNOrInfinity("value", value); NativeShaderData.setFloat(getNative(), key, value); }
[ "public", "void", "setFloat", "(", "String", "key", ",", "float", "value", ")", "{", "checkKeyIsUniform", "(", "key", ")", ";", "checkFloatNotNaNOrInfinity", "(", "\"value\"", ",", "value", ")", ";", "NativeShaderData", ".", "setFloat", "(", "getNative", "(", ...
Bind a {@code float} to the shader uniform {@code key}. Throws an exception of the key is not found. @param key Name of the shader uniform @param value New data
[ "Bind", "a", "{", "@code", "float", "}", "to", "the", "shader", "uniform", "{", "@code", "key", "}", ".", "Throws", "an", "exception", "of", "the", "key", "is", "not", "found", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRShaderData.java#L247-L252
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultJsonQueryLogEntryCreator.java
DefaultJsonQueryLogEntryCreator.writeBatchSizeEntry
protected void writeBatchSizeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("\"batchSize\":"); sb.append(execInfo.getBatchSize()); sb.append(", "); }
java
protected void writeBatchSizeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("\"batchSize\":"); sb.append(execInfo.getBatchSize()); sb.append(", "); }
[ "protected", "void", "writeBatchSizeEntry", "(", "StringBuilder", "sb", ",", "ExecutionInfo", "execInfo", ",", "List", "<", "QueryInfo", ">", "queryInfoList", ")", "{", "sb", ".", "append", "(", "\"\\\"batchSize\\\":\"", ")", ";", "sb", ".", "append", "(", "ex...
Write batch size as json. <p>default: "batchSize":1, @param sb StringBuilder to write @param execInfo execution info @param queryInfoList query info list
[ "Write", "batch", "size", "as", "json", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultJsonQueryLogEntryCreator.java#L182-L186
apereo/cas
support/cas-server-support-consent-ldap/src/main/java/org/apereo/cas/consent/LdapConsentRepository.java
LdapConsentRepository.executeModifyOperation
private boolean executeModifyOperation(final Set<String> newConsent, final LdapEntry entry) { val attrMap = new HashMap<String, Set<String>>(); attrMap.put(this.ldap.getConsentAttributeName(), newConsent); LOGGER.debug("Storing consent decisions [{}] at LDAP attribute [{}] for [{}]", newConsent...
java
private boolean executeModifyOperation(final Set<String> newConsent, final LdapEntry entry) { val attrMap = new HashMap<String, Set<String>>(); attrMap.put(this.ldap.getConsentAttributeName(), newConsent); LOGGER.debug("Storing consent decisions [{}] at LDAP attribute [{}] for [{}]", newConsent...
[ "private", "boolean", "executeModifyOperation", "(", "final", "Set", "<", "String", ">", "newConsent", ",", "final", "LdapEntry", "entry", ")", "{", "val", "attrMap", "=", "new", "HashMap", "<", "String", ",", "Set", "<", "String", ">", ">", "(", ")", ";...
Modifies the consent decisions attribute on the entry. @param newConsent new set of consent decisions @param entry entry of consent decisions @return true / false
[ "Modifies", "the", "consent", "decisions", "attribute", "on", "the", "entry", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-consent-ldap/src/main/java/org/apereo/cas/consent/LdapConsentRepository.java#L156-L162
groupon/odo
client/src/main/java/com/groupon/odo/client/Client.java
Client.setCustomResponseForDefaultClient
public static boolean setCustomResponseForDefaultClient(String profileName, String pathName, String customData) { try { return setCustomForDefaultClient(profileName, pathName, true, customData); } catch (Exception e) { e.printStackTrace(); } return false; }
java
public static boolean setCustomResponseForDefaultClient(String profileName, String pathName, String customData) { try { return setCustomForDefaultClient(profileName, pathName, true, customData); } catch (Exception e) { e.printStackTrace(); } return false; }
[ "public", "static", "boolean", "setCustomResponseForDefaultClient", "(", "String", "profileName", ",", "String", "pathName", ",", "String", "customData", ")", "{", "try", "{", "return", "setCustomForDefaultClient", "(", "profileName", ",", "pathName", ",", "true", "...
set custom response for profile's default client @param profileName profileName to modify @param pathName friendly name of path @param customData custom request data @return true if success, false otherwise
[ "set", "custom", "response", "for", "profile", "s", "default", "client" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/Client.java#L835-L842
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormat.java
DecimalFormat.skipUWhiteSpace
private static int skipUWhiteSpace(String text, int pos) { while (pos < text.length()) { int c = UTF16.charAt(text, pos); if (!UCharacter.isUWhiteSpace(c)) { break; } pos += UTF16.getCharCount(c); } return pos; }
java
private static int skipUWhiteSpace(String text, int pos) { while (pos < text.length()) { int c = UTF16.charAt(text, pos); if (!UCharacter.isUWhiteSpace(c)) { break; } pos += UTF16.getCharCount(c); } return pos; }
[ "private", "static", "int", "skipUWhiteSpace", "(", "String", "text", ",", "int", "pos", ")", "{", "while", "(", "pos", "<", "text", ".", "length", "(", ")", ")", "{", "int", "c", "=", "UTF16", ".", "charAt", "(", "text", ",", "pos", ")", ";", "i...
Skips over a run of zero or more isUWhiteSpace() characters at pos in text.
[ "Skips", "over", "a", "run", "of", "zero", "or", "more", "isUWhiteSpace", "()", "characters", "at", "pos", "in", "text", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormat.java#L3025-L3034
OpenLiberty/open-liberty
dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/SystemConfiguration.java
SystemConfiguration.addDefaultConfiguration
BaseConfiguration addDefaultConfiguration(String pid, Dictionary<String, String> props) throws ConfigUpdateException { return defaultConfiguration.add(pid, props, serverXMLConfig, variableRegistry); }
java
BaseConfiguration addDefaultConfiguration(String pid, Dictionary<String, String> props) throws ConfigUpdateException { return defaultConfiguration.add(pid, props, serverXMLConfig, variableRegistry); }
[ "BaseConfiguration", "addDefaultConfiguration", "(", "String", "pid", ",", "Dictionary", "<", "String", ",", "String", ">", "props", ")", "throws", "ConfigUpdateException", "{", "return", "defaultConfiguration", ".", "add", "(", "pid", ",", "props", ",", "serverXM...
Add configuration to the default configuration add runtime @param pid @param props @return
[ "Add", "configuration", "to", "the", "default", "configuration", "add", "runtime" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/SystemConfiguration.java#L190-L192
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/KeyStoreManager.java
KeyStoreManager.loadKeyStores
public void loadKeyStores(Map<String, WSKeyStore> config) { // now process each keystore in the provided config for (Entry<String, WSKeyStore> current : config.entrySet()) { try { String name = current.getKey(); WSKeyStore keystore = current.getValue(); ...
java
public void loadKeyStores(Map<String, WSKeyStore> config) { // now process each keystore in the provided config for (Entry<String, WSKeyStore> current : config.entrySet()) { try { String name = current.getKey(); WSKeyStore keystore = current.getValue(); ...
[ "public", "void", "loadKeyStores", "(", "Map", "<", "String", ",", "WSKeyStore", ">", "config", ")", "{", "// now process each keystore in the provided config", "for", "(", "Entry", "<", "String", ",", "WSKeyStore", ">", "current", ":", "config", ".", "entrySet", ...
Load the provided list of keystores from the configuration. @param config
[ "Load", "the", "provided", "list", "of", "keystores", "from", "the", "configuration", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/KeyStoreManager.java#L91-L105
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBaseGridScreen.java
HBaseGridScreen.printStartRecordGridData
public void printStartRecordGridData(PrintWriter out, int iPrintOptions) { if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN) { out.println("<tr>\n<td colspan=\"20\">"); } out.println("<table border=\"1\">"); }
java
public void printStartRecordGridData(PrintWriter out, int iPrintOptions) { if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN) { out.println("<tr>\n<td colspan=\"20\">"); } out.println("<table border=\"1\">"); }
[ "public", "void", "printStartRecordGridData", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "if", "(", "(", "iPrintOptions", "&", "HtmlConstants", ".", "DETAIL_SCREEN", ")", "==", "HtmlConstants", ".", "DETAIL_SCREEN", ")", "{", "out", ".", ...
Display the start grid in input format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception.
[ "Display", "the", "start", "grid", "in", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBaseGridScreen.java#L161-L168
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/query/StatsOptions.java
StatsOptions.addField
public FieldStatsOptions addField(Field field) { Assert.notNull(field, "Field for statistics must not be 'null'."); state.fields.add(field); return new FieldStatsOptions(field, state); }
java
public FieldStatsOptions addField(Field field) { Assert.notNull(field, "Field for statistics must not be 'null'."); state.fields.add(field); return new FieldStatsOptions(field, state); }
[ "public", "FieldStatsOptions", "addField", "(", "Field", "field", ")", "{", "Assert", ".", "notNull", "(", "field", ",", "\"Field for statistics must not be 'null'.\"", ")", ";", "state", ".", "fields", ".", "add", "(", "field", ")", ";", "return", "new", "Fie...
Adds a field to the statistics to be requested. @param field @return
[ "Adds", "a", "field", "to", "the", "statistics", "to", "be", "requested", "." ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/query/StatsOptions.java#L53-L59
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GitLabApiForm.java
GitLabApiForm.withParam
public GitLabApiForm withParam(String name, Map<String, ?> variables, boolean required) throws IllegalArgumentException { if (variables == null || variables.isEmpty()) { if (required) { throw new IllegalArgumentException(name + " cannot be empty or null"); } ...
java
public GitLabApiForm withParam(String name, Map<String, ?> variables, boolean required) throws IllegalArgumentException { if (variables == null || variables.isEmpty()) { if (required) { throw new IllegalArgumentException(name + " cannot be empty or null"); } ...
[ "public", "GitLabApiForm", "withParam", "(", "String", "name", ",", "Map", "<", "String", ",", "?", ">", "variables", ",", "boolean", "required", ")", "throws", "IllegalArgumentException", "{", "if", "(", "variables", "==", "null", "||", "variables", ".", "i...
Fluent method for adding an array of hash type query and form parameters to a get() or post() call. @param name the name of the field/attribute to add @param variables a Map containing array of hashes @param required the field is required flag @return this GitLabAPiForm instance @throws IllegalArgumentException if a r...
[ "Fluent", "method", "for", "adding", "an", "array", "of", "hash", "type", "query", "and", "form", "parameters", "to", "a", "get", "()", "or", "post", "()", "call", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiForm.java#L148-L167
landawn/AbacusUtil
src/com/landawn/abacus/util/Primitives.java
Primitives.box
@SafeVarargs public static Boolean[] box(final boolean... a) { if (a == null) { return null; } return box(a, 0, a.length); }
java
@SafeVarargs public static Boolean[] box(final boolean... a) { if (a == null) { return null; } return box(a, 0, a.length); }
[ "@", "SafeVarargs", "public", "static", "Boolean", "[", "]", "box", "(", "final", "boolean", "...", "a", ")", "{", "if", "(", "a", "==", "null", ")", "{", "return", "null", ";", "}", "return", "box", "(", "a", ",", "0", ",", "a", ".", "length", ...
<p> Converts an array of primitive booleans to objects. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code boolean} array @return a {@code Boolean} array, {@code null} if null array input
[ "<p", ">", "Converts", "an", "array", "of", "primitive", "booleans", "to", "objects", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Primitives.java#L123-L130
PeachTech/peachweb-peachproxy-java
src/main/java/com/peachfuzzer/web/api/PeachProxy.java
PeachProxy.sessionTeardown
public void sessionTeardown() throws PeachApiException { stashUnirestProxy(); if(_debug) System.out.println(">>sessionTeardown"); try { HttpResponse<String> ret = null; try { ret = Unirest ...
java
public void sessionTeardown() throws PeachApiException { stashUnirestProxy(); if(_debug) System.out.println(">>sessionTeardown"); try { HttpResponse<String> ret = null; try { ret = Unirest ...
[ "public", "void", "sessionTeardown", "(", ")", "throws", "PeachApiException", "{", "stashUnirestProxy", "(", ")", ";", "if", "(", "_debug", ")", "System", ".", "out", ".", "println", "(", "\">>sessionTeardown\"", ")", ";", "try", "{", "HttpResponse", "<", "S...
Stop testing job and destroy proxy. This will stop the current testing job and destroy the proxy. @throws PeachApiException
[ "Stop", "testing", "job", "and", "destroy", "proxy", "." ]
train
https://github.com/PeachTech/peachweb-peachproxy-java/blob/0ca274b0d1668fb4be0fed7e247394438374de58/src/main/java/com/peachfuzzer/web/api/PeachProxy.java#L373-L411
google/closure-compiler
src/com/google/javascript/jscomp/DevirtualizePrototypeMethods.java
DevirtualizePrototypeMethods.isEligibleDefinitionSite
private boolean isEligibleDefinitionSite(String name, Node definitionSite) { switch (definitionSite.getToken()) { case GETPROP: case MEMBER_FUNCTION_DEF: case STRING_KEY: break; default: // No other node types are supported. throw new IllegalArgumentException(definit...
java
private boolean isEligibleDefinitionSite(String name, Node definitionSite) { switch (definitionSite.getToken()) { case GETPROP: case MEMBER_FUNCTION_DEF: case STRING_KEY: break; default: // No other node types are supported. throw new IllegalArgumentException(definit...
[ "private", "boolean", "isEligibleDefinitionSite", "(", "String", "name", ",", "Node", "definitionSite", ")", "{", "switch", "(", "definitionSite", ".", "getToken", "(", ")", ")", "{", "case", "GETPROP", ":", "case", "MEMBER_FUNCTION_DEF", ":", "case", "STRING_KE...
Determines if a method definition site is eligible for rewrite as a global. <p>In order to be eligible for rewrite, the definition site must: <ul> <li>Not be exported <li>Be for a prototype method </ul>
[ "Determines", "if", "a", "method", "definition", "site", "is", "eligible", "for", "rewrite", "as", "a", "global", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/DevirtualizePrototypeMethods.java#L215-L238
jmrozanec/cron-utils
src/main/java/com/cronutils/model/time/SingleExecutionTime.java
SingleExecutionTime.nextClosestMatch
private ZonedDateTime nextClosestMatch(final ZonedDateTime date) throws NoSuchValueException { ExecutionTimeResult result = new ExecutionTimeResult(date, false); for (int i = 0; i < MAX_ITERATIONS; i++) { result = potentialNextClosestMatch(result.getTime()); if (result.isMatch())...
java
private ZonedDateTime nextClosestMatch(final ZonedDateTime date) throws NoSuchValueException { ExecutionTimeResult result = new ExecutionTimeResult(date, false); for (int i = 0; i < MAX_ITERATIONS; i++) { result = potentialNextClosestMatch(result.getTime()); if (result.isMatch())...
[ "private", "ZonedDateTime", "nextClosestMatch", "(", "final", "ZonedDateTime", "date", ")", "throws", "NoSuchValueException", "{", "ExecutionTimeResult", "result", "=", "new", "ExecutionTimeResult", "(", "date", ",", "false", ")", ";", "for", "(", "int", "i", "=",...
If date is not match, will return next closest match. If date is match, will return this date. @param date - reference ZonedDateTime instance - never null; @return ZonedDateTime instance, never null. Value obeys logic specified above. @throws NoSuchValueException if there is no potential next year
[ "If", "date", "is", "not", "match", "will", "return", "next", "closest", "match", ".", "If", "date", "is", "match", "will", "return", "this", "date", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/model/time/SingleExecutionTime.java#L122-L135
ThreeTen/threetenbp
src/main/java/org/threeten/bp/zone/ZoneOffsetTransitionRule.java
ZoneOffsetTransitionRule.createTransition
public ZoneOffsetTransition createTransition(int year) { LocalDate date; if (dom < 0) { date = LocalDate.of(year, month, month.length(IsoChronology.INSTANCE.isLeapYear(year)) + 1 + dom); if (dow != null) { date = date.with(previousOrSame(dow)); } ...
java
public ZoneOffsetTransition createTransition(int year) { LocalDate date; if (dom < 0) { date = LocalDate.of(year, month, month.length(IsoChronology.INSTANCE.isLeapYear(year)) + 1 + dom); if (dow != null) { date = date.with(previousOrSame(dow)); } ...
[ "public", "ZoneOffsetTransition", "createTransition", "(", "int", "year", ")", "{", "LocalDate", "date", ";", "if", "(", "dom", "<", "0", ")", "{", "date", "=", "LocalDate", ".", "of", "(", "year", ",", "month", ",", "month", ".", "length", "(", "IsoCh...
Creates a transition instance for the specified year. <p> Calculations are performed using the ISO-8601 chronology. @param year the year to create a transition for, not null @return the transition instance, not null
[ "Creates", "a", "transition", "instance", "for", "the", "specified", "year", ".", "<p", ">", "Calculations", "are", "performed", "using", "the", "ISO", "-", "8601", "chronology", "." ]
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/zone/ZoneOffsetTransitionRule.java#L410-L426
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/listeners/SerializingListener.java
SerializingListener.processEvent
@Override public void processEvent(ListenerEvent event, SequenceVectors<T> sequenceVectors, long argument) { try { locker.acquire(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); StringBuilder builder = new StringBuilder(targetFolder.getAbsolut...
java
@Override public void processEvent(ListenerEvent event, SequenceVectors<T> sequenceVectors, long argument) { try { locker.acquire(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); StringBuilder builder = new StringBuilder(targetFolder.getAbsolut...
[ "@", "Override", "public", "void", "processEvent", "(", "ListenerEvent", "event", ",", "SequenceVectors", "<", "T", ">", "sequenceVectors", ",", "long", "argument", ")", "{", "try", "{", "locker", ".", "acquire", "(", ")", ";", "SimpleDateFormat", "sdf", "="...
This method is called at each epoch end @param event @param sequenceVectors @param argument
[ "This", "method", "is", "called", "at", "each", "epoch", "end" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/sequencevectors/listeners/SerializingListener.java#L81-L103
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/PostConditionException.java
PostConditionException.validateGreaterThan
public static void validateGreaterThan( Number value, Number limit, String identifier ) throws PostConditionException { if( value.doubleValue() > limit.doubleValue() ) { return; } throw new PostConditionException( identifier + " was not greater than " + limit + "....
java
public static void validateGreaterThan( Number value, Number limit, String identifier ) throws PostConditionException { if( value.doubleValue() > limit.doubleValue() ) { return; } throw new PostConditionException( identifier + " was not greater than " + limit + "....
[ "public", "static", "void", "validateGreaterThan", "(", "Number", "value", ",", "Number", "limit", ",", "String", "identifier", ")", "throws", "PostConditionException", "{", "if", "(", "value", ".", "doubleValue", "(", ")", ">", "limit", ".", "doubleValue", "(...
Validates that the value is greater than a limit. This method ensures that <code>value > limit</code>. @param identifier The name of the object. @param limit The limit that the value must exceed. @param value The value to be tested. @throws PostConditionException if the condition is not met.
[ "Validates", "that", "the", "value", "is", "greater", "than", "a", "limit", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/PostConditionException.java#L128-L136
SonarSource/sonarqube
server/sonar-process/src/main/java/org/sonar/process/logging/AbstractLogHelper.java
AbstractLogHelper.resolveLevel
static Level resolveLevel(Props props, String... propertyKeys) { Level newLevel = Level.INFO; for (String propertyKey : propertyKeys) { Level level = getPropertyValueAsLevel(props, propertyKey); if (level != null) { newLevel = level; } } return newLevel; }
java
static Level resolveLevel(Props props, String... propertyKeys) { Level newLevel = Level.INFO; for (String propertyKey : propertyKeys) { Level level = getPropertyValueAsLevel(props, propertyKey); if (level != null) { newLevel = level; } } return newLevel; }
[ "static", "Level", "resolveLevel", "(", "Props", "props", ",", "String", "...", "propertyKeys", ")", "{", "Level", "newLevel", "=", "Level", ".", "INFO", ";", "for", "(", "String", "propertyKey", ":", "propertyKeys", ")", "{", "Level", "level", "=", "getPr...
Resolve a log level reading the value of specified properties. <p> To compute the applied log level the following rules will be followed: <ul>the last property with a defined and valid value in the order of the {@code propertyKeys} argument will be applied</ul> <ul>if there is none, {@link Level#INFO INFO} will be retu...
[ "Resolve", "a", "log", "level", "reading", "the", "value", "of", "specified", "properties", ".", "<p", ">", "To", "compute", "the", "applied", "log", "level", "the", "following", "rules", "will", "be", "followed", ":", "<ul", ">", "the", "last", "property"...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-process/src/main/java/org/sonar/process/logging/AbstractLogHelper.java#L64-L73
doanduyhai/Achilles
achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/raw/NativeQuery.java
NativeQuery.withResultSetAsyncListeners
public NativeQuery withResultSetAsyncListeners(List<Function<ResultSet, ResultSet>> resultSetAsyncListeners) { this.options.setResultSetAsyncListeners(Optional.of(resultSetAsyncListeners)); return this; }
java
public NativeQuery withResultSetAsyncListeners(List<Function<ResultSet, ResultSet>> resultSetAsyncListeners) { this.options.setResultSetAsyncListeners(Optional.of(resultSetAsyncListeners)); return this; }
[ "public", "NativeQuery", "withResultSetAsyncListeners", "(", "List", "<", "Function", "<", "ResultSet", ",", "ResultSet", ">", ">", "resultSetAsyncListeners", ")", "{", "this", ".", "options", ".", "setResultSetAsyncListeners", "(", "Optional", ".", "of", "(", "re...
Add the given list of async listeners on the {@link com.datastax.driver.core.ResultSet} object. Example of usage: <pre class="code"><code class="java"> .withResultSetAsyncListeners(Arrays.asList(resultSet -> { //Do something with the resultSet object here })) </code></pre> Remark: <strong>it is not allowed to consum...
[ "Add", "the", "given", "list", "of", "async", "listeners", "on", "the", "{", "@link", "com", ".", "datastax", ".", "driver", ".", "core", ".", "ResultSet", "}", "object", ".", "Example", "of", "usage", ":", "<pre", "class", "=", "code", ">", "<code", ...
train
https://github.com/doanduyhai/Achilles/blob/8281c33100e72c993e570592ae1a5306afac6813/achilles-core/src/main/java/info/archinnov/achilles/internals/dsl/raw/NativeQuery.java#L126-L129
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/X509CertSelector.java
X509CertSelector.addPathToNameInternal
private void addPathToNameInternal(int type, Object name) throws IOException { // First, ensure that the name parses GeneralNameInterface tempName = makeGeneralNameInterface(type, name); if (pathToGeneralNames == null) { pathToNames = new HashSet<List<?>>(); p...
java
private void addPathToNameInternal(int type, Object name) throws IOException { // First, ensure that the name parses GeneralNameInterface tempName = makeGeneralNameInterface(type, name); if (pathToGeneralNames == null) { pathToNames = new HashSet<List<?>>(); p...
[ "private", "void", "addPathToNameInternal", "(", "int", "type", ",", "Object", "name", ")", "throws", "IOException", "{", "// First, ensure that the name parses", "GeneralNameInterface", "tempName", "=", "makeGeneralNameInterface", "(", "type", ",", "name", ")", ";", ...
A private method that adds a name (String or byte array) to the pathToNames criterion. The {@code X509Certificate} must contain the specified pathToName. @param type the name type (0-8, as specified in RFC 3280, section 4.2.1.7) @param name the name in string or byte array form @throws IOException if an encoding error...
[ "A", "private", "method", "that", "adds", "a", "name", "(", "String", "or", "byte", "array", ")", "to", "the", "pathToNames", "criterion", ".", "The", "{", "@code", "X509Certificate", "}", "must", "contain", "the", "specified", "pathToName", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/X509CertSelector.java#L1266-L1279
unbescape/unbescape
src/main/java/org/unbescape/javascript/JavaScriptEscape.java
JavaScriptEscape.unescapeJavaScript
public static void unescapeJavaScript(final Reader reader, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } JavaScriptEscapeUtil.unescape(reader, writer); }
java
public static void unescapeJavaScript(final Reader reader, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } JavaScriptEscapeUtil.unescape(reader, writer); }
[ "public", "static", "void", "unescapeJavaScript", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'wr...
<p> Perform a JavaScript <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> JavaScript unescape of SECs, x-based, u-based and octal escapes. </p> <p> ...
[ "<p", ">", "Perform", "a", "JavaScript", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/javascript/JavaScriptEscape.java#L1033-L1042
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/misc/TransposeAlgs_ZDRM.java
TransposeAlgs_ZDRM.standard
public static void standard(ZMatrixRMaj A, ZMatrixRMaj A_tran) { int index = 0; int rowStrideTran = A_tran.getRowStride(); int rowStride = A.getRowStride(); for( int i = 0; i < A_tran.numRows; i++ ) { int index2 = i*2; int end = index + rowStrideTran; ...
java
public static void standard(ZMatrixRMaj A, ZMatrixRMaj A_tran) { int index = 0; int rowStrideTran = A_tran.getRowStride(); int rowStride = A.getRowStride(); for( int i = 0; i < A_tran.numRows; i++ ) { int index2 = i*2; int end = index + rowStrideTran; ...
[ "public", "static", "void", "standard", "(", "ZMatrixRMaj", "A", ",", "ZMatrixRMaj", "A_tran", ")", "{", "int", "index", "=", "0", ";", "int", "rowStrideTran", "=", "A_tran", ".", "getRowStride", "(", ")", ";", "int", "rowStride", "=", "A", ".", "getRowS...
A straight forward transpose. Good for small non-square matrices. @param A Original matrix. Not modified. @param A_tran Transposed matrix. Modified.
[ "A", "straight", "forward", "transpose", ".", "Good", "for", "small", "non", "-", "square", "matrices", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/misc/TransposeAlgs_ZDRM.java#L85-L100
jboss-integration/fuse-bxms-integ
quickstarts/switchyard-demo-library/src/main/java/org/switchyard/quickstarts/demos/library/Library.java
Library.addBook
private void addBook(String isbn, String title, String synopsis, int quantity) { Book book = new Book(); book.setIsbn(isbn); book.setTitle(title); book.setSynopsis(synopsis); isbns_to_books.put(isbn, book); isbns_to_quantities.put(isbn, quantity); }
java
private void addBook(String isbn, String title, String synopsis, int quantity) { Book book = new Book(); book.setIsbn(isbn); book.setTitle(title); book.setSynopsis(synopsis); isbns_to_books.put(isbn, book); isbns_to_quantities.put(isbn, quantity); }
[ "private", "void", "addBook", "(", "String", "isbn", ",", "String", "title", ",", "String", "synopsis", ",", "int", "quantity", ")", "{", "Book", "book", "=", "new", "Book", "(", ")", ";", "book", ".", "setIsbn", "(", "isbn", ")", ";", "book", ".", ...
Adds the book. @param isbn the isbn @param title the title @param synopsis the synopsis @param quantity the quantity
[ "Adds", "the", "book", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/quickstarts/switchyard-demo-library/src/main/java/org/switchyard/quickstarts/demos/library/Library.java#L81-L88
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java
ChannelFrameworkImpl.cleanChildRefsInParent
private void cleanChildRefsInParent(ChannelData channelDataArray[], boolean childrenNew[]) { ChildChannelDataImpl child = null; // Clean up the already child refs in the parent. for (int i = 0; i < channelDataArray.length; i++) { if (childrenNew[i] == true) { child = ...
java
private void cleanChildRefsInParent(ChannelData channelDataArray[], boolean childrenNew[]) { ChildChannelDataImpl child = null; // Clean up the already child refs in the parent. for (int i = 0; i < channelDataArray.length; i++) { if (childrenNew[i] == true) { child = ...
[ "private", "void", "cleanChildRefsInParent", "(", "ChannelData", "channelDataArray", "[", "]", ",", "boolean", "childrenNew", "[", "]", ")", "{", "ChildChannelDataImpl", "child", "=", "null", ";", "// Clean up the already child refs in the parent.", "for", "(", "int", ...
This is a helper function. The same logic needs to be done in multiple places so this method was written to break it out. It will be called in times when an exception occurred during the construction of a chain. It cleans up some of the objects that were lined up ahead of time. @param channelDataArray @param childrenN...
[ "This", "is", "a", "helper", "function", ".", "The", "same", "logic", "needs", "to", "be", "done", "in", "multiple", "places", "so", "this", "method", "was", "written", "to", "break", "it", "out", ".", "It", "will", "be", "called", "in", "times", "when...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java#L2508-L2517
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java
JsiiObject.jsiiStaticCall
@Nullable protected static <T> T jsiiStaticCall(final Class<?> nativeClass, final String method, final Class<T> returnType, @Nullable final Object... args) { String fqn = engine.loadModuleForClass(nativeClass); return JsiiObjectMapper.treeToValue(engine.getClient() ...
java
@Nullable protected static <T> T jsiiStaticCall(final Class<?> nativeClass, final String method, final Class<T> returnType, @Nullable final Object... args) { String fqn = engine.loadModuleForClass(nativeClass); return JsiiObjectMapper.treeToValue(engine.getClient() ...
[ "@", "Nullable", "protected", "static", "<", "T", ">", "T", "jsiiStaticCall", "(", "final", "Class", "<", "?", ">", "nativeClass", ",", "final", "String", "method", ",", "final", "Class", "<", "T", ">", "returnType", ",", "@", "Nullable", "final", "Objec...
Calls a static method. @param nativeClass The java class. @param method The method to call. @param returnType The return type. @param args The method arguments. @param <T> Return type. @return Return value.
[ "Calls", "a", "static", "method", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java#L72-L78
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/LinearRing.java
LinearRing.getCentroid
public Coordinate getCentroid() { if (isEmpty()) { return null; } double area = getSignedArea(); double x = 0; double y = 0; Coordinate[] coordinates = getCoordinates(); for (int i = 1; i < coordinates.length; i++) { double x1 = coordinates[i - 1].getX(); double y1 = coordinates[i - 1].getY(); ...
java
public Coordinate getCentroid() { if (isEmpty()) { return null; } double area = getSignedArea(); double x = 0; double y = 0; Coordinate[] coordinates = getCoordinates(); for (int i = 1; i < coordinates.length; i++) { double x1 = coordinates[i - 1].getX(); double y1 = coordinates[i - 1].getY(); ...
[ "public", "Coordinate", "getCentroid", "(", ")", "{", "if", "(", "isEmpty", "(", ")", ")", "{", "return", "null", ";", "}", "double", "area", "=", "getSignedArea", "(", ")", ";", "double", "x", "=", "0", ";", "double", "y", "=", "0", ";", "Coordina...
The centroid is also known as the "center of gravity" or the "center of mass". @return Return the center point.
[ "The", "centroid", "is", "also", "known", "as", "the", "center", "of", "gravity", "or", "the", "center", "of", "mass", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/LinearRing.java#L107-L126
davetcc/tcMenu
tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/TextMenuItem.java
TextMenuItem.newMenuState
@Override public MenuState<String> newMenuState(String value, boolean changed, boolean active) { return new StringMenuState(changed, active, value); }
java
@Override public MenuState<String> newMenuState(String value, boolean changed, boolean active) { return new StringMenuState(changed, active, value); }
[ "@", "Override", "public", "MenuState", "<", "String", ">", "newMenuState", "(", "String", "value", ",", "boolean", "changed", ",", "boolean", "active", ")", "{", "return", "new", "StringMenuState", "(", "changed", ",", "active", ",", "value", ")", ";", "}...
Returns a new String current value that can be used as the current value in the Menutree @param value the new value @param changed if the value has changed @param active if the value is active. @return the new menu state object
[ "Returns", "a", "new", "String", "current", "value", "that", "can", "be", "used", "as", "the", "current", "value", "in", "the", "Menutree" ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/TextMenuItem.java#L47-L50