repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
lamydev/Android-Notification
core/src/zemin/notification/NotificationBoard.java
NotificationBoard.setHeaderMargin
public void setHeaderMargin(int l, int t, int r, int b) { mHeader.setMargin(l, t, r, b); }
java
public void setHeaderMargin(int l, int t, int r, int b) { mHeader.setMargin(l, t, r, b); }
[ "public", "void", "setHeaderMargin", "(", "int", "l", ",", "int", "t", ",", "int", "r", ",", "int", "b", ")", "{", "mHeader", ".", "setMargin", "(", "l", ",", "t", ",", "r", ",", "b", ")", ";", "}" ]
Set the margin of the header. @param l @param t @param r @param b
[ "Set", "the", "margin", "of", "the", "header", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L556-L558
voldemort/voldemort
src/java/voldemort/utils/RebalanceUtils.java
RebalanceUtils.validateClusterNodeCounts
public static void validateClusterNodeCounts(final Cluster lhs, final Cluster rhs) { if(!lhs.getNodeIds().equals(rhs.getNodeIds())) { throw new VoldemortException("Node ids are not the same [ lhs cluster node ids (" + lhs.getNodeIds() ...
java
public static void validateClusterNodeCounts(final Cluster lhs, final Cluster rhs) { if(!lhs.getNodeIds().equals(rhs.getNodeIds())) { throw new VoldemortException("Node ids are not the same [ lhs cluster node ids (" + lhs.getNodeIds() ...
[ "public", "static", "void", "validateClusterNodeCounts", "(", "final", "Cluster", "lhs", ",", "final", "Cluster", "rhs", ")", "{", "if", "(", "!", "lhs", ".", "getNodeIds", "(", ")", ".", "equals", "(", "rhs", ".", "getNodeIds", "(", ")", ")", ")", "{"...
Confirms that both clusters have the same number of nodes by comparing set of node Ids between clusters. @param lhs @param rhs
[ "Confirms", "that", "both", "clusters", "have", "the", "same", "number", "of", "nodes", "by", "comparing", "set", "of", "node", "Ids", "between", "clusters", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L221-L228
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetIntegrationResult.java
GetIntegrationResult.withRequestTemplates
public GetIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) { setRequestTemplates(requestTemplates); return this; }
java
public GetIntegrationResult withRequestTemplates(java.util.Map<String, String> requestTemplates) { setRequestTemplates(requestTemplates); return this; }
[ "public", "GetIntegrationResult", "withRequestTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestTemplates", ")", "{", "setRequestTemplates", "(", "requestTemplates", ")", ";", "return", "this", ";", "}" ]
<p> Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. </p> @param requestTemplates Represents a map of Velocity templates that are a...
[ "<p", ">", "Represents", "a", "map", "of", "Velocity", "templates", "that", "are", "applied", "on", "the", "request", "payload", "based", "on", "the", "value", "of", "the", "Content", "-", "Type", "header", "sent", "by", "the", "client", ".", "The", "con...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetIntegrationResult.java#L1219-L1222
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContext.java
SslContext.buildKeyStore
static KeyStore buildKeyStore(X509Certificate[] certChain, PrivateKey key, char[] keyPasswordChars) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); ks.load(null, null); ...
java
static KeyStore buildKeyStore(X509Certificate[] certChain, PrivateKey key, char[] keyPasswordChars) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); ks.load(null, null); ...
[ "static", "KeyStore", "buildKeyStore", "(", "X509Certificate", "[", "]", "certChain", ",", "PrivateKey", "key", ",", "char", "[", "]", "keyPasswordChars", ")", "throws", "KeyStoreException", ",", "NoSuchAlgorithmException", ",", "CertificateException", ",", "IOExcepti...
Generates a new {@link KeyStore}. @param certChain a X.509 certificate chain @param key a PKCS#8 private key @param keyPasswordChars the password of the {@code keyFile}. {@code null} if it's not password-protected. @return generated {@link KeyStore}.
[ "Generates", "a", "new", "{", "@link", "KeyStore", "}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContext.java#L1035-L1042
ModeShape/modeshape
modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java
JcrTools.printQuery
public QueryResult printQuery( Session session, String jcrSql2 ) throws RepositoryException { return printQuery(session, jcrSql2, Query.JCR_SQL2, -1, null); }
java
public QueryResult printQuery( Session session, String jcrSql2 ) throws RepositoryException { return printQuery(session, jcrSql2, Query.JCR_SQL2, -1, null); }
[ "public", "QueryResult", "printQuery", "(", "Session", "session", ",", "String", "jcrSql2", ")", "throws", "RepositoryException", "{", "return", "printQuery", "(", "session", ",", "jcrSql2", ",", "Query", ".", "JCR_SQL2", ",", "-", "1", ",", "null", ")", ";"...
Execute the supplied JCR-SQL2 query and, if printing is enabled, print out the results. @param session the session @param jcrSql2 the JCR-SQL2 query @return the results @throws RepositoryException
[ "Execute", "the", "supplied", "JCR", "-", "SQL2", "query", "and", "if", "printing", "is", "enabled", "print", "out", "the", "results", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java#L627-L630
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ExtendedPropertyUrl.java
ExtendedPropertyUrl.deleteExtendedPropertyUrl
public static MozuUrl deleteExtendedPropertyUrl(String key, String orderId, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/extendedproperties/{key}?updatemode={updateMode}&version={version}"); formatter.formatUrl("key", key); formatter.formatUrl...
java
public static MozuUrl deleteExtendedPropertyUrl(String key, String orderId, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/extendedproperties/{key}?updatemode={updateMode}&version={version}"); formatter.formatUrl("key", key); formatter.formatUrl...
[ "public", "static", "MozuUrl", "deleteExtendedPropertyUrl", "(", "String", "key", ",", "String", "orderId", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/{orderId}...
Get Resource Url for DeleteExtendedProperty @param key The extended property key. @param orderId Unique identifier of the order. @param updateMode Specifies whether to update the original order, update the order in draft mode, or update the order in draft mode and then commit the changes to the original. Draft mode ena...
[ "Get", "Resource", "Url", "for", "DeleteExtendedProperty" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/ExtendedPropertyUrl.java#L96-L104
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java
XPathUtils.buildExpression
private static XPathExpression buildExpression(String xPathExpression, NamespaceContext nsContext) throws XPathExpressionException { XPath xpath = createXPathFactory().newXPath(); if (nsContext != null) { xpath.setNamespaceContext(nsContext); } return xp...
java
private static XPathExpression buildExpression(String xPathExpression, NamespaceContext nsContext) throws XPathExpressionException { XPath xpath = createXPathFactory().newXPath(); if (nsContext != null) { xpath.setNamespaceContext(nsContext); } return xp...
[ "private", "static", "XPathExpression", "buildExpression", "(", "String", "xPathExpression", ",", "NamespaceContext", "nsContext", ")", "throws", "XPathExpressionException", "{", "XPath", "xpath", "=", "createXPathFactory", "(", ")", ".", "newXPath", "(", ")", ";", ...
Construct a xPath expression instance with given expression string and namespace context. If namespace context is not specified a default context is built from the XML node that is evaluated against. @param xPathExpression @param nsContext @return @throws XPathExpressionException
[ "Construct", "a", "xPath", "expression", "instance", "with", "given", "expression", "string", "and", "namespace", "context", ".", "If", "namespace", "context", "is", "not", "specified", "a", "default", "context", "is", "built", "from", "the", "XML", "node", "t...
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L269-L278
samskivert/samskivert
src/main/java/com/samskivert/util/PropertiesUtil.java
PropertiesUtil.loadAndGet
public static String loadAndGet (String loaderPath, String key) { try { Properties props = ConfigUtil.loadProperties(loaderPath); return props.getProperty(key); } catch (IOException ioe) { return null; } }
java
public static String loadAndGet (String loaderPath, String key) { try { Properties props = ConfigUtil.loadProperties(loaderPath); return props.getProperty(key); } catch (IOException ioe) { return null; } }
[ "public", "static", "String", "loadAndGet", "(", "String", "loaderPath", ",", "String", "key", ")", "{", "try", "{", "Properties", "props", "=", "ConfigUtil", ".", "loadProperties", "(", "loaderPath", ")", ";", "return", "props", ".", "getProperty", "(", "ke...
Like {@link #loadAndGet(File,String)} but obtains the properties data via the classloader. @return the value of the key in question or null if no such key exists or an error occurred loading the properties file.
[ "Like", "{", "@link", "#loadAndGet", "(", "File", "String", ")", "}", "but", "obtains", "the", "properties", "data", "via", "the", "classloader", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/PropertiesUtil.java#L197-L205
derari/cthul
xml/src/main/java/org/cthul/resolve/ResolvingException.java
ResolvingException.throwIf
public <T1 extends Throwable, T2 extends Throwable> RuntimeException throwIf(Class<T1> t1, Class<T2> t2) throws T1, T2 { return throwIf(t1, t2, NULL_EX, NULL_EX); }
java
public <T1 extends Throwable, T2 extends Throwable> RuntimeException throwIf(Class<T1> t1, Class<T2> t2) throws T1, T2 { return throwIf(t1, t2, NULL_EX, NULL_EX); }
[ "public", "<", "T1", "extends", "Throwable", ",", "T2", "extends", "Throwable", ">", "RuntimeException", "throwIf", "(", "Class", "<", "T1", ">", "t1", ",", "Class", "<", "T2", ">", "t2", ")", "throws", "T1", ",", "T2", "{", "return", "throwIf", "(", ...
Throws the {@linkplain #getResolvingCause() cause} if it is one of the specified types, otherwise returns a {@linkplain #asRuntimeException() runtime exception}. @param <T1> @param <T2> @param t1 @param t2 @return runtime exception @throws T1 @throws T2
[ "Throws", "the", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/xml/src/main/java/org/cthul/resolve/ResolvingException.java#L245-L249
rimerosolutions/ant-git-tasks
src/main/java/com/rimerosolutions/ant/git/GitSettings.java
GitSettings.setIdentity
public void setIdentity(String name, String email) { if (GitTaskUtils.isNullOrBlankString(name) || GitTaskUtils.isNullOrBlankString(email)) { throw new IllegalArgumentException("Both the username and password must be provided."); } identity = new ...
java
public void setIdentity(String name, String email) { if (GitTaskUtils.isNullOrBlankString(name) || GitTaskUtils.isNullOrBlankString(email)) { throw new IllegalArgumentException("Both the username and password must be provided."); } identity = new ...
[ "public", "void", "setIdentity", "(", "String", "name", ",", "String", "email", ")", "{", "if", "(", "GitTaskUtils", ".", "isNullOrBlankString", "(", "name", ")", "||", "GitTaskUtils", ".", "isNullOrBlankString", "(", "email", ")", ")", "{", "throw", "new", ...
Sets the name and email for the Git commands user @param name The Git user's name @param email The Git user's email
[ "Sets", "the", "name", "and", "email", "for", "the", "Git", "commands", "user" ]
train
https://github.com/rimerosolutions/ant-git-tasks/blob/bfb32fe68afe6b9dcfd0a5194497d748ef3e8a6f/src/main/java/com/rimerosolutions/ant/git/GitSettings.java#L52-L58
alkacon/opencms-core
src/org/opencms/workflow/CmsDefaultPublishResourceFormatter.java
CmsDefaultPublishResourceFormatter.getOuAwareName
public static String getOuAwareName(CmsObject cms, String name) { String ou = CmsOrganizationalUnit.getParentFqn(name); if (ou.equals(cms.getRequestContext().getCurrentUser().getOuFqn())) { return CmsOrganizationalUnit.getSimpleName(name); } return CmsOrganizationalUnit.SEPA...
java
public static String getOuAwareName(CmsObject cms, String name) { String ou = CmsOrganizationalUnit.getParentFqn(name); if (ou.equals(cms.getRequestContext().getCurrentUser().getOuFqn())) { return CmsOrganizationalUnit.getSimpleName(name); } return CmsOrganizationalUnit.SEPA...
[ "public", "static", "String", "getOuAwareName", "(", "CmsObject", "cms", ",", "String", "name", ")", "{", "String", "ou", "=", "CmsOrganizationalUnit", ".", "getParentFqn", "(", "name", ")", ";", "if", "(", "ou", ".", "equals", "(", "cms", ".", "getRequest...
Returns the simple name if the ou is the same as the current user's ou.<p> @param cms the CMS context @param name the fully qualified name to check @return the simple name if the ou is the same as the current user's ou
[ "Returns", "the", "simple", "name", "if", "the", "ou", "is", "the", "same", "as", "the", "current", "user", "s", "ou", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workflow/CmsDefaultPublishResourceFormatter.java#L324-L331
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/json/JsonObject.java
JsonObject.getString
public String getString(String name, String defaultValue) { JsonValue value = get(name); return value != null ? value.asString() : defaultValue; }
java
public String getString(String name, String defaultValue) { JsonValue value = get(name); return value != null ? value.asString() : defaultValue; }
[ "public", "String", "getString", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "JsonValue", "value", "=", "get", "(", "name", ")", ";", "return", "value", "!=", "null", "?", "value", ".", "asString", "(", ")", ":", "defaultValue", ";", ...
Returns the <code>String</code> value of the member with the specified name in this object. If this object does not contain a member with this name, the given default value is returned. If this object contains multiple members with the given name, the last one is picked. If this member's value does not represent a JSON...
[ "Returns", "the", "<code", ">", "String<", "/", "code", ">", "value", "of", "the", "member", "with", "the", "specified", "name", "in", "this", "object", ".", "If", "this", "object", "does", "not", "contain", "a", "member", "with", "this", "name", "the", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/json/JsonObject.java#L675-L678
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java
MapExtensions.operator_minus
@Pure public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Pair<? extends K, ? extends V> right) { return Maps.filterEntries(left, new Predicate<Entry<K, V>>() { @Override public boolean apply(Entry<K, V> input) { return !Objects.equal(input.getKey(), right.getKey()) || !Objects.equal(input....
java
@Pure public static <K, V> Map<K, V> operator_minus(Map<K, V> left, final Pair<? extends K, ? extends V> right) { return Maps.filterEntries(left, new Predicate<Entry<K, V>>() { @Override public boolean apply(Entry<K, V> input) { return !Objects.equal(input.getKey(), right.getKey()) || !Objects.equal(input....
[ "@", "Pure", "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "operator_minus", "(", "Map", "<", "K", ",", "V", ">", "left", ",", "final", "Pair", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "right", "...
Remove the given pair from a given map for obtaining a new map. <p> If the given key is inside the map, but is not mapped to the given value, the map will not be changed. </p> <p> The replied map is a view on the given map. It means that any change in the original map is reflected to the result of this operation. </p...
[ "Remove", "the", "given", "pair", "from", "a", "given", "map", "for", "obtaining", "a", "new", "map", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java#L275-L283
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/rule/ItemRule.java
ItemRule.putValue
public void putValue(String name, Token[] tokens) { if (type == null) { type = ItemType.MAP; } if (!isMappableType()) { throw new IllegalArgumentException("The type of this item must be 'map' or 'properties'"); } if (tokensMap == null) { tokens...
java
public void putValue(String name, Token[] tokens) { if (type == null) { type = ItemType.MAP; } if (!isMappableType()) { throw new IllegalArgumentException("The type of this item must be 'map' or 'properties'"); } if (tokensMap == null) { tokens...
[ "public", "void", "putValue", "(", "String", "name", ",", "Token", "[", "]", "tokens", ")", "{", "if", "(", "type", "==", "null", ")", "{", "type", "=", "ItemType", ".", "MAP", ";", "}", "if", "(", "!", "isMappableType", "(", ")", ")", "{", "thro...
Puts the specified value with the specified key to this Map type item. @param name the value name; may be null @param tokens an array of tokens
[ "Puts", "the", "specified", "value", "with", "the", "specified", "key", "to", "this", "Map", "type", "item", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/rule/ItemRule.java#L250-L261
EdwardRaff/JSAT
JSAT/src/jsat/driftdetectors/DDM.java
DDM.setWarningThreshold
public void setWarningThreshold(double warningThreshold) { if(warningThreshold <= 0 || Double.isNaN(warningThreshold) || Double.isInfinite(warningThreshold)) throw new IllegalArgumentException("warning threshold must be positive, not " + warningThreshold); this.warningThreshold = warning...
java
public void setWarningThreshold(double warningThreshold) { if(warningThreshold <= 0 || Double.isNaN(warningThreshold) || Double.isInfinite(warningThreshold)) throw new IllegalArgumentException("warning threshold must be positive, not " + warningThreshold); this.warningThreshold = warning...
[ "public", "void", "setWarningThreshold", "(", "double", "warningThreshold", ")", "{", "if", "(", "warningThreshold", "<=", "0", "||", "Double", ".", "isNaN", "(", "warningThreshold", ")", "||", "Double", ".", "isInfinite", "(", "warningThreshold", ")", ")", "t...
Sets the multiplier on the standard deviation that must be exceeded to initiate a warning state. Once in the warning state, DDM will begin to collect a history of the inputs <br> Increasing the warning threshold makes it take longer to start detecting a change, but reduces false positives. <br> If the warning threshold...
[ "Sets", "the", "multiplier", "on", "the", "standard", "deviation", "that", "must", "be", "exceeded", "to", "initiate", "a", "warning", "state", ".", "Once", "in", "the", "warning", "state", "DDM", "will", "begin", "to", "collect", "a", "history", "of", "th...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/driftdetectors/DDM.java#L152-L157
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java
MethodFinder.findMatchingMethod
public static Method findMatchingMethod(Method originalMethod, String methodName) { Class<?> originalClass = originalMethod.getDeclaringClass(); return AccessController.doPrivileged(new PrivilegedAction<Method>() { @Override public Method run() { return findMatch...
java
public static Method findMatchingMethod(Method originalMethod, String methodName) { Class<?> originalClass = originalMethod.getDeclaringClass(); return AccessController.doPrivileged(new PrivilegedAction<Method>() { @Override public Method run() { return findMatch...
[ "public", "static", "Method", "findMatchingMethod", "(", "Method", "originalMethod", ",", "String", "methodName", ")", "{", "Class", "<", "?", ">", "originalClass", "=", "originalMethod", ".", "getDeclaringClass", "(", ")", ";", "return", "AccessController", ".", ...
Recursively search the class hierarchy of the class which declares {@code originalMethod} to find a method named {@code methodName} with the same signature as {@code originalMethod} @return The matching method, or {@code null} if one could not be found
[ "Recursively", "search", "the", "class", "hierarchy", "of", "the", "class", "which", "declares", "{", "@code", "originalMethod", "}", "to", "find", "a", "method", "named", "{", "@code", "methodName", "}", "with", "the", "same", "signature", "as", "{", "@code...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java#L40-L49
playn/playn
scene/src/playn/scene/LayerUtil.java
LayerUtil.layerToParent
public static Point layerToParent(Layer layer, Layer parent, XY point, Point into) { into.set(point); while (layer != parent) { if (layer == null) { throw new IllegalArgumentException( "Failed to find parent, perhaps you passed parent, layer instead of " + "layer, parent?"); ...
java
public static Point layerToParent(Layer layer, Layer parent, XY point, Point into) { into.set(point); while (layer != parent) { if (layer == null) { throw new IllegalArgumentException( "Failed to find parent, perhaps you passed parent, layer instead of " + "layer, parent?"); ...
[ "public", "static", "Point", "layerToParent", "(", "Layer", "layer", ",", "Layer", "parent", ",", "XY", "point", ",", "Point", "into", ")", "{", "into", ".", "set", "(", "point", ")", ";", "while", "(", "layer", "!=", "parent", ")", "{", "if", "(", ...
Converts the supplied point from coordinates relative to the specified child layer to coordinates relative to the specified parent layer. The results are stored into {@code into}, which is returned for convenience.
[ "Converts", "the", "supplied", "point", "from", "coordinates", "relative", "to", "the", "specified", "child", "layer", "to", "coordinates", "relative", "to", "the", "specified", "parent", "layer", ".", "The", "results", "are", "stored", "into", "{" ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/LayerUtil.java#L54-L68
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.addComment
public Comment addComment(Object projectIdOrPath, String sha, String note, String path, Integer line, LineType lineType) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("note", note, true) .withParam("path", path) .withParam("li...
java
public Comment addComment(Object projectIdOrPath, String sha, String note, String path, Integer line, LineType lineType) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("note", note, true) .withParam("path", path) .withParam("li...
[ "public", "Comment", "addComment", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "String", "note", ",", "String", "path", ",", "Integer", "line", ",", "LineType", "lineType", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "...
Add a comment to a commit. In order to post a comment in a particular line of a particular file, you must specify the full commit SHA, the path, the line and lineType should be NEW. <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the ...
[ "Add", "a", "comment", "to", "a", "commit", ".", "In", "order", "to", "post", "a", "comment", "in", "a", "particular", "line", "of", "a", "particular", "file", "you", "must", "specify", "the", "full", "commit", "SHA", "the", "path", "the", "line", "and...
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L526-L534
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cdn_dedicated_serviceName_cacheRule_duration_POST
public OvhOrder cdn_dedicated_serviceName_cacheRule_duration_POST(String serviceName, String duration, OvhOrderCacheRuleEnum cacheRule) throws IOException { String qPath = "/order/cdn/dedicated/{serviceName}/cacheRule/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = n...
java
public OvhOrder cdn_dedicated_serviceName_cacheRule_duration_POST(String serviceName, String duration, OvhOrderCacheRuleEnum cacheRule) throws IOException { String qPath = "/order/cdn/dedicated/{serviceName}/cacheRule/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = n...
[ "public", "OvhOrder", "cdn_dedicated_serviceName_cacheRule_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhOrderCacheRuleEnum", "cacheRule", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cdn/dedicated/{serviceName}/cacheR...
Create order REST: POST /order/cdn/dedicated/{serviceName}/cacheRule/{duration} @param cacheRule [required] cache rule upgrade option to 100 or 1000 @param serviceName [required] The internal name of your CDN offer @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5293-L5300
nutzam/nutzboot
nutzboot-starter/nutzboot-starter-fastdfs/src/main/java/org/nutz/boot/starter/fastdfs/FastdfsService.java
FastdfsService.getFileName
private String getFileName(int type, String tokenFilename) { StringBuilder sb = new StringBuilder(); String filename = tokenFilename.substring(0, tokenFilename.indexOf(EXT_SEPERATOR)); String ext = tokenFilename.substring(tokenFilename.indexOf(EXT_SEPERATOR)); sb.append(filename); ...
java
private String getFileName(int type, String tokenFilename) { StringBuilder sb = new StringBuilder(); String filename = tokenFilename.substring(0, tokenFilename.indexOf(EXT_SEPERATOR)); String ext = tokenFilename.substring(tokenFilename.indexOf(EXT_SEPERATOR)); sb.append(filename); ...
[ "private", "String", "getFileName", "(", "int", "type", ",", "String", "tokenFilename", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "String", "filename", "=", "tokenFilename", ".", "substring", "(", "0", ",", "tokenFilename", ...
获取文件名 @param type 0-原图 1水印图 2缩略图 @param tokenFilename 文件名 @return
[ "获取文件名" ]
train
https://github.com/nutzam/nutzboot/blob/fd33fd4fdce058eab594f28e4d3202f997e3c66a/nutzboot-starter/nutzboot-starter-fastdfs/src/main/java/org/nutz/boot/starter/fastdfs/FastdfsService.java#L174-L189
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java
ICUResourceBundle.getAvailEntry
private static AvailEntry getAvailEntry(String key, ClassLoader loader) { return GET_AVAILABLE_CACHE.getInstance(key, loader); }
java
private static AvailEntry getAvailEntry(String key, ClassLoader loader) { return GET_AVAILABLE_CACHE.getInstance(key, loader); }
[ "private", "static", "AvailEntry", "getAvailEntry", "(", "String", "key", ",", "ClassLoader", "loader", ")", "{", "return", "GET_AVAILABLE_CACHE", ".", "getInstance", "(", "key", ",", "loader", ")", ";", "}" ]
Stores the locale information in a cache accessed by key (bundle prefix). The cached objects are AvailEntries. The cache is implemented by SoftCache so it can be GC'd.
[ "Stores", "the", "locale", "information", "in", "a", "cache", "accessed", "by", "key", "(", "bundle", "prefix", ")", ".", "The", "cached", "objects", "are", "AvailEntries", ".", "The", "cache", "is", "implemented", "by", "SoftCache", "so", "it", "can", "be...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L798-L800
jnr/jnr-x86asm
src/main/java/jnr/x86asm/SerializerIntrinsics.java
SerializerIntrinsics.pcmpistri
public final void pcmpistri(XMMRegister dst, XMMRegister src, Immediate imm8) { emitX86(INST_PCMPISTRI, dst, src, imm8); }
java
public final void pcmpistri(XMMRegister dst, XMMRegister src, Immediate imm8) { emitX86(INST_PCMPISTRI, dst, src, imm8); }
[ "public", "final", "void", "pcmpistri", "(", "XMMRegister", "dst", ",", "XMMRegister", "src", ",", "Immediate", "imm8", ")", "{", "emitX86", "(", "INST_PCMPISTRI", ",", "dst", ",", "src", ",", "imm8", ")", ";", "}" ]
Packed Compare Implicit Length Strings, Return Index (SSE4.2).
[ "Packed", "Compare", "Implicit", "Length", "Strings", "Return", "Index", "(", "SSE4", ".", "2", ")", "." ]
train
https://github.com/jnr/jnr-x86asm/blob/fdcf68fb3dae49e607a49e33399e3dad1ada5536/src/main/java/jnr/x86asm/SerializerIntrinsics.java#L6551-L6554
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobHistory.java
JobHistory.parseHistoryFromFS
public static void parseHistoryFromFS(String path, Listener l, FileSystem fs) throws IOException{ FSDataInputStream in = fs.open(new Path(path)); BufferedReader reader = new BufferedReader(new InputStreamReader (in)); try { String line = null; StringBuffer buf = new StringBuffer(); ...
java
public static void parseHistoryFromFS(String path, Listener l, FileSystem fs) throws IOException{ FSDataInputStream in = fs.open(new Path(path)); BufferedReader reader = new BufferedReader(new InputStreamReader (in)); try { String line = null; StringBuffer buf = new StringBuffer(); ...
[ "public", "static", "void", "parseHistoryFromFS", "(", "String", "path", ",", "Listener", "l", ",", "FileSystem", "fs", ")", "throws", "IOException", "{", "FSDataInputStream", "in", "=", "fs", ".", "open", "(", "new", "Path", "(", "path", ")", ")", ";", ...
Parses history file and invokes Listener.handle() for each line of history. It can be used for looking through history files for specific items without having to keep whole history in memory. @param path path to history file @param l Listener for history events @param fs FileSystem where history file is present @throws...
[ "Parses", "history", "file", "and", "invokes", "Listener", ".", "handle", "()", "for", "each", "line", "of", "history", ".", "It", "can", "be", "used", "for", "looking", "through", "history", "files", "for", "specific", "items", "without", "having", "to", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobHistory.java#L573-L611
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getAccountTransactions
public Transactions getAccountTransactions(final String accountCode, final TransactionState state, final TransactionType type, final QueryParams params) { if (state != null) params.put("state", state.getType()); if (type != null) params.put("type", type.getType()); return doGET(Accounts.ACCOUNT...
java
public Transactions getAccountTransactions(final String accountCode, final TransactionState state, final TransactionType type, final QueryParams params) { if (state != null) params.put("state", state.getType()); if (type != null) params.put("type", type.getType()); return doGET(Accounts.ACCOUNT...
[ "public", "Transactions", "getAccountTransactions", "(", "final", "String", "accountCode", ",", "final", "TransactionState", "state", ",", "final", "TransactionType", "type", ",", "final", "QueryParams", "params", ")", "{", "if", "(", "state", "!=", "null", ")", ...
Lookup an account's transactions history given query params <p> Returns the account's transaction history @param accountCode recurly account id @param state {@link TransactionState} @param type {@link TransactionType} @param params {@link QueryParams} @return the transaction history associated with this account on suc...
[ "Lookup", "an", "account", "s", "transactions", "history", "given", "query", "params", "<p", ">", "Returns", "the", "account", "s", "transaction", "history" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L879-L885
Erudika/para
para-core/src/main/java/com/erudika/para/utils/Utils.java
Utils.abbreviateInt
public static String abbreviateInt(Number number, int decPlaces) { if (number == null) { return ""; } String abbrevn = number.toString(); // 2 decimal places => 100, 3 => 1000, etc decPlaces = (int) Math.pow(10, decPlaces); // Enumerate number abbreviations String[] abbrev = {"K", "M", "B", "T"}; boo...
java
public static String abbreviateInt(Number number, int decPlaces) { if (number == null) { return ""; } String abbrevn = number.toString(); // 2 decimal places => 100, 3 => 1000, etc decPlaces = (int) Math.pow(10, decPlaces); // Enumerate number abbreviations String[] abbrev = {"K", "M", "B", "T"}; boo...
[ "public", "static", "String", "abbreviateInt", "(", "Number", "number", ",", "int", "decPlaces", ")", "{", "if", "(", "number", "==", "null", ")", "{", "return", "\"\"", ";", "}", "String", "abbrevn", "=", "number", ".", "toString", "(", ")", ";", "// ...
Abbreviates an integer by adding a letter suffix at the end. E.g. "M" for millions, "K" for thousands, etc. @param number a big integer @param decPlaces decimal places @return the rounded integer as a string
[ "Abbreviates", "an", "integer", "by", "adding", "a", "letter", "suffix", "at", "the", "end", ".", "E", ".", "g", ".", "M", "for", "millions", "K", "for", "thousands", "etc", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/Utils.java#L561-L587
dita-ot/dita-ot
src/main/java/org/dita/dost/util/XMLUtils.java
XMLUtils.escapeXML
public static String escapeXML(final char[] chars, final int offset, final int length) { final StringBuilder escaped = new StringBuilder(); final int end = offset + length; for (int i = offset; i < end; ++i) { final char c = chars[i]; switch (c) { case '\'':...
java
public static String escapeXML(final char[] chars, final int offset, final int length) { final StringBuilder escaped = new StringBuilder(); final int end = offset + length; for (int i = offset; i < end; ++i) { final char c = chars[i]; switch (c) { case '\'':...
[ "public", "static", "String", "escapeXML", "(", "final", "char", "[", "]", "chars", ",", "final", "int", "offset", ",", "final", "int", "length", ")", "{", "final", "StringBuilder", "escaped", "=", "new", "StringBuilder", "(", ")", ";", "final", "int", "...
Escape XML characters. @param chars char arrays @param offset start position @param length arrays lenth @return escaped value
[ "Escape", "XML", "characters", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLUtils.java#L650-L679
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/factory/helper/BaseAdsServiceClientFactoryHelper.java
BaseAdsServiceClientFactoryHelper.createAdsServiceClient
@Override public C createAdsServiceClient(D adsServiceDescriptor, S adsSession) throws ServiceException { Object soapClient = createSoapClient(adsServiceDescriptor); C adsServiceClient = createServiceClient(soapClient, adsServiceDescriptor, adsSession); try { adsServiceClient.setEndpointAddress(adsS...
java
@Override public C createAdsServiceClient(D adsServiceDescriptor, S adsSession) throws ServiceException { Object soapClient = createSoapClient(adsServiceDescriptor); C adsServiceClient = createServiceClient(soapClient, adsServiceDescriptor, adsSession); try { adsServiceClient.setEndpointAddress(adsS...
[ "@", "Override", "public", "C", "createAdsServiceClient", "(", "D", "adsServiceDescriptor", ",", "S", "adsSession", ")", "throws", "ServiceException", "{", "Object", "soapClient", "=", "createSoapClient", "(", "adsServiceDescriptor", ")", ";", "C", "adsServiceClient",...
Creates an {@link AdsServiceClient} given an {@link AdsServiceDescriptor} descriptor and an {@link AdsSession}. @param adsServiceDescriptor descriptor with information on ads service @param adsSession the session associated with the desired client @return the created {@link AdsServiceClient} @throws ServiceException i...
[ "Creates", "an", "{", "@link", "AdsServiceClient", "}", "given", "an", "{", "@link", "AdsServiceDescriptor", "}", "descriptor", "and", "an", "{", "@link", "AdsSession", "}", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/factory/helper/BaseAdsServiceClientFactoryHelper.java#L68-L79
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.removeAttachment
public ApiSuccessResponse removeAttachment(String mediatype, String id, String documentId, RemoveAttachmentData removeAttachmentData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = removeAttachmentWithHttpInfo(mediatype, id, documentId, removeAttachmentData); return resp.getData(); }
java
public ApiSuccessResponse removeAttachment(String mediatype, String id, String documentId, RemoveAttachmentData removeAttachmentData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = removeAttachmentWithHttpInfo(mediatype, id, documentId, removeAttachmentData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "removeAttachment", "(", "String", "mediatype", ",", "String", "id", ",", "String", "documentId", ",", "RemoveAttachmentData", "removeAttachmentData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "res...
Remove the attachment of the open-media interaction Remove the attachment of the interaction specified in the documentId path parameter @param mediatype media-type of interaction to remove attachment (required) @param id id of interaction (required) @param documentId id of document to remove (required) @param removeAtt...
[ "Remove", "the", "attachment", "of", "the", "open", "-", "media", "interaction", "Remove", "the", "attachment", "of", "the", "interaction", "specified", "in", "the", "documentId", "path", "parameter" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L3781-L3784
rhuss/jolokia
agent/core/src/main/java/org/jolokia/backend/executor/AbstractMBeanServerExecutor.java
AbstractMBeanServerExecutor.registerForMBeanNotifications
protected void registerForMBeanNotifications() { Set<MBeanServerConnection> servers = getMBeanServers(); Exception lastExp = null; StringBuilder errors = new StringBuilder(); for (MBeanServerConnection server : servers) { try { JmxUtil.addMBeanRegistrationList...
java
protected void registerForMBeanNotifications() { Set<MBeanServerConnection> servers = getMBeanServers(); Exception lastExp = null; StringBuilder errors = new StringBuilder(); for (MBeanServerConnection server : servers) { try { JmxUtil.addMBeanRegistrationList...
[ "protected", "void", "registerForMBeanNotifications", "(", ")", "{", "Set", "<", "MBeanServerConnection", ">", "servers", "=", "getMBeanServers", "(", ")", ";", "Exception", "lastExp", "=", "null", ";", "StringBuilder", "errors", "=", "new", "StringBuilder", "(", ...
Add this executor as listener for MBeanServer notification so that we can update the local timestamp for when the set of registered MBeans has changed last.
[ "Add", "this", "executor", "as", "listener", "for", "MBeanServer", "notification", "so", "that", "we", "can", "update", "the", "local", "timestamp", "for", "when", "the", "set", "of", "registered", "MBeans", "has", "changed", "last", "." ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/backend/executor/AbstractMBeanServerExecutor.java#L122-L136
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_number_serviceName_PUT
public void billingAccount_number_serviceName_PUT(String billingAccount, String serviceName, OvhNumber body) throws IOException { String qPath = "/telephony/{billingAccount}/number/{serviceName}"; StringBuilder sb = path(qPath, billingAccount, serviceName); exec(qPath, "PUT", sb.toString(), body); }
java
public void billingAccount_number_serviceName_PUT(String billingAccount, String serviceName, OvhNumber body) throws IOException { String qPath = "/telephony/{billingAccount}/number/{serviceName}"; StringBuilder sb = path(qPath, billingAccount, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "billingAccount_number_serviceName_PUT", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhNumber", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/number/{serviceName}\"", ";", "Strin...
Alter this object properties REST: PUT /telephony/{billingAccount}/number/{serviceName} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param serviceName [required] Name of the service
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5666-L5670
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.naturalTime
@Expose public static String naturalTime(final Date duration, final Locale locale) { return naturalTime(new Date(), duration, locale); }
java
@Expose public static String naturalTime(final Date duration, final Locale locale) { return naturalTime(new Date(), duration, locale); }
[ "@", "Expose", "public", "static", "String", "naturalTime", "(", "final", "Date", "duration", ",", "final", "Locale", "locale", ")", "{", "return", "naturalTime", "(", "new", "Date", "(", ")", ",", "duration", ",", "locale", ")", ";", "}" ]
Same as {@link #naturalTime(Date)} for the specified locale. @param duration The duration @param locale The locale @return String representing the relative date
[ "Same", "as", "{", "@link", "#naturalTime", "(", "Date", ")", "}", "for", "the", "specified", "locale", "." ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L1666-L1670
haifengl/smile
core/src/main/java/smile/association/TotalSupportTree.java
TotalSupportTree.getSupport
private int getSupport(int[] itemset, int index, Node node) { int item = order[itemset[index]]; Node child = node.children[item]; if (child != null) { // If the index is 0, then this is the last element (i.e the // input is a 1 itemset) and therefore item set found ...
java
private int getSupport(int[] itemset, int index, Node node) { int item = order[itemset[index]]; Node child = node.children[item]; if (child != null) { // If the index is 0, then this is the last element (i.e the // input is a 1 itemset) and therefore item set found ...
[ "private", "int", "getSupport", "(", "int", "[", "]", "itemset", ",", "int", "index", ",", "Node", "node", ")", "{", "int", "item", "=", "order", "[", "itemset", "[", "index", "]", "]", ";", "Node", "child", "=", "node", ".", "children", "[", "item...
Returns the support value for the given item set if found in the T-tree and 0 otherwise. @param itemset the given item set. @param index the current index in the given item set. @param nodes the nodes of the current T-tree level. @return the support value (0 if not found)
[ "Returns", "the", "support", "value", "for", "the", "given", "item", "set", "if", "found", "in", "the", "T", "-", "tree", "and", "0", "otherwise", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/association/TotalSupportTree.java#L147-L163
openengsb/openengsb
components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/EntryFactory.java
EntryFactory.addDescription
private static void addDescription(Entry entry, String description) { try { entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.DESCRIPTIVE_OBJECT_OC); if (description == null) { entry.add(SchemaConstants.EMPTY_FLAG_ATTRIBUTE, String.valueOf(false)); // case...
java
private static void addDescription(Entry entry, String description) { try { entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.DESCRIPTIVE_OBJECT_OC); if (description == null) { entry.add(SchemaConstants.EMPTY_FLAG_ATTRIBUTE, String.valueOf(false)); // case...
[ "private", "static", "void", "addDescription", "(", "Entry", "entry", ",", "String", "description", ")", "{", "try", "{", "entry", ".", "add", "(", "SchemaConstants", ".", "OBJECT_CLASS_ATTRIBUTE", ",", "SchemaConstants", ".", "DESCRIPTIVE_OBJECT_OC", ")", ";", ...
3 possibilities:<br> 1) description is null -> emptyFlag = false, no description attribute <br> 2) description is empty -> emptyFlag = true, no description attribute <br> 3) description exists -> no emptyFlag, description attribute exists and has a value
[ "3", "possibilities", ":", "<br", ">", "1", ")", "description", "is", "null", "-", ">", "emptyFlag", "=", "false", "no", "description", "attribute", "<br", ">", "2", ")", "description", "is", "empty", "-", ">", "emptyFlag", "=", "true", "no", "descriptio...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/EntryFactory.java#L160-L173
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/Message.java
Message.setMetadata
public void setMetadata(String key, Object value) { if (value != null) { getMetadata().put(key, value); } }
java
public void setMetadata(String key, Object value) { if (value != null) { getMetadata().put(key, value); } }
[ "public", "void", "setMetadata", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "getMetadata", "(", ")", ".", "put", "(", "key", ",", "value", ")", ";", "}", "}" ]
Sets a metadata value. @param key The key. @param value The value.
[ "Sets", "a", "metadata", "value", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/Message.java#L146-L150
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetVMsInner.java
VirtualMachineScaleSetVMsInner.getInstanceViewAsync
public Observable<VirtualMachineScaleSetVMInstanceViewInner> getInstanceViewAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMInstanceView...
java
public Observable<VirtualMachineScaleSetVMInstanceViewInner> getInstanceViewAsync(String resourceGroupName, String vmScaleSetName, String instanceId) { return getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMInstanceView...
[ "public", "Observable", "<", "VirtualMachineScaleSetVMInstanceViewInner", ">", "getInstanceViewAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "String", "instanceId", ")", "{", "return", "getInstanceViewWithServiceResponseAsync", "(", "resour...
Gets the status of a virtual machine from a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceId The instance ID of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validation @return the observab...
[ "Gets", "the", "status", "of", "a", "virtual", "machine", "from", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetVMsInner.java#L1161-L1168
JodaOrg/joda-time
src/main/java/org/joda/time/Days.java
Days.daysBetween
public static Days daysBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.days()); return Days.days(amount); }
java
public static Days daysBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.days()); return Days.days(amount); }
[ "public", "static", "Days", "daysBetween", "(", "ReadableInstant", "start", ",", "ReadableInstant", "end", ")", "{", "int", "amount", "=", "BaseSingleFieldPeriod", ".", "between", "(", "start", ",", "end", ",", "DurationFieldType", ".", "days", "(", ")", ")", ...
Creates a <code>Days</code> representing the number of whole days between the two specified datetimes. This method correctly handles any daylight savings time changes that may occur during the interval. @param start the start instant, must not be null @param end the end instant, must not be null @return the period i...
[ "Creates", "a", "<code", ">", "Days<", "/", "code", ">", "representing", "the", "number", "of", "whole", "days", "between", "the", "two", "specified", "datetimes", ".", "This", "method", "correctly", "handles", "any", "daylight", "savings", "time", "changes", ...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Days.java#L117-L120
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/websocket/stream/IOState.java
IOState.onReadFailure
public void onReadFailure(Throwable t) { ConnectionState event = null; synchronized (this) { if (this.state == ConnectionState.CLOSED) { // already closed return; } // Build out Close Reason String reason = "WebSocket Read ...
java
public void onReadFailure(Throwable t) { ConnectionState event = null; synchronized (this) { if (this.state == ConnectionState.CLOSED) { // already closed return; } // Build out Close Reason String reason = "WebSocket Read ...
[ "public", "void", "onReadFailure", "(", "Throwable", "t", ")", "{", "ConnectionState", "event", "=", "null", ";", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "state", "==", "ConnectionState", ".", "CLOSED", ")", "{", "// already closed", ...
The local endpoint has reached a read failure. <p> This could be a normal result after a proper close handshake, or even a premature close due to a connection disconnect. @param t the read failure
[ "The", "local", "endpoint", "has", "reached", "a", "read", "failure", ".", "<p", ">", "This", "could", "be", "a", "normal", "result", "after", "a", "proper", "close", "handshake", "or", "even", "a", "premature", "close", "due", "to", "a", "connection", "...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/websocket/stream/IOState.java#L395-L430
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/util/ChartModelProvider.java
ChartModelProvider.translateMarkerToRange
private static Double translateMarkerToRange(double size, Double min, Double max, Double value) { if (value != null && min != null && max != null) { return (size / (max - min)) * (value - min); } return value; }
java
private static Double translateMarkerToRange(double size, Double min, Double max, Double value) { if (value != null && min != null && max != null) { return (size / (max - min)) * (value - min); } return value; }
[ "private", "static", "Double", "translateMarkerToRange", "(", "double", "size", ",", "Double", "min", ",", "Double", "max", ",", "Double", "value", ")", "{", "if", "(", "value", "!=", "null", "&&", "min", "!=", "null", "&&", "max", "!=", "null", ")", "...
Translates marker value to be correct in given range @param size size of the range @param min min value @param max max value @param value original value @return translated value
[ "Translates", "marker", "value", "to", "be", "correct", "in", "given", "range" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/util/ChartModelProvider.java#L781-L787
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForResourceGroup
public PolicyStatesQueryResultsInner listQueryResultsForResourceGroup(PolicyStatesResource policyStatesResource, String subscriptionId, String resourceGroupName, QueryOptions queryOptions) { return listQueryResultsForResourceGroupWithServiceResponseAsync(policyStatesResource, subscriptionId, resourceGroupName, ...
java
public PolicyStatesQueryResultsInner listQueryResultsForResourceGroup(PolicyStatesResource policyStatesResource, String subscriptionId, String resourceGroupName, QueryOptions queryOptions) { return listQueryResultsForResourceGroupWithServiceResponseAsync(policyStatesResource, subscriptionId, resourceGroupName, ...
[ "public", "PolicyStatesQueryResultsInner", "listQueryResultsForResourceGroup", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "subscriptionId", ",", "String", "resourceGroupName", ",", "QueryOptions", "queryOptions", ")", "{", "return", "listQueryResultsForRe...
Queries policy states for the resources under the resource group. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest' @par...
[ "Queries", "policy", "states", "for", "the", "resources", "under", "the", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L982-L984
infinispan/infinispan
core/src/main/java/org/infinispan/distribution/LocalizedCacheTopology.java
LocalizedCacheTopology.makeSegmentedSingletonTopology
public static LocalizedCacheTopology makeSegmentedSingletonTopology(KeyPartitioner keyPartitioner, int numSegments, Address localAddress) { return new LocalizedCacheTopology(keyPartitioner, numSegments, localAddress); }
java
public static LocalizedCacheTopology makeSegmentedSingletonTopology(KeyPartitioner keyPartitioner, int numSegments, Address localAddress) { return new LocalizedCacheTopology(keyPartitioner, numSegments, localAddress); }
[ "public", "static", "LocalizedCacheTopology", "makeSegmentedSingletonTopology", "(", "KeyPartitioner", "keyPartitioner", ",", "int", "numSegments", ",", "Address", "localAddress", ")", "{", "return", "new", "LocalizedCacheTopology", "(", "keyPartitioner", ",", "numSegments"...
Creates a new local topology that has a single address but multiple segments. This is useful when the data storage is segmented in some way (ie. segmented store) @param keyPartitioner partitioner to decide which segment a given key maps to @param numSegments how many segments there are @param localAddress the address o...
[ "Creates", "a", "new", "local", "topology", "that", "has", "a", "single", "address", "but", "multiple", "segments", ".", "This", "is", "useful", "when", "the", "data", "storage", "is", "segmented", "in", "some", "way", "(", "ie", ".", "segmented", "store",...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/distribution/LocalizedCacheTopology.java#L61-L64
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/RTreeIndexCoreExtension.java
RTreeIndexCoreExtension.dropAllTriggers
public void dropAllTriggers(String tableName, String geometryColumnName) { dropInsertTrigger(tableName, geometryColumnName); dropUpdate1Trigger(tableName, geometryColumnName); dropUpdate2Trigger(tableName, geometryColumnName); dropUpdate3Trigger(tableName, geometryColumnName); dropUpdate4Trigger(tableName, g...
java
public void dropAllTriggers(String tableName, String geometryColumnName) { dropInsertTrigger(tableName, geometryColumnName); dropUpdate1Trigger(tableName, geometryColumnName); dropUpdate2Trigger(tableName, geometryColumnName); dropUpdate3Trigger(tableName, geometryColumnName); dropUpdate4Trigger(tableName, g...
[ "public", "void", "dropAllTriggers", "(", "String", "tableName", ",", "String", "geometryColumnName", ")", "{", "dropInsertTrigger", "(", "tableName", ",", "geometryColumnName", ")", ";", "dropUpdate1Trigger", "(", "tableName", ",", "geometryColumnName", ")", ";", "...
Drop Triggers that Maintain Spatial Index Values @param tableName table name @param geometryColumnName geometry column name
[ "Drop", "Triggers", "that", "Maintain", "Spatial", "Index", "Values" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/RTreeIndexCoreExtension.java#L876-L885
eclipse/xtext-core
org.eclipse.xtext.util/src/org/eclipse/xtext/util/OnChangeEvictingCache.java
OnChangeEvictingCache.execWithTemporaryCaching
public <Result, Param extends Resource> Result execWithTemporaryCaching(Param resource, IUnitOfWork<Result, Param> transaction) throws WrappedException { CacheAdapter cacheAdapter = getOrCreate(resource); IgnoreValuesMemento memento = cacheAdapter.ignoreNewValues(); try { return transaction.exec(resource); }...
java
public <Result, Param extends Resource> Result execWithTemporaryCaching(Param resource, IUnitOfWork<Result, Param> transaction) throws WrappedException { CacheAdapter cacheAdapter = getOrCreate(resource); IgnoreValuesMemento memento = cacheAdapter.ignoreNewValues(); try { return transaction.exec(resource); }...
[ "public", "<", "Result", ",", "Param", "extends", "Resource", ">", "Result", "execWithTemporaryCaching", "(", "Param", "resource", ",", "IUnitOfWork", "<", "Result", ",", "Param", ">", "transaction", ")", "throws", "WrappedException", "{", "CacheAdapter", "cacheAd...
The transaction will be executed with caching enabled. However, all newly cached values will be discarded as soon as the transaction is over. @since 2.1
[ "The", "transaction", "will", "be", "executed", "with", "caching", "enabled", ".", "However", "all", "newly", "cached", "values", "will", "be", "discarded", "as", "soon", "as", "the", "transaction", "is", "over", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/OnChangeEvictingCache.java#L143-L153
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java
CommerceNotificationQueueEntryPersistenceImpl.findByGroupId
@Override public List<CommerceNotificationQueueEntry> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
java
@Override public List<CommerceNotificationQueueEntry> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationQueueEntry", ">", "findByGroupId", "(", "long", "groupId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "start", ",", "end", ",", "null", ")", ...
Returns a range of all the commerce notification queue entries where groupId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first r...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "notification", "queue", "entries", "where", "groupId", "=", "&#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#L145-L149
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/ConfigBasedDatasetsFinder.java
ConfigBasedDatasetsFinder.getValidDatasetURIs
protected Set<URI> getValidDatasetURIs(Path datasetCommonRoot) { Collection<URI> allDatasetURIs; Set<URI> disabledURISet = new HashSet(); // This try block basically populate the Valid dataset URI set. try { allDatasetURIs = configClient.getImportedBy(new URI(whitelistTag.toString()), true); ...
java
protected Set<URI> getValidDatasetURIs(Path datasetCommonRoot) { Collection<URI> allDatasetURIs; Set<URI> disabledURISet = new HashSet(); // This try block basically populate the Valid dataset URI set. try { allDatasetURIs = configClient.getImportedBy(new URI(whitelistTag.toString()), true); ...
[ "protected", "Set", "<", "URI", ">", "getValidDatasetURIs", "(", "Path", "datasetCommonRoot", ")", "{", "Collection", "<", "URI", ">", "allDatasetURIs", ";", "Set", "<", "URI", ">", "disabledURISet", "=", "new", "HashSet", "(", ")", ";", "// This try block bas...
Semantic of black/whitelist: - Whitelist always respect blacklist. - Job-level blacklist is reponsible for dataset filtering instead of dataset discovery. i.e. There's no implementation of job-level whitelist currently.
[ "Semantic", "of", "black", "/", "whitelist", ":", "-", "Whitelist", "always", "respect", "blacklist", ".", "-", "Job", "-", "level", "blacklist", "is", "reponsible", "for", "dataset", "filtering", "instead", "of", "dataset", "discovery", ".", "i", ".", "e", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/replication/ConfigBasedDatasetsFinder.java#L168-L182
molgenis/molgenis
molgenis-data-index/src/main/java/org/molgenis/data/index/job/IndexJobService.java
IndexJobService.performAction
private boolean performAction(Progress progress, int progressCount, IndexAction indexAction) { requireNonNull(indexAction); String entityTypeId = indexAction.getEntityTypeId(); updateIndexActionStatus(indexAction, IndexActionMetadata.IndexStatus.STARTED); try { if (dataService.hasEntityType(entity...
java
private boolean performAction(Progress progress, int progressCount, IndexAction indexAction) { requireNonNull(indexAction); String entityTypeId = indexAction.getEntityTypeId(); updateIndexActionStatus(indexAction, IndexActionMetadata.IndexStatus.STARTED); try { if (dataService.hasEntityType(entity...
[ "private", "boolean", "performAction", "(", "Progress", "progress", ",", "int", "progressCount", ",", "IndexAction", "indexAction", ")", "{", "requireNonNull", "(", "indexAction", ")", ";", "String", "entityTypeId", "=", "indexAction", ".", "getEntityTypeId", "(", ...
Performs a single IndexAction @param progress {@link Progress} to report progress to @param progressCount the progress count for this IndexAction @param indexAction Entity of type IndexActionMetaData @return boolean indicating success or failure
[ "Performs", "a", "single", "IndexAction" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-index/src/main/java/org/molgenis/data/index/job/IndexJobService.java#L107-L145
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java
Bytes.toShort
public static short toShort(byte[] bytes, int offset, final int length) { if (length != SIZEOF_SHORT || offset + length > bytes.length) { throw explainWrongLengthOrOffset(bytes, offset, length, SIZEOF_SHORT); } short n = 0; n ^= bytes[offset] & 0xFF; n <<= 8; n ^= bytes[offset + 1] & 0xFF;...
java
public static short toShort(byte[] bytes, int offset, final int length) { if (length != SIZEOF_SHORT || offset + length > bytes.length) { throw explainWrongLengthOrOffset(bytes, offset, length, SIZEOF_SHORT); } short n = 0; n ^= bytes[offset] & 0xFF; n <<= 8; n ^= bytes[offset + 1] & 0xFF;...
[ "public", "static", "short", "toShort", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "final", "int", "length", ")", "{", "if", "(", "length", "!=", "SIZEOF_SHORT", "||", "offset", "+", "length", ">", "bytes", ".", "length", ")", "{", "t...
Converts a byte array to a short value. @param bytes byte array @param offset offset into array @param length length, has to be {@link #SIZEOF_SHORT} @return the short value @throws IllegalArgumentException if length is not {@link #SIZEOF_SHORT} or if there's not enough room in the array at the offset indicated.
[ "Converts", "a", "byte", "array", "to", "a", "short", "value", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L642-L651
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/AbstractBundleLinkRenderer.java
AbstractBundleLinkRenderer.renderGlobalBundleLinks
protected void renderGlobalBundleLinks(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException { if (debugOn) { addComment("Start adding global members.", out); } performGlobalBundleLinksRendering(ctx, out, debugOn); ctx.setGlobalBundleAdded(true); if (debugOn) { addComment("Finish...
java
protected void renderGlobalBundleLinks(BundleRendererContext ctx, Writer out, boolean debugOn) throws IOException { if (debugOn) { addComment("Start adding global members.", out); } performGlobalBundleLinksRendering(ctx, out, debugOn); ctx.setGlobalBundleAdded(true); if (debugOn) { addComment("Finish...
[ "protected", "void", "renderGlobalBundleLinks", "(", "BundleRendererContext", "ctx", ",", "Writer", "out", ",", "boolean", "debugOn", ")", "throws", "IOException", "{", "if", "(", "debugOn", ")", "{", "addComment", "(", "\"Start adding global members.\"", ",", "out"...
Renders the links for the global bundles @param ctx the context @param out the writer @param debugOn the debug flag @throws IOException if an IOException occurs.
[ "Renders", "the", "links", "for", "the", "global", "bundles" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/renderer/AbstractBundleLinkRenderer.java#L195-L207
Stratio/bdt
src/main/java/com/stratio/qa/specs/KafkaSpec.java
KafkaSpec.sendAMessage
@When("^I send a message '(.+?)' to the kafka topic named '(.+?)'") public void sendAMessage(String message, String topic_name) throws Exception { commonspec.getKafkaUtils().sendMessage(message, topic_name); }
java
@When("^I send a message '(.+?)' to the kafka topic named '(.+?)'") public void sendAMessage(String message, String topic_name) throws Exception { commonspec.getKafkaUtils().sendMessage(message, topic_name); }
[ "@", "When", "(", "\"^I send a message '(.+?)' to the kafka topic named '(.+?)'\"", ")", "public", "void", "sendAMessage", "(", "String", "message", ",", "String", "topic_name", ")", "throws", "Exception", "{", "commonspec", ".", "getKafkaUtils", "(", ")", ".", "sendM...
Sending a message in a Kafka topic. @param topic_name topic name @param message string that you send to topic
[ "Sending", "a", "message", "in", "a", "Kafka", "topic", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/KafkaSpec.java#L108-L111
openengsb/openengsb
components/ekb/persistence-persist-edb/src/main/java/org/openengsb/core/ekb/persistence/persist/edb/internal/EDBModelObject.java
EDBModelObject.getCorrespondingModel
public OpenEngSBModel getCorrespondingModel() throws EKBException { ModelDescription description = getModelDescription(); try { Class<?> modelClass = modelRegistry.loadModel(description); return (OpenEngSBModel) edbConverter.convertEDBObjectToModel(modelClass, object); } ...
java
public OpenEngSBModel getCorrespondingModel() throws EKBException { ModelDescription description = getModelDescription(); try { Class<?> modelClass = modelRegistry.loadModel(description); return (OpenEngSBModel) edbConverter.convertEDBObjectToModel(modelClass, object); } ...
[ "public", "OpenEngSBModel", "getCorrespondingModel", "(", ")", "throws", "EKBException", "{", "ModelDescription", "description", "=", "getModelDescription", "(", ")", ";", "try", "{", "Class", "<", "?", ">", "modelClass", "=", "modelRegistry", ".", "loadModel", "(...
Returns the corresponding model object for the EDBModelObject
[ "Returns", "the", "corresponding", "model", "object", "for", "the", "EDBModelObject" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/persistence-persist-edb/src/main/java/org/openengsb/core/ekb/persistence/persist/edb/internal/EDBModelObject.java#L55-L63
alkacon/opencms-core
src-setup/org/opencms/setup/db/CmsUpdateDBManager.java
CmsUpdateDBManager.getOracleTablespaces
protected void getOracleTablespaces(Map<String, String> dbPoolData) { String dataTablespace = "users"; String indexTablespace = "users"; CmsSetupDb setupDb = new CmsSetupDb(null); try { setupDb.setConnection( dbPoolData.get("driver"), dbPoolD...
java
protected void getOracleTablespaces(Map<String, String> dbPoolData) { String dataTablespace = "users"; String indexTablespace = "users"; CmsSetupDb setupDb = new CmsSetupDb(null); try { setupDb.setConnection( dbPoolData.get("driver"), dbPoolD...
[ "protected", "void", "getOracleTablespaces", "(", "Map", "<", "String", ",", "String", ">", "dbPoolData", ")", "{", "String", "dataTablespace", "=", "\"users\"", ";", "String", "indexTablespace", "=", "\"users\"", ";", "CmsSetupDb", "setupDb", "=", "new", "CmsSe...
Retrieves the oracle tablespace names.<p> @param dbPoolData the database pool data
[ "Retrieves", "the", "oracle", "tablespace", "names", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/db/CmsUpdateDBManager.java#L424-L472
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.rotateLocalZ
public Matrix3f rotateLocalZ(float ang, Matrix3f dest) { float sin = (float) Math.sin(ang); float cos = (float) Math.cosFromSin(sin, ang); float nm00 = cos * m00 - sin * m01; float nm01 = sin * m00 + cos * m01; float nm10 = cos * m10 - sin * m11; float nm11 = sin * m10 + ...
java
public Matrix3f rotateLocalZ(float ang, Matrix3f dest) { float sin = (float) Math.sin(ang); float cos = (float) Math.cosFromSin(sin, ang); float nm00 = cos * m00 - sin * m01; float nm01 = sin * m00 + cos * m01; float nm10 = cos * m10 - sin * m11; float nm11 = sin * m10 + ...
[ "public", "Matrix3f", "rotateLocalZ", "(", "float", "ang", ",", "Matrix3f", "dest", ")", "{", "float", "sin", "=", "(", "float", ")", "Math", ".", "sin", "(", "ang", ")", ";", "float", "cos", "=", "(", "float", ")", "Math", ".", "cosFromSin", "(", ...
Pre-multiply a rotation around the Z axis to this matrix by rotating the given amount of radians about the Z axis and store the result in <code>dest</code>. <p> When used with a right-handed coordinate system, the produced rotation will rotate a vector counter-clockwise around the rotation axis, when viewing along the ...
[ "Pre", "-", "multiply", "a", "rotation", "around", "the", "Z", "axis", "to", "this", "matrix", "by", "rotating", "the", "given", "amount", "of", "radians", "about", "the", "Z", "axis", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L2621-L2640
Red5/red5-server-common
src/main/java/org/red5/server/stream/StreamService.java
StreamService.sendNetStreamStatus
public static void sendNetStreamStatus(IConnection conn, String statusCode, String description, String name, String status, Number streamId) { if (conn instanceof RTMPConnection) { Status s = new Status(statusCode); s.setClientid(streamId); s.setDesciption(description); ...
java
public static void sendNetStreamStatus(IConnection conn, String statusCode, String description, String name, String status, Number streamId) { if (conn instanceof RTMPConnection) { Status s = new Status(statusCode); s.setClientid(streamId); s.setDesciption(description); ...
[ "public", "static", "void", "sendNetStreamStatus", "(", "IConnection", "conn", ",", "String", "statusCode", ",", "String", "description", ",", "String", "name", ",", "String", "status", ",", "Number", "streamId", ")", "{", "if", "(", "conn", "instanceof", "RTM...
Send NetStream.Status to the client. @param conn connection @param statusCode NetStream status code @param description description @param name name @param status The status - error, warning, or status @param streamId stream id
[ "Send", "NetStream", ".", "Status", "to", "the", "client", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/StreamService.java#L834-L848
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/FullMappingPropertiesBasedBundlesHandlerFactory.java
FullMappingPropertiesBasedBundlesHandlerFactory.getResourceBundles
public List<JoinableResourceBundle> getResourceBundles(Properties properties) { PropertiesConfigHelper props = new PropertiesConfigHelper(properties, resourceType); String fileExtension = "." + resourceType; // Initialize custom bundles List<JoinableResourceBundle> customBundles = new ArrayList<>(); // Chec...
java
public List<JoinableResourceBundle> getResourceBundles(Properties properties) { PropertiesConfigHelper props = new PropertiesConfigHelper(properties, resourceType); String fileExtension = "." + resourceType; // Initialize custom bundles List<JoinableResourceBundle> customBundles = new ArrayList<>(); // Chec...
[ "public", "List", "<", "JoinableResourceBundle", ">", "getResourceBundles", "(", "Properties", "properties", ")", "{", "PropertiesConfigHelper", "props", "=", "new", "PropertiesConfigHelper", "(", "properties", ",", "resourceType", ")", ";", "String", "fileExtension", ...
Returns the list of joinable resource bundle @param properties the properties @return the list of joinable resource bundle
[ "Returns", "the", "list", "of", "joinable", "resource", "bundle" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/FullMappingPropertiesBasedBundlesHandlerFactory.java#L97-L137
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_udp_farm_POST
public OvhBackendUdp serviceName_udp_farm_POST(String serviceName, String displayName, Long port, Long vrackNetworkId, String zone) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/udp/farm"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); ...
java
public OvhBackendUdp serviceName_udp_farm_POST(String serviceName, String displayName, Long port, Long vrackNetworkId, String zone) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/udp/farm"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); ...
[ "public", "OvhBackendUdp", "serviceName_udp_farm_POST", "(", "String", "serviceName", ",", "String", "displayName", ",", "Long", "port", ",", "Long", "vrackNetworkId", ",", "String", "zone", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalanc...
Add a new UDP Farm on your IP Load Balancing REST: POST /ipLoadbalancing/{serviceName}/udp/farm @param zone [required] Zone of your farm @param vrackNetworkId [required] Internal Load Balancer identifier of the vRack private network to attach to your farm, mandatory when your Load Balancer is attached to a vRack @para...
[ "Add", "a", "new", "UDP", "Farm", "on", "your", "IP", "Load", "Balancing" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L874-L884
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java
Util.generateSuperclassPattern
public static String generateSuperclassPattern(URI origin, String matchVariable) { return new StringBuilder() .append(sparqlWrapUri(origin)).append(" ") .append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ") .append("?").append(matchVariable).append(" .") ...
java
public static String generateSuperclassPattern(URI origin, String matchVariable) { return new StringBuilder() .append(sparqlWrapUri(origin)).append(" ") .append(sparqlWrapUri(RDFS.subClassOf.getURI())).append("+ ") .append("?").append(matchVariable).append(" .") ...
[ "public", "static", "String", "generateSuperclassPattern", "(", "URI", "origin", ",", "String", "matchVariable", ")", "{", "return", "new", "StringBuilder", "(", ")", ".", "append", "(", "sparqlWrapUri", "(", "origin", ")", ")", ".", "append", "(", "\" \"", ...
Generate a pattern for matching var to the superclasses of clazz @param origin @param matchVariable @return
[ "Generate", "a", "pattern", "for", "matching", "var", "to", "the", "superclasses", "of", "clazz" ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L248-L254
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java
PixelMath.boundImage
public static void boundImage( GrayF64 img , double min , double max ) { ImplPixelMath.boundImage(img,min,max); }
java
public static void boundImage( GrayF64 img , double min , double max ) { ImplPixelMath.boundImage(img,min,max); }
[ "public", "static", "void", "boundImage", "(", "GrayF64", "img", ",", "double", "min", ",", "double", "max", ")", "{", "ImplPixelMath", ".", "boundImage", "(", "img", ",", "min", ",", "max", ")", ";", "}" ]
Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value.
[ "Bounds", "image", "pixels", "to", "be", "between", "these", "two", "values" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java#L4515-L4517
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.rotate
public static BufferedImage rotate(Image image, int degree) { return Img.from(image).rotate(degree).getImg(); }
java
public static BufferedImage rotate(Image image, int degree) { return Img.from(image).rotate(degree).getImg(); }
[ "public", "static", "BufferedImage", "rotate", "(", "Image", "image", ",", "int", "degree", ")", "{", "return", "Img", ".", "from", "(", "image", ")", ".", "rotate", "(", "degree", ")", ".", "getImg", "(", ")", ";", "}" ]
旋转图片为指定角度<br> 来自:http://blog.51cto.com/cping1982/130066 @param image 目标图像 @param degree 旋转角度 @return 旋转后的图片 @since 3.2.2
[ "旋转图片为指定角度<br", ">", "来自:http", ":", "//", "blog", ".", "51cto", ".", "com", "/", "cping1982", "/", "130066" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L1057-L1059
googleapis/google-cloud-java
google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java
SubscriptionAdminClient.modifyPushConfig
public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = ModifyPushConfigRequest.newBuilder() .setSubscription(subscription == null ? null : subscription.toString()) .setPushConfig(pushConfig) .bu...
java
public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = ModifyPushConfigRequest.newBuilder() .setSubscription(subscription == null ? null : subscription.toString()) .setPushConfig(pushConfig) .bu...
[ "public", "final", "void", "modifyPushConfig", "(", "ProjectSubscriptionName", "subscription", ",", "PushConfig", "pushConfig", ")", "{", "ModifyPushConfigRequest", "request", "=", "ModifyPushConfigRequest", ".", "newBuilder", "(", ")", ".", "setSubscription", "(", "sub...
Modifies the `PushConfig` for a specified subscription. <p>This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardl...
[ "Modifies", "the", "PushConfig", "for", "a", "specified", "subscription", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java#L1254-L1262
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRRenderData.java
GVRRenderData.setMaterial
public void setMaterial(GVRMaterial material, int passIndex) { if (passIndex < mRenderPassList.size()) { mRenderPassList.get(passIndex).setMaterial(material); } else { Log.e(TAG, "Trying to set material from invalid pass. Pass " + passIndex + " was not...
java
public void setMaterial(GVRMaterial material, int passIndex) { if (passIndex < mRenderPassList.size()) { mRenderPassList.get(passIndex).setMaterial(material); } else { Log.e(TAG, "Trying to set material from invalid pass. Pass " + passIndex + " was not...
[ "public", "void", "setMaterial", "(", "GVRMaterial", "material", ",", "int", "passIndex", ")", "{", "if", "(", "passIndex", "<", "mRenderPassList", ".", "size", "(", ")", ")", "{", "mRenderPassList", ".", "get", "(", "passIndex", ")", ".", "setMaterial", "...
Set the {@link GVRMaterial material} this pass will be rendered with. @param material The {@link GVRMaterial material} for rendering. @param passIndex The rendering pass this material will be assigned to.
[ "Set", "the", "{", "@link", "GVRMaterial", "material", "}", "this", "pass", "will", "be", "rendered", "with", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRRenderData.java#L233-L243
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java
EventServiceImpl.executeLocal
private void executeLocal(String serviceName, Object event, EventRegistration registration, int orderKey) { if (!nodeEngine.isRunning()) { return; } Registration reg = (Registration) registration; try { if (reg.getListener() != null) { eventExecut...
java
private void executeLocal(String serviceName, Object event, EventRegistration registration, int orderKey) { if (!nodeEngine.isRunning()) { return; } Registration reg = (Registration) registration; try { if (reg.getListener() != null) { eventExecut...
[ "private", "void", "executeLocal", "(", "String", "serviceName", ",", "Object", "event", ",", "EventRegistration", "registration", ",", "int", "orderKey", ")", "{", "if", "(", "!", "nodeEngine", ".", "isRunning", "(", ")", ")", "{", "return", ";", "}", "Re...
Processes the {@code event} on this node. If the event is not accepted to the executor in {@link #eventQueueTimeoutMs}, it will be rejected and not processed. This means that we increase the rejected count and log the failure. @param serviceName the name of the service responsible for this event @param event t...
[ "Processes", "the", "{", "@code", "event", "}", "on", "this", "node", ".", "If", "the", "event", "is", "not", "accepted", "to", "the", "executor", "in", "{", "@link", "#eventQueueTimeoutMs", "}", "it", "will", "be", "rejected", "and", "not", "processed", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java#L468-L489
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnServerConfigurationsInner.java
P2sVpnServerConfigurationsInner.createOrUpdate
public P2SVpnServerConfigurationInner createOrUpdate(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName, P2SVpnServerConfigurationInner p2SVpnServerConfigurationParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWanName, p2SVpnServerConfigura...
java
public P2SVpnServerConfigurationInner createOrUpdate(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName, P2SVpnServerConfigurationInner p2SVpnServerConfigurationParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualWanName, p2SVpnServerConfigura...
[ "public", "P2SVpnServerConfigurationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "virtualWanName", ",", "String", "p2SVpnServerConfigurationName", ",", "P2SVpnServerConfigurationInner", "p2SVpnServerConfigurationParameters", ")", "{", "return", "cr...
Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it doesn't exist else updates the existing P2SVpnServerConfiguration. @param resourceGroupName The resource group name of the VirtualWan. @param virtualWanName The name of the VirtualWan. @param p2SVpnServerConfigurationName The name of the P2SVpnSe...
[ "Creates", "a", "P2SVpnServerConfiguration", "to", "associate", "with", "a", "VirtualWan", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "P2SVpnServerConfiguration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnServerConfigurationsInner.java#L197-L199
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/CalendarPanel.java
CalendarPanel.labelIndicatorMouseEntered
private void labelIndicatorMouseEntered(MouseEvent e) { // Skip this function if the settings have not been applied. if (settings == null) { return; } JLabel label = ((JLabel) e.getSource()); // Do not highlight the today label if today is vetoed. if (label ==...
java
private void labelIndicatorMouseEntered(MouseEvent e) { // Skip this function if the settings have not been applied. if (settings == null) { return; } JLabel label = ((JLabel) e.getSource()); // Do not highlight the today label if today is vetoed. if (label ==...
[ "private", "void", "labelIndicatorMouseEntered", "(", "MouseEvent", "e", ")", "{", "// Skip this function if the settings have not been applied.", "if", "(", "settings", "==", "null", ")", "{", "return", ";", "}", "JLabel", "label", "=", "(", "(", "JLabel", ")", "...
labelIndicatorMouseEntered, This event is called when the user move the mouse inside a monitored label. This is used to generate mouse over effects for the calendar panel.
[ "labelIndicatorMouseEntered", "This", "event", "is", "called", "when", "the", "user", "move", "the", "mouse", "inside", "a", "monitored", "label", ".", "This", "is", "used", "to", "generate", "mouse", "over", "effects", "for", "the", "calendar", "panel", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/CalendarPanel.java#L920-L946
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java
GISCoordinates.L3_WSG84
@Pure public static GeodesicPosition L3_WSG84(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY()); }
java
@Pure public static GeodesicPosition L3_WSG84(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_3_N, LAMBERT_3_C, LAMBERT_3_XS, LAMBERT_3_YS); return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY()); }
[ "@", "Pure", "public", "static", "GeodesicPosition", "L3_WSG84", "(", "double", "x", ",", "double", "y", ")", "{", "final", "Point2d", "ntfLambdaPhi", "=", "NTFLambert_NTFLambdaPhi", "(", "x", ",", "y", ",", "LAMBERT_3_N", ",", "LAMBERT_3_C", ",", "LAMBERT_3_X...
This function convert France Lambert III coordinate to geographic WSG84 Data. @param x is the coordinate in France Lambert III @param y is the coordinate in France Lambert III @return lambda and phi in geographic WSG84 in degrees.
[ "This", "function", "convert", "France", "Lambert", "III", "coordinate", "to", "geographic", "WSG84", "Data", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L541-L549
graphhopper/graphhopper
core/src/main/java/com/graphhopper/routing/ch/NodeBasedNodeContractor.java
NodeBasedNodeContractor.calculatePriority
@Override public float calculatePriority(int node) { CalcShortcutsResult calcShortcutsResult = calcShortcutCount(node); // # huge influence: the bigger the less shortcuts gets created and the faster is the preparation // // every adjNode has an 'original edge' number associated. ini...
java
@Override public float calculatePriority(int node) { CalcShortcutsResult calcShortcutsResult = calcShortcutCount(node); // # huge influence: the bigger the less shortcuts gets created and the faster is the preparation // // every adjNode has an 'original edge' number associated. ini...
[ "@", "Override", "public", "float", "calculatePriority", "(", "int", "node", ")", "{", "CalcShortcutsResult", "calcShortcutsResult", "=", "calcShortcutCount", "(", "node", ")", ";", "// # huge influence: the bigger the less shortcuts gets created and the faster is the preparation...
Warning: the calculated priority must NOT depend on priority(v) and therefore findShortcuts should also not depend on the priority(v). Otherwise updating the priority before contracting in contractNodes() could lead to a slowish or even endless loop.
[ "Warning", ":", "the", "calculated", "priority", "must", "NOT", "depend", "on", "priority", "(", "v", ")", "and", "therefore", "findShortcuts", "should", "also", "not", "depend", "on", "the", "priority", "(", "v", ")", ".", "Otherwise", "updating", "the", ...
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/ch/NodeBasedNodeContractor.java#L98-L135
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java
PropertyBuilder.getInstance
public static PropertyBuilder getInstance(Context context, ClassDoc classDoc, PropertyWriter writer) { return new PropertyBuilder(context, classDoc, writer); }
java
public static PropertyBuilder getInstance(Context context, ClassDoc classDoc, PropertyWriter writer) { return new PropertyBuilder(context, classDoc, writer); }
[ "public", "static", "PropertyBuilder", "getInstance", "(", "Context", "context", ",", "ClassDoc", "classDoc", ",", "PropertyWriter", "writer", ")", "{", "return", "new", "PropertyBuilder", "(", "context", ",", "classDoc", ",", "writer", ")", ";", "}" ]
Construct a new PropertyBuilder. @param context the build context. @param classDoc the class whoses members are being documented. @param writer the doclet specific writer.
[ "Construct", "a", "new", "PropertyBuilder", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java#L107-L111
stripe/stripe-android
stripe/src/main/java/com/stripe/android/view/LockableHorizontalScrollView.java
LockableHorizontalScrollView.wrappedSmoothScrollBy
void wrappedSmoothScrollBy(int dx, int dy) { if (!mScrollable) { return; } smoothScrollBy(dx, dy); if (mLockableScrollChangedListener != null) { mLockableScrollChangedListener.onSmoothScrollBy(dx, dy); } }
java
void wrappedSmoothScrollBy(int dx, int dy) { if (!mScrollable) { return; } smoothScrollBy(dx, dy); if (mLockableScrollChangedListener != null) { mLockableScrollChangedListener.onSmoothScrollBy(dx, dy); } }
[ "void", "wrappedSmoothScrollBy", "(", "int", "dx", ",", "int", "dy", ")", "{", "if", "(", "!", "mScrollable", ")", "{", "return", ";", "}", "smoothScrollBy", "(", "dx", ",", "dy", ")", ";", "if", "(", "mLockableScrollChangedListener", "!=", "null", ")", ...
Wrapping the {@link HorizontalScrollView#smoothScrollBy(int, int)} function to increase testability. @param dx the number of pixels to scroll by on the X axis @param dy the number of pixels to scroll by on the Y axis
[ "Wrapping", "the", "{", "@link", "HorizontalScrollView#smoothScrollBy", "(", "int", "int", ")", "}", "function", "to", "increase", "testability", "." ]
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/view/LockableHorizontalScrollView.java#L90-L99
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Chunk.java
Chunk.chunkCountFrom
public static <T extends Chunkable> int chunkCountFrom(T chunkable, int chunkLength) { byte[] data = chunkable.getChunkableData(); return (int) Math.ceil(data.length * 1.0 / chunkLength); }
java
public static <T extends Chunkable> int chunkCountFrom(T chunkable, int chunkLength) { byte[] data = chunkable.getChunkableData(); return (int) Math.ceil(data.length * 1.0 / chunkLength); }
[ "public", "static", "<", "T", "extends", "Chunkable", ">", "int", "chunkCountFrom", "(", "T", "chunkable", ",", "int", "chunkLength", ")", "{", "byte", "[", "]", "data", "=", "chunkable", ".", "getChunkableData", "(", ")", ";", "return", "(", "int", ")",...
Retrieve the count of chunks for a given chunk length. @param chunkLength The length of each chunk @return The number of chunks generated for a given chunk length
[ "Retrieve", "the", "count", "of", "chunks", "for", "a", "given", "chunk", "length", "." ]
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Chunk.java#L65-L68
RestComm/Restcomm-Connect
restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/AccountsEndpoint.java
AccountsEndpoint.switchAccountStatusTree
private void switchAccountStatusTree(Account parentAccount, UserIdentityContext userIdentityContext) { logger.debug("Status transition requested"); // transition child accounts List<String> subAccountsToSwitch = accountsDao.getSubAccountSidsRecursive(parentAccount.getSid()); ...
java
private void switchAccountStatusTree(Account parentAccount, UserIdentityContext userIdentityContext) { logger.debug("Status transition requested"); // transition child accounts List<String> subAccountsToSwitch = accountsDao.getSubAccountSidsRecursive(parentAccount.getSid()); ...
[ "private", "void", "switchAccountStatusTree", "(", "Account", "parentAccount", ",", "UserIdentityContext", "userIdentityContext", ")", "{", "logger", ".", "debug", "(", "\"Status transition requested\"", ")", ";", "// transition child accounts", "List", "<", "String", ">"...
Switches status of account along with all its children (the whole tree). @param parentAccount
[ "Switches", "status", "of", "account", "along", "with", "all", "its", "children", "(", "the", "whole", "tree", ")", "." ]
train
https://github.com/RestComm/Restcomm-Connect/blob/2194dee4fc524cdfd0af77a218ba5f212f97f7c5/restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/AccountsEndpoint.java#L806-L828
rabbitmq/hop
src/main/java/com/rabbitmq/http/client/Client.java
Client.declareShovel
public void declareShovel(String vhost, ShovelInfo info) { Map<String, Object> props = info.getDetails().getPublishProperties(); if(props != null && props.isEmpty()) { throw new IllegalArgumentException("Shovel publish properties must be a non-empty map or null"); } final URI uri = uriWithPath("./...
java
public void declareShovel(String vhost, ShovelInfo info) { Map<String, Object> props = info.getDetails().getPublishProperties(); if(props != null && props.isEmpty()) { throw new IllegalArgumentException("Shovel publish properties must be a non-empty map or null"); } final URI uri = uriWithPath("./...
[ "public", "void", "declareShovel", "(", "String", "vhost", ",", "ShovelInfo", "info", ")", "{", "Map", "<", "String", ",", "Object", ">", "props", "=", "info", ".", "getDetails", "(", ")", ".", "getPublishProperties", "(", ")", ";", "if", "(", "props", ...
Declares a shovel. @param vhost virtual host where to declare the shovel @param info Shovel info.
[ "Declares", "a", "shovel", "." ]
train
https://github.com/rabbitmq/hop/blob/94e70f1f7e39f523a11ab3162b4efc976311ee03/src/main/java/com/rabbitmq/http/client/Client.java#L768-L775
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.ensureSingleLocale
void ensureSingleLocale(CmsXmlContainerPage containerPage, CmsResource localeRes) throws CmsException { CmsObject cms = getCmsObject(); Locale mainLocale = CmsLocaleManager.getMainLocale(cms, localeRes); OpenCms.getLocaleManager(); Locale defaultLocale = CmsLocaleManager.getDefaultLocal...
java
void ensureSingleLocale(CmsXmlContainerPage containerPage, CmsResource localeRes) throws CmsException { CmsObject cms = getCmsObject(); Locale mainLocale = CmsLocaleManager.getMainLocale(cms, localeRes); OpenCms.getLocaleManager(); Locale defaultLocale = CmsLocaleManager.getDefaultLocal...
[ "void", "ensureSingleLocale", "(", "CmsXmlContainerPage", "containerPage", ",", "CmsResource", "localeRes", ")", "throws", "CmsException", "{", "CmsObject", "cms", "=", "getCmsObject", "(", ")", ";", "Locale", "mainLocale", "=", "CmsLocaleManager", ".", "getMainLocale...
Removes unnecessary locales from a container page.<p> @param containerPage the container page which should be changed @param localeRes the resource used to determine the locale @throws CmsException if something goes wrong
[ "Removes", "unnecessary", "locales", "from", "a", "container", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L1262-L1280
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.setDateHeader
@Deprecated public static void setDateHeader(HttpMessage message, CharSequence name, Date value) { if (value != null) { message.headers().set(name, DateFormatter.format(value)); } else { message.headers().set(name, null); } }
java
@Deprecated public static void setDateHeader(HttpMessage message, CharSequence name, Date value) { if (value != null) { message.headers().set(name, DateFormatter.format(value)); } else { message.headers().set(name, null); } }
[ "@", "Deprecated", "public", "static", "void", "setDateHeader", "(", "HttpMessage", "message", ",", "CharSequence", "name", ",", "Date", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "message", ".", "headers", "(", ")", ".", "set", "(", ...
@deprecated Use {@link #set(CharSequence, Object)} instead. Sets a new date header with the specified name and value. If there is an existing header with the same name, the existing header is removed. The specified value is formatted as defined in <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3....
[ "@deprecated", "Use", "{", "@link", "#set", "(", "CharSequence", "Object", ")", "}", "instead", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L900-L907
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/spout/CheckpointSpout.java
CheckpointSpout.loadCheckpointState
private KeyValueState<String, CheckPointState> loadCheckpointState(Map conf, TopologyContext ctx) { String namespace = ctx.getThisComponentId() + "-" + ctx.getThisTaskId(); KeyValueState<String, CheckPointState> state = (KeyValueState<String, CheckPointState>) StateFactory.getState(names...
java
private KeyValueState<String, CheckPointState> loadCheckpointState(Map conf, TopologyContext ctx) { String namespace = ctx.getThisComponentId() + "-" + ctx.getThisTaskId(); KeyValueState<String, CheckPointState> state = (KeyValueState<String, CheckPointState>) StateFactory.getState(names...
[ "private", "KeyValueState", "<", "String", ",", "CheckPointState", ">", "loadCheckpointState", "(", "Map", "conf", ",", "TopologyContext", "ctx", ")", "{", "String", "namespace", "=", "ctx", ".", "getThisComponentId", "(", ")", "+", "\"-\"", "+", "ctx", ".", ...
Loads the last saved checkpoint state the from persistent storage.
[ "Loads", "the", "last", "saved", "checkpoint", "state", "the", "from", "persistent", "storage", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/spout/CheckpointSpout.java#L134-L147
bwkimmel/java-util
src/main/java/ca/eandb/util/io/StreamUtil.java
StreamUtil.writeBytes
public static void writeBytes(ByteBuffer bytes, OutputStream out) throws IOException { final int BUFFER_LENGTH = 1024; byte[] buffer; if (bytes.remaining() >= BUFFER_LENGTH) { buffer = new byte[BUFFER_LENGTH]; do { bytes.get(buffer); out.write(buffer); } while (bytes.remai...
java
public static void writeBytes(ByteBuffer bytes, OutputStream out) throws IOException { final int BUFFER_LENGTH = 1024; byte[] buffer; if (bytes.remaining() >= BUFFER_LENGTH) { buffer = new byte[BUFFER_LENGTH]; do { bytes.get(buffer); out.write(buffer); } while (bytes.remai...
[ "public", "static", "void", "writeBytes", "(", "ByteBuffer", "bytes", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "final", "int", "BUFFER_LENGTH", "=", "1024", ";", "byte", "[", "]", "buffer", ";", "if", "(", "bytes", ".", "remaining", "...
Writes the contents of a <code>ByteBuffer</code> to the provided <code>OutputStream</code>. @param bytes The <code>ByteBuffer</code> containing the bytes to write. @param out The <code>OutputStream</code> to write to. @throws IOException If unable to write to the <code>OutputStream</code>.
[ "Writes", "the", "contents", "of", "a", "<code", ">", "ByteBuffer<", "/", "code", ">", "to", "the", "provided", "<code", ">", "OutputStream<", "/", "code", ">", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/io/StreamUtil.java#L98-L117
nohana/Amalgam
amalgam/src/main/java/com/amalgam/view/ViewUtils.java
ViewUtils.findViewById
@SuppressWarnings("unchecked") // we know that return value type is a child of view, and V is bound to a child of view. public static <V extends View> V findViewById(View view, int id) { return (V) view.findViewById(id); }
java
@SuppressWarnings("unchecked") // we know that return value type is a child of view, and V is bound to a child of view. public static <V extends View> V findViewById(View view, int id) { return (V) view.findViewById(id); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// we know that return value type is a child of view, and V is bound to a child of view.", "public", "static", "<", "V", "extends", "View", ">", "V", "findViewById", "(", "View", "view", ",", "int", "id", ")", "{", "r...
Find the specific view from the view as traversal root. Returning value type is bound to your variable type. @param view the root view to find the view. @param id the view id. @param <V> the view class type parameter. @return the view, null if not found.
[ "Find", "the", "specific", "view", "from", "the", "view", "as", "traversal", "root", ".", "Returning", "value", "type", "is", "bound", "to", "your", "variable", "type", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/view/ViewUtils.java#L137-L140
killbill/killbill
invoice/src/main/java/org/killbill/billing/invoice/dao/CBADao.java
CBADao.computeCBAComplexity
public InvoiceItemModelDao computeCBAComplexity(final InvoiceModelDao invoice, @Nullable final BigDecimal accountCBAOrNull, @Nullable final EntitySqlDaoWrapperFactory entitySqlDaoWrapperFactory, ...
java
public InvoiceItemModelDao computeCBAComplexity(final InvoiceModelDao invoice, @Nullable final BigDecimal accountCBAOrNull, @Nullable final EntitySqlDaoWrapperFactory entitySqlDaoWrapperFactory, ...
[ "public", "InvoiceItemModelDao", "computeCBAComplexity", "(", "final", "InvoiceModelDao", "invoice", ",", "@", "Nullable", "final", "BigDecimal", "accountCBAOrNull", ",", "@", "Nullable", "final", "EntitySqlDaoWrapperFactory", "entitySqlDaoWrapperFactory", ",", "final", "In...
We expect a clean up to date invoice, with all the items except the cba, that we will compute in that method
[ "We", "expect", "a", "clean", "up", "to", "date", "invoice", "with", "all", "the", "items", "except", "the", "cba", "that", "we", "will", "compute", "in", "that", "method" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/invoice/src/main/java/org/killbill/billing/invoice/dao/CBADao.java#L58-L84
openengsb/openengsb
components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/AbstractEDBService.java
AbstractEDBService.runErrorHooks
private Long runErrorHooks(EDBCommit commit, EDBException exception) throws EDBException { for (EDBErrorHook hook : errorHooks) { try { EDBCommit newCommit = hook.onError(commit, exception); if (newCommit != null) { return commit(newCommit); ...
java
private Long runErrorHooks(EDBCommit commit, EDBException exception) throws EDBException { for (EDBErrorHook hook : errorHooks) { try { EDBCommit newCommit = hook.onError(commit, exception); if (newCommit != null) { return commit(newCommit); ...
[ "private", "Long", "runErrorHooks", "(", "EDBCommit", "commit", ",", "EDBException", "exception", ")", "throws", "EDBException", "{", "for", "(", "EDBErrorHook", "hook", ":", "errorHooks", ")", "{", "try", "{", "EDBCommit", "newCommit", "=", "hook", ".", "onEr...
Runs all registered error hooks on the EDBCommit object. Logs exceptions which occurs in the hooks, except for ServiceUnavailableExceptions and EDBExceptions. If an EDBException occurs, the function overrides the cause of the error with the new Exception. If an error hook returns a new EDBCommit, the EDB tries to persi...
[ "Runs", "all", "registered", "error", "hooks", "on", "the", "EDBCommit", "object", ".", "Logs", "exceptions", "which", "occurs", "in", "the", "hooks", "except", "for", "ServiceUnavailableExceptions", "and", "EDBExceptions", ".", "If", "an", "EDBException", "occurs...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edb/src/main/java/org/openengsb/core/edb/jpa/internal/AbstractEDBService.java#L192-L209
opendigitaleducation/web-utils
src/main/java/org/vertx/java/core/http/RouteMatcher.java
RouteMatcher.optionsWithRegEx
public RouteMatcher optionsWithRegEx(String regex, Handler<HttpServerRequest> handler) { addRegEx(regex, handler, optionsBindings); return this; }
java
public RouteMatcher optionsWithRegEx(String regex, Handler<HttpServerRequest> handler) { addRegEx(regex, handler, optionsBindings); return this; }
[ "public", "RouteMatcher", "optionsWithRegEx", "(", "String", "regex", ",", "Handler", "<", "HttpServerRequest", ">", "handler", ")", "{", "addRegEx", "(", "regex", ",", "handler", ",", "optionsBindings", ")", ";", "return", "this", ";", "}" ]
Specify a handler that will be called for a matching HTTP OPTIONS @param regex A regular expression @param handler The handler to call
[ "Specify", "a", "handler", "that", "will", "be", "called", "for", "a", "matching", "HTTP", "OPTIONS" ]
train
https://github.com/opendigitaleducation/web-utils/blob/5c12f7e8781a9a0fbbe7b8d9fb741627aa97a1e3/src/main/java/org/vertx/java/core/http/RouteMatcher.java#L249-L252
apache/incubator-gobblin
gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/ingestion/google/webmaster/GoogleWebmasterDataFetcherImpl.java
GoogleWebmasterDataFetcherImpl.getAllPages
@Override public Collection<ProducerJob> getAllPages(String startDate, String endDate, String country, int rowLimit) throws IOException { log.info("Requested row limit: " + rowLimit); if (!_jobs.isEmpty()) { log.info("Service got hot started."); return _jobs; } ApiDimensionFilter cou...
java
@Override public Collection<ProducerJob> getAllPages(String startDate, String endDate, String country, int rowLimit) throws IOException { log.info("Requested row limit: " + rowLimit); if (!_jobs.isEmpty()) { log.info("Service got hot started."); return _jobs; } ApiDimensionFilter cou...
[ "@", "Override", "public", "Collection", "<", "ProducerJob", ">", "getAllPages", "(", "String", "startDate", ",", "String", "endDate", ",", "String", "country", ",", "int", "rowLimit", ")", "throws", "IOException", "{", "log", ".", "info", "(", "\"Requested ro...
Due to the limitation of the API, we can get a maximum of 5000 rows at a time. Another limitation is that, results are sorted by click count descending. If two rows have the same click count, they are sorted in an arbitrary way. (Read more at https://developers.google.com/webmaster-tools/v3/searchanalytics). So we try ...
[ "Due", "to", "the", "limitation", "of", "the", "API", "we", "can", "get", "a", "maximum", "of", "5000", "rows", "at", "a", "time", ".", "Another", "limitation", "is", "that", "results", "are", "sorted", "by", "click", "count", "descending", ".", "If", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/google-ingestion/src/main/java/org/apache/gobblin/ingestion/google/webmaster/GoogleWebmasterDataFetcherImpl.java#L86-L124
groupon/odo
examples/api-usage/src/main/java/com/groupon/odo/sample/SampleClient.java
SampleClient.getHistory
public static void getHistory() throws Exception{ Client client = new Client("ProfileName", false); // Obtain the 100 history entries starting from offset 0 History[] history = client.refreshHistory(100, 0); client.clearHistory(); }
java
public static void getHistory() throws Exception{ Client client = new Client("ProfileName", false); // Obtain the 100 history entries starting from offset 0 History[] history = client.refreshHistory(100, 0); client.clearHistory(); }
[ "public", "static", "void", "getHistory", "(", ")", "throws", "Exception", "{", "Client", "client", "=", "new", "Client", "(", "\"ProfileName\"", ",", "false", ")", ";", "// Obtain the 100 history entries starting from offset 0", "History", "[", "]", "history", "=",...
Demonstrates obtaining the request history data from a test run
[ "Demonstrates", "obtaining", "the", "request", "history", "data", "from", "a", "test", "run" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/examples/api-usage/src/main/java/com/groupon/odo/sample/SampleClient.java#L99-L106
alipay/sofa-rpc
extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistry.java
SofaRegistry.doRegister
protected void doRegister(String appName, String serviceName, String serviceData, String group) { PublisherRegistration publisherRegistration; // 生成注册对象,并添加额外属性 publisherRegistration = new PublisherRegistration(serviceName); publisherRegistration.setGroup(group); addAttributes(p...
java
protected void doRegister(String appName, String serviceName, String serviceData, String group) { PublisherRegistration publisherRegistration; // 生成注册对象,并添加额外属性 publisherRegistration = new PublisherRegistration(serviceName); publisherRegistration.setGroup(group); addAttributes(p...
[ "protected", "void", "doRegister", "(", "String", "appName", ",", "String", "serviceName", ",", "String", "serviceData", ",", "String", "group", ")", "{", "PublisherRegistration", "publisherRegistration", ";", "// 生成注册对象,并添加额外属性", "publisherRegistration", "=", "new", ...
注册单条服务信息 @param appName 应用 @param serviceName 服务关键字 @param serviceData 服务提供者数据 @param group 服务分组
[ "注册单条服务信息" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistry.java#L131-L141
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java
WebConfigParamUtils.getLongInitParameter
public static long getLongInitParameter(ExternalContext context, String name, long defaultValue) { if (name == null) { throw new NullPointerException(); } String param = getStringInitParameter(context, name); if (param == null) { return defaul...
java
public static long getLongInitParameter(ExternalContext context, String name, long defaultValue) { if (name == null) { throw new NullPointerException(); } String param = getStringInitParameter(context, name); if (param == null) { return defaul...
[ "public", "static", "long", "getLongInitParameter", "(", "ExternalContext", "context", ",", "String", "name", ",", "long", "defaultValue", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "Strin...
Gets the long init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param name the init parameter's name @param deprecatedName the init parameter's deprecated name. @param defaultValue the default value...
[ "Gets", "the", "long", "init", "parameter", "value", "from", "the", "specified", "context", ".", "If", "the", "parameter", "was", "not", "specified", "the", "default", "value", "is", "used", "instead", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java#L583-L599
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/internal/specification/PropertyFieldExtractor.java
PropertyFieldExtractor.getStringValue
private String getStringValue(Object instance, Field field) throws IllegalAccessException { Class<?> fieldType = field.getType(); // Only support primitive type, boxed type, String and Enum Preconditions.checkArgument( fieldType.isPrimitive() || Primitives.isWrapperType(fieldType) || String.c...
java
private String getStringValue(Object instance, Field field) throws IllegalAccessException { Class<?> fieldType = field.getType(); // Only support primitive type, boxed type, String and Enum Preconditions.checkArgument( fieldType.isPrimitive() || Primitives.isWrapperType(fieldType) || String.c...
[ "private", "String", "getStringValue", "(", "Object", "instance", ",", "Field", "field", ")", "throws", "IllegalAccessException", "{", "Class", "<", "?", ">", "fieldType", "=", "field", ".", "getType", "(", ")", ";", "// Only support primitive type, boxed type, Stri...
Gets the value of the field in the given instance as String. Currently only allows primitive types, boxed types, String and Enum.
[ "Gets", "the", "value", "of", "the", "field", "in", "the", "given", "instance", "as", "String", ".", "Currently", "only", "allows", "primitive", "types", "boxed", "types", "String", "and", "Enum", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/internal/specification/PropertyFieldExtractor.java#L64-L85
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRBitmapImage.java
GVRBitmapImage.setBuffer
public void setBuffer(final int width, final int height, final int format, final int type, final Buffer pixels) { NativeBitmapImage.updateFromBuffer(getNative(), 0, 0, width, height, format, type, pixels); }
java
public void setBuffer(final int width, final int height, final int format, final int type, final Buffer pixels) { NativeBitmapImage.updateFromBuffer(getNative(), 0, 0, width, height, format, type, pixels); }
[ "public", "void", "setBuffer", "(", "final", "int", "width", ",", "final", "int", "height", ",", "final", "int", "format", ",", "final", "int", "type", ",", "final", "Buffer", "pixels", ")", "{", "NativeBitmapImage", ".", "updateFromBuffer", "(", "getNative"...
Copy a new texture from a {@link Buffer} to the GPU texture. This one is also safe even in a non-GL thread. An updateGPU request on a non-GL thread will be forwarded to the GL thread and be executed before main rendering happens. Creating a new {@link GVRImage} is pretty cheap, but it's still not a totally trivial ope...
[ "Copy", "a", "new", "texture", "from", "a", "{", "@link", "Buffer", "}", "to", "the", "GPU", "texture", ".", "This", "one", "is", "also", "safe", "even", "in", "a", "non", "-", "GL", "thread", ".", "An", "updateGPU", "request", "on", "a", "non", "-...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRBitmapImage.java#L176-L179
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.linkBidirectionalOneToMany
protected void linkBidirectionalOneToMany(Collection collection, PersistentClass associatedClass, DependantValue key, PersistentProperty otherSide) { collection.setInverse(true); // Iterator mappedByColumns = associatedClass.getProperty(otherSide.getName()).getValue().getColumnIterator(); Itera...
java
protected void linkBidirectionalOneToMany(Collection collection, PersistentClass associatedClass, DependantValue key, PersistentProperty otherSide) { collection.setInverse(true); // Iterator mappedByColumns = associatedClass.getProperty(otherSide.getName()).getValue().getColumnIterator(); Itera...
[ "protected", "void", "linkBidirectionalOneToMany", "(", "Collection", "collection", ",", "PersistentClass", "associatedClass", ",", "DependantValue", "key", ",", "PersistentProperty", "otherSide", ")", "{", "collection", ".", "setInverse", "(", "true", ")", ";", "// I...
Links a bidirectional one-to-many, configuring the inverse side and using a column copy to perform the link @param collection The collection one-to-many @param associatedClass The associated class @param key The key @param otherSide The other side of the relationship
[ "Links", "a", "bidirectional", "one", "-", "to", "-", "many", "configuring", "the", "inverse", "side", "and", "using", "a", "column", "copy", "to", "perform", "the", "link" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L964-L973
landawn/AbacusUtil
src/com/landawn/abacus/util/Sheet.java
Sheet.swapColumns
public void swapColumns(Object columnKeyA, Object columnKeyB) { checkFrozen(); final int columnIndexA = this.getColumnIndex(columnKeyA); final int columnIndexB = this.getColumnIndex(columnKeyB); final List<C> tmp = new ArrayList<>(rowLength()); tmp.addAll(_columnKeySet);...
java
public void swapColumns(Object columnKeyA, Object columnKeyB) { checkFrozen(); final int columnIndexA = this.getColumnIndex(columnKeyA); final int columnIndexB = this.getColumnIndex(columnKeyB); final List<C> tmp = new ArrayList<>(rowLength()); tmp.addAll(_columnKeySet);...
[ "public", "void", "swapColumns", "(", "Object", "columnKeyA", ",", "Object", "columnKeyB", ")", "{", "checkFrozen", "(", ")", ";", "final", "int", "columnIndexA", "=", "this", ".", "getColumnIndex", "(", "columnKeyA", ")", ";", "final", "int", "columnIndexB", ...
Swap the positions of the two specified columns. @param columnKeyA @param columnKeyB
[ "Swap", "the", "positions", "of", "the", "two", "specified", "columns", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Sheet.java#L849-L873
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRAssetLoader.java
GVRAssetLoader.loadModel
public void loadModel(final GVRSceneObject model, final GVRResourceVolume volume, final EnumSet<GVRImportSettings> settings, final GVRScene scene) { Threads.spawn(new Runnable() { public void run() { String filePath = volume.getFileName(); Asse...
java
public void loadModel(final GVRSceneObject model, final GVRResourceVolume volume, final EnumSet<GVRImportSettings> settings, final GVRScene scene) { Threads.spawn(new Runnable() { public void run() { String filePath = volume.getFileName(); Asse...
[ "public", "void", "loadModel", "(", "final", "GVRSceneObject", "model", ",", "final", "GVRResourceVolume", "volume", ",", "final", "EnumSet", "<", "GVRImportSettings", ">", "settings", ",", "final", "GVRScene", "scene", ")", "{", "Threads", ".", "spawn", "(", ...
Loads a hierarchy of scene objects {@link GVRSceneObject} asymchronously from a 3D model on the volume provided and adds it to the specified scene. <p> and will return before the model is loaded. IAssetEvents are emitted to event listeners attached to the context. The resource volume may reference res/raw in which case...
[ "Loads", "a", "hierarchy", "of", "scene", "objects", "{", "@link", "GVRSceneObject", "}", "asymchronously", "from", "a", "3D", "model", "on", "the", "volume", "provided", "and", "adds", "it", "to", "the", "specified", "scene", ".", "<p", ">", "and", "will"...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRAssetLoader.java#L1343-L1372
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/StringBuilders.java
StringBuilders.appendDqValue
public static StringBuilder appendDqValue(final StringBuilder sb, final Object value) { return sb.append(Chars.DQUOTE).append(value).append(Chars.DQUOTE); }
java
public static StringBuilder appendDqValue(final StringBuilder sb, final Object value) { return sb.append(Chars.DQUOTE).append(value).append(Chars.DQUOTE); }
[ "public", "static", "StringBuilder", "appendDqValue", "(", "final", "StringBuilder", "sb", ",", "final", "Object", "value", ")", "{", "return", "sb", ".", "append", "(", "Chars", ".", "DQUOTE", ")", ".", "append", "(", "value", ")", ".", "append", "(", "...
Appends in the following format: double quoted value. @param sb a string builder @param value a value @return {@code "value"}
[ "Appends", "in", "the", "following", "format", ":", "double", "quoted", "value", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StringBuilders.java#L37-L39
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java
DOMHelper.isNodeTheSame
public static boolean isNodeTheSame(Node node1, Node node2) { if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy) return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2); else return (node1 == node2); }
java
public static boolean isNodeTheSame(Node node1, Node node2) { if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy) return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2); else return (node1 == node2); }
[ "public", "static", "boolean", "isNodeTheSame", "(", "Node", "node1", ",", "Node", "node2", ")", "{", "if", "(", "node1", "instanceof", "DTMNodeProxy", "&&", "node2", "instanceof", "DTMNodeProxy", ")", "return", "(", "(", "DTMNodeProxy", ")", "node1", ")", "...
Use DTMNodeProxy to determine whether two nodes are the same. @param node1 The first DOM node to compare. @param node2 The second DOM node to compare. @return true if the two nodes are the same.
[ "Use", "DTMNodeProxy", "to", "determine", "whether", "two", "nodes", "are", "the", "same", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java#L339-L345
atomix/atomix
utils/src/main/java/io/atomix/utils/concurrent/AbstractAccumulator.java
AbstractAccumulator.rescheduleTask
private void rescheduleTask(AtomicReference<TimerTask> taskRef, long millis) { ProcessorTask newTask = new ProcessorTask(); timer.schedule(newTask, millis); swapAndCancelTask(taskRef, newTask); }
java
private void rescheduleTask(AtomicReference<TimerTask> taskRef, long millis) { ProcessorTask newTask = new ProcessorTask(); timer.schedule(newTask, millis); swapAndCancelTask(taskRef, newTask); }
[ "private", "void", "rescheduleTask", "(", "AtomicReference", "<", "TimerTask", ">", "taskRef", ",", "long", "millis", ")", "{", "ProcessorTask", "newTask", "=", "new", "ProcessorTask", "(", ")", ";", "timer", ".", "schedule", "(", "newTask", ",", "millis", "...
Reschedules the specified task, cancelling existing one if applicable. @param taskRef task reference @param millis delay in milliseconds
[ "Reschedules", "the", "specified", "task", "cancelling", "existing", "one", "if", "applicable", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/concurrent/AbstractAccumulator.java#L124-L128
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/config/LaunchConfigurationConfigurator.java
LaunchConfigurationConfigurator.setMainJavaClass
protected static void setMainJavaClass(ILaunchConfigurationWorkingCopy wc, String name) { wc.setAttribute( IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, name); }
java
protected static void setMainJavaClass(ILaunchConfigurationWorkingCopy wc, String name) { wc.setAttribute( IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, name); }
[ "protected", "static", "void", "setMainJavaClass", "(", "ILaunchConfigurationWorkingCopy", "wc", ",", "String", "name", ")", "{", "wc", ".", "setAttribute", "(", "IJavaLaunchConfigurationConstants", ".", "ATTR_MAIN_TYPE_NAME", ",", "name", ")", ";", "}" ]
Change the main java class within the given configuration. @param wc the configuration to change. @param name the qualified name of the main Java class. @since 0.7
[ "Change", "the", "main", "java", "class", "within", "the", "given", "configuration", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/config/LaunchConfigurationConfigurator.java#L201-L205
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java
MRCompactorJobRunner.getCompactionTimestamp
private DateTime getCompactionTimestamp() throws IOException { DateTimeZone timeZone = DateTimeZone.forID( this.dataset.jobProps().getProp(MRCompactor.COMPACTION_TIMEZONE, MRCompactor.DEFAULT_COMPACTION_TIMEZONE)); if (!this.recompactFromDestPaths) { return new DateTime(timeZone); } Set<...
java
private DateTime getCompactionTimestamp() throws IOException { DateTimeZone timeZone = DateTimeZone.forID( this.dataset.jobProps().getProp(MRCompactor.COMPACTION_TIMEZONE, MRCompactor.DEFAULT_COMPACTION_TIMEZONE)); if (!this.recompactFromDestPaths) { return new DateTime(timeZone); } Set<...
[ "private", "DateTime", "getCompactionTimestamp", "(", ")", "throws", "IOException", "{", "DateTimeZone", "timeZone", "=", "DateTimeZone", ".", "forID", "(", "this", ".", "dataset", ".", "jobProps", "(", ")", ".", "getProp", "(", "MRCompactor", ".", "COMPACTION_T...
For regular compactions, compaction timestamp is the time the compaction job starts. If this is a recompaction from output paths, the compaction timestamp will remain the same as previously persisted compaction time. This is because such a recompaction doesn't consume input data, so next time, whether a file in the in...
[ "For", "regular", "compactions", "compaction", "timestamp", "is", "the", "time", "the", "compaction", "job", "starts", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactorJobRunner.java#L372-L386
marklogic/marklogic-contentpump
mlcp/src/main/java/com/marklogic/contentpump/ContentPump.java
ContentPump.setClassLoader
private static void setClassLoader(File hdConfDir, Configuration conf) throws Exception { ClassLoader parent = conf.getClassLoader(); URL url = hdConfDir.toURI().toURL(); URL[] urls = new URL[1]; urls[0] = url; ClassLoader classLoader = new URLClassLoader(urls, parent); ...
java
private static void setClassLoader(File hdConfDir, Configuration conf) throws Exception { ClassLoader parent = conf.getClassLoader(); URL url = hdConfDir.toURI().toURL(); URL[] urls = new URL[1]; urls[0] = url; ClassLoader classLoader = new URLClassLoader(urls, parent); ...
[ "private", "static", "void", "setClassLoader", "(", "File", "hdConfDir", ",", "Configuration", "conf", ")", "throws", "Exception", "{", "ClassLoader", "parent", "=", "conf", ".", "getClassLoader", "(", ")", ";", "URL", "url", "=", "hdConfDir", ".", "toURI", ...
Set class loader for current thread and for Confifguration based on Hadoop home. @param hdConfDir Hadoop home directory @param conf Hadoop configuration @throws MalformedURLException
[ "Set", "class", "loader", "for", "current", "thread", "and", "for", "Confifguration", "based", "on", "Hadoop", "home", "." ]
train
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mlcp/src/main/java/com/marklogic/contentpump/ContentPump.java#L261-L270
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/optional/Download.java
Download.toFile
public static void toFile(final HttpConfig config, final File file) { toFile(config, ContentTypes.ANY.getAt(0), file); }
java
public static void toFile(final HttpConfig config, final File file) { toFile(config, ContentTypes.ANY.getAt(0), file); }
[ "public", "static", "void", "toFile", "(", "final", "HttpConfig", "config", ",", "final", "File", "file", ")", "{", "toFile", "(", "config", ",", "ContentTypes", ".", "ANY", ".", "getAt", "(", "0", ")", ",", "file", ")", ";", "}" ]
Downloads the content to a specified file. @param config the `HttpConfig` instance @param file the file where content will be downloaded
[ "Downloads", "the", "content", "to", "a", "specified", "file", "." ]
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/optional/Download.java#L81-L83
Clivern/Racter
src/main/java/com/clivern/racter/senders/templates/GenericTemplate.java
GenericTemplate.setElementDefaultAction
public void setElementDefaultAction(Integer index, String type, String url, Boolean messenger_extensions, String webview_height_ratio, String fallback_url) { this.elements.get(index).put("default_action_type", type); this.elements.get(index).put("default_action_url", url); this.elements.get(...
java
public void setElementDefaultAction(Integer index, String type, String url, Boolean messenger_extensions, String webview_height_ratio, String fallback_url) { this.elements.get(index).put("default_action_type", type); this.elements.get(index).put("default_action_url", url); this.elements.get(...
[ "public", "void", "setElementDefaultAction", "(", "Integer", "index", ",", "String", "type", ",", "String", "url", ",", "Boolean", "messenger_extensions", ",", "String", "webview_height_ratio", ",", "String", "fallback_url", ")", "{", "this", ".", "elements", ".",...
Set Element Default Action @param index the element index @param type the element type @param url the element url @param messenger_extensions the messenger extensions @param webview_height_ratio the webview height ratio @param fallback_url the fallback url
[ "Set", "Element", "Default", "Action" ]
train
https://github.com/Clivern/Racter/blob/bbde02f0c2a8a80653ad6b1607376d8408acd71c/src/main/java/com/clivern/racter/senders/templates/GenericTemplate.java#L84-L91
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201902/activitygroupservice/GetActiveActivityGroups.java
GetActiveActivityGroups.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { ActivityGroupServiceInterface activityGroupService = adManagerServices.get(session, ActivityGroupServiceInterface.class); // Create a statement to select activity groups. Stat...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { ActivityGroupServiceInterface activityGroupService = adManagerServices.get(session, ActivityGroupServiceInterface.class); // Create a statement to select activity groups. Stat...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "ActivityGroupServiceInterface", "activityGroupService", "=", "adManagerServices", ".", "get", "(", "session",...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201902/activitygroupservice/GetActiveActivityGroups.java#L52-L87
zaproxy/zaproxy
src/org/zaproxy/zap/view/StandardFieldsDialog.java
StandardFieldsDialog.setContextValue
public void setContextValue(String fieldLabel, Context context) { Component c = this.fieldMap.get(fieldLabel); if (c != null) { if (c instanceof ContextSelectComboBox) { ((ContextSelectComboBox) c).setSelectedItem(context); } else { handleUnexpectedFieldClass(fieldLabel, c); } } }
java
public void setContextValue(String fieldLabel, Context context) { Component c = this.fieldMap.get(fieldLabel); if (c != null) { if (c instanceof ContextSelectComboBox) { ((ContextSelectComboBox) c).setSelectedItem(context); } else { handleUnexpectedFieldClass(fieldLabel, c); } } }
[ "public", "void", "setContextValue", "(", "String", "fieldLabel", ",", "Context", "context", ")", "{", "Component", "c", "=", "this", ".", "fieldMap", ".", "get", "(", "fieldLabel", ")", ";", "if", "(", "c", "!=", "null", ")", "{", "if", "(", "c", "i...
Sets the (selected) context of a {@link ContextSelectComboBox} field. <p> The call to this method has no effect it the context is not present in the combo box. @param fieldLabel the label of the field @param context the context to be set/selected, {@code null} to clear the selection. @since 2.6.0 @see #getContextValue...
[ "Sets", "the", "(", "selected", ")", "context", "of", "a", "{", "@link", "ContextSelectComboBox", "}", "field", ".", "<p", ">", "The", "call", "to", "this", "method", "has", "no", "effect", "it", "the", "context", "is", "not", "present", "in", "the", "...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L1569-L1578
deeplearning4j/deeplearning4j
nd4j/nd4j-parameter-server-parent/nd4j-parameter-server-node/src/main/java/org/nd4j/parameterserver/distributed/transport/BaseTransport.java
BaseTransport.clientMessageHandler
protected void clientMessageHandler(DirectBuffer buffer, int offset, int length, Header header) { /** * All incoming messages here are supposed to be "just messages", only unicast communication * All of them should implement MeaningfulMessage interface */ // TODO: to be impl...
java
protected void clientMessageHandler(DirectBuffer buffer, int offset, int length, Header header) { /** * All incoming messages here are supposed to be "just messages", only unicast communication * All of them should implement MeaningfulMessage interface */ // TODO: to be impl...
[ "protected", "void", "clientMessageHandler", "(", "DirectBuffer", "buffer", ",", "int", "offset", ",", "int", "length", ",", "Header", "header", ")", "{", "/**\n * All incoming messages here are supposed to be \"just messages\", only unicast communication\n * All ...
This message handler is responsible for receiving messages on Client side @param buffer @param offset @param length @param header
[ "This", "message", "handler", "is", "responsible", "for", "receiving", "messages", "on", "Client", "side" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-parameter-server-parent/nd4j-parameter-server-node/src/main/java/org/nd4j/parameterserver/distributed/transport/BaseTransport.java#L269-L282
iig-uni-freiburg/SEWOL
src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContextProperties.java
ProcessContextProperties.getDataUsageNameIndexes
private Set<Integer> getDataUsageNameIndexes() throws PropertyException { Set<Integer> result = new HashSet<>(); Set<String> dataUsageNames = getDataUsageNameList(); if (dataUsageNames.isEmpty()) { return result; } for (String dataUsageName : dataUsageNames) { ...
java
private Set<Integer> getDataUsageNameIndexes() throws PropertyException { Set<Integer> result = new HashSet<>(); Set<String> dataUsageNames = getDataUsageNameList(); if (dataUsageNames.isEmpty()) { return result; } for (String dataUsageName : dataUsageNames) { ...
[ "private", "Set", "<", "Integer", ">", "getDataUsageNameIndexes", "(", ")", "throws", "PropertyException", "{", "Set", "<", "Integer", ">", "result", "=", "new", "HashSet", "<>", "(", ")", ";", "Set", "<", "String", ">", "dataUsageNames", "=", "getDataUsageN...
Returns all used indexes for data usage property names.<br> Constraint names are enumerated (DATA_USAGE_1, DATA_USAGE_2, ...).<br> When new data usages are added, the lowest unused index is used within the new property name. @return The set of indexes in use. @throws PropertyException if existing constraint names are ...
[ "Returns", "all", "used", "indexes", "for", "data", "usage", "property", "names", ".", "<br", ">", "Constraint", "names", "are", "enumerated", "(", "DATA_USAGE_1", "DATA_USAGE_2", "...", ")", ".", "<br", ">", "When", "new", "data", "usages", "are", "added", ...
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContextProperties.java#L234-L254
apache/groovy
src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java
EncodingGroovyMethods.encodeBase64Url
public static Writable encodeBase64Url(Byte[] data, boolean pad) { return encodeBase64Url(DefaultTypeTransformation.convertToByteArray(data), pad); }
java
public static Writable encodeBase64Url(Byte[] data, boolean pad) { return encodeBase64Url(DefaultTypeTransformation.convertToByteArray(data), pad); }
[ "public", "static", "Writable", "encodeBase64Url", "(", "Byte", "[", "]", "data", ",", "boolean", "pad", ")", "{", "return", "encodeBase64Url", "(", "DefaultTypeTransformation", ".", "convertToByteArray", "(", "data", ")", ",", "pad", ")", ";", "}" ]
Produce a Writable object which writes the Base64 URL and Filename Safe encoding of the byte array. Calling toString() on the result returns the encoding as a String. For more information on Base64 URL and Filename Safe encoding see <code>RFC 4648 - Section 5 Base 64 Encoding with URL and Filename Safe Alphabet</code>....
[ "Produce", "a", "Writable", "object", "which", "writes", "the", "Base64", "URL", "and", "Filename", "Safe", "encoding", "of", "the", "byte", "array", ".", "Calling", "toString", "()", "on", "the", "result", "returns", "the", "encoding", "as", "a", "String", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/EncodingGroovyMethods.java#L193-L195
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/util/ArrayUtil.java
ArrayUtil.endsWith
public static int endsWith(String str, String[] arr) { if ( arr == null ) { return -1; } for ( int i = 0; i < arr.length; i++ ) { if ( arr[i].endsWith(str) ) { return i; } } return -1; }
java
public static int endsWith(String str, String[] arr) { if ( arr == null ) { return -1; } for ( int i = 0; i < arr.length; i++ ) { if ( arr[i].endsWith(str) ) { return i; } } return -1; }
[ "public", "static", "int", "endsWith", "(", "String", "str", ",", "String", "[", "]", "arr", ")", "{", "if", "(", "arr", "==", "null", ")", "{", "return", "-", "1", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arr", ".", "lengt...
check if there is an element that ends with the specified string @param str @return int
[ "check", "if", "there", "is", "an", "element", "that", "ends", "with", "the", "specified", "string" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/ArrayUtil.java#L84-L97