repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.produceErrorView
public static ModelAndView produceErrorView(final String view, final Exception e) { """ Produce error view model and view. @param view the view @param e the e @return the model and view """ return new ModelAndView(view, CollectionUtils.wrap("rootCauseException", e)); }
java
public static ModelAndView produceErrorView(final String view, final Exception e) { return new ModelAndView(view, CollectionUtils.wrap("rootCauseException", e)); }
[ "public", "static", "ModelAndView", "produceErrorView", "(", "final", "String", "view", ",", "final", "Exception", "e", ")", "{", "return", "new", "ModelAndView", "(", "view", ",", "CollectionUtils", ".", "wrap", "(", "\"rootCauseException\"", ",", "e", ")", "...
Produce error view model and view. @param view the view @param e the e @return the model and view
[ "Produce", "error", "view", "model", "and", "view", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L793-L795
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java
JdbcCpoAdapter.setContext
protected void setContext(Context context) throws CpoException { """ DOCUMENT ME! @param context DOCUMENT ME! @throws CpoException DOCUMENT ME! """ try { if (context == null) { context_ = new InitialContext(); } else { context_ = context; } } catch (NamingException...
java
protected void setContext(Context context) throws CpoException { try { if (context == null) { context_ = new InitialContext(); } else { context_ = context; } } catch (NamingException e) { throw new CpoException("Error setting Context", e); } }
[ "protected", "void", "setContext", "(", "Context", "context", ")", "throws", "CpoException", "{", "try", "{", "if", "(", "context", "==", "null", ")", "{", "context_", "=", "new", "InitialContext", "(", ")", ";", "}", "else", "{", "context_", "=", "conte...
DOCUMENT ME! @param context DOCUMENT ME! @throws CpoException DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L1988-L1998
Waikato/moa
moa/src/main/java/moa/classifiers/meta/AccuracyWeightedEnsemble.java
AccuracyWeightedEnsemble.addToStored
protected Classifier addToStored(Classifier newClassifier, double newClassifiersWeight) { """ Adds a classifier to the storage. @param newClassifier The classifier to add. @param newClassifiersWeight The new classifiers weight. """ Classifier addedClassifier = null; Classifier[] newStored =...
java
protected Classifier addToStored(Classifier newClassifier, double newClassifiersWeight) { Classifier addedClassifier = null; Classifier[] newStored = new Classifier[this.storedLearners.length + 1]; double[][] newStoredWeights = new double[newStored.length][2]; for (int i = 0; i < newSto...
[ "protected", "Classifier", "addToStored", "(", "Classifier", "newClassifier", ",", "double", "newClassifiersWeight", ")", "{", "Classifier", "addedClassifier", "=", "null", ";", "Classifier", "[", "]", "newStored", "=", "new", "Classifier", "[", "this", ".", "stor...
Adds a classifier to the storage. @param newClassifier The classifier to add. @param newClassifiersWeight The new classifiers weight.
[ "Adds", "a", "classifier", "to", "the", "storage", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/meta/AccuracyWeightedEnsemble.java#L409-L429
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPolicyDefinitionsInner.java
ServiceEndpointPolicyDefinitionsInner.beginCreateOrUpdate
public ServiceEndpointPolicyDefinitionInner beginCreateOrUpdate(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { """ Creates or updates a service endpoint policy definition in the specifi...
java
public ServiceEndpointPolicyDefinitionInner beginCreateOrUpdate(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, s...
[ "public", "ServiceEndpointPolicyDefinitionInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serviceEndpointPolicyName", ",", "String", "serviceEndpointPolicyDefinitionName", ",", "ServiceEndpointPolicyDefinitionInner", "serviceEndpointPolicyDefinitions", ...
Creates or updates a service endpoint policy definition in the specified service endpoint policy. @param resourceGroupName The name of the resource group. @param serviceEndpointPolicyName The name of the service endpoint policy. @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definit...
[ "Creates", "or", "updates", "a", "service", "endpoint", "policy", "definition", "in", "the", "specified", "service", "endpoint", "policy", "." ]
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/ServiceEndpointPolicyDefinitionsInner.java#L444-L446
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/KnapsackDecorator.java
KnapsackDecorator.filterFullDim
@SuppressWarnings("squid:S3346") private void filterFullDim(int bin, int dim) throws ContradictionException { """ remove all candidate items from a bin that is full then synchronize potentialLoad and sup(binLoad) accordingly if an item becomes instantiated then propagate the newly assigned bin @param bin ...
java
@SuppressWarnings("squid:S3346") private void filterFullDim(int bin, int dim) throws ContradictionException { for (int i = candidate.get(bin).nextSetBit(0); i >= 0; i = candidate.get(bin).nextSetBit(i + 1)) { if (prop.iSizes[dim][i] == 0) { continue; } // I...
[ "@", "SuppressWarnings", "(", "\"squid:S3346\"", ")", "private", "void", "filterFullDim", "(", "int", "bin", ",", "int", "dim", ")", "throws", "ContradictionException", "{", "for", "(", "int", "i", "=", "candidate", ".", "get", "(", "bin", ")", ".", "nextS...
remove all candidate items from a bin that is full then synchronize potentialLoad and sup(binLoad) accordingly if an item becomes instantiated then propagate the newly assigned bin @param bin the full bin @throws ContradictionException
[ "remove", "all", "candidate", "items", "from", "a", "bin", "that", "is", "full", "then", "synchronize", "potentialLoad", "and", "sup", "(", "binLoad", ")", "accordingly", "if", "an", "item", "becomes", "instantiated", "then", "propagate", "the", "newly", "assi...
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/KnapsackDecorator.java#L118-L140
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java
SystemInputJson.asValueDef
private static VarValueDef asValueDef( String valueName, JsonObject json) { """ Returns the value definition represented by the given JSON object. """ try { VarValueDef valueDef = new VarValueDef( ObjectUtils.toObject( valueName)); // Get the type of this value boolean failure = js...
java
private static VarValueDef asValueDef( String valueName, JsonObject json) { try { VarValueDef valueDef = new VarValueDef( ObjectUtils.toObject( valueName)); // Get the type of this value boolean failure = json.getBoolean( FAILURE_KEY, false); boolean once = json.getBoolean( ONCE_K...
[ "private", "static", "VarValueDef", "asValueDef", "(", "String", "valueName", ",", "JsonObject", "json", ")", "{", "try", "{", "VarValueDef", "valueDef", "=", "new", "VarValueDef", "(", "ObjectUtils", ".", "toObject", "(", "valueName", ")", ")", ";", "// Get t...
Returns the value definition represented by the given JSON object.
[ "Returns", "the", "value", "definition", "represented", "by", "the", "given", "JSON", "object", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java#L342-L380
yoojia/NextInputs-Android
inputs/src/main/java/com/github/yoojia/inputs/Texts.java
Texts.regexMatch
public static boolean regexMatch(String input, String regex) { """ If input matched regex @param input Input String @param regex Regex @return is matched """ return Pattern.compile(regex).matcher(input).matches(); }
java
public static boolean regexMatch(String input, String regex) { return Pattern.compile(regex).matcher(input).matches(); }
[ "public", "static", "boolean", "regexMatch", "(", "String", "input", ",", "String", "regex", ")", "{", "return", "Pattern", ".", "compile", "(", "regex", ")", ".", "matcher", "(", "input", ")", ".", "matches", "(", ")", ";", "}" ]
If input matched regex @param input Input String @param regex Regex @return is matched
[ "If", "input", "matched", "regex" ]
train
https://github.com/yoojia/NextInputs-Android/blob/9ca90cf47e84c41ac226d04694194334d2923252/inputs/src/main/java/com/github/yoojia/inputs/Texts.java#L27-L29
alexvasilkov/GestureViews
library/src/main/java/com/alexvasilkov/gestures/utils/GravityUtils.java
GravityUtils.getImagePosition
public static void getImagePosition(Matrix matrix, Settings settings, Rect out) { """ Calculates image position (scaled and rotated) within viewport area with gravity applied. @param matrix Image matrix @param settings Image settings @param out Output rectangle """ tmpRectF.set(0, 0, settings.getI...
java
public static void getImagePosition(Matrix matrix, Settings settings, Rect out) { tmpRectF.set(0, 0, settings.getImageW(), settings.getImageH()); matrix.mapRect(tmpRectF); final int w = Math.round(tmpRectF.width()); final int h = Math.round(tmpRectF.height()); // Calculating i...
[ "public", "static", "void", "getImagePosition", "(", "Matrix", "matrix", ",", "Settings", "settings", ",", "Rect", "out", ")", "{", "tmpRectF", ".", "set", "(", "0", ",", "0", ",", "settings", ".", "getImageW", "(", ")", ",", "settings", ".", "getImageH"...
Calculates image position (scaled and rotated) within viewport area with gravity applied. @param matrix Image matrix @param settings Image settings @param out Output rectangle
[ "Calculates", "image", "position", "(", "scaled", "and", "rotated", ")", "within", "viewport", "area", "with", "gravity", "applied", "." ]
train
https://github.com/alexvasilkov/GestureViews/blob/f0a4c266e31dcad23bd0d9013531bc1c501b9c9f/library/src/main/java/com/alexvasilkov/gestures/utils/GravityUtils.java#L42-L53
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/util/Configs.java
Configs.unmergeNetworks
public static NetworkConfig unmergeNetworks(NetworkConfig base, NetworkConfig unmerge) { """ Unmerges one network configuration from another. @param base The base network configuration. @param unmerge The configuration to extract. @return The cleaned configuration. """ if (!base.getName().equals(unmer...
java
public static NetworkConfig unmergeNetworks(NetworkConfig base, NetworkConfig unmerge) { if (!base.getName().equals(unmerge.getName())) { throw new IllegalArgumentException("Cannot merge networks of different names."); } for (ComponentConfig<?> component : unmerge.getComponents()) { base.remove...
[ "public", "static", "NetworkConfig", "unmergeNetworks", "(", "NetworkConfig", "base", ",", "NetworkConfig", "unmerge", ")", "{", "if", "(", "!", "base", ".", "getName", "(", ")", ".", "equals", "(", "unmerge", ".", "getName", "(", ")", ")", ")", "{", "th...
Unmerges one network configuration from another. @param base The base network configuration. @param unmerge The configuration to extract. @return The cleaned configuration.
[ "Unmerges", "one", "network", "configuration", "from", "another", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/util/Configs.java#L106-L119
Omertron/api-rottentomatoes
src/main/java/com/omertron/rottentomatoesapi/RottenTomatoesApi.java
RottenTomatoesApi.getUpcomingMovies
public List<RTMovie> getUpcomingMovies(String country) throws RottenTomatoesException { """ Retrieves upcoming movies @param country Provides localized data for the selected country @return @throws RottenTomatoesException """ return getUpcomingMovies(country, DEFAULT_PAGE, DEFAULT_PAGE_LIMIT); ...
java
public List<RTMovie> getUpcomingMovies(String country) throws RottenTomatoesException { return getUpcomingMovies(country, DEFAULT_PAGE, DEFAULT_PAGE_LIMIT); }
[ "public", "List", "<", "RTMovie", ">", "getUpcomingMovies", "(", "String", "country", ")", "throws", "RottenTomatoesException", "{", "return", "getUpcomingMovies", "(", "country", ",", "DEFAULT_PAGE", ",", "DEFAULT_PAGE_LIMIT", ")", ";", "}" ]
Retrieves upcoming movies @param country Provides localized data for the selected country @return @throws RottenTomatoesException
[ "Retrieves", "upcoming", "movies" ]
train
https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/RottenTomatoesApi.java#L306-L308
encoway/edu
edu/src/main/java/com/encoway/edu/EventDrivenUpdatesMap.java
EventDrivenUpdatesMap.get
public String get(String events, String defaultValue) { """ Returns a space separated list of component IDs of components registered for at least one the `events`. @param events a comma/space separated list of event names @param defaultValue will be returned if no component is registered for one of the `events...
java
public String get(String events, String defaultValue) { return get(parseEvents(events), defaultValue); }
[ "public", "String", "get", "(", "String", "events", ",", "String", "defaultValue", ")", "{", "return", "get", "(", "parseEvents", "(", "events", ")", ",", "defaultValue", ")", ";", "}" ]
Returns a space separated list of component IDs of components registered for at least one the `events`. @param events a comma/space separated list of event names @param defaultValue will be returned if no component is registered for one of the `events` @return a space separated list of fully qualified component IDs or...
[ "Returns", "a", "space", "separated", "list", "of", "component", "IDs", "of", "components", "registered", "for", "at", "least", "one", "the", "events", "." ]
train
https://github.com/encoway/edu/blob/52ae92b2207f7d5668e212904359fbeb360f3f05/edu/src/main/java/com/encoway/edu/EventDrivenUpdatesMap.java#L120-L122
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java
FastStringBuffer.setLength
private final void setLength(int l, FastStringBuffer rootFSB) { """ Subroutine for the public setLength() method. Deals with the fact that truncation may require restoring one of the innerFSBs NEEDSDOC @param l NEEDSDOC @param rootFSB """ m_lastChunk = l >>> m_chunkBits; if (m_lastChunk == 0 && ...
java
private final void setLength(int l, FastStringBuffer rootFSB) { m_lastChunk = l >>> m_chunkBits; if (m_lastChunk == 0 && m_innerFSB != null) { m_innerFSB.setLength(l, rootFSB); } else { // Undo encapsulation -- pop the innerFSB data back up to root. // Inefficient, but att...
[ "private", "final", "void", "setLength", "(", "int", "l", ",", "FastStringBuffer", "rootFSB", ")", "{", "m_lastChunk", "=", "l", ">>>", "m_chunkBits", ";", "if", "(", "m_lastChunk", "==", "0", "&&", "m_innerFSB", "!=", "null", ")", "{", "m_innerFSB", ".", ...
Subroutine for the public setLength() method. Deals with the fact that truncation may require restoring one of the innerFSBs NEEDSDOC @param l NEEDSDOC @param rootFSB
[ "Subroutine", "for", "the", "public", "setLength", "()", "method", ".", "Deals", "with", "the", "fact", "that", "truncation", "may", "require", "restoring", "one", "of", "the", "innerFSBs" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java#L357-L383
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/quadtree/QuadTree.java
QuadTree.computeNonEdgeForces
public void computeNonEdgeForces(int pointIndex, double theta, INDArray negativeForce, AtomicDouble sumQ) { """ Compute non edge forces using barnes hut @param pointIndex @param theta @param negativeForce @param sumQ """ // Make sure that we spend no time on empty nodes or self-interactions ...
java
public void computeNonEdgeForces(int pointIndex, double theta, INDArray negativeForce, AtomicDouble sumQ) { // Make sure that we spend no time on empty nodes or self-interactions if (cumSize == 0 || (isLeaf() && size == 1 && index[0] == pointIndex)) return; // Compute distance betw...
[ "public", "void", "computeNonEdgeForces", "(", "int", "pointIndex", ",", "double", "theta", ",", "INDArray", "negativeForce", ",", "AtomicDouble", "sumQ", ")", "{", "// Make sure that we spend no time on empty nodes or self-interactions", "if", "(", "cumSize", "==", "0", ...
Compute non edge forces using barnes hut @param pointIndex @param theta @param negativeForce @param sumQ
[ "Compute", "non", "edge", "forces", "using", "barnes", "hut" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/quadtree/QuadTree.java#L236-L265
spring-projects/spring-social-facebook
spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestDecoder.java
SignedRequestDecoder.decodeSignedRequest
@SuppressWarnings("unchecked") public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException { """ Decodes a signed request, returning the payload of the signed request as a Map @param signedRequest the value of the signed_request parameter sent by Facebook. @return the payload o...
java
@SuppressWarnings("unchecked") public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException { return decodeSignedRequest(signedRequest, Map.class); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Map", "<", "String", ",", "?", ">", "decodeSignedRequest", "(", "String", "signedRequest", ")", "throws", "SignedRequestException", "{", "return", "decodeSignedRequest", "(", "signedRequest", ",", "Map",...
Decodes a signed request, returning the payload of the signed request as a Map @param signedRequest the value of the signed_request parameter sent by Facebook. @return the payload of the signed request as a Map @throws SignedRequestException if there is an error decoding the signed request
[ "Decodes", "a", "signed", "request", "returning", "the", "payload", "of", "the", "signed", "request", "as", "a", "Map" ]
train
https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestDecoder.java#L58-L61
qiujiayu/AutoLoadCache
src/main/java/com/jarvis/cache/script/AbstractScriptParser.java
AbstractScriptParser.getRealExpire
public int getRealExpire(int expire, String expireExpression, Object[] arguments, Object result) throws Exception { """ 获取真实的缓存时间值 @param expire 缓存时间 @param expireExpression 缓存时间表达式 @param arguments 方法参数 @param result 方法执行返回结果 @return real expire @throws Exception 异常 """ ...
java
public int getRealExpire(int expire, String expireExpression, Object[] arguments, Object result) throws Exception { Integer tmpExpire = null; if (null != expireExpression && expireExpression.length() > 0) { tmpExpire = this.getElValue(expireExpression, null, arguments, result, true, Integ...
[ "public", "int", "getRealExpire", "(", "int", "expire", ",", "String", "expireExpression", ",", "Object", "[", "]", "arguments", ",", "Object", "result", ")", "throws", "Exception", "{", "Integer", "tmpExpire", "=", "null", ";", "if", "(", "null", "!=", "e...
获取真实的缓存时间值 @param expire 缓存时间 @param expireExpression 缓存时间表达式 @param arguments 方法参数 @param result 方法执行返回结果 @return real expire @throws Exception 异常
[ "获取真实的缓存时间值" ]
train
https://github.com/qiujiayu/AutoLoadCache/blob/8121c146f1a420fa6d6832e849acadb547c13622/src/main/java/com/jarvis/cache/script/AbstractScriptParser.java#L188-L198
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.invalidateAndSet
@Override public Object invalidateAndSet(com.ibm.ws.cache.EntryInfo ei, Object value, boolean coordinate) { """ Puts an entry into the cache. If the entry already exists in the cache, this method will ALSO update the same. Called by DistributedMap @param ei The EntryInfo object @param value The value o...
java
@Override public Object invalidateAndSet(com.ibm.ws.cache.EntryInfo ei, Object value, boolean coordinate) { final String methodName = "invalidateAndSet()"; Object oldValue = null; Object id = null; if (ei != null && value != null) { id = ei.getIdObject(); com....
[ "@", "Override", "public", "Object", "invalidateAndSet", "(", "com", ".", "ibm", ".", "ws", ".", "cache", ".", "EntryInfo", "ei", ",", "Object", "value", ",", "boolean", "coordinate", ")", "{", "final", "String", "methodName", "=", "\"invalidateAndSet()\"", ...
Puts an entry into the cache. If the entry already exists in the cache, this method will ALSO update the same. Called by DistributedMap @param ei The EntryInfo object @param value The value of the object @param coordinate Indicates that the value should be set in other caches caching this value. (No effect on CoreCac...
[ "Puts", "an", "entry", "into", "the", "cache", ".", "If", "the", "entry", "already", "exists", "in", "the", "cache", "this", "method", "will", "ALSO", "update", "the", "same", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L439-L455
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.matchesPattern
public CharSequence matchesPattern(final CharSequence input, final String pattern, final String message, final Object... values) { """ <p>Validate that the specified argument character sequence matches the specified regular expression pattern; otherwise throwing an exception with the specified message.</p> <pre>V...
java
public CharSequence matchesPattern(final CharSequence input, final String pattern, final String message, final Object... values) { if (!Pattern.matches(pattern, input)) { fail(String.format(message, values)); } return input; }
[ "public", "CharSequence", "matchesPattern", "(", "final", "CharSequence", "input", ",", "final", "String", "pattern", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "!", "Pattern", ".", "matches", "(", "patte...
<p>Validate that the specified argument character sequence matches the specified regular expression pattern; otherwise throwing an exception with the specified message.</p> <pre>Validate.matchesPattern("hi", "[a-z]*", "%s does not match %s", "hi" "[a-z]*");</pre> <p>The syntax of the pattern is the one used in the {@li...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "character", "sequence", "matches", "the", "specified", "regular", "expression", "pattern", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "<", "/", "p",...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L1197-L1202
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java
ListViewUrl.getViewEntityContainersUrl
public static MozuUrl getViewEntityContainersUrl(String entityListFullName, String filter, Integer pageSize, String responseFields, Integer startIndex, String viewName) { """ Get Resource Url for GetViewEntityContainers @param entityListFullName The full name of the EntityList including namespace in name@nameSpac...
java
public static MozuUrl getViewEntityContainersUrl(String entityListFullName, String filter, Integer pageSize, String responseFields, Integer startIndex, String viewName) { UrlFormatter formatter = new UrlFormatter("/api/platform/entitylists/{entityListFullName}/views/{viewName}/entityContainers?pageSize={pageSize}&...
[ "public", "static", "MozuUrl", "getViewEntityContainersUrl", "(", "String", "entityListFullName", ",", "String", "filter", ",", "Integer", "pageSize", ",", "String", "responseFields", ",", "Integer", "startIndex", ",", "String", "viewName", ")", "{", "UrlFormatter", ...
Get Resource Url for GetViewEntityContainers @param entityListFullName The full name of the EntityList including namespace in name@nameSpace format @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer...
[ "Get", "Resource", "Url", "for", "GetViewEntityContainers" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/platform/entitylists/ListViewUrl.java#L84-L94
apache/groovy
subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
XmlSlurper.setEntityBaseUrl
public void setEntityBaseUrl(final URL base) { """ Resolves entities against using the supplied URL as the base for relative URLs @param base The URL used to resolve relative URLs """ reader.setEntityResolver(new EntityResolver() { public InputSource resolveEntity(final String publicId, ...
java
public void setEntityBaseUrl(final URL base) { reader.setEntityResolver(new EntityResolver() { public InputSource resolveEntity(final String publicId, final String systemId) throws IOException { return new InputSource(new URL(base, systemId).openStream()); } }); ...
[ "public", "void", "setEntityBaseUrl", "(", "final", "URL", "base", ")", "{", "reader", ".", "setEntityResolver", "(", "new", "EntityResolver", "(", ")", "{", "public", "InputSource", "resolveEntity", "(", "final", "String", "publicId", ",", "final", "String", ...
Resolves entities against using the supplied URL as the base for relative URLs @param base The URL used to resolve relative URLs
[ "Resolves", "entities", "against", "using", "the", "supplied", "URL", "as", "the", "base", "for", "relative", "URLs" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java#L340-L346
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java
CompiledFEELSemanticMappings.sub
public static Object sub(Object left, Object right) { """ FEEL spec Table 45 Delegates to {@link InfixOpNode} except evaluationcontext """ return InfixOpNode.sub(left, right, null); }
java
public static Object sub(Object left, Object right) { return InfixOpNode.sub(left, right, null); }
[ "public", "static", "Object", "sub", "(", "Object", "left", ",", "Object", "right", ")", "{", "return", "InfixOpNode", ".", "sub", "(", "left", ",", "right", ",", "null", ")", ";", "}" ]
FEEL spec Table 45 Delegates to {@link InfixOpNode} except evaluationcontext
[ "FEEL", "spec", "Table", "45", "Delegates", "to", "{" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java#L306-L308
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.requiresOptionBar
public boolean requiresOptionBar(CmsContainerPageElementPanel element, I_CmsDropContainer dragParent) { """ Checks whether the given element should display the option bar.<p> @param element the element @param dragParent the element parent @return <code>true</code> if the given element should display the opt...
java
public boolean requiresOptionBar(CmsContainerPageElementPanel element, I_CmsDropContainer dragParent) { return element.hasViewPermission() && (!element.hasModelGroupParent() || getData().isModelGroup()) && (matchRootView(element.getElementView()) || isGroupcontainerEditi...
[ "public", "boolean", "requiresOptionBar", "(", "CmsContainerPageElementPanel", "element", ",", "I_CmsDropContainer", "dragParent", ")", "{", "return", "element", ".", "hasViewPermission", "(", ")", "&&", "(", "!", "element", ".", "hasModelGroupParent", "(", ")", "||...
Checks whether the given element should display the option bar.<p> @param element the element @param dragParent the element parent @return <code>true</code> if the given element should display the option bar
[ "Checks", "whether", "the", "given", "element", "should", "display", "the", "option", "bar", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L2825-L2834
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java
Cells.getShort
public Short getShort(String nameSpace, String cellName) { """ Returns the {@code Short} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellName the name ...
java
public Short getShort(String nameSpace, String cellName) { return getValue(nameSpace, cellName, Short.class); }
[ "public", "Short", "getShort", "(", "String", "nameSpace", ",", "String", "cellName", ")", "{", "return", "getValue", "(", "nameSpace", ",", "cellName", ",", "Short", ".", "class", ")", ";", "}" ]
Returns the {@code Short} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellName the name of the Cell we want to retrieve from this Cells object. @return the {@co...
[ "Returns", "the", "{", "@code", "Short", "}", "value", "of", "the", "{", "@link", "Cell", "}", "(", "associated", "to", "{", "@code", "table", "}", ")", "whose", "name", "iscellName", "or", "null", "if", "this", "Cells", "object", "contains", "no", "ce...
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L979-L981
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.setCorner
public void setCorner(int index, double x, double y) { """ Sets x,y-coordinate of a corner. @param index The index of a corner. @param x The x-coordinate of a corner. @param y The y-coordinate of a corner. """ if (index <= 0) { this.x1 = x; this.y1 = y; } else if (i...
java
public void setCorner(int index, double x, double y) { if (index <= 0) { this.x1 = x; this.y1 = y; } else if (index == 1) { this.x2 = x; this.y2 = y; } else if (index == 2) { this.x3 = x; this.y3 = y; } else if (inde...
[ "public", "void", "setCorner", "(", "int", "index", ",", "double", "x", ",", "double", "y", ")", "{", "if", "(", "index", "<=", "0", ")", "{", "this", ".", "x1", "=", "x", ";", "this", ".", "y1", "=", "y", ";", "}", "else", "if", "(", "index"...
Sets x,y-coordinate of a corner. @param index The index of a corner. @param x The x-coordinate of a corner. @param y The y-coordinate of a corner.
[ "Sets", "x", "y", "-", "coordinate", "of", "a", "corner", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L151-L166
querydsl/querydsl
querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbExpressions.java
MongodbExpressions.nearSphere
public static BooleanExpression nearSphere(Expression<Double[]> expr, double latVal, double longVal) { """ Finds the closest points relative to the given location on a sphere and orders the results with decreasing proximity @param expr location @param latVal latitude @param longVal longitude @return predicat...
java
public static BooleanExpression nearSphere(Expression<Double[]> expr, double latVal, double longVal) { return Expressions.booleanOperation(MongodbOps.NEAR_SPHERE, expr, ConstantImpl.create(new Double[]{latVal, longVal})); }
[ "public", "static", "BooleanExpression", "nearSphere", "(", "Expression", "<", "Double", "[", "]", ">", "expr", ",", "double", "latVal", ",", "double", "longVal", ")", "{", "return", "Expressions", ".", "booleanOperation", "(", "MongodbOps", ".", "NEAR_SPHERE", ...
Finds the closest points relative to the given location on a sphere and orders the results with decreasing proximity @param expr location @param latVal latitude @param longVal longitude @return predicate
[ "Finds", "the", "closest", "points", "relative", "to", "the", "given", "location", "on", "a", "sphere", "and", "orders", "the", "results", "with", "decreasing", "proximity" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-mongodb/src/main/java/com/querydsl/mongodb/MongodbExpressions.java#L51-L53
vigna/Sux4J
src/it/unimi/dsi/sux4j/mph/HypergraphSorter.java
HypergraphSorter.tripleToEdge
public static void tripleToEdge(final long[] triple, final long seed, final int numVertices, final int partSize, final int e[]) { """ Turns a triple of longs into a 3-hyperedge. @param triple a triple of intermediate hashes. @param seed the seed for the hash function. @param numVertices the number of vertices...
java
public static void tripleToEdge(final long[] triple, final long seed, final int numVertices, final int partSize, final int e[]) { if (numVertices == 0) { e[0] = e[1] = e[2] = -1; return; } final long[] hash = new long[3]; Hashes.spooky4(triple, seed, hash); e[0] = (int)((hash[0] & 0x7FFFFFFFFFFFFFFFL) %...
[ "public", "static", "void", "tripleToEdge", "(", "final", "long", "[", "]", "triple", ",", "final", "long", "seed", ",", "final", "int", "numVertices", ",", "final", "int", "partSize", ",", "final", "int", "e", "[", "]", ")", "{", "if", "(", "numVertic...
Turns a triple of longs into a 3-hyperedge. @param triple a triple of intermediate hashes. @param seed the seed for the hash function. @param numVertices the number of vertices in the underlying hypergraph. @param partSize <code>numVertices</code>/3 (to avoid a division). @param e an array to store the resulting edge....
[ "Turns", "a", "triple", "of", "longs", "into", "a", "3", "-", "hyperedge", "." ]
train
https://github.com/vigna/Sux4J/blob/d57de8fa897c7d273e0e6dae7a3274174f175a5f/src/it/unimi/dsi/sux4j/mph/HypergraphSorter.java#L232-L242
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
Drawer.addItemAtPosition
public void addItemAtPosition(@NonNull IDrawerItem drawerItem, int position) { """ Add a drawerItem at a specific position @param drawerItem @param position """ mDrawerBuilder.getItemAdapter().add(position, drawerItem); }
java
public void addItemAtPosition(@NonNull IDrawerItem drawerItem, int position) { mDrawerBuilder.getItemAdapter().add(position, drawerItem); }
[ "public", "void", "addItemAtPosition", "(", "@", "NonNull", "IDrawerItem", "drawerItem", ",", "int", "position", ")", "{", "mDrawerBuilder", ".", "getItemAdapter", "(", ")", ".", "add", "(", "position", ",", "drawerItem", ")", ";", "}" ]
Add a drawerItem at a specific position @param drawerItem @param position
[ "Add", "a", "drawerItem", "at", "a", "specific", "position" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java#L733-L735
stephenc/simple-java-mail
src/main/java/org/codemonkey/simplejavamail/Email.java
Email.addRecipient
public void addRecipient(final String name, final String address, final RecipientType type) { """ Adds a new {@link Recipient} to the list on account of name, address and recipient type (eg. {@link RecipientType#CC}). @param name The name of the recipient. @param address The emailadres of the recipient. @par...
java
public void addRecipient(final String name, final String address, final RecipientType type) { recipients.add(new Recipient(name, address, type)); }
[ "public", "void", "addRecipient", "(", "final", "String", "name", ",", "final", "String", "address", ",", "final", "RecipientType", "type", ")", "{", "recipients", ".", "add", "(", "new", "Recipient", "(", "name", ",", "address", ",", "type", ")", ")", "...
Adds a new {@link Recipient} to the list on account of name, address and recipient type (eg. {@link RecipientType#CC}). @param name The name of the recipient. @param address The emailadres of the recipient. @param type The type of receiver (eg. {@link RecipientType#CC}). @see #recipients @see Recipient @see RecipientT...
[ "Adds", "a", "new", "{", "@link", "Recipient", "}", "to", "the", "list", "on", "account", "of", "name", "address", "and", "recipient", "type", "(", "eg", ".", "{", "@link", "RecipientType#CC", "}", ")", "." ]
train
https://github.com/stephenc/simple-java-mail/blob/8c5897e6bbc23c11e7c7eb5064f407625c653923/src/main/java/org/codemonkey/simplejavamail/Email.java#L100-L102
oboehm/jfachwert
src/main/java/de/jfachwert/FachwertFactory.java
FachwertFactory.getFachwert
public Fachwert getFachwert(Class<? extends Fachwert> clazz, Object... args) { """ Liefert einen Fachwert zur angegebenen Klasse. @param clazz Fachwert-Klasse @param args Argument(e) fuer den Konstruktor der Fachwert-Klasse @return ein Fachwert """ Class[] argTypes = toTypes(args); try { ...
java
public Fachwert getFachwert(Class<? extends Fachwert> clazz, Object... args) { Class[] argTypes = toTypes(args); try { Constructor<? extends Fachwert> ctor = clazz.getConstructor(argTypes); return ctor.newInstance(args); } catch (ReflectiveOperationException ex) { ...
[ "public", "Fachwert", "getFachwert", "(", "Class", "<", "?", "extends", "Fachwert", ">", "clazz", ",", "Object", "...", "args", ")", "{", "Class", "[", "]", "argTypes", "=", "toTypes", "(", "args", ")", ";", "try", "{", "Constructor", "<", "?", "extend...
Liefert einen Fachwert zur angegebenen Klasse. @param clazz Fachwert-Klasse @param args Argument(e) fuer den Konstruktor der Fachwert-Klasse @return ein Fachwert
[ "Liefert", "einen", "Fachwert", "zur", "angegebenen", "Klasse", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/FachwertFactory.java#L181-L196
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container/src/com/ibm/ws/jpa/container/osgi/internal/JPAComponentImpl.java
JPAComponentImpl.getPXmlRootURL
private URL getPXmlRootURL(String appName, String archiveName, Entry pxml) { """ Determine the root of all persistence units defined in a persistence.xml. <p> This is the value that should be returned by the method getPersistenceUnitRootUrl on javax.persistence.spi.PersistenceUnitInfo. It is defined in the JPA...
java
private URL getPXmlRootURL(String appName, String archiveName, Entry pxml) { URL pxmlUrl = pxml.getResource(); String pxmlStr = pxmlUrl.toString(); String pxmlRootStr = pxmlStr.substring(0, pxmlStr.length() - PERSISTENCE_XML_RESOURCE_NAME.length()); URL pxmlRootUrl = null; try { ...
[ "private", "URL", "getPXmlRootURL", "(", "String", "appName", ",", "String", "archiveName", ",", "Entry", "pxml", ")", "{", "URL", "pxmlUrl", "=", "pxml", ".", "getResource", "(", ")", ";", "String", "pxmlStr", "=", "pxmlUrl", ".", "toString", "(", ")", ...
Determine the root of all persistence units defined in a persistence.xml. <p> This is the value that should be returned by the method getPersistenceUnitRootUrl on javax.persistence.spi.PersistenceUnitInfo. It is defined in the JPA 2.0 specification as follows: <p> The jar file or directory whose META-INF directory co...
[ "Determine", "the", "root", "of", "all", "persistence", "units", "defined", "in", "a", "persistence", ".", "xml", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container/src/com/ibm/ws/jpa/container/osgi/internal/JPAComponentImpl.java#L413-L425
Bedework/bw-util
bw-util-misc/src/main/java/org/bedework/util/misc/Util.java
Util.fmtMsg
public static String fmtMsg(final String fmt, final int arg) { """ Format a message consisting of a format string plus one integer parameter @param fmt @param arg @return String formatted message """ Object[] o = new Object[1]; o[0] = new Integer(arg); return MessageFormat.format(fmt, o); }
java
public static String fmtMsg(final String fmt, final int arg) { Object[] o = new Object[1]; o[0] = new Integer(arg); return MessageFormat.format(fmt, o); }
[ "public", "static", "String", "fmtMsg", "(", "final", "String", "fmt", ",", "final", "int", "arg", ")", "{", "Object", "[", "]", "o", "=", "new", "Object", "[", "1", "]", ";", "o", "[", "0", "]", "=", "new", "Integer", "(", "arg", ")", ";", "re...
Format a message consisting of a format string plus one integer parameter @param fmt @param arg @return String formatted message
[ "Format", "a", "message", "consisting", "of", "a", "format", "string", "plus", "one", "integer", "parameter" ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-misc/src/main/java/org/bedework/util/misc/Util.java#L436-L441
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getExports
public List<Export> getExports(UUID projectId, UUID iterationId) { """ Get the list of exports for a specific iteration. @param projectId The project id @param iterationId The iteration id @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request i...
java
public List<Export> getExports(UUID projectId, UUID iterationId) { return getExportsWithServiceResponseAsync(projectId, iterationId).toBlocking().single().body(); }
[ "public", "List", "<", "Export", ">", "getExports", "(", "UUID", "projectId", ",", "UUID", "iterationId", ")", "{", "return", "getExportsWithServiceResponseAsync", "(", "projectId", ",", "iterationId", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")",...
Get the list of exports for a specific iteration. @param projectId The project id @param iterationId The iteration id @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exception...
[ "Get", "the", "list", "of", "exports", "for", "a", "specific", "iteration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L1129-L1131
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newDataAccessException
public static DataAccessException newDataAccessException(Throwable cause, String message, Object... args) { """ Constructs and initializes a new {@link DataAccessException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link...
java
public static DataAccessException newDataAccessException(Throwable cause, String message, Object... args) { return new DataAccessException(format(message, args), cause); }
[ "public", "static", "DataAccessException", "newDataAccessException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "DataAccessException", "(", "format", "(", "message", ",", "args", ")", ",", "cause...
Constructs and initializes a new {@link DataAccessException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link DataAccessException} was thrown. @param message {@link String} describi...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "DataAccessException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Obje...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L167-L169
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.collapseParentRange
@UiThread public void collapseParentRange(int startParentPosition, int parentCount) { """ Collapses all parents in a range of indices in the list of parents. @param startParentPosition The index at which to to start collapsing parents @param parentCount The number of parents to collapse """ int...
java
@UiThread public void collapseParentRange(int startParentPosition, int parentCount) { int endParentPosition = startParentPosition + parentCount; for (int i = startParentPosition; i < endParentPosition; i++) { collapseParent(i); } }
[ "@", "UiThread", "public", "void", "collapseParentRange", "(", "int", "startParentPosition", ",", "int", "parentCount", ")", "{", "int", "endParentPosition", "=", "startParentPosition", "+", "parentCount", ";", "for", "(", "int", "i", "=", "startParentPosition", "...
Collapses all parents in a range of indices in the list of parents. @param startParentPosition The index at which to to start collapsing parents @param parentCount The number of parents to collapse
[ "Collapses", "all", "parents", "in", "a", "range", "of", "indices", "in", "the", "list", "of", "parents", "." ]
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L547-L553
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.deallocate
public OperationStatusResponseInner deallocate(String resourceGroupName, String vmName) { """ Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. @param resourceGroupName The name of the resource group. @param vmName Th...
java
public OperationStatusResponseInner deallocate(String resourceGroupName, String vmName) { return deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "deallocate", "(", "String", "resourceGroupName", ",", "String", "vmName", ")", "{", "return", "deallocateWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ")", ".", "toBlocking", "(", ")", ".", "last", "(", ...
Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validati...
[ "Shuts", "down", "the", "virtual", "machine", "and", "releases", "the", "compute", "resources", ".", "You", "are", "not", "billed", "for", "the", "compute", "resources", "that", "this", "virtual", "machine", "uses", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L1290-L1292
MenoData/Time4J
base/src/main/java/net/time4j/AnnualDate.java
AnnualDate.parseXML
public static AnnualDate parseXML(String xml) throws ParseException { """ /*[deutsch] <p>Interpretiert den angegebenen Text als Jahrestag im XML-Format &quot;--MM-dd&quot;. </p> @param xml string compatible to lexical space of xsd:gMonthDay @return AnnualDate @throws ParseException if parsing fails ...
java
public static AnnualDate parseXML(String xml) throws ParseException { if ((xml.length() == 7) && (xml.charAt(0) == '-') && (xml.charAt(1) == '-') && (xml.charAt(4) == '-')) { int m1 = toDigit(xml, 2); int m2 = toDigit(xml, 3); int d1 = toDigit(xml, 5); int d2 = t...
[ "public", "static", "AnnualDate", "parseXML", "(", "String", "xml", ")", "throws", "ParseException", "{", "if", "(", "(", "xml", ".", "length", "(", ")", "==", "7", ")", "&&", "(", "xml", ".", "charAt", "(", "0", ")", "==", "'", "'", ")", "&&", "...
/*[deutsch] <p>Interpretiert den angegebenen Text als Jahrestag im XML-Format &quot;--MM-dd&quot;. </p> @param xml string compatible to lexical space of xsd:gMonthDay @return AnnualDate @throws ParseException if parsing fails @see #toString()
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Interpretiert", "den", "angegebenen", "Text", "als", "Jahrestag", "im", "XML", "-", "Format", "&quot", ";", "--", "MM", "-", "dd&quot", ";", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/AnnualDate.java#L472-L484
radkovo/jStyleParser
src/main/java/cz/vutbr/web/domassign/Analyzer.java
Analyzer.assingDeclarationsToDOM
protected DeclarationMap assingDeclarationsToDOM(Document doc, MediaSpec media, final boolean inherit) { """ Creates map of declarations assigned to each element of a DOM tree @param doc DOM document @param media Media type to be used for declarations @param inherit Inheritance (cascade propagation of valu...
java
protected DeclarationMap assingDeclarationsToDOM(Document doc, MediaSpec media, final boolean inherit) { // classify the rules classifyAllSheets(media); // resulting map DeclarationMap declarations = new DeclarationMap(); // if the holder is empty skip evaluation if(rules!=null && !rul...
[ "protected", "DeclarationMap", "assingDeclarationsToDOM", "(", "Document", "doc", ",", "MediaSpec", "media", ",", "final", "boolean", "inherit", ")", "{", "// classify the rules", "classifyAllSheets", "(", "media", ")", ";", "// resulting map", "DeclarationMap", "declar...
Creates map of declarations assigned to each element of a DOM tree @param doc DOM document @param media Media type to be used for declarations @param inherit Inheritance (cascade propagation of values) @return Map of elements as keys and their declarations
[ "Creates", "map", "of", "declarations", "assigned", "to", "each", "element", "of", "a", "DOM", "tree" ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/domassign/Analyzer.java#L200-L230
aws/aws-sdk-java
aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/GetFolderResult.java
GetFolderResult.withCustomMetadata
public GetFolderResult withCustomMetadata(java.util.Map<String, String> customMetadata) { """ <p> The custom metadata on the folder. </p> @param customMetadata The custom metadata on the folder. @return Returns a reference to this object so that method calls can be chained together. """ setCusto...
java
public GetFolderResult withCustomMetadata(java.util.Map<String, String> customMetadata) { setCustomMetadata(customMetadata); return this; }
[ "public", "GetFolderResult", "withCustomMetadata", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "customMetadata", ")", "{", "setCustomMetadata", "(", "customMetadata", ")", ";", "return", "this", ";", "}" ]
<p> The custom metadata on the folder. </p> @param customMetadata The custom metadata on the folder. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "custom", "metadata", "on", "the", "folder", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/GetFolderResult.java#L114-L117
code4craft/webmagic
webmagic-core/src/main/java/us/codecraft/webmagic/utils/UrlUtils.java
UrlUtils.canonicalizeUrl
public static String canonicalizeUrl(String url, String refer) { """ canonicalizeUrl <br> Borrowed from Jsoup. @param url url @param refer refer @return canonicalizeUrl """ URL base; try { try { base = new URL(refer); } catch (MalformedURLException...
java
public static String canonicalizeUrl(String url, String refer) { URL base; try { try { base = new URL(refer); } catch (MalformedURLException e) { // the base is unsuitable, but the attribute may be abs on its own, so try that URL ab...
[ "public", "static", "String", "canonicalizeUrl", "(", "String", "url", ",", "String", "refer", ")", "{", "URL", "base", ";", "try", "{", "try", "{", "base", "=", "new", "URL", "(", "refer", ")", ";", "}", "catch", "(", "MalformedURLException", "e", ")"...
canonicalizeUrl <br> Borrowed from Jsoup. @param url url @param refer refer @return canonicalizeUrl
[ "canonicalizeUrl", "<br", ">", "Borrowed", "from", "Jsoup", "." ]
train
https://github.com/code4craft/webmagic/blob/be892b80bf6682cd063d30ac25a79be0c079a901/webmagic-core/src/main/java/us/codecraft/webmagic/utils/UrlUtils.java#L32-L50
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.updateBytes
public void updateBytes(int columnIndex, byte[] x) throws SQLException { """ <!-- start generic documentation --> Updates the designated column with a <code>byte</code> array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the...
java
public void updateBytes(int columnIndex, byte[] x) throws SQLException { startUpdate(columnIndex); preparedStatement.setParameter(columnIndex, x); }
[ "public", "void", "updateBytes", "(", "int", "columnIndex", ",", "byte", "[", "]", "x", ")", "throws", "SQLException", "{", "startUpdate", "(", "columnIndex", ")", ";", "preparedStatement", ".", "setParameter", "(", "columnIndex", ",", "x", ")", ";", "}" ]
<!-- start generic documentation --> Updates the designated column with a <code>byte</code> array value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> met...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Updates", "the", "designated", "column", "with", "a", "<code", ">", "byte<", "/", "code", ">", "array", "value", ".", "The", "updater", "methods", "are", "used", "to", "update", "column", "values...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L2949-L2952
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Preconditions.java
Preconditions.checkPreconditionD
public static double checkPreconditionD( final double value, final boolean condition, final DoubleFunction<String> describer) { """ A {@code double} specialized version of {@link #checkPrecondition(Object, boolean, Function)} @param value The value @param condition The predicate @param descri...
java
public static double checkPreconditionD( final double value, final boolean condition, final DoubleFunction<String> describer) { return innerCheckD(value, condition, describer); }
[ "public", "static", "double", "checkPreconditionD", "(", "final", "double", "value", ",", "final", "boolean", "condition", ",", "final", "DoubleFunction", "<", "String", ">", "describer", ")", "{", "return", "innerCheckD", "(", "value", ",", "condition", ",", ...
A {@code double} specialized version of {@link #checkPrecondition(Object, boolean, Function)} @param value The value @param condition The predicate @param describer The describer of the predicate @return value @throws PreconditionViolationException If the predicate is false
[ "A", "{", "@code", "double", "}", "specialized", "version", "of", "{", "@link", "#checkPrecondition", "(", "Object", "boolean", "Function", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Preconditions.java#L551-L557
apache/fluo
modules/core/src/main/java/org/apache/fluo/core/util/SpanUtil.java
SpanUtil.toRowColumn
public static RowColumn toRowColumn(Key key) { """ Converts from an Accumulo Key to a Fluo RowColumn @param key Key @return RowColumn """ if (key == null) { return RowColumn.EMPTY; } if ((key.getRow() == null) || key.getRow().getLength() == 0) { return RowColumn.EMPTY; } Byt...
java
public static RowColumn toRowColumn(Key key) { if (key == null) { return RowColumn.EMPTY; } if ((key.getRow() == null) || key.getRow().getLength() == 0) { return RowColumn.EMPTY; } Bytes row = ByteUtil.toBytes(key.getRow()); if ((key.getColumnFamily() == null) || key.getColumnFamily(...
[ "public", "static", "RowColumn", "toRowColumn", "(", "Key", "key", ")", "{", "if", "(", "key", "==", "null", ")", "{", "return", "RowColumn", ".", "EMPTY", ";", "}", "if", "(", "(", "key", ".", "getRow", "(", ")", "==", "null", ")", "||", "key", ...
Converts from an Accumulo Key to a Fluo RowColumn @param key Key @return RowColumn
[ "Converts", "from", "an", "Accumulo", "Key", "to", "a", "Fluo", "RowColumn" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/core/src/main/java/org/apache/fluo/core/util/SpanUtil.java#L87-L108
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java
Uris.getRawFile
public static String getRawFile(final URI uri, final boolean strict) { """ Returns the raw (and normalized) file portion of the given URI. The file is everything in the raw path after (but not including) the last slash. This could also be an empty string, but will not be null. @param uri the URI to extract t...
java
public static String getRawFile(final URI uri, final boolean strict) { return esc(strict).escapePath(getFile(getRawPath(uri, strict))); }
[ "public", "static", "String", "getRawFile", "(", "final", "URI", "uri", ",", "final", "boolean", "strict", ")", "{", "return", "esc", "(", "strict", ")", ".", "escapePath", "(", "getFile", "(", "getRawPath", "(", "uri", ",", "strict", ")", ")", ")", ";...
Returns the raw (and normalized) file portion of the given URI. The file is everything in the raw path after (but not including) the last slash. This could also be an empty string, but will not be null. @param uri the URI to extract the file from @param strict whether or not to do strict escaping @return the extract...
[ "Returns", "the", "raw", "(", "and", "normalized", ")", "file", "portion", "of", "the", "given", "URI", ".", "The", "file", "is", "everything", "in", "the", "raw", "path", "after", "(", "but", "not", "including", ")", "the", "last", "slash", ".", "This...
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L211-L213
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/TaskRunner.java
TaskRunner.getChildJavaOpts
@Deprecated public String getChildJavaOpts(JobConf jobConf, String defaultValue) { """ Get the java command line options for the child map/reduce tasks. Overriden by specific launchers. @param jobConf job configuration @param defaultValue default value @return the java command line options for child map/re...
java
@Deprecated public String getChildJavaOpts(JobConf jobConf, String defaultValue) { if (getTask().isJobSetupTask()) { return jobConf.get(JobConf.MAPRED_JOB_SETUP_TASK_JAVA_OPTS, defaultValue); } else if (getTask().isJobCleanupTask()) { return jobConf.get(JobConf.MAPRED_JOB_CLEANUP_TASK_JA...
[ "@", "Deprecated", "public", "String", "getChildJavaOpts", "(", "JobConf", "jobConf", ",", "String", "defaultValue", ")", "{", "if", "(", "getTask", "(", ")", ".", "isJobSetupTask", "(", ")", ")", "{", "return", "jobConf", ".", "get", "(", "JobConf", ".", ...
Get the java command line options for the child map/reduce tasks. Overriden by specific launchers. @param jobConf job configuration @param defaultValue default value @return the java command line options for child map/reduce tasks @deprecated Use command line options specific to map or reduce tasks set via {@link JobC...
[ "Get", "the", "java", "command", "line", "options", "for", "the", "child", "map", "/", "reduce", "tasks", ".", "Overriden", "by", "specific", "launchers", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/TaskRunner.java#L135-L149
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/images/ImageUtilities.java
ImageUtilities.imageFromReader
public static BufferedImage imageFromReader( AbstractGridCoverage2DReader reader, int cols, int rows, double w, double e, double s, double n, CoordinateReferenceSystem resampleCrs ) throws IOException { """ Read an image from a coverage reader. @param reader the reader. @param cols the expected col...
java
public static BufferedImage imageFromReader( AbstractGridCoverage2DReader reader, int cols, int rows, double w, double e, double s, double n, CoordinateReferenceSystem resampleCrs ) throws IOException { CoordinateReferenceSystem sourceCrs = reader.getCoordinateReferenceSystem(); GeneralParam...
[ "public", "static", "BufferedImage", "imageFromReader", "(", "AbstractGridCoverage2DReader", "reader", ",", "int", "cols", ",", "int", "rows", ",", "double", "w", ",", "double", "e", ",", "double", "s", ",", "double", "n", ",", "CoordinateReferenceSystem", "resa...
Read an image from a coverage reader. @param reader the reader. @param cols the expected cols. @param rows the expected rows. @param w west bound. @param e east bound. @param s south bound. @param n north bound. @return the image or <code>null</code> if unable to read it. @throws IOException
[ "Read", "an", "image", "from", "a", "coverage", "reader", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/images/ImageUtilities.java#L126-L166
threerings/nenya
core/src/main/java/com/threerings/media/sprite/SpriteManager.java
SpriteManager.getHitSprites
public void getHitSprites (List<Sprite> list, int x, int y) { """ When an animated view is determining what entity in its view is under the mouse pointer, it may require a list of sprites that are "hit" by a particular pixel. The sprites' bounds are first checked and sprites with bounds that contain the supplied...
java
public void getHitSprites (List<Sprite> list, int x, int y) { for (int ii = _sprites.size() - 1; ii >= 0; ii--) { Sprite sprite = _sprites.get(ii); if (sprite.hitTest(x, y)) { list.add(sprite); } } }
[ "public", "void", "getHitSprites", "(", "List", "<", "Sprite", ">", "list", ",", "int", "x", ",", "int", "y", ")", "{", "for", "(", "int", "ii", "=", "_sprites", ".", "size", "(", ")", "-", "1", ";", "ii", ">=", "0", ";", "ii", "--", ")", "{"...
When an animated view is determining what entity in its view is under the mouse pointer, it may require a list of sprites that are "hit" by a particular pixel. The sprites' bounds are first checked and sprites with bounds that contain the supplied point are further checked for a non-transparent at the specified locatio...
[ "When", "an", "animated", "view", "is", "determining", "what", "entity", "in", "its", "view", "is", "under", "the", "mouse", "pointer", "it", "may", "require", "a", "list", "of", "sprites", "that", "are", "hit", "by", "a", "particular", "pixel", ".", "Th...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/sprite/SpriteManager.java#L72-L80
apache/flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java
HadoopInputs.readHadoopFile
public static <K, V> HadoopInputFormat<K, V> readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K, V> mapredInputFormat, Class<K> key, Class<V> value, String inputPath, JobConf job) { """ Creates a Flink {@link InputFormat} that wraps the given Hadoop {@link org.apache.hadoop.mapred.FileInputFormat}. @retu...
java
public static <K, V> HadoopInputFormat<K, V> readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K, V> mapredInputFormat, Class<K> key, Class<V> value, String inputPath, JobConf job) { // set input path in JobConf org.apache.hadoop.mapred.FileInputFormat.addInputPath(job, new org.apache.hadoop.fs.Path(inputPath...
[ "public", "static", "<", "K", ",", "V", ">", "HadoopInputFormat", "<", "K", ",", "V", ">", "readHadoopFile", "(", "org", ".", "apache", ".", "hadoop", ".", "mapred", ".", "FileInputFormat", "<", "K", ",", "V", ">", "mapredInputFormat", ",", "Class", "<...
Creates a Flink {@link InputFormat} that wraps the given Hadoop {@link org.apache.hadoop.mapred.FileInputFormat}. @return A Flink InputFormat that wraps the Hadoop FileInputFormat.
[ "Creates", "a", "Flink", "{", "@link", "InputFormat", "}", "that", "wraps", "the", "given", "Hadoop", "{", "@link", "org", ".", "apache", ".", "hadoop", ".", "mapred", ".", "FileInputFormat", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java#L50-L55
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/monitoring/internal/AsynchronousAgentDispatcher.java
AsynchronousAgentDispatcher.addWriteTask
public void addWriteTask(MonitoringEvent event, DatagramChannel channel, int maxSize) { """ Add a task to asynchronously write {@code event} to the {@code channel} if its serialized form does not exceed {@code maxSize}. @param event The event to write. @param channel The channel to write to. @param maxSize T...
java
public void addWriteTask(MonitoringEvent event, DatagramChannel channel, int maxSize) { if (!initialized) { throw new IllegalStateException("Dispatcher is not initialized!"); } tasks.add(new WriteTask(event, channel, maxSize)); }
[ "public", "void", "addWriteTask", "(", "MonitoringEvent", "event", ",", "DatagramChannel", "channel", ",", "int", "maxSize", ")", "{", "if", "(", "!", "initialized", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Dispatcher is not initialized!\"", ")", ...
Add a task to asynchronously write {@code event} to the {@code channel} if its serialized form does not exceed {@code maxSize}. @param event The event to write. @param channel The channel to write to. @param maxSize The maximum allowed size for the serialized {@code event}. @throws IllegalStateException If this dispa...
[ "Add", "a", "task", "to", "asynchronously", "write", "{", "@code", "event", "}", "to", "the", "{", "@code", "channel", "}", "if", "its", "serialized", "form", "does", "not", "exceed", "{", "@code", "maxSize", "}", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/monitoring/internal/AsynchronousAgentDispatcher.java#L79-L84
ThreeTen/threetenbp
src/main/java/org/threeten/bp/LocalDateTime.java
LocalDateTime.ofEpochSecond
public static LocalDateTime ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) { """ Obtains an instance of {@code LocalDateTime} using seconds from the epoch of 1970-01-01T00:00:00Z. <p> This allows the {@link ChronoField#INSTANT_SECONDS epoch-second} field to be converted to a local date-ti...
java
public static LocalDateTime ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) { Jdk8Methods.requireNonNull(offset, "offset"); long localSecond = epochSecond + offset.getTotalSeconds(); // overflow caught later long localEpochDay = Jdk8Methods.floorDiv(localSecond, SECONDS_PER...
[ "public", "static", "LocalDateTime", "ofEpochSecond", "(", "long", "epochSecond", ",", "int", "nanoOfSecond", ",", "ZoneOffset", "offset", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "offset", ",", "\"offset\"", ")", ";", "long", "localSecond", "=", "ep...
Obtains an instance of {@code LocalDateTime} using seconds from the epoch of 1970-01-01T00:00:00Z. <p> This allows the {@link ChronoField#INSTANT_SECONDS epoch-second} field to be converted to a local date-time. This is primarily intended for low-level conversions rather than general application usage. @param epochSec...
[ "Obtains", "an", "instance", "of", "{", "@code", "LocalDateTime", "}", "using", "seconds", "from", "the", "epoch", "of", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", ".", "<p", ">", "This", "allows", "the", "{", "@link", "ChronoField#INSTANT_S...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/LocalDateTime.java#L375-L383
igniterealtime/Smack
smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentSession.java
AgentSession.getAgentRoster
public AgentRoster getAgentRoster() throws NotConnectedException, InterruptedException { """ Returns the agent roster for the workgroup, which contains. @return the AgentRoster @throws NotConnectedException @throws InterruptedException """ if (agentRoster == null) { agentRoster = new A...
java
public AgentRoster getAgentRoster() throws NotConnectedException, InterruptedException { if (agentRoster == null) { agentRoster = new AgentRoster(connection, workgroupJID); } // This might be the first time the user has asked for the roster. If so, we // want to wait up to 2...
[ "public", "AgentRoster", "getAgentRoster", "(", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "if", "(", "agentRoster", "==", "null", ")", "{", "agentRoster", "=", "new", "AgentRoster", "(", "connection", ",", "workgroupJID", ")", ";", ...
Returns the agent roster for the workgroup, which contains. @return the AgentRoster @throws NotConnectedException @throws InterruptedException
[ "Returns", "the", "agent", "roster", "for", "the", "workgroup", "which", "contains", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentSession.java#L215-L236
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/icon/provider/SidesIconProvider.java
SidesIconProvider.getIcon
@Override public Icon getIcon(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) { """ Gets the {@link Icon} for the side for the block in world.<br> Takes in account the facing of the block.<br> If no icon was set for the side, {@link #defaultIcon} is used. @param world the world @param ...
java
@Override public Icon getIcon(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) { return getIcon(side); }
[ "@", "Override", "public", "Icon", "getIcon", "(", "IBlockAccess", "world", ",", "BlockPos", "pos", ",", "IBlockState", "state", ",", "EnumFacing", "side", ")", "{", "return", "getIcon", "(", "side", ")", ";", "}" ]
Gets the {@link Icon} for the side for the block in world.<br> Takes in account the facing of the block.<br> If no icon was set for the side, {@link #defaultIcon} is used. @param world the world @param pos the pos @param state the state @param side the side @return the icon
[ "Gets", "the", "{", "@link", "Icon", "}", "for", "the", "side", "for", "the", "block", "in", "world", ".", "<br", ">", "Takes", "in", "account", "the", "facing", "of", "the", "block", ".", "<br", ">", "If", "no", "icon", "was", "set", "for", "the",...
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/provider/SidesIconProvider.java#L166-L170
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/IntSerializer.java
IntSerializer.writeInt16LE
public static void writeInt16LE(final int value, final byte[] buffer, int offset) { """ Writes the 16-bit int into the buffer starting with the least significant byte. """ buffer[offset++] = (byte) value; buffer[offset] = (byte) ((value >>> 8) & 0xFF); }
java
public static void writeInt16LE(final int value, final byte[] buffer, int offset) { buffer[offset++] = (byte) value; buffer[offset] = (byte) ((value >>> 8) & 0xFF); }
[ "public", "static", "void", "writeInt16LE", "(", "final", "int", "value", ",", "final", "byte", "[", "]", "buffer", ",", "int", "offset", ")", "{", "buffer", "[", "offset", "++", "]", "=", "(", "byte", ")", "value", ";", "buffer", "[", "offset", "]",...
Writes the 16-bit int into the buffer starting with the least significant byte.
[ "Writes", "the", "16", "-", "bit", "int", "into", "the", "buffer", "starting", "with", "the", "least", "significant", "byte", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/IntSerializer.java#L44-L48
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java
BaseApplet.pushHistory
public void pushHistory(String strHistory, boolean bPushToBrowser) { """ Push this command onto the history stack. @param strHistory The history command to push onto the stack. """ if (m_vHistory == null) m_vHistory = new Vector<String>(); String strHelpURL = ThinUtil.fixDisplayURL...
java
public void pushHistory(String strHistory, boolean bPushToBrowser) { if (m_vHistory == null) m_vHistory = new Vector<String>(); String strHelpURL = ThinUtil.fixDisplayURL(strHistory, true, true, true, this); if (bPushToBrowser) if ((strHistory != null) && (strHistory....
[ "public", "void", "pushHistory", "(", "String", "strHistory", ",", "boolean", "bPushToBrowser", ")", "{", "if", "(", "m_vHistory", "==", "null", ")", "m_vHistory", "=", "new", "Vector", "<", "String", ">", "(", ")", ";", "String", "strHelpURL", "=", "ThinU...
Push this command onto the history stack. @param strHistory The history command to push onto the stack.
[ "Push", "this", "command", "onto", "the", "history", "stack", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java#L1232-L1244
netceteragroup/valdr-bean-validation
valdr-bean-validation/src/main/java/com/github/valdr/thirdparty/spring/AnnotationUtils.java
AnnotationUtils.findAnnotation
public static <A extends Annotation> A findAnnotation(Method method, Class<A> annotationType) { """ Get a single {@link java.lang.annotation.Annotation} of {@code annotationType} from the supplied {@link java.lang.reflect.Method}, traversing its super methods if no annotation can be found on the given method itse...
java
public static <A extends Annotation> A findAnnotation(Method method, Class<A> annotationType) { A annotation = getAnnotation(method, annotationType); Class<?> clazz = method.getDeclaringClass(); if (annotation == null) { annotation = searchOnInterfaces(method, annotationType, clazz.getInterfaces()); ...
[ "public", "static", "<", "A", "extends", "Annotation", ">", "A", "findAnnotation", "(", "Method", "method", ",", "Class", "<", "A", ">", "annotationType", ")", "{", "A", "annotation", "=", "getAnnotation", "(", "method", ",", "annotationType", ")", ";", "C...
Get a single {@link java.lang.annotation.Annotation} of {@code annotationType} from the supplied {@link java.lang.reflect.Method}, traversing its super methods if no annotation can be found on the given method itself. <p>Annotations on methods are not inherited by default, so we need to handle this explicitly. @param m...
[ "Get", "a", "single", "{" ]
train
https://github.com/netceteragroup/valdr-bean-validation/blob/3f49f1357c575a11331be2de867cf47809a83823/valdr-bean-validation/src/main/java/com/github/valdr/thirdparty/spring/AnnotationUtils.java#L91-L114
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/heideltime/processors/HolidayProcessor.java
HolidayProcessor.getWeekdayOfMonth
public String getWeekdayOfMonth(int number, int weekday, int month, int year) { """ Get the date of a the first, second, third etc. weekday in a month @author Hans-Peter Pfeiffer @param number @param weekday @param month @param year @return date """ return getWeekdayRelativeTo(String.format("%04d-%02...
java
public String getWeekdayOfMonth(int number, int weekday, int month, int year) { return getWeekdayRelativeTo(String.format("%04d-%02d-01", year, month), weekday, number, true); }
[ "public", "String", "getWeekdayOfMonth", "(", "int", "number", ",", "int", "weekday", ",", "int", "month", ",", "int", "year", ")", "{", "return", "getWeekdayRelativeTo", "(", "String", ".", "format", "(", "\"%04d-%02d-01\"", ",", "year", ",", "month", ")", ...
Get the date of a the first, second, third etc. weekday in a month @author Hans-Peter Pfeiffer @param number @param weekday @param month @param year @return date
[ "Get", "the", "date", "of", "a", "the", "first", "second", "third", "etc", ".", "weekday", "in", "a", "month" ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/heideltime/processors/HolidayProcessor.java#L401-L403
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.selectCheckbox
@Lorsque("Je mets à jour la case à cocher '(.*)-(.*)' avec '(.*)' à partir de ces valeurs:") @Then("I update checkbox '(.*)-(.*)' with '(.*)' from these values:") public void selectCheckbox(String page, String elementKey, String value, Map<String, Boolean> values) throws TechnicalException, FailureException {...
java
@Lorsque("Je mets à jour la case à cocher '(.*)-(.*)' avec '(.*)' à partir de ces valeurs:") @Then("I update checkbox '(.*)-(.*)' with '(.*)' from these values:") public void selectCheckbox(String page, String elementKey, String value, Map<String, Boolean> values) throws TechnicalException, FailureException {...
[ "@", "Lorsque", "(", "\"Je mets à jour la case à cocher '(.*)-(.*)' avec '(.*)' à partir de ces valeurs:\")\r", "", "@", "Then", "(", "\"I update checkbox '(.*)-(.*)' with '(.*)' from these values:\"", ")", "public", "void", "selectCheckbox", "(", "String", "page", ",", "String", ...
Updates the value of a html checkbox element with conditions regarding the provided keys/values map. @param page The concerned page of elementKey @param elementKey The key of PageElement to select @param value A key to map with 'values' to find the final right checkbox value @param values A list of keys/values to map ...
[ "Updates", "the", "value", "of", "a", "html", "checkbox", "element", "with", "conditions", "regarding", "the", "provided", "keys", "/", "values", "map", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L912-L916
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/Barcode.java
Barcode.createImageWithBarcode
public Image createImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor) { """ Creates an <CODE>Image</CODE> with the barcode. @param cb the <CODE>PdfContentByte</CODE> to create the <CODE>Image</CODE>. It serves no other use @param barColor the color of the bars. It can be <CODE>null</CODE> @pa...
java
public Image createImageWithBarcode(PdfContentByte cb, Color barColor, Color textColor) { try { return Image.getInstance(createTemplateWithBarcode(cb, barColor, textColor)); } catch (Exception e) { throw new ExceptionConverter(e); } }
[ "public", "Image", "createImageWithBarcode", "(", "PdfContentByte", "cb", ",", "Color", "barColor", ",", "Color", "textColor", ")", "{", "try", "{", "return", "Image", ".", "getInstance", "(", "createTemplateWithBarcode", "(", "cb", ",", "barColor", ",", "textCo...
Creates an <CODE>Image</CODE> with the barcode. @param cb the <CODE>PdfContentByte</CODE> to create the <CODE>Image</CODE>. It serves no other use @param barColor the color of the bars. It can be <CODE>null</CODE> @param textColor the color of the text. It can be <CODE>null</CODE> @return the <CODE>Image</CODE> @see #p...
[ "Creates", "an", "<CODE", ">", "Image<", "/", "CODE", ">", "with", "the", "barcode", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/Barcode.java#L422-L429
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getDisplayLanguageWithDialect
public static String getDisplayLanguageWithDialect(String localeID, String displayLocaleID) { """ <strong>[icu]</strong> Returns a locale's language localized for display in the provided locale. If a dialect name is present in the data, then it is returned. This is a cover for the ICU4C API. @param localeID the...
java
public static String getDisplayLanguageWithDialect(String localeID, String displayLocaleID) { return getDisplayLanguageInternal(new ULocale(localeID), new ULocale(displayLocaleID), true); }
[ "public", "static", "String", "getDisplayLanguageWithDialect", "(", "String", "localeID", ",", "String", "displayLocaleID", ")", "{", "return", "getDisplayLanguageInternal", "(", "new", "ULocale", "(", "localeID", ")", ",", "new", "ULocale", "(", "displayLocaleID", ...
<strong>[icu]</strong> Returns a locale's language localized for display in the provided locale. If a dialect name is present in the data, then it is returned. This is a cover for the ICU4C API. @param localeID the id of the locale whose language will be displayed @param displayLocaleID the id of the locale in which to...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "a", "locale", "s", "language", "localized", "for", "display", "in", "the", "provided", "locale", ".", "If", "a", "dialect", "name", "is", "present", "in", "the", "data", "then", "it"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1436-L1439
netty/netty
codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java
HAProxyMessage.checkAddress
private static void checkAddress(String address, AddressFamily addrFamily) { """ Validate an address (IPv4, IPv6, Unix Socket) @param address human-readable address @param addrFamily the {@link AddressFamily} to check the address against @throws HAProxyProtocolException if ...
java
private static void checkAddress(String address, AddressFamily addrFamily) { if (addrFamily == null) { throw new NullPointerException("addrFamily"); } switch (addrFamily) { case AF_UNSPEC: if (address != null) { throw new HAProxyProtoc...
[ "private", "static", "void", "checkAddress", "(", "String", "address", ",", "AddressFamily", "addrFamily", ")", "{", "if", "(", "addrFamily", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"addrFamily\"", ")", ";", "}", "switch", "(", ...
Validate an address (IPv4, IPv6, Unix Socket) @param address human-readable address @param addrFamily the {@link AddressFamily} to check the address against @throws HAProxyProtocolException if the address is invalid
[ "Validate", "an", "address", "(", "IPv4", "IPv6", "Unix", "Socket", ")" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java#L418-L451
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java
CommonOps_ZDRM.multAdd
public static void multAdd(double realAlpha , double imgAlpha , ZMatrixRMaj a , ZMatrixRMaj b , ZMatrixRMaj c ) { """ <p> Performs the following operation:<br> <br> c = c + &alpha; * a * b<br> c<sub>ij</sub> = c<sub>ij</sub> + &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>} </p> @param ...
java
public static void multAdd(double realAlpha , double imgAlpha , ZMatrixRMaj a , ZMatrixRMaj b , ZMatrixRMaj c ) { if( b.numCols >= EjmlParameters.CMULT_COLUMN_SWITCH ) { MatrixMatrixMult_ZDRM.multAdd_reorder(realAlpha,imgAlpha,a,b,c); } else { MatrixMatrixMult_ZDRM.multAdd_sm...
[ "public", "static", "void", "multAdd", "(", "double", "realAlpha", ",", "double", "imgAlpha", ",", "ZMatrixRMaj", "a", ",", "ZMatrixRMaj", "b", ",", "ZMatrixRMaj", "c", ")", "{", "if", "(", "b", ".", "numCols", ">=", "EjmlParameters", ".", "CMULT_COLUMN_SWIT...
<p> Performs the following operation:<br> <br> c = c + &alpha; * a * b<br> c<sub>ij</sub> = c<sub>ij</sub> + &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>} </p> @param realAlpha real component of scaling factor. @param imgAlpha imaginary component of scaling factor. @param a The left matrix in the...
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "c", "+", "&alpha", ";", "*", "a", "*", "b<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "c<sub", ">", "ij<", "/", "sub", ">", "+", "&alpha", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L433-L440
apiman/apiman
manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java
EsStorage.indexEntity
@SuppressWarnings("nls") private void indexEntity(String type, String id, XContentBuilder sourceEntity, boolean refresh) throws StorageException { """ Indexes an entity. @param type @param id @param sourceEntity @param refresh true if the operation should wait for a refresh before it returns @...
java
@SuppressWarnings("nls") private void indexEntity(String type, String id, XContentBuilder sourceEntity, boolean refresh) throws StorageException { try { String json = sourceEntity.string(); JestResult response = esClient.execute(new Index.Builder(json).refresh(refresh).in...
[ "@", "SuppressWarnings", "(", "\"nls\"", ")", "private", "void", "indexEntity", "(", "String", "type", ",", "String", "id", ",", "XContentBuilder", "sourceEntity", ",", "boolean", "refresh", ")", "throws", "StorageException", "{", "try", "{", "String", "json", ...
Indexes an entity. @param type @param id @param sourceEntity @param refresh true if the operation should wait for a refresh before it returns @throws StorageException
[ "Indexes", "an", "entity", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/es/src/main/java/io/apiman/manager/api/es/EsStorage.java#L2000-L2015
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/X11WarpingCursor.java
X11WarpingCursor.setLocation
@Override void setLocation(int x, int y) { """ Update the next coordinates for the cursor. The actual move will occur on the next buffer swap @param x the new X location on the screen @param y the new Y location on the screen """ if (x != nextX || y != nextY) { nextX = x; ...
java
@Override void setLocation(int x, int y) { if (x != nextX || y != nextY) { nextX = x; nextY = y; MonocleWindowManager.getInstance().repaintAll(); } }
[ "@", "Override", "void", "setLocation", "(", "int", "x", ",", "int", "y", ")", "{", "if", "(", "x", "!=", "nextX", "||", "y", "!=", "nextY", ")", "{", "nextX", "=", "x", ";", "nextY", "=", "y", ";", "MonocleWindowManager", ".", "getInstance", "(", ...
Update the next coordinates for the cursor. The actual move will occur on the next buffer swap @param x the new X location on the screen @param y the new Y location on the screen
[ "Update", "the", "next", "coordinates", "for", "the", "cursor", ".", "The", "actual", "move", "will", "occur", "on", "the", "next", "buffer", "swap" ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/X11WarpingCursor.java#L41-L48
wcm-io/wcm-io-tooling
commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/PackageManagerHttpActionException.java
PackageManagerHttpActionException.forIOException
public static PackageManagerHttpActionException forIOException(String url, IOException ex) { """ Create exception instance for I/O exception. @param url HTTP url called @param ex I/O exception @return Exception instance """ String message = "HTTP call to " + url + " failed: " + StringUtils.defau...
java
public static PackageManagerHttpActionException forIOException(String url, IOException ex) { String message = "HTTP call to " + url + " failed: " + StringUtils.defaultString(ex.getMessage(), ex.getClass().getSimpleName()); if (ex instanceof SocketTimeoutException) { message += " (consider to incre...
[ "public", "static", "PackageManagerHttpActionException", "forIOException", "(", "String", "url", ",", "IOException", "ex", ")", "{", "String", "message", "=", "\"HTTP call to \"", "+", "url", "+", "\" failed: \"", "+", "StringUtils", ".", "defaultString", "(", "ex",...
Create exception instance for I/O exception. @param url HTTP url called @param ex I/O exception @return Exception instance
[ "Create", "exception", "instance", "for", "I", "/", "O", "exception", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/PackageManagerHttpActionException.java#L55-L62
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CreateSyntheticOverheadView.java
CreateSyntheticOverheadView.configure
public void configure( CameraPinholeBrown intrinsic , Se3_F64 planeToCamera , double centerX, double centerY, double cellSize , int overheadWidth , int overheadHeight ) { """ Specifies camera configurations. @param intrinsic Intrinsic camera parameters @param planeToCamera Transform fr...
java
public void configure( CameraPinholeBrown intrinsic , Se3_F64 planeToCamera , double centerX, double centerY, double cellSize , int overheadWidth , int overheadHeight ) { this.overheadWidth = overheadWidth; this.overheadHeight = overheadHeight; Point2Transform2_F64 normToPixel = LensD...
[ "public", "void", "configure", "(", "CameraPinholeBrown", "intrinsic", ",", "Se3_F64", "planeToCamera", ",", "double", "centerX", ",", "double", "centerY", ",", "double", "cellSize", ",", "int", "overheadWidth", ",", "int", "overheadHeight", ")", "{", "this", "....
Specifies camera configurations. @param intrinsic Intrinsic camera parameters @param planeToCamera Transform from the plane to the camera. This is the extrinsic parameters. @param centerX X-coordinate of camera center in the overhead image in world units. @param centerY Y-coordinate of camera center in the overhead im...
[ "Specifies", "camera", "configurations", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CreateSyntheticOverheadView.java#L81-L133
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/tools/PropertyParser.java
PropertyParser.toBoolean
public boolean toBoolean(String name, boolean defaultValue) { """ Get property. The method returns the default value if the property is not parsed. @param name property name @param defaultValue default value @return property """ String property = getProperties().getProperty(name); return p...
java
public boolean toBoolean(String name, boolean defaultValue) { String property = getProperties().getProperty(name); return property != null ? Boolean.parseBoolean(property) : defaultValue; }
[ "public", "boolean", "toBoolean", "(", "String", "name", ",", "boolean", "defaultValue", ")", "{", "String", "property", "=", "getProperties", "(", ")", ".", "getProperty", "(", "name", ")", ";", "return", "property", "!=", "null", "?", "Boolean", ".", "pa...
Get property. The method returns the default value if the property is not parsed. @param name property name @param defaultValue default value @return property
[ "Get", "property", ".", "The", "method", "returns", "the", "default", "value", "if", "the", "property", "is", "not", "parsed", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/tools/PropertyParser.java#L228-L231
alkacon/opencms-core
src/org/opencms/db/CmsSubscriptionManager.java
CmsSubscriptionManager.unsubscribeAllResourcesFor
public void unsubscribeAllResourcesFor(CmsObject cms, CmsPrincipal principal) throws CmsException { """ Unsubscribes the user or group from all resources.<p> @param cms the current users context @param principal the principal that unsubscribes from all resources @throws CmsException if something goes wrong ...
java
public void unsubscribeAllResourcesFor(CmsObject cms, CmsPrincipal principal) throws CmsException { if (!isEnabled()) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_SUBSCRIPTION_MANAGER_DISABLED_0)); } m_securityManager.unsubscribeAllResourcesFor(cms.getReques...
[ "public", "void", "unsubscribeAllResourcesFor", "(", "CmsObject", "cms", ",", "CmsPrincipal", "principal", ")", "throws", "CmsException", "{", "if", "(", "!", "isEnabled", "(", ")", ")", "{", "throw", "new", "CmsRuntimeException", "(", "Messages", ".", "get", ...
Unsubscribes the user or group from all resources.<p> @param cms the current users context @param principal the principal that unsubscribes from all resources @throws CmsException if something goes wrong
[ "Unsubscribes", "the", "user", "or", "group", "from", "all", "resources", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSubscriptionManager.java#L426-L432
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java
GaliosFieldTableOps.polyEvalContinue
public int polyEvalContinue( int previousOutput, GrowQueue_I8 part , int x ) { """ Continue evaluating a polynomial which has been broken up into multiple arrays. @param previousOutput Output from the evaluation of the prior part of the polynomial @param part Additional segment of the polynomial @param x Poin...
java
public int polyEvalContinue( int previousOutput, GrowQueue_I8 part , int x ) { int y = previousOutput; for (int i = 0; i < part.size; i++) { y = multiply(y,x) ^ (part.data[i]&0xFF); } return y; }
[ "public", "int", "polyEvalContinue", "(", "int", "previousOutput", ",", "GrowQueue_I8", "part", ",", "int", "x", ")", "{", "int", "y", "=", "previousOutput", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "part", ".", "size", ";", "i", "++", ...
Continue evaluating a polynomial which has been broken up into multiple arrays. @param previousOutput Output from the evaluation of the prior part of the polynomial @param part Additional segment of the polynomial @param x Point it's being evaluated at @return results
[ "Continue", "evaluating", "a", "polynomial", "which", "has", "been", "broken", "up", "into", "multiple", "arrays", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/GaliosFieldTableOps.java#L335-L342
ziccardi/jnrpe
jnrpe-lib/src/main/java/it/jnrpe/ReturnValue.java
ReturnValue.withPerformanceData
public ReturnValue withPerformanceData(final Metric metric, final UnitOfMeasure uom, final String warningRange, final String criticalRange) { """ Adds performance data to the plugin result. Thos data will be added to the output formatted as specified in Nagios specifications (http://nagiosplug.source...
java
public ReturnValue withPerformanceData(final Metric metric, final UnitOfMeasure uom, final String warningRange, final String criticalRange) { performanceDataList.add(new PerformanceData(metric, uom, warningRange, criticalRange)); return this; }
[ "public", "ReturnValue", "withPerformanceData", "(", "final", "Metric", "metric", ",", "final", "UnitOfMeasure", "uom", ",", "final", "String", "warningRange", ",", "final", "String", "criticalRange", ")", "{", "performanceDataList", ".", "add", "(", "new", "Perfo...
Adds performance data to the plugin result. Thos data will be added to the output formatted as specified in Nagios specifications (http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN201) @param metric The metric relative to this result @param uom The Unit Of Measure @param warningRange The warning threshol...
[ "Adds", "performance", "data", "to", "the", "plugin", "result", ".", "Thos", "data", "will", "be", "added", "to", "the", "output", "formatted", "as", "specified", "in", "Nagios", "specifications", "(", "http", ":", "//", "nagiosplug", ".", "sourceforge", "."...
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/ReturnValue.java#L237-L241
apache/incubator-atlas
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
GraphHelper.getRelationshipDefName
public String getRelationshipDefName(AtlasVertex entityVertex, AtlasEntityType entityType, String attributeName) { """ Get relationshipDef name from entityType using relationship attribute. if more than one relationDefs are returned for an attribute. e.g. hive_column.table hive_table.columns -> hive_col...
java
public String getRelationshipDefName(AtlasVertex entityVertex, AtlasEntityType entityType, String attributeName) { AtlasRelationshipDef relationshipDef = getRelationshipDef(entityVertex, entityType, attributeName); return (relationshipDef != null) ? relationshipDef.getName() : null; }
[ "public", "String", "getRelationshipDefName", "(", "AtlasVertex", "entityVertex", ",", "AtlasEntityType", "entityType", ",", "String", "attributeName", ")", "{", "AtlasRelationshipDef", "relationshipDef", "=", "getRelationshipDef", "(", "entityVertex", ",", "entityType", ...
Get relationshipDef name from entityType using relationship attribute. if more than one relationDefs are returned for an attribute. e.g. hive_column.table hive_table.columns -> hive_column.table hive_table.partitionKeys -> hive_column.table resolve by comparing all incoming edges typename with relationDefs name...
[ "Get", "relationshipDef", "name", "from", "entityType", "using", "relationship", "attribute", ".", "if", "more", "than", "one", "relationDefs", "are", "returned", "for", "an", "attribute", ".", "e", ".", "g", ".", "hive_column", ".", "table" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java#L1286-L1290
alipay/sofa-rpc
extension-impl/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookout.java
RpcLookout.collectThreadPool
public void collectThreadPool(ServerConfig serverConfig, final ThreadPoolExecutor threadPoolExecutor) { """ Collect the thread pool information @param serverConfig ServerConfig @param threadPoolExecutor ThreadPoolExecutor """ try { int coreSize = serverConfig.getCoreThreads(); ...
java
public void collectThreadPool(ServerConfig serverConfig, final ThreadPoolExecutor threadPoolExecutor) { try { int coreSize = serverConfig.getCoreThreads(); int maxSize = serverConfig.getMaxThreads(); int queueSize = serverConfig.getQueues(); final ThreadPoolConf...
[ "public", "void", "collectThreadPool", "(", "ServerConfig", "serverConfig", ",", "final", "ThreadPoolExecutor", "threadPoolExecutor", ")", "{", "try", "{", "int", "coreSize", "=", "serverConfig", ".", "getCoreThreads", "(", ")", ";", "int", "maxSize", "=", "server...
Collect the thread pool information @param serverConfig ServerConfig @param threadPoolExecutor ThreadPoolExecutor
[ "Collect", "the", "thread", "pool", "information" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/metrics-lookout/src/main/java/com/alipay/sofa/rpc/metrics/lookout/RpcLookout.java#L98-L142
maxirosson/jdroid-android
jdroid-android-core/src/main/java/com/jdroid/android/utils/SharedPreferencesHelper.java
SharedPreferencesHelper.loadPreference
public String loadPreference(String key, String defaultValue) { """ Retrieve a string value from the preferences. @param key The name of the preference to retrieve @param defaultValue Value to return if this preference does not exist @return the preference value if it exists, or defaultValue. """ String...
java
public String loadPreference(String key, String defaultValue) { String value = getSharedPreferences().getString(key, defaultValue); logLoad(key, value); return value; }
[ "public", "String", "loadPreference", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "getSharedPreferences", "(", ")", ".", "getString", "(", "key", ",", "defaultValue", ")", ";", "logLoad", "(", "key", ",", "value", ...
Retrieve a string value from the preferences. @param key The name of the preference to retrieve @param defaultValue Value to return if this preference does not exist @return the preference value if it exists, or defaultValue.
[ "Retrieve", "a", "string", "value", "from", "the", "preferences", "." ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-core/src/main/java/com/jdroid/android/utils/SharedPreferencesHelper.java#L179-L183
kaazing/gateway
mina.netty/src/main/java/org/kaazing/mina/core/future/DefaultUnbindFuture.java
DefaultUnbindFuture.combineFutures
public static UnbindFuture combineFutures(UnbindFuture future1, UnbindFuture future2) { """ Combine futures in a way that minimizes cost(no object creation) for the common case where both have already been fulfilled. """ if (future1 == null || future1.isUnbound()) { return future2; ...
java
public static UnbindFuture combineFutures(UnbindFuture future1, UnbindFuture future2) { if (future1 == null || future1.isUnbound()) { return future2; } else if (future2 == null || future2.isUnbound()) { return future1; } else { return new Compo...
[ "public", "static", "UnbindFuture", "combineFutures", "(", "UnbindFuture", "future1", ",", "UnbindFuture", "future2", ")", "{", "if", "(", "future1", "==", "null", "||", "future1", ".", "isUnbound", "(", ")", ")", "{", "return", "future2", ";", "}", "else", ...
Combine futures in a way that minimizes cost(no object creation) for the common case where both have already been fulfilled.
[ "Combine", "futures", "in", "a", "way", "that", "minimizes", "cost", "(", "no", "object", "creation", ")", "for", "the", "common", "case", "where", "both", "have", "already", "been", "fulfilled", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.netty/src/main/java/org/kaazing/mina/core/future/DefaultUnbindFuture.java#L45-L55
JetBrains/xodus
utils/src/main/java/jetbrains/exodus/util/UTFUtil.java
UTFUtil.writeUTF
public static void writeUTF(@NotNull final OutputStream stream, @NotNull final String str) throws IOException { """ Writes long strings to output stream as several chunks. @param stream stream to write to. @param str string to be written. @throws IOException if something went wrong """ try (Dat...
java
public static void writeUTF(@NotNull final OutputStream stream, @NotNull final String str) throws IOException { try (DataOutputStream dataStream = new DataOutputStream(stream)) { int len = str.length(); if (len < SINGLE_UTF_CHUNK_SIZE) { dataStream.writeUTF(str); ...
[ "public", "static", "void", "writeUTF", "(", "@", "NotNull", "final", "OutputStream", "stream", ",", "@", "NotNull", "final", "String", "str", ")", "throws", "IOException", "{", "try", "(", "DataOutputStream", "dataStream", "=", "new", "DataOutputStream", "(", ...
Writes long strings to output stream as several chunks. @param stream stream to write to. @param str string to be written. @throws IOException if something went wrong
[ "Writes", "long", "strings", "to", "output", "stream", "as", "several", "chunks", "." ]
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/utils/src/main/java/jetbrains/exodus/util/UTFUtil.java#L39-L57
cdk/cdk
base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java
Mappings.toChemObjects
public Iterable<IChemObject> toChemObjects() { """ Obtain the chem objects (atoms and bonds) that have 'hit' in the target molecule. <blockquote><pre> for (IChemObject obj : mappings.toChemObjects()) { if (obj instanceof IAtom) { // this atom was 'hit' by the pattern } } </pre></blockquote> @return laz...
java
public Iterable<IChemObject> toChemObjects() { return FluentIterable.from(map(new ToAtomBondMap(query, target))) .transformAndConcat(new Function<Map<IChemObject, IChemObject>, Iterable<? extends IChemObject>>() { @Override public Iterable<? extends IChemObje...
[ "public", "Iterable", "<", "IChemObject", ">", "toChemObjects", "(", ")", "{", "return", "FluentIterable", ".", "from", "(", "map", "(", "new", "ToAtomBondMap", "(", "query", ",", "target", ")", ")", ")", ".", "transformAndConcat", "(", "new", "Function", ...
Obtain the chem objects (atoms and bonds) that have 'hit' in the target molecule. <blockquote><pre> for (IChemObject obj : mappings.toChemObjects()) { if (obj instanceof IAtom) { // this atom was 'hit' by the pattern } } </pre></blockquote> @return lazy iterable of chem objects
[ "Obtain", "the", "chem", "objects", "(", "atoms", "and", "bonds", ")", "that", "have", "hit", "in", "the", "target", "molecule", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/Mappings.java#L436-L444
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.pathString
protected DocPath pathString(PackageDoc pd, DocPath name) { """ Return path to the given file name in the given package. So if the name passed is "Object.html" and the name of the package is "java.lang", and if the relative path is "../.." then returned string will be "../../java/lang/Object.html" @param pd ...
java
protected DocPath pathString(PackageDoc pd, DocPath name) { return pathToRoot.resolve(DocPath.forPackage(pd).resolve(name)); }
[ "protected", "DocPath", "pathString", "(", "PackageDoc", "pd", ",", "DocPath", "name", ")", "{", "return", "pathToRoot", ".", "resolve", "(", "DocPath", ".", "forPackage", "(", "pd", ")", ".", "resolve", "(", "name", ")", ")", ";", "}" ]
Return path to the given file name in the given package. So if the name passed is "Object.html" and the name of the package is "java.lang", and if the relative path is "../.." then returned string will be "../../java/lang/Object.html" @param pd Package in which the file name is assumed to be. @param name File name, to...
[ "Return", "path", "to", "the", "given", "file", "name", "in", "the", "given", "package", ".", "So", "if", "the", "name", "passed", "is", "Object", ".", "html", "and", "the", "name", "of", "the", "package", "is", "java", ".", "lang", "and", "if", "the...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L927-L929
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/BlogApi.java
BlogApi.postPhoto
public Response postPhoto(String blogId, String photoId, String title, String description, String blogPassword, String serviceId) throws JinxException { """ Post a photo to a blogging service. <br> Authentication <br> This method requires authentication with 'write' permission. <br> Note: This method require...
java
public Response postPhoto(String blogId, String photoId, String title, String description, String blogPassword, String serviceId) throws JinxException { JinxUtils.validateParams(photoId, title, description); Map<String, String> params = new TreeMap<String, String>(); params.put("method", "flickr.blogs.post...
[ "public", "Response", "postPhoto", "(", "String", "blogId", ",", "String", "photoId", ",", "String", "title", ",", "String", "description", ",", "String", "blogPassword", ",", "String", "serviceId", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validat...
Post a photo to a blogging service. <br> Authentication <br> This method requires authentication with 'write' permission. <br> Note: This method requires an HTTP POST request. <br> <br> This method has no specific response - It returns an empty success response if it completes without error. <p> The blogId and serviceI...
[ "Post", "a", "photo", "to", "a", "blogging", "service", ".", "<br", ">", "Authentication", "<br", ">", "This", "method", "requires", "authentication", "with", "write", "permission", ".", "<br", ">", "Note", ":", "This", "method", "requires", "an", "HTTP", ...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/BlogApi.java#L109-L128
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java
FactoryThresholdBinary.localSauvola
public static <T extends ImageGray<T>> InputToBinary<T> localSauvola(ConfigLength width, boolean down, float k, Class<T> inputType) { """ @see ThresholdSauvola @param width Width of square region. @param down Should it threshold up or down. @param k User specified threshold adjustment factor. Must be positi...
java
public static <T extends ImageGray<T>> InputToBinary<T> localSauvola(ConfigLength width, boolean down, float k, Class<T> inputType) { if( BOverrideFactoryThresholdBinary.localSauvola != null ) return BOverrideFactoryThresholdBinary.localSauvola.handle(width, k, down, inputType); InputToBinary<GrayF32> sauvola...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "InputToBinary", "<", "T", ">", "localSauvola", "(", "ConfigLength", "width", ",", "boolean", "down", ",", "float", "k", ",", "Class", "<", "T", ">", "inputType", ")", "{", "if",...
@see ThresholdSauvola @param width Width of square region. @param down Should it threshold up or down. @param k User specified threshold adjustment factor. Must be positive. Try 0.3 @param inputType Type of input image @return Filter to binary
[ "@see", "ThresholdSauvola" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L68-L81
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java
AnycastOutputHandler.writtenStartedFlush
public final void writtenStartedFlush(AOStream stream, Item startedFlushItem) { """ Callback when the Item that records that flush has been started has been committed to persistent storage @param stream The stream making this call @param startedFlushItem The item written """ if (TraceComponent.isAnyTraci...
java
public final void writtenStartedFlush(AOStream stream, Item startedFlushItem) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "writtenStartedFlush"); String key = SIMPUtils.getRemoteGetKey(stream.getRemoteMEUuid(), stream.getGatheringTargetDestUuid()); Stre...
[ "public", "final", "void", "writtenStartedFlush", "(", "AOStream", "stream", ",", "Item", "startedFlushItem", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", ...
Callback when the Item that records that flush has been started has been committed to persistent storage @param stream The stream making this call @param startedFlushItem The item written
[ "Callback", "when", "the", "Item", "that", "records", "that", "flush", "has", "been", "started", "has", "been", "committed", "to", "persistent", "storage" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AnycastOutputHandler.java#L2789-L2835
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java
DistributionBarHelper.getDistributionBarAsHTMLString
public static String getDistributionBarAsHTMLString(final Map<Status, Long> statusTotalCountMap) { """ Returns a string with details of status and count . @param statusTotalCountMap map with status and count @return string of format "status1:count,status2:count" """ final StringBuilder htmlStrin...
java
public static String getDistributionBarAsHTMLString(final Map<Status, Long> statusTotalCountMap) { final StringBuilder htmlString = new StringBuilder(); final Map<Status, Long> statusMapWithNonZeroValues = getStatusMapWithNonZeroValues(statusTotalCountMap); final Long totalValue = getTotalSizes(...
[ "public", "static", "String", "getDistributionBarAsHTMLString", "(", "final", "Map", "<", "Status", ",", "Long", ">", "statusTotalCountMap", ")", "{", "final", "StringBuilder", "htmlString", "=", "new", "StringBuilder", "(", ")", ";", "final", "Map", "<", "Statu...
Returns a string with details of status and count . @param statusTotalCountMap map with status and count @return string of format "status1:count,status2:count"
[ "Returns", "a", "string", "with", "details", "of", "status", "and", "count", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/DistributionBarHelper.java#L43-L61
grpc/grpc-java
api/src/main/java/io/grpc/CallOptions.java
CallOptions.withDeadlineAfter
public CallOptions withDeadlineAfter(long duration, TimeUnit unit) { """ Returns a new {@code CallOptions} with a deadline that is after the given {@code duration} from now. """ return withDeadline(Deadline.after(duration, unit)); }
java
public CallOptions withDeadlineAfter(long duration, TimeUnit unit) { return withDeadline(Deadline.after(duration, unit)); }
[ "public", "CallOptions", "withDeadlineAfter", "(", "long", "duration", ",", "TimeUnit", "unit", ")", "{", "return", "withDeadline", "(", "Deadline", ".", "after", "(", "duration", ",", "unit", ")", ")", ";", "}" ]
Returns a new {@code CallOptions} with a deadline that is after the given {@code duration} from now.
[ "Returns", "a", "new", "{" ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/CallOptions.java#L139-L141
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathBase.java
RelationalPathBase.eq
@Override public BooleanExpression eq(T right) { """ Compares the two relational paths using primary key columns @param right rhs of the comparison @return this == right """ if (right instanceof RelationalPath) { return primaryKeyOperation(Ops.EQ, primaryKey, ((RelationalPath) right...
java
@Override public BooleanExpression eq(T right) { if (right instanceof RelationalPath) { return primaryKeyOperation(Ops.EQ, primaryKey, ((RelationalPath) right).getPrimaryKey()); } else { return super.eq(right); } }
[ "@", "Override", "public", "BooleanExpression", "eq", "(", "T", "right", ")", "{", "if", "(", "right", "instanceof", "RelationalPath", ")", "{", "return", "primaryKeyOperation", "(", "Ops", ".", "EQ", ",", "primaryKey", ",", "(", "(", "RelationalPath", ")", ...
Compares the two relational paths using primary key columns @param right rhs of the comparison @return this == right
[ "Compares", "the", "two", "relational", "paths", "using", "primary", "key", "columns" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathBase.java#L141-L148
drallgood/jpasskit
jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java
PKSigningInformationUtil.loadSigningInformationFromPKCS12AndIntermediateCertificate
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream keyStoreInputStream, String keyStorePassword, InputStream appleWWDRCAFileInputStream) throws IOException, CertificateException { """ Load all signing information necessary for pass generation using two in...
java
public PKSigningInformation loadSigningInformationFromPKCS12AndIntermediateCertificate(InputStream keyStoreInputStream, String keyStorePassword, InputStream appleWWDRCAFileInputStream) throws IOException, CertificateException { KeyStore pkcs12KeyStore = loadPKCS12File(keyStoreInputStream, keyStoreP...
[ "public", "PKSigningInformation", "loadSigningInformationFromPKCS12AndIntermediateCertificate", "(", "InputStream", "keyStoreInputStream", ",", "String", "keyStorePassword", ",", "InputStream", "appleWWDRCAFileInputStream", ")", "throws", "IOException", ",", "CertificateException", ...
Load all signing information necessary for pass generation using two input streams for the key store and the Apple WWDRCA certificate. The caller is responsible for closing the stream after this method returns successfully or fails. @param keyStoreInputStream <code>InputStream</code> of the key store @param keyStoreP...
[ "Load", "all", "signing", "information", "necessary", "for", "pass", "generation", "using", "two", "input", "streams", "for", "the", "key", "store", "and", "the", "Apple", "WWDRCA", "certificate", "." ]
train
https://github.com/drallgood/jpasskit/blob/63bfa8abbdb85c2d7596c60eed41ed8e374cbd01/jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java#L97-L104
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.getLong
public static Long getLong(Config config, String path, Long def) { """ Return {@link Long} value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return {@link Long} value at <c...
java
public static Long getLong(Config config, String path, Long def) { if (config.hasPath(path)) { return Long.valueOf(config.getLong(path)); } return def; }
[ "public", "static", "Long", "getLong", "(", "Config", "config", ",", "String", "path", ",", "Long", "def", ")", "{", "if", "(", "config", ".", "hasPath", "(", "path", ")", ")", "{", "return", "Long", ".", "valueOf", "(", "config", ".", "getLong", "("...
Return {@link Long} value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return {@link Long} value at <code>path</code> if <code>config</code> has path. If not return <code>def</code>
[ "Return", "{", "@link", "Long", "}", "value", "at", "<code", ">", "path<", "/", "code", ">", "if", "<code", ">", "config<", "/", "code", ">", "has", "path", ".", "If", "not", "return", "<code", ">", "def<", "/", "code", ">" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L336-L341
cose-wg/COSE-JAVA
src/main/java/COSE/Attribute.java
Attribute.AddUnprotected
@Deprecated public void AddUnprotected(CBORObject label, CBORObject value) throws CoseException { """ Set an attribute in the unprotected bucket of the COSE object @param label value identifies the attribute in the map @param value value to be associated with the label @deprecated As of COSE 0.9.1, use ...
java
@Deprecated public void AddUnprotected(CBORObject label, CBORObject value) throws CoseException { addAttribute(label, value, UNPROTECTED); }
[ "@", "Deprecated", "public", "void", "AddUnprotected", "(", "CBORObject", "label", ",", "CBORObject", "value", ")", "throws", "CoseException", "{", "addAttribute", "(", "label", ",", "value", ",", "UNPROTECTED", ")", ";", "}" ]
Set an attribute in the unprotected bucket of the COSE object @param label value identifies the attribute in the map @param value value to be associated with the label @deprecated As of COSE 0.9.1, use addAttribute(HeaderKeys, byte[], Attribute.UNPROTECTED); @exception CoseException COSE Package exception
[ "Set", "an", "attribute", "in", "the", "unprotected", "bucket", "of", "the", "COSE", "object" ]
train
https://github.com/cose-wg/COSE-JAVA/blob/f972b11ab4c9a18f911bc49a15225a6951cf6f63/src/main/java/COSE/Attribute.java#L219-L222
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cdn_webstorage_serviceName_traffic_POST
public OvhOrder cdn_webstorage_serviceName_traffic_POST(String serviceName, OvhOrderTrafficEnum bandwidth) throws IOException { """ Create order REST: POST /order/cdn/webstorage/{serviceName}/traffic @param bandwidth [required] Traffic in TB that will be added to the cdn.webstorage service @param serviceName ...
java
public OvhOrder cdn_webstorage_serviceName_traffic_POST(String serviceName, OvhOrderTrafficEnum bandwidth) throws IOException { String qPath = "/order/cdn/webstorage/{serviceName}/traffic"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "bandwid...
[ "public", "OvhOrder", "cdn_webstorage_serviceName_traffic_POST", "(", "String", "serviceName", ",", "OvhOrderTrafficEnum", "bandwidth", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cdn/webstorage/{serviceName}/traffic\"", ";", "StringBuilder", "sb", "=...
Create order REST: POST /order/cdn/webstorage/{serviceName}/traffic @param bandwidth [required] Traffic in TB that will be added to the cdn.webstorage service @param serviceName [required] The internal name of your CDN Static offer
[ "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#L5450-L5457
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.setMonths
public static <T extends java.util.Date> T setMonths(final T date, final int amount) { """ Copied from Apache Commons Lang under Apache License v2. <br /> Sets the months field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amoun...
java
public static <T extends java.util.Date> T setMonths(final T date, final int amount) { return set(date, Calendar.MONTH, amount); }
[ "public", "static", "<", "T", "extends", "java", ".", "util", ".", "Date", ">", "T", "setMonths", "(", "final", "T", "date", ",", "final", "int", "amount", ")", "{", "return", "set", "(", "date", ",", "Calendar", ".", "MONTH", ",", "amount", ")", "...
Copied from Apache Commons Lang under Apache License v2. <br /> Sets the months field to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to set @return a new {@code Date} set with the specified value @throws IllegalArgumentException if th...
[ "Copied", "from", "Apache", "Commons", "Lang", "under", "Apache", "License", "v2", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L714-L716
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.core/src/com/ibm/ejs/ras/TraceNLS.java
TraceNLS.getFormattedMessage
public String getFormattedMessage(String key, Object[] args, String defaultString) { """ Return the message obtained by looking up the localized text indicated by the key in the ResourceBundle wrapped by this instance, then formatting the message using the specified arguments as substitution parameters. <p> Th...
java
public String getFormattedMessage(String key, Object[] args, String defaultString) { return resolver.getMessage(caller, null, ivBundleName, key, args, defaultString, true, null, false); }
[ "public", "String", "getFormattedMessage", "(", "String", "key", ",", "Object", "[", "]", "args", ",", "String", "defaultString", ")", "{", "return", "resolver", ".", "getMessage", "(", "caller", ",", "null", ",", "ivBundleName", ",", "key", ",", "args", "...
Return the message obtained by looking up the localized text indicated by the key in the ResourceBundle wrapped by this instance, then formatting the message using the specified arguments as substitution parameters. <p> The message is formatted using the java.text.MessageFormat class. Substitution parameters are handle...
[ "Return", "the", "message", "obtained", "by", "looking", "up", "the", "localized", "text", "indicated", "by", "the", "key", "in", "the", "ResourceBundle", "wrapped", "by", "this", "instance", "then", "formatting", "the", "message", "using", "the", "specified", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/ejs/ras/TraceNLS.java#L184-L186
cdk/cdk
legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java
IonizationPotentialTool.predictIP
public static double predictIP(IAtomContainer container, IAtom atom) throws CDKException { """ Method which is predict the Ionization Potential from given atom. @param container The IAtomContainer where is contained the IAtom @param atom The IAtom to prediction the IP @return The value in eV ...
java
public static double predictIP(IAtomContainer container, IAtom atom) throws CDKException { double value = 0; // at least one lone pair orbital is necessary to ionize if (container.getConnectedLonePairsCount(atom) == 0) return value; // control if the IAtom belongs in some family ...
[ "public", "static", "double", "predictIP", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ")", "throws", "CDKException", "{", "double", "value", "=", "0", ";", "// at least one lone pair orbital is necessary to ionize", "if", "(", "container", ".", "getConn...
Method which is predict the Ionization Potential from given atom. @param container The IAtomContainer where is contained the IAtom @param atom The IAtom to prediction the IP @return The value in eV
[ "Method", "which", "is", "predict", "the", "Ionization", "Potential", "from", "given", "atom", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/tools/IonizationPotentialTool.java#L70-L84
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.generatePrivateKey
public static PrivateKey generatePrivateKey(String algorithm, KeySpec keySpec) { """ 生成私钥,仅用于非对称加密<br> 算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyFactory @param algorithm 算法 @param keySpec {@link KeySpec} @return 私钥 {@link PrivateKey} @since 3.1.1 """ if...
java
public static PrivateKey generatePrivateKey(String algorithm, KeySpec keySpec) { if (null == keySpec) { return null; } algorithm = getAlgorithmAfterWith(algorithm); try { return getKeyFactory(algorithm).generatePrivate(keySpec); } catch (Exception e) { throw new CryptoException(e); } }
[ "public", "static", "PrivateKey", "generatePrivateKey", "(", "String", "algorithm", ",", "KeySpec", "keySpec", ")", "{", "if", "(", "null", "==", "keySpec", ")", "{", "return", "null", ";", "}", "algorithm", "=", "getAlgorithmAfterWith", "(", "algorithm", ")",...
生成私钥,仅用于非对称加密<br> 算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyFactory @param algorithm 算法 @param keySpec {@link KeySpec} @return 私钥 {@link PrivateKey} @since 3.1.1
[ "生成私钥,仅用于非对称加密<br", ">", "算法见:https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "7", "/", "docs", "/", "technotes", "/", "guides", "/", "security", "/", "StandardNames", ".", "html#KeyFactory" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L235-L245
Prototik/HoloEverywhere
library/src/org/holoeverywhere/widget/datetimepicker/DateTimePickerUtils.java
DateTimePickerUtils.getWeeksSinceEpochFromJulianDay
public static int getWeeksSinceEpochFromJulianDay(int julianDay, int firstDayOfWeek) { """ Returns the week since {@link Time#EPOCH_JULIAN_DAY} (Jan 1, 1970) adjusted for first day of week. <p/> This takes a julian day and the week start day and calculates which week since {@link Time#EPOCH_JULIAN_DAY} that da...
java
public static int getWeeksSinceEpochFromJulianDay(int julianDay, int firstDayOfWeek) { int diff = Time.THURSDAY - firstDayOfWeek; if (diff < 0) { diff += 7; } int refDay = Time.EPOCH_JULIAN_DAY - diff; return (julianDay - refDay) / 7; }
[ "public", "static", "int", "getWeeksSinceEpochFromJulianDay", "(", "int", "julianDay", ",", "int", "firstDayOfWeek", ")", "{", "int", "diff", "=", "Time", ".", "THURSDAY", "-", "firstDayOfWeek", ";", "if", "(", "diff", "<", "0", ")", "{", "diff", "+=", "7"...
Returns the week since {@link Time#EPOCH_JULIAN_DAY} (Jan 1, 1970) adjusted for first day of week. <p/> This takes a julian day and the week start day and calculates which week since {@link Time#EPOCH_JULIAN_DAY} that day occurs in, starting at 0. *Do not* use this to compute the ISO week number for the year. @param j...
[ "Returns", "the", "week", "since", "{", "@link", "Time#EPOCH_JULIAN_DAY", "}", "(", "Jan", "1", "1970", ")", "adjusted", "for", "first", "day", "of", "week", ".", "<p", "/", ">", "This", "takes", "a", "julian", "day", "and", "the", "week", "start", "da...
train
https://github.com/Prototik/HoloEverywhere/blob/b870abb5ab009a5a6dbab3fb855ec2854e35e125/library/src/org/holoeverywhere/widget/datetimepicker/DateTimePickerUtils.java#L113-L120
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/Fetcher.java
Fetcher.loadEntities
protected <T> Page<T> loadEntities(Pager pager, EntityConvertor<BE, E, T> conversionFunction) { """ Loads the entities given the pager and converts them using the provided conversion function to the desired type. <p>Note that the conversion function accepts both the backend entity and the converted entity becau...
java
protected <T> Page<T> loadEntities(Pager pager, EntityConvertor<BE, E, T> conversionFunction) { return inCommittableTx(tx -> { Function<BE, Pair<BE, E>> conversion = (e) -> new Pair<>(e, tx.convert(e, context.entityClass)); Function<Pair<BE, E>, Boolean> filter = con...
[ "protected", "<", "T", ">", "Page", "<", "T", ">", "loadEntities", "(", "Pager", "pager", ",", "EntityConvertor", "<", "BE", ",", "E", ",", "T", ">", "conversionFunction", ")", "{", "return", "inCommittableTx", "(", "tx", "->", "{", "Function", "<", "B...
Loads the entities given the pager and converts them using the provided conversion function to the desired type. <p>Note that the conversion function accepts both the backend entity and the converted entity because both of them are required anyway during the loading and thus the function can choose which one to use wi...
[ "Loads", "the", "entities", "given", "the", "pager", "and", "converts", "them", "using", "the", "provided", "conversion", "function", "to", "the", "desired", "type", "." ]
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/base/Fetcher.java#L170-L193
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/tags/TagContextBuilder.java
TagContextBuilder.putPropagating
public final TagContextBuilder putPropagating(TagKey key, TagValue value) { """ Adds an unlimited propagating tag to this {@code TagContextBuilder}. <p>This is equivalent to calling {@code put(key, value, TagMetadata.create(TagTtl.METADATA_UNLIMITED_PROPAGATION))}. <p>Only call this method if you want propa...
java
public final TagContextBuilder putPropagating(TagKey key, TagValue value) { return put(key, value, METADATA_UNLIMITED_PROPAGATION); }
[ "public", "final", "TagContextBuilder", "putPropagating", "(", "TagKey", "key", ",", "TagValue", "value", ")", "{", "return", "put", "(", "key", ",", "value", ",", "METADATA_UNLIMITED_PROPAGATION", ")", ";", "}" ]
Adds an unlimited propagating tag to this {@code TagContextBuilder}. <p>This is equivalent to calling {@code put(key, value, TagMetadata.create(TagTtl.METADATA_UNLIMITED_PROPAGATION))}. <p>Only call this method if you want propagating tags. If you want tags for breaking down metrics, or there are sensitive messages i...
[ "Adds", "an", "unlimited", "propagating", "tag", "to", "this", "{", "@code", "TagContextBuilder", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/tags/TagContextBuilder.java#L97-L99
alibaba/otter
shared/arbitrate/src/main/java/com/alibaba/otter/shared/arbitrate/impl/zookeeper/ZooKeeperx.java
ZooKeeperx.createNoRetry
public String createNoRetry(final String path, final byte[] data, final CreateMode mode) throws KeeperException, InterruptedException { """ add by ljh at 2012-09-13 <pre> 1. 使用zookeeper过程,针对出现ConnectionLoss异常,比如进行create...
java
public String createNoRetry(final String path, final byte[] data, final CreateMode mode) throws KeeperException, InterruptedException { return zookeeper.create(path, data, acl, mode); }
[ "public", "String", "createNoRetry", "(", "final", "String", "path", ",", "final", "byte", "[", "]", "data", ",", "final", "CreateMode", "mode", ")", "throws", "KeeperException", ",", "InterruptedException", "{", "return", "zookeeper", ".", "create", "(", "pat...
add by ljh at 2012-09-13 <pre> 1. 使用zookeeper过程,针对出现ConnectionLoss异常,比如进行create/setData/delete,操作可能已经在zookeeper server上进行应用 2. 针对SelectStageListener进行processId创建时,会以最后一次创建的processId做为调度id. 如果进行retry,之前成功的processId就会被遗漏了 </pre> @see org.apache.zookeeper.ZooKeeper#create(String path, byte[] path, List acl, CreateMode m...
[ "add", "by", "ljh", "at", "2012", "-", "09", "-", "13" ]
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/arbitrate/src/main/java/com/alibaba/otter/shared/arbitrate/impl/zookeeper/ZooKeeperx.java#L75-L78
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/variant/css/CssSkinGenerator.java
CssSkinGenerator.checkRootDirectoryNotOverlap
private void checkRootDirectoryNotOverlap(String dir, Set<String> skinRootDirectories) { """ Check if there are no directory which is contained in another root directory, @param dir the root directory to check @param skinRootDirectories the root directories """ String rootDir = removeLocaleSuffixIfEx...
java
private void checkRootDirectoryNotOverlap(String dir, Set<String> skinRootDirectories) { String rootDir = removeLocaleSuffixIfExist(dir); for (Iterator<String> itSkinDir = skinRootDirectories.iterator(); itSkinDir.hasNext();) { String skinDir = PathNormalizer.asDirPath(itSkinDir.next()); if (!skinDir.equals(...
[ "private", "void", "checkRootDirectoryNotOverlap", "(", "String", "dir", ",", "Set", "<", "String", ">", "skinRootDirectories", ")", "{", "String", "rootDir", "=", "removeLocaleSuffixIfExist", "(", "dir", ")", ";", "for", "(", "Iterator", "<", "String", ">", "...
Check if there are no directory which is contained in another root directory, @param dir the root directory to check @param skinRootDirectories the root directories
[ "Check", "if", "there", "are", "no", "directory", "which", "is", "contained", "in", "another", "root", "directory" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/variant/css/CssSkinGenerator.java#L618-L631
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newStatusUpdateRequest
public static Request newStatusUpdateRequest(Session session, String message, GraphPlace place, List<GraphUser> tags, Callback callback) { """ Creates a new Request configured to post a status update to a user's feed. @param session the Session to use, or null; if non-null, the session must be in a...
java
public static Request newStatusUpdateRequest(Session session, String message, GraphPlace place, List<GraphUser> tags, Callback callback) { List<String> tagIds = null; if (tags != null) { tagIds = new ArrayList<String>(tags.size()); for (GraphUser tag: tags) { ...
[ "public", "static", "Request", "newStatusUpdateRequest", "(", "Session", "session", ",", "String", "message", ",", "GraphPlace", "place", ",", "List", "<", "GraphUser", ">", "tags", ",", "Callback", "callback", ")", "{", "List", "<", "String", ">", "tagIds", ...
Creates a new Request configured to post a status update to a user's feed. @param session the Session to use, or null; if non-null, the session must be in an opened state @param message the text of the status update @param place an optional place to associate with the post @param tags an optional list of users to tag ...
[ "Creates", "a", "new", "Request", "configured", "to", "post", "a", "status", "update", "to", "a", "user", "s", "feed", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L492-L504
undertow-io/undertow
core/src/main/java/io/undertow/Handlers.java
Handlers.requestLimitingHandler
public static RequestLimitingHandler requestLimitingHandler(final int maxRequest, final int queueSize, HttpHandler next) { """ Returns a handler that limits the maximum number of requests that can run at a time. @param maxRequest The maximum number of requests @param queueSize The maximum number of queued req...
java
public static RequestLimitingHandler requestLimitingHandler(final int maxRequest, final int queueSize, HttpHandler next) { return new RequestLimitingHandler(maxRequest, queueSize, next); }
[ "public", "static", "RequestLimitingHandler", "requestLimitingHandler", "(", "final", "int", "maxRequest", ",", "final", "int", "queueSize", ",", "HttpHandler", "next", ")", "{", "return", "new", "RequestLimitingHandler", "(", "maxRequest", ",", "queueSize", ",", "n...
Returns a handler that limits the maximum number of requests that can run at a time. @param maxRequest The maximum number of requests @param queueSize The maximum number of queued requests @param next The next handler @return The handler
[ "Returns", "a", "handler", "that", "limits", "the", "maximum", "number", "of", "requests", "that", "can", "run", "at", "a", "time", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/Handlers.java#L465-L467
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/ComponentAnnotationLoader.java
ComponentAnnotationLoader.initialize
public void initialize(ComponentManager manager, ClassLoader classLoader) { """ Loads all components defined using annotations. @param manager the component manager to use to dynamically register components @param classLoader the classloader to use to look for the Component list declaration file ( {@code META...
java
public void initialize(ComponentManager manager, ClassLoader classLoader) { try { // Find all declared components by retrieving the list defined in COMPONENT_LIST. List<ComponentDeclaration> componentDeclarations = getDeclaredComponents(classLoader, COMPONENT_LIST); // F...
[ "public", "void", "initialize", "(", "ComponentManager", "manager", ",", "ClassLoader", "classLoader", ")", "{", "try", "{", "// Find all declared components by retrieving the list defined in COMPONENT_LIST.", "List", "<", "ComponentDeclaration", ">", "componentDeclarations", "...
Loads all components defined using annotations. @param manager the component manager to use to dynamically register components @param classLoader the classloader to use to look for the Component list declaration file ( {@code META-INF/components.txt})
[ "Loads", "all", "components", "defined", "using", "annotations", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/annotation/ComponentAnnotationLoader.java#L99-L126
perwendel/spark
src/main/java/spark/FilterImpl.java
FilterImpl.create
static FilterImpl create(final String path, final Filter filter) { """ Wraps the filter in FilterImpl @param path the path @param filter the filter @return the wrapped route """ return create(path, DEFAULT_ACCEPT_TYPE, filter); }
java
static FilterImpl create(final String path, final Filter filter) { return create(path, DEFAULT_ACCEPT_TYPE, filter); }
[ "static", "FilterImpl", "create", "(", "final", "String", "path", ",", "final", "Filter", "filter", ")", "{", "return", "create", "(", "path", ",", "DEFAULT_ACCEPT_TYPE", ",", "filter", ")", ";", "}" ]
Wraps the filter in FilterImpl @param path the path @param filter the filter @return the wrapped route
[ "Wraps", "the", "filter", "in", "FilterImpl" ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/FilterImpl.java#L54-L56
apache/reef
lang/java/reef-bridge-client/src/main/java/org/apache/reef/bridge/client/YarnJobSubmissionClient.java
YarnJobSubmissionClient.logToken
private static void logToken(final Level logLevel, final String msgPrefix, final UserGroupInformation user) { """ Log all the tokens in the container for thr user. @param logLevel - the log level. @param msgPrefix - msg prefix for log. @param user - the UserGroupInformation object. """ if (LOG.isLogga...
java
private static void logToken(final Level logLevel, final String msgPrefix, final UserGroupInformation user) { if (LOG.isLoggable(logLevel)) { LOG.log(logLevel, "{0} number of tokens: [{1}].", new Object[] {msgPrefix, user.getCredentials().numberOfTokens()}); for (final org.apache.hadoop.securi...
[ "private", "static", "void", "logToken", "(", "final", "Level", "logLevel", ",", "final", "String", "msgPrefix", ",", "final", "UserGroupInformation", "user", ")", "{", "if", "(", "LOG", ".", "isLoggable", "(", "logLevel", ")", ")", "{", "LOG", ".", "log",...
Log all the tokens in the container for thr user. @param logLevel - the log level. @param msgPrefix - msg prefix for log. @param user - the UserGroupInformation object.
[ "Log", "all", "the", "tokens", "in", "the", "container", "for", "thr", "user", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-bridge-client/src/main/java/org/apache/reef/bridge/client/YarnJobSubmissionClient.java#L229-L237
tvesalainen/util
util/src/main/java/org/vesalainen/code/PropertyDispatcher.java
PropertyDispatcher.getInstance
public static <T extends PropertyDispatcher> T getInstance(Class<T> cls, PropertySetterDispatcher dispatcher) { """ Creates a instance of a class PropertyDispatcher subclass. @param <T> Type of PropertyDispatcher subclass @param cls PropertyDispatcher subclass class @param dispatcher @return """ t...
java
public static <T extends PropertyDispatcher> T getInstance(Class<T> cls, PropertySetterDispatcher dispatcher) { try { PropertyDispatcherClass annotation = cls.getAnnotation(PropertyDispatcherClass.class); if (annotation == null) { throw new ...
[ "public", "static", "<", "T", "extends", "PropertyDispatcher", ">", "T", "getInstance", "(", "Class", "<", "T", ">", "cls", ",", "PropertySetterDispatcher", "dispatcher", ")", "{", "try", "{", "PropertyDispatcherClass", "annotation", "=", "cls", ".", "getAnnotat...
Creates a instance of a class PropertyDispatcher subclass. @param <T> Type of PropertyDispatcher subclass @param cls PropertyDispatcher subclass class @param dispatcher @return
[ "Creates", "a", "instance", "of", "a", "class", "PropertyDispatcher", "subclass", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/code/PropertyDispatcher.java#L196-L221
square/okhttp
okhttp/src/main/java/okhttp3/internal/connection/Transmitter.java
Transmitter.prepareToConnect
public void prepareToConnect(Request request) { """ Prepare to create a stream to carry {@code request}. This prefers to use the existing connection if it exists. """ if (this.request != null) { if (sameConnection(this.request.url(), request.url()) && exchangeFinder.hasRouteToTry()) { return...
java
public void prepareToConnect(Request request) { if (this.request != null) { if (sameConnection(this.request.url(), request.url()) && exchangeFinder.hasRouteToTry()) { return; // Already ready. } if (exchange != null) throw new IllegalStateException(); if (exchangeFinder != null) { ...
[ "public", "void", "prepareToConnect", "(", "Request", "request", ")", "{", "if", "(", "this", ".", "request", "!=", "null", ")", "{", "if", "(", "sameConnection", "(", "this", ".", "request", ".", "url", "(", ")", ",", "request", ".", "url", "(", ")"...
Prepare to create a stream to carry {@code request}. This prefers to use the existing connection if it exists.
[ "Prepare", "to", "create", "a", "stream", "to", "carry", "{" ]
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/connection/Transmitter.java#L124-L140