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
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java
FeaturesImpl.listPhraseListsWithServiceResponseAsync
public Observable<ServiceResponse<List<PhraseListFeatureInfo>>> listPhraseListsWithServiceResponseAsync(UUID appId, String versionId, ListPhraseListsOptionalParameter listPhraseListsOptionalParameter) { """ Gets all the phraselist features. @param appId The application ID. @param versionId The version ID. @pa...
java
public Observable<ServiceResponse<List<PhraseListFeatureInfo>>> listPhraseListsWithServiceResponseAsync(UUID appId, String versionId, ListPhraseListsOptionalParameter listPhraseListsOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.e...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "PhraseListFeatureInfo", ">", ">", ">", "listPhraseListsWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListPhraseListsOptionalParameter", "listPhraseListsOptionalParameter", ...
Gets all the phraselist features. @param appId The application ID. @param versionId The version ID. @param listPhraseListsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable ...
[ "Gets", "all", "the", "phraselist", "features", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java#L246-L260
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericGenbankHeaderFormat.java
GenericGenbankHeaderFormat._write_multi_line
private String _write_multi_line(String tag, String text) { """ Used in the the 'header' of each GenBank record. @param tag @param text """ if (text == null) { text = ""; } int max_len = MAX_WIDTH - HEADER_WIDTH; ArrayList<String> lines = _split_multi_line(text, max_len); String output = _writ...
java
private String _write_multi_line(String tag, String text) { if (text == null) { text = ""; } int max_len = MAX_WIDTH - HEADER_WIDTH; ArrayList<String> lines = _split_multi_line(text, max_len); String output = _write_single_line(tag, lines.get(0)); for (int i = 1; i < lines.size(); i++) { output += _wr...
[ "private", "String", "_write_multi_line", "(", "String", "tag", ",", "String", "text", ")", "{", "if", "(", "text", "==", "null", ")", "{", "text", "=", "\"\"", ";", "}", "int", "max_len", "=", "MAX_WIDTH", "-", "HEADER_WIDTH", ";", "ArrayList", "<", "...
Used in the the 'header' of each GenBank record. @param tag @param text
[ "Used", "in", "the", "the", "header", "of", "each", "GenBank", "record", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/io/GenericGenbankHeaderFormat.java#L67-L78
bmwcarit/joynr
java/backend-services/domain-access-controller/src/main/java/io/joynr/accesscontrol/global/GlobalDomainAccessControlListEditorProviderImpl.java
GlobalDomainAccessControlListEditorProviderImpl.hasRoleMaster
private boolean hasRoleMaster(String userId, String domain) { """ Indicates if the given user has master role for the given domain """ DomainRoleEntry domainRole = domainAccessStore.getDomainRole(userId, Role.MASTER); if (domainRole == null || !Arrays.asList(domainRole.getDomains()).contains(d...
java
private boolean hasRoleMaster(String userId, String domain) { DomainRoleEntry domainRole = domainAccessStore.getDomainRole(userId, Role.MASTER); if (domainRole == null || !Arrays.asList(domainRole.getDomains()).contains(domain)) { return false; } return true; }
[ "private", "boolean", "hasRoleMaster", "(", "String", "userId", ",", "String", "domain", ")", "{", "DomainRoleEntry", "domainRole", "=", "domainAccessStore", ".", "getDomainRole", "(", "userId", ",", "Role", ".", "MASTER", ")", ";", "if", "(", "domainRole", "=...
Indicates if the given user has master role for the given domain
[ "Indicates", "if", "the", "given", "user", "has", "master", "role", "for", "the", "given", "domain" ]
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/backend-services/domain-access-controller/src/main/java/io/joynr/accesscontrol/global/GlobalDomainAccessControlListEditorProviderImpl.java#L86-L94
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java
JawrConfig.getProperty
public String getProperty(String key, String defaultValue) { """ Returns the value of the property associated to the key passed in parameter @param key the key of the property @param defaultValue the default value @return the value of the property """ String property = configProperties.getProperty(k...
java
public String getProperty(String key, String defaultValue) { String property = configProperties.getProperty(key, defaultValue); if (property != null) { property = property.trim(); } return property; }
[ "public", "String", "getProperty", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "String", "property", "=", "configProperties", ".", "getProperty", "(", "key", ",", "defaultValue", ")", ";", "if", "(", "property", "!=", "null", ")", "{", "...
Returns the value of the property associated to the key passed in parameter @param key the key of the property @param defaultValue the default value @return the value of the property
[ "Returns", "the", "value", "of", "the", "property", "associated", "to", "the", "key", "passed", "in", "parameter" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/JawrConfig.java#L1358-L1365
alkacon/opencms-core
src/org/opencms/workplace/CmsLoginUserAgreement.java
CmsLoginUserAgreement.dialogButtonsHtml
@Override protected void dialogButtonsHtml(StringBuffer result, int button, String attribute) { """ The standard "OK" and "Cancel" buttons are overridden to show other labels.<p> See also {@link CmsDialog#dialogButtonsHtml(StringBuffer, int, String)} @param result a string buffer where the rendered HTML ...
java
@Override protected void dialogButtonsHtml(StringBuffer result, int button, String attribute) { attribute = appendDelimiter(attribute); switch (button) { case BUTTON_OK: result.append("<input name=\"ok\" value=\""); result.append(getConfigurationContentS...
[ "@", "Override", "protected", "void", "dialogButtonsHtml", "(", "StringBuffer", "result", ",", "int", "button", ",", "String", "attribute", ")", "{", "attribute", "=", "appendDelimiter", "(", "attribute", ")", ";", "switch", "(", "button", ")", "{", "case", ...
The standard "OK" and "Cancel" buttons are overridden to show other labels.<p> See also {@link CmsDialog#dialogButtonsHtml(StringBuffer, int, String)} @param result a string buffer where the rendered HTML gets appended to @param button a integer key to identify the button @param attribute an optional string with poss...
[ "The", "standard", "OK", "and", "Cancel", "buttons", "are", "overridden", "to", "show", "other", "labels", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsLoginUserAgreement.java#L413-L447
google/closure-compiler
src/com/google/javascript/jscomp/Es6RewriteClassExtendsExpressions.java
Es6RewriteClassExtendsExpressions.decomposeInIIFE
private void decomposeInIIFE(NodeTraversal t, Node classNode) { """ When a class is used in an expressions where adding an alias as the previous statement might change execution order of a side-effect causing statement, wrap the class in an IIFE so that decomposition can happen safely. """ // converts ...
java
private void decomposeInIIFE(NodeTraversal t, Node classNode) { // converts // `class X extends something {}` // to // `(function() { return class X extends something {}; })()` Node functionBody = IR.block(); Node function = IR.function(IR.name(""), IR.paramList(), functionBody); Node call =...
[ "private", "void", "decomposeInIIFE", "(", "NodeTraversal", "t", ",", "Node", "classNode", ")", "{", "// converts", "// `class X extends something {}`", "// to", "// `(function() { return class X extends something {}; })()`", "Node", "functionBody", "=", "IR", ".", "block", ...
When a class is used in an expressions where adding an alias as the previous statement might change execution order of a side-effect causing statement, wrap the class in an IIFE so that decomposition can happen safely.
[ "When", "a", "class", "is", "used", "in", "an", "expressions", "where", "adding", "an", "alias", "as", "the", "previous", "statement", "might", "change", "execution", "order", "of", "a", "side", "-", "effect", "causing", "statement", "wrap", "the", "class", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6RewriteClassExtendsExpressions.java#L156-L172
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.getByResourceGroupAsync
public Observable<ManagementLockObjectInner> getByResourceGroupAsync(String resourceGroupName, String lockName) { """ Gets a management lock at the resource group level. @param resourceGroupName The name of the locked resource group. @param lockName The name of the lock to get. @throws IllegalArgumentExceptio...
java
public Observable<ManagementLockObjectInner> getByResourceGroupAsync(String resourceGroupName, String lockName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, lockName).map(new Func1<ServiceResponse<ManagementLockObjectInner>, ManagementLockObjectInner>() { @Override ...
[ "public", "Observable", "<", "ManagementLockObjectInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "lockName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "lockName", ")", ".", ...
Gets a management lock at the resource group level. @param resourceGroupName The name of the locked resource group. @param lockName The name of the lock to get. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ManagementLockObjectInner object
[ "Gets", "a", "management", "lock", "at", "the", "resource", "group", "level", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L364-L371
EsotericSoftware/yamlbeans
src/com/esotericsoftware/yamlbeans/YamlReader.java
YamlReader.readValue
protected Object readValue (Class type, Class elementType, Class defaultType) throws YamlException, ParserException, TokenizerException { """ Reads an object from the YAML. Can be overidden to take some action for any of the objects returned. """ String tag = null, anchor = null; Event event = parser....
java
protected Object readValue (Class type, Class elementType, Class defaultType) throws YamlException, ParserException, TokenizerException { String tag = null, anchor = null; Event event = parser.peekNextEvent(); switch (event.type) { case ALIAS: parser.getNextEvent(); anchor = ((AliasEvent)event)...
[ "protected", "Object", "readValue", "(", "Class", "type", ",", "Class", "elementType", ",", "Class", "defaultType", ")", "throws", "YamlException", ",", "ParserException", ",", "TokenizerException", "{", "String", "tag", "=", "null", ",", "anchor", "=", "null", ...
Reads an object from the YAML. Can be overidden to take some action for any of the objects returned.
[ "Reads", "an", "object", "from", "the", "YAML", ".", "Can", "be", "overidden", "to", "take", "some", "action", "for", "any", "of", "the", "objects", "returned", "." ]
train
https://github.com/EsotericSoftware/yamlbeans/blob/f5610997edbc5534fc7e9f0a91654d14742345ca/src/com/esotericsoftware/yamlbeans/YamlReader.java#L114-L139
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java
SimpleRandomSampling.pbarStd
public static double pbarStd(double pbar, int sampleN, int populationN) { """ Calculates Standard Deviation for Pbar for finite population size @param pbar @param sampleN @param populationN @return """ return Math.sqrt(pbarVariance(pbar, sampleN, populationN)); }
java
public static double pbarStd(double pbar, int sampleN, int populationN) { return Math.sqrt(pbarVariance(pbar, sampleN, populationN)); }
[ "public", "static", "double", "pbarStd", "(", "double", "pbar", ",", "int", "sampleN", ",", "int", "populationN", ")", "{", "return", "Math", ".", "sqrt", "(", "pbarVariance", "(", "pbar", ",", "sampleN", ",", "populationN", ")", ")", ";", "}" ]
Calculates Standard Deviation for Pbar for finite population size @param pbar @param sampleN @param populationN @return
[ "Calculates", "Standard", "Deviation", "for", "Pbar", "for", "finite", "population", "size" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java#L242-L244
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/SocketGroovyMethods.java
SocketGroovyMethods.withStreams
public static <T> T withStreams(Socket socket, @ClosureParams(value=SimpleType.class, options= { """ Passes the Socket's InputStream and OutputStream to the closure. The streams will be closed after the closure returns, even if an exception is thrown. @param socket a Socket @param closure a Closure @retur...
java
public static <T> T withStreams(Socket socket, @ClosureParams(value=SimpleType.class, options={"java.io.InputStream","java.io.OutputStream"}) Closure<T> closure) throws IOException { InputStream input = socket.getInputStream(); OutputStream output = socket.getOutputStream(); try { T ...
[ "public", "static", "<", "T", ">", "T", "withStreams", "(", "Socket", "socket", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "{", "\"java.io.InputStream\"", ",", "\"java.io.OutputStream\"", "}", ")", "Closure",...
Passes the Socket's InputStream and OutputStream to the closure. The streams will be closed after the closure returns, even if an exception is thrown. @param socket a Socket @param closure a Closure @return the value returned by the closure @throws IOException if an IOException occurs. @since 1.5.2
[ "Passes", "the", "Socket", "s", "InputStream", "and", "OutputStream", "to", "the", "closure", ".", "The", "streams", "will", "be", "closed", "after", "the", "closure", "returns", "even", "if", "an", "exception", "is", "thrown", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/SocketGroovyMethods.java#L61-L79
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XCostExtension.java
XCostExtension.assignDriver
public void assignDriver(XAttribute attribute, String driver) { """ Assigns any attribute its cost driver, as defined by this extension's driver attribute. @param attribute Attribute to assign cost driver to. @param driver The cost driver to be assigned. """ if (driver != null && driver.trim().length...
java
public void assignDriver(XAttribute attribute, String driver) { if (driver != null && driver.trim().length() > 0) { XAttributeLiteral attr = (XAttributeLiteral) ATTR_DRIVER.clone(); attr.setValue(driver); attribute.getAttributes().put(KEY_DRIVER, attr); } }
[ "public", "void", "assignDriver", "(", "XAttribute", "attribute", ",", "String", "driver", ")", "{", "if", "(", "driver", "!=", "null", "&&", "driver", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "XAttributeLiteral", "attr", "="...
Assigns any attribute its cost driver, as defined by this extension's driver attribute. @param attribute Attribute to assign cost driver to. @param driver The cost driver to be assigned.
[ "Assigns", "any", "attribute", "its", "cost", "driver", "as", "defined", "by", "this", "extension", "s", "driver", "attribute", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L786-L792
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java
AbstractEpollStreamChannel.spliceTo
public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len, final ChannelPromise promise) { """ Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}. The {@code offset} is the offset for the {@link FileDescr...
java
public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len, final ChannelPromise promise) { checkPositiveOrZero(len, "len"); checkPositiveOrZero(offset, "offser"); if (config().getEpollMode() != EpollMode.LEVEL_TRIGGERED) ...
[ "public", "final", "ChannelFuture", "spliceTo", "(", "final", "FileDescriptor", "ch", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "ChannelPromise", "promise", ")", "{", "checkPositiveOrZero", "(", "len", ",", "\"len\"", ")", ";", ...
Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}. The {@code offset} is the offset for the {@link FileDescriptor} and {@code len} is the number of bytes to splice. If using {@link Integer#MAX_VALUE} it will splice until the {@link ChannelFuture} was canceled or it was failed. Pleas...
[ "Splice", "from", "this", "{", "@link", "AbstractEpollStreamChannel", "}", "to", "another", "{", "@link", "FileDescriptor", "}", ".", "The", "{", "@code", "offset", "}", "is", "the", "offset", "for", "the", "{", "@link", "FileDescriptor", "}", "and", "{", ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java#L214-L229
relayrides/pushy
micrometer-metrics-listener/src/main/java/com/turo/pushy/apns/metrics/micrometer/MicrometerApnsClientMetricsListener.java
MicrometerApnsClientMetricsListener.handleWriteFailure
@Override public void handleWriteFailure(final ApnsClient apnsClient, final long notificationId) { """ Records a failed attempt to send a notification and updates metrics accordingly. @param apnsClient the client that failed to write the notification; note that this is ignored by {@code MicrometerApnsClien...
java
@Override public void handleWriteFailure(final ApnsClient apnsClient, final long notificationId) { this.notificationStartTimes.remove(notificationId); this.writeFailures.increment(); }
[ "@", "Override", "public", "void", "handleWriteFailure", "(", "final", "ApnsClient", "apnsClient", ",", "final", "long", "notificationId", ")", "{", "this", ".", "notificationStartTimes", ".", "remove", "(", "notificationId", ")", ";", "this", ".", "writeFailures"...
Records a failed attempt to send a notification and updates metrics accordingly. @param apnsClient the client that failed to write the notification; note that this is ignored by {@code MicrometerApnsClientMetricsListener} instances, which should always be used for exactly one client @param notificationId an opaque, un...
[ "Records", "a", "failed", "attempt", "to", "send", "a", "notification", "and", "updates", "metrics", "accordingly", "." ]
train
https://github.com/relayrides/pushy/blob/1f6f9a0e07d785c815d74c2320a8d87c80231d36/micrometer-metrics-listener/src/main/java/com/turo/pushy/apns/metrics/micrometer/MicrometerApnsClientMetricsListener.java#L183-L187
saxsys/SynchronizeFX
transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java
SychronizeFXWebsocketServer.newChannel
public SynchronizeFxServer newChannel(final Object root, final String channelName, final ServerCallback callback) { """ Like {@link #newChannel(Object, String, Executor, ServerCallback)} but with a default model change executor. @see #newChannel(Object, String, Executor, ServerCallback) @param root see {@link ...
java
public SynchronizeFxServer newChannel(final Object root, final String channelName, final ServerCallback callback) { return newChannel(root, channelName, null, callback); }
[ "public", "SynchronizeFxServer", "newChannel", "(", "final", "Object", "root", ",", "final", "String", "channelName", ",", "final", "ServerCallback", "callback", ")", "{", "return", "newChannel", "(", "root", ",", "channelName", ",", "null", ",", "callback", ")"...
Like {@link #newChannel(Object, String, Executor, ServerCallback)} but with a default model change executor. @see #newChannel(Object, String, Executor, ServerCallback) @param root see {@link #newChannel(Object, String, Executor, ServerCallback)} @param channelName see {@link #newChannel(Object, String, Executor, Serve...
[ "Like", "{", "@link", "#newChannel", "(", "Object", "String", "Executor", "ServerCallback", ")", "}", "but", "with", "a", "default", "model", "change", "executor", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java#L141-L143
watchrabbit/rabbit-executor
src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java
ExecutorCommand.observe
public <V> void observe(Callable<V> callable, CheckedConsumer<V> onSuccess) { """ Invokes runnable asynchronously with respecting circuit logic and cache logic if configured. If callable completed with success then the {@code onSuccess} method is called. @param <V> type of returned value by callable @param c...
java
public <V> void observe(Callable<V> callable, CheckedConsumer<V> onSuccess) { service.executeAsynchronously(wrap(callable, onSuccess), config); }
[ "public", "<", "V", ">", "void", "observe", "(", "Callable", "<", "V", ">", "callable", ",", "CheckedConsumer", "<", "V", ">", "onSuccess", ")", "{", "service", ".", "executeAsynchronously", "(", "wrap", "(", "callable", ",", "onSuccess", ")", ",", "conf...
Invokes runnable asynchronously with respecting circuit logic and cache logic if configured. If callable completed with success then the {@code onSuccess} method is called. @param <V> type of returned value by callable @param callable method fired by executor @param onSuccess method fired if callable is completed with...
[ "Invokes", "runnable", "asynchronously", "with", "respecting", "circuit", "logic", "and", "cache", "logic", "if", "configured", ".", "If", "callable", "completed", "with", "success", "then", "the", "{", "@code", "onSuccess", "}", "method", "is", "called", "." ]
train
https://github.com/watchrabbit/rabbit-executor/blob/fe6674b78e6ab464babcecb6e1f100edec3c9966/src/main/java/com/watchrabbit/executor/command/ExecutorCommand.java#L159-L161
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.setController
public void setController(Object object, GraphicsController controller) { """ Set the controller on an element of this <code>GraphicsContext</code> so it can react to events. @param object the element on which the controller should be set. @param controller The new <code>GraphicsController</code> """ /...
java
public void setController(Object object, GraphicsController controller) { // set them all doSetController(getGroup(object), controller, Event.MOUSEEVENTS | Event.ONDBLCLICK | Event.ONMOUSEWHEEL); }
[ "public", "void", "setController", "(", "Object", "object", ",", "GraphicsController", "controller", ")", "{", "// set them all", "doSetController", "(", "getGroup", "(", "object", ")", ",", "controller", ",", "Event", ".", "MOUSEEVENTS", "|", "Event", ".", "OND...
Set the controller on an element of this <code>GraphicsContext</code> so it can react to events. @param object the element on which the controller should be set. @param controller The new <code>GraphicsController</code>
[ "Set", "the", "controller", "on", "an", "element", "of", "this", "<code", ">", "GraphicsContext<", "/", "code", ">", "so", "it", "can", "react", "to", "events", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L552-L555
glookast/commons-timecode
src/main/java/com/glookast/commons/timecode/MutableTimecodeDuration.java
MutableTimecodeDuration.valueOf
public static MutableTimecodeDuration valueOf(String timecode, int timecodeBase) throws IllegalArgumentException { """ Returns a TimecodeDuration instance for given timecode string and timecode base. Acceptable inputs are the normal representation HH:MM:SS:FF for non drop frame and HH:MM:SS:FF for drop frame @...
java
public static MutableTimecodeDuration valueOf(String timecode, int timecodeBase) throws IllegalArgumentException { return valueOf(timecode, timecodeBase, StringType.NORMAL); }
[ "public", "static", "MutableTimecodeDuration", "valueOf", "(", "String", "timecode", ",", "int", "timecodeBase", ")", "throws", "IllegalArgumentException", "{", "return", "valueOf", "(", "timecode", ",", "timecodeBase", ",", "StringType", ".", "NORMAL", ")", ";", ...
Returns a TimecodeDuration instance for given timecode string and timecode base. Acceptable inputs are the normal representation HH:MM:SS:FF for non drop frame and HH:MM:SS:FF for drop frame @param timecode @param timecodeBase @return the TimecodeDuration @throws IllegalArgumentException
[ "Returns", "a", "TimecodeDuration", "instance", "for", "given", "timecode", "string", "and", "timecode", "base", ".", "Acceptable", "inputs", "are", "the", "normal", "representation", "HH", ":", "MM", ":", "SS", ":", "FF", "for", "non", "drop", "frame", "and...
train
https://github.com/glookast/commons-timecode/blob/ec2f682a51d1cc435d0b42d80de48ff15adb4ee8/src/main/java/com/glookast/commons/timecode/MutableTimecodeDuration.java#L75-L78
outbrain/ob1k
ob1k-example/src/main/java/com/outbrain/ob1k/example/hello/server/services/HelloServiceImpl.java
HelloServiceImpl.helloUserStream
@Override public Observable<String> helloUserStream(final String name, final int repeats) { """ Endpoint which receives username and repeats number, and returns stream of messages limited by the repeat number size @param name username (comes either from request body or as query param) @param repeats repeats...
java
@Override public Observable<String> helloUserStream(final String name, final int repeats) { return interval(100, TimeUnit.MILLISECONDS).map(i -> "Hello, " + name + "! (#" + i + ")").take(repeats); }
[ "@", "Override", "public", "Observable", "<", "String", ">", "helloUserStream", "(", "final", "String", "name", ",", "final", "int", "repeats", ")", "{", "return", "interval", "(", "100", ",", "TimeUnit", ".", "MILLISECONDS", ")", ".", "map", "(", "i", "...
Endpoint which receives username and repeats number, and returns stream of messages limited by the repeat number size @param name username (comes either from request body or as query param) @param repeats repeats (comes either from request body or as query param) @return stream of results (&gt;= repeats)
[ "Endpoint", "which", "receives", "username", "and", "repeats", "number", "and", "returns", "stream", "of", "messages", "limited", "by", "the", "repeat", "number", "size" ]
train
https://github.com/outbrain/ob1k/blob/9e43ab39230c5787065053da0f766d822d0fe4e7/ob1k-example/src/main/java/com/outbrain/ob1k/example/hello/server/services/HelloServiceImpl.java#L61-L64
Chorus-bdd/Chorus
interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/ProcessManagerImpl.java
ProcessManagerImpl.incrementPortsIfDuplicateName
private void incrementPortsIfDuplicateName(String configName, ProcessConfigBean config) { """ If we already have an instance of a process with this name, auto increment ports to avoid a conflict """ int startedCount = getNumberOfInstancesStarted(configName); int debugPort = config.getDebugPort...
java
private void incrementPortsIfDuplicateName(String configName, ProcessConfigBean config) { int startedCount = getNumberOfInstancesStarted(configName); int debugPort = config.getDebugPort(); if ( debugPort != -1) { config.setDebugPort(debugPort + startedCount); } int ...
[ "private", "void", "incrementPortsIfDuplicateName", "(", "String", "configName", ",", "ProcessConfigBean", "config", ")", "{", "int", "startedCount", "=", "getNumberOfInstancesStarted", "(", "configName", ")", ";", "int", "debugPort", "=", "config", ".", "getDebugPort...
If we already have an instance of a process with this name, auto increment ports to avoid a conflict
[ "If", "we", "already", "have", "an", "instance", "of", "a", "process", "with", "this", "name", "auto", "increment", "ports", "to", "avoid", "a", "conflict" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-processes/src/main/java/org/chorusbdd/chorus/processes/manager/ProcessManagerImpl.java#L120-L132
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropertiesConfigHelper.java
PropertiesConfigHelper.getCommonPropertyAsSet
public Set<String> getCommonPropertyAsSet(String key) { """ Returns as a set, the comma separated values of a property @param key the key of the property @return a set of the comma separated values of a property """ Set<String> propertiesSet = new HashSet<>(); StringTokenizer tk = new StringTokenizer(...
java
public Set<String> getCommonPropertyAsSet(String key) { Set<String> propertiesSet = new HashSet<>(); StringTokenizer tk = new StringTokenizer(props.getProperty(PropertiesBundleConstant.PROPS_PREFIX + key, ""), ","); while (tk.hasMoreTokens()) propertiesSet.add(tk.nextToken().trim()); return propertiesSet...
[ "public", "Set", "<", "String", ">", "getCommonPropertyAsSet", "(", "String", "key", ")", "{", "Set", "<", "String", ">", "propertiesSet", "=", "new", "HashSet", "<>", "(", ")", ";", "StringTokenizer", "tk", "=", "new", "StringTokenizer", "(", "props", "."...
Returns as a set, the comma separated values of a property @param key the key of the property @return a set of the comma separated values of a property
[ "Returns", "as", "a", "set", "the", "comma", "separated", "values", "of", "a", "property" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropertiesConfigHelper.java#L116-L123
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.resumeSession
public ResumeSessionResponse resumeSession(ResumeSessionRequest request) { """ Resume your live session by live session id. @param request The request object containing all parameters for resuming live session. @return the response """ checkNotNull(request, "The parameter request should NOT be null...
java
public ResumeSessionResponse resumeSession(ResumeSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createReque...
[ "public", "ResumeSessionResponse", "resumeSession", "(", "ResumeSessionRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getSessionId", "(", ")", ",",...
Resume your live session by live session id. @param request The request object containing all parameters for resuming live session. @return the response
[ "Resume", "your", "live", "session", "by", "live", "session", "id", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L948-L955
gocd/gocd
common/src/main/java/com/thoughtworks/go/util/URLService.java
URLService.getUploadUrlOfAgent
public String getUploadUrlOfAgent(JobIdentifier jobIdentifier, String filePath, int attempt) { """ and therefore cannot locate job correctly when it is rescheduled """ return format("%s/%s/%s/%s?attempt=%d&buildId=%d", baseRemotingURL, "remoting", "files", jobIdentifier.artifactLocator(filePath), attem...
java
public String getUploadUrlOfAgent(JobIdentifier jobIdentifier, String filePath, int attempt) { return format("%s/%s/%s/%s?attempt=%d&buildId=%d", baseRemotingURL, "remoting", "files", jobIdentifier.artifactLocator(filePath), attempt, jobIdentifier.getBuildId()); }
[ "public", "String", "getUploadUrlOfAgent", "(", "JobIdentifier", "jobIdentifier", ",", "String", "filePath", ",", "int", "attempt", ")", "{", "return", "format", "(", "\"%s/%s/%s/%s?attempt=%d&buildId=%d\"", ",", "baseRemotingURL", ",", "\"remoting\"", ",", "\"files\"",...
and therefore cannot locate job correctly when it is rescheduled
[ "and", "therefore", "cannot", "locate", "job", "correctly", "when", "it", "is", "rescheduled" ]
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/common/src/main/java/com/thoughtworks/go/util/URLService.java#L70-L72
jenkinsci/jenkins
core/src/main/java/hudson/slaves/Channels.java
Channels.newJVM
public static Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String,String> systemProperties) throws IOException { """ Launches a new JVM with the given classpath and system properties, establish a communication channel, and return a {@link Channel} to ...
java
public static Channel newJVM(String displayName, TaskListener listener, FilePath workDir, ClasspathBuilder classpath, Map<String,String> systemProperties) throws IOException { JVMBuilder vmb = new JVMBuilder(); vmb.systemProperties(systemProperties); return newJVM(displayName,listener,vmb,workD...
[ "public", "static", "Channel", "newJVM", "(", "String", "displayName", ",", "TaskListener", "listener", ",", "FilePath", "workDir", ",", "ClasspathBuilder", "classpath", ",", "Map", "<", "String", ",", "String", ">", "systemProperties", ")", "throws", "IOException...
Launches a new JVM with the given classpath and system properties, establish a communication channel, and return a {@link Channel} to it. @param displayName Human readable name of what this JVM represents. For example "Selenium grid" or "Hadoop". This token is used for messages to {@code listener}. @param listener The...
[ "Launches", "a", "new", "JVM", "with", "the", "given", "classpath", "and", "system", "properties", "establish", "a", "communication", "channel", "and", "return", "a", "{", "@link", "Channel", "}", "to", "it", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/slaves/Channels.java#L180-L185
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/handlers/AuthorizationHandler.java
AuthorizationHandler.isNotBlank
private boolean isNotBlank(String subject, String resource, String operation) { """ Checks if any of the given strings is blank @param subject The subject to validate @param resource The resource to validate @param operation The operation to validate @return True if all strings are not blank, false otherwi...
java
private boolean isNotBlank(String subject, String resource, String operation) { return StringUtils.isNotBlank(subject) && StringUtils.isNotBlank(resource) && StringUtils.isNotBlank(operation); }
[ "private", "boolean", "isNotBlank", "(", "String", "subject", ",", "String", "resource", ",", "String", "operation", ")", "{", "return", "StringUtils", ".", "isNotBlank", "(", "subject", ")", "&&", "StringUtils", ".", "isNotBlank", "(", "resource", ")", "&&", ...
Checks if any of the given strings is blank @param subject The subject to validate @param resource The resource to validate @param operation The operation to validate @return True if all strings are not blank, false otherwise
[ "Checks", "if", "any", "of", "the", "given", "strings", "is", "blank" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/handlers/AuthorizationHandler.java#L67-L69
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java
DatabaseUtils.cursorLongToContentValues
public static void cursorLongToContentValues(Cursor cursor, String field, ContentValues values) { """ Reads a Long out of a field in a Cursor and writes it to a Map. @param cursor The cursor to read from @param field The INTEGER field to read @param values The {@link ContentValues} to put the value into, with...
java
public static void cursorLongToContentValues(Cursor cursor, String field, ContentValues values) { cursorLongToContentValues(cursor, field, values, field); }
[ "public", "static", "void", "cursorLongToContentValues", "(", "Cursor", "cursor", ",", "String", "field", ",", "ContentValues", "values", ")", "{", "cursorLongToContentValues", "(", "cursor", ",", "field", ",", "values", ",", "field", ")", ";", "}" ]
Reads a Long out of a field in a Cursor and writes it to a Map. @param cursor The cursor to read from @param field The INTEGER field to read @param values The {@link ContentValues} to put the value into, with the field as the key
[ "Reads", "a", "Long", "out", "of", "a", "field", "in", "a", "Cursor", "and", "writes", "it", "to", "a", "Map", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java#L675-L678
pawelprazak/java-extended
guava/src/main/java/com/bluecatcode/common/base/Environment.java
Environment.isPortAvailable
public static boolean isPortAvailable(int port) { """ Checks if a port is available by opening a socket on it @param port the port to test @return true if the port is available """ StringBuilder builder = new StringBuilder(); builder.append("Testing port ").append(port).append("\n"); ...
java
public static boolean isPortAvailable(int port) { StringBuilder builder = new StringBuilder(); builder.append("Testing port ").append(port).append("\n"); try (Socket s = new Socket("localhost", port)) { // If the code makes it this far without an exception it means // som...
[ "public", "static", "boolean", "isPortAvailable", "(", "int", "port", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "builder", ".", "append", "(", "\"Testing port \"", ")", ".", "append", "(", "port", ")", ".", "append", ...
Checks if a port is available by opening a socket on it @param port the port to test @return true if the port is available
[ "Checks", "if", "a", "port", "is", "available", "by", "opening", "a", "socket", "on", "it" ]
train
https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/base/Environment.java#L141-L155
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataIntersectionOfImpl_CustomFieldSerializer.java
OWLDataIntersectionOfImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataIntersectionOfImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.g...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataIntersectionOfImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLDataIntersectionOfImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataIntersectionOfImpl_CustomFieldSerializer.java#L69-L72
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/preferences/ExtraLanguagePreferenceAccess.java
ExtraLanguagePreferenceAccess.getString
public static String getString(IPreferenceStore store, String preferenceContainerID, String preferenceName) { """ Replies the preference value from the given store. @param store the preference storE. @param preferenceContainerID the identifier of the generator's preference container. @param preferenceName the...
java
public static String getString(IPreferenceStore store, String preferenceContainerID, String preferenceName) { return store.getString(getPrefixedKey(preferenceContainerID, preferenceName)); }
[ "public", "static", "String", "getString", "(", "IPreferenceStore", "store", ",", "String", "preferenceContainerID", ",", "String", "preferenceName", ")", "{", "return", "store", ".", "getString", "(", "getPrefixedKey", "(", "preferenceContainerID", ",", "preferenceNa...
Replies the preference value from the given store. @param store the preference storE. @param preferenceContainerID the identifier of the generator's preference container. @param preferenceName the name of the preference. @return the key.
[ "Replies", "the", "preference", "value", "from", "the", "given", "store", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/preferences/ExtraLanguagePreferenceAccess.java#L122-L124
dspinellis/UMLGraph
src/main/java/org/umlgraph/doclet/ClassGraph.java
ClassGraph.allRelation
private void allRelation(Options opt, RelationType rt, ClassDoc from) { """ Print all relations for a given's class's tag @param tagname the tag containing the given relation @param from the source class @param edgetype the dot edge specification """ String tagname = rt.lower; for (Tag tag : from.tags(tag...
java
private void allRelation(Options opt, RelationType rt, ClassDoc from) { String tagname = rt.lower; for (Tag tag : from.tags(tagname)) { String t[] = tokenize(tag.text()); // l-src label l-dst target t = t.length == 1 ? new String[] { "-", "-", "-", t[0] } : t; // Shorthand if (t.length != 4) { Sys...
[ "private", "void", "allRelation", "(", "Options", "opt", ",", "RelationType", "rt", ",", "ClassDoc", "from", ")", "{", "String", "tagname", "=", "rt", ".", "lower", ";", "for", "(", "Tag", "tag", ":", "from", ".", "tags", "(", "tagname", ")", ")", "{...
Print all relations for a given's class's tag @param tagname the tag containing the given relation @param from the source class @param edgetype the dot edge specification
[ "Print", "all", "relations", "for", "a", "given", "s", "class", "s", "tag" ]
train
https://github.com/dspinellis/UMLGraph/blob/09576db5ae0ea63bfe30ef9fce88a513f9a8d843/src/main/java/org/umlgraph/doclet/ClassGraph.java#L495-L515
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/assembly/DockerFileBuilder.java
DockerFileBuilder.createKeyValue
private String createKeyValue(String key, String value) { """ Escape any slashes, quotes, and newlines int the value. If any escaping occurred, quote the value. @param key The key @param value The value @return Escaped and quoted key="value" """ StringBuilder sb = new StringBuilder(); // no...
java
private String createKeyValue(String key, String value) { StringBuilder sb = new StringBuilder(); // no quoting the key; "Keys are alphanumeric strings which may contain periods (.) and hyphens (-)" sb.append(key).append('='); if (value == null || value.isEmpty()) { return sb...
[ "private", "String", "createKeyValue", "(", "String", "key", ",", "String", "value", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "// no quoting the key; \"Keys are alphanumeric strings which may contain periods (.) and hyphens (-)\"", "sb", ...
Escape any slashes, quotes, and newlines int the value. If any escaping occurred, quote the value. @param key The key @param value The value @return Escaped and quoted key="value"
[ "Escape", "any", "slashes", "quotes", "and", "newlines", "int", "the", "value", ".", "If", "any", "escaping", "occurred", "quote", "the", "value", "." ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/assembly/DockerFileBuilder.java#L250-L282
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsColor.java
CmsColor.MAX
private float MAX(float first, float second, float third) { """ Calculates the largest value between the three inputs.<p> @param first value @param second value @param third value @return the largest value between the three inputs """ float max = Integer.MIN_VALUE; if (first > max) { ...
java
private float MAX(float first, float second, float third) { float max = Integer.MIN_VALUE; if (first > max) { max = first; } if (second > max) { max = second; } if (third > max) { max = third; } return max; ...
[ "private", "float", "MAX", "(", "float", "first", ",", "float", "second", ",", "float", "third", ")", "{", "float", "max", "=", "Integer", ".", "MIN_VALUE", ";", "if", "(", "first", ">", "max", ")", "{", "max", "=", "first", ";", "}", "if", "(", ...
Calculates the largest value between the three inputs.<p> @param first value @param second value @param third value @return the largest value between the three inputs
[ "Calculates", "the", "largest", "value", "between", "the", "three", "inputs", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsColor.java#L259-L272
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/TopElementBuilderFragment.java
TopElementBuilderFragment.generateMember
protected List<StringConcatenationClient> generateMember(CodeElementExtractor.ElementDescription memberDescription, TopElementDescription topElementDescription, boolean forInterface, boolean forAppender, boolean namedMember) { """ Generate a member from the grammar. @param memberDescription the description o...
java
protected List<StringConcatenationClient> generateMember(CodeElementExtractor.ElementDescription memberDescription, TopElementDescription topElementDescription, boolean forInterface, boolean forAppender, boolean namedMember) { if (namedMember) { return generateNamedMember(memberDescription, topElementDescriptio...
[ "protected", "List", "<", "StringConcatenationClient", ">", "generateMember", "(", "CodeElementExtractor", ".", "ElementDescription", "memberDescription", ",", "TopElementDescription", "topElementDescription", ",", "boolean", "forInterface", ",", "boolean", "forAppender", ","...
Generate a member from the grammar. @param memberDescription the description of the member. @param topElementDescription the description of the top element. @param forInterface indicates if the generated code is for interfaces. @param forAppender <code>true</code> if the generation is for the ISourceAppender. @param n...
[ "Generate", "a", "member", "from", "the", "grammar", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/TopElementBuilderFragment.java#L459-L465
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/SequenceFile.java
SequenceFile.createWriter
public static Writer createWriter(Configuration conf, FSDataOutputStream out, Class keyClass, Class valClass, CompressionType compressionType, CompressionCodec codec, Metadata metadata) throws IOException { """ Construct the preferred type of 'raw' SequenceFile Writer. @...
java
public static Writer createWriter(Configuration conf, FSDataOutputStream out, Class keyClass, Class valClass, CompressionType compressionType, CompressionCodec codec, Metadata metadata) throws IOException { if ((codec instanceof GzipCodec) && !NativeCodeLoader.isN...
[ "public", "static", "Writer", "createWriter", "(", "Configuration", "conf", ",", "FSDataOutputStream", "out", ",", "Class", "keyClass", ",", "Class", "valClass", ",", "CompressionType", "compressionType", ",", "CompressionCodec", "codec", ",", "Metadata", "metadata", ...
Construct the preferred type of 'raw' SequenceFile Writer. @param conf The configuration. @param out The stream on top which the writer is to be constructed. @param keyClass The 'key' type. @param valClass The 'value' type. @param compressionType The compression type. @param codec The compression codec. @param metadata...
[ "Construct", "the", "preferred", "type", "of", "raw", "SequenceFile", "Writer", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/SequenceFile.java#L651-L674
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/PasswordlessFormLayout.java
PasswordlessFormLayout.onCountryCodeSelected
public void onCountryCodeSelected(String country, String dialCode) { """ Notifies the form that a new country code was selected by the user. @param country the selected country iso code (2 chars). @param dialCode the dial code for this country """ if (passwordlessRequestCodeLayout != null) { ...
java
public void onCountryCodeSelected(String country, String dialCode) { if (passwordlessRequestCodeLayout != null) { passwordlessRequestCodeLayout.onCountryCodeSelected(country, dialCode); } }
[ "public", "void", "onCountryCodeSelected", "(", "String", "country", ",", "String", "dialCode", ")", "{", "if", "(", "passwordlessRequestCodeLayout", "!=", "null", ")", "{", "passwordlessRequestCodeLayout", ".", "onCountryCodeSelected", "(", "country", ",", "dialCode"...
Notifies the form that a new country code was selected by the user. @param country the selected country iso code (2 chars). @param dialCode the dial code for this country
[ "Notifies", "the", "form", "that", "a", "new", "country", "code", "was", "selected", "by", "the", "user", "." ]
train
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/PasswordlessFormLayout.java#L209-L213
ow2-chameleon/fuchsia
importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java
ZWaveController.increaseLevel
public void increaseLevel(int nodeId, int endpoint) { """ increase level on the node / endpoint. The level is increased. Only dimmers support this. @param nodeId the node id to increase the level for. @param endpoint the endpoint to increase the level for. """ ZWaveNode node = this.getNode(nodeId); Seri...
java
public void increaseLevel(int nodeId, int endpoint) { ZWaveNode node = this.getNode(nodeId); SerialMessage serialMessage = null; ZWaveMultiLevelSwitchCommandClass zwaveCommandClass = (ZWaveMultiLevelSwitchCommandClass)node.resolveCommandClass(ZWaveCommandClass.CommandClass.SWITCH_MULTILEVEL, endpoint); if...
[ "public", "void", "increaseLevel", "(", "int", "nodeId", ",", "int", "endpoint", ")", "{", "ZWaveNode", "node", "=", "this", ".", "getNode", "(", "nodeId", ")", ";", "SerialMessage", "serialMessage", "=", "null", ";", "ZWaveMultiLevelSwitchCommandClass", "zwaveC...
increase level on the node / endpoint. The level is increased. Only dimmers support this. @param nodeId the node id to increase the level for. @param endpoint the endpoint to increase the level for.
[ "increase", "level", "on", "the", "node", "/", "endpoint", ".", "The", "level", "is", "increased", ".", "Only", "dimmers", "support", "this", "." ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java#L904-L924
UrielCh/ovh-java-sdk
ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java
ApiOvhMsServices.serviceName_sharepoint_PUT
public void serviceName_sharepoint_PUT(String serviceName, OvhSharepointService body) throws IOException { """ Alter this object properties REST: PUT /msServices/{serviceName}/sharepoint @param body [required] New object properties @param serviceName [required] The internal name of your Active Directory organ...
java
public void serviceName_sharepoint_PUT(String serviceName, OvhSharepointService body) throws IOException { String qPath = "/msServices/{serviceName}/sharepoint"; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_sharepoint_PUT", "(", "String", "serviceName", ",", "OvhSharepointService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/msServices/{serviceName}/sharepoint\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath...
Alter this object properties REST: PUT /msServices/{serviceName}/sharepoint @param body [required] New object properties @param serviceName [required] The internal name of your Active Directory organization API beta
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java#L673-L677
threerings/nenya
core/src/main/java/com/threerings/media/AbstractMedia.java
AbstractMedia.viewLocationDidChange
public void viewLocationDidChange (int dx, int dy) { """ Called by the {@link AbstractMediaManager} when we are in a {@link VirtualMediaPanel} that just scrolled. """ if (_renderOrder >= HUD_LAYER) { setLocation(_bounds.x + dx, _bounds.y + dy); } }
java
public void viewLocationDidChange (int dx, int dy) { if (_renderOrder >= HUD_LAYER) { setLocation(_bounds.x + dx, _bounds.y + dy); } }
[ "public", "void", "viewLocationDidChange", "(", "int", "dx", ",", "int", "dy", ")", "{", "if", "(", "_renderOrder", ">=", "HUD_LAYER", ")", "{", "setLocation", "(", "_bounds", ".", "x", "+", "dx", ",", "_bounds", ".", "y", "+", "dy", ")", ";", "}", ...
Called by the {@link AbstractMediaManager} when we are in a {@link VirtualMediaPanel} that just scrolled.
[ "Called", "by", "the", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/AbstractMedia.java#L220-L225
apache/groovy
subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java
SimpleGroovyClassDoc.encodeAngleBracketsInTagBody
public static String encodeAngleBracketsInTagBody(String text, Pattern regex) { """ Replaces angle brackets inside a tag. @param text GroovyDoc text to process @param regex has to capture tag name in group 1 and tag body in group 2 """ Matcher matcher = regex.matcher(text); if (matcher.find...
java
public static String encodeAngleBracketsInTagBody(String text, Pattern regex) { Matcher matcher = regex.matcher(text); if (matcher.find()) { matcher.reset(); StringBuffer sb = new StringBuffer(); while (matcher.find()) { String tagName = matcher.group(...
[ "public", "static", "String", "encodeAngleBracketsInTagBody", "(", "String", "text", ",", "Pattern", "regex", ")", "{", "Matcher", "matcher", "=", "regex", ".", "matcher", "(", "text", ")", ";", "if", "(", "matcher", ".", "find", "(", ")", ")", "{", "mat...
Replaces angle brackets inside a tag. @param text GroovyDoc text to process @param regex has to capture tag name in group 1 and tag body in group 2
[ "Replaces", "angle", "brackets", "inside", "a", "tag", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/SimpleGroovyClassDoc.java#L952-L969
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheOnDisk.java
CacheOnDisk.readDependency
public ValueSet readDependency(Object id, boolean delete) { """ Call this method to read a specified dependency id which contains the cache ids from the disk. @param id - dependency id. @param delete - boolean to delete the dependency id after reading @return valueSet - the collection of cache ids. """ ...
java
public ValueSet readDependency(Object id, boolean delete) { // SKS-O Result result = htod.readDependency(id, delete); if (result.returnCode == HTODDynacache.DISK_EXCEPTION) { stopOnError(result.diskException); this.htod.returnToResultPool(result); return HTODDynacache...
[ "public", "ValueSet", "readDependency", "(", "Object", "id", ",", "boolean", "delete", ")", "{", "// SKS-O", "Result", "result", "=", "htod", ".", "readDependency", "(", "id", ",", "delete", ")", ";", "if", "(", "result", ".", "returnCode", "==", "HTODDyna...
Call this method to read a specified dependency id which contains the cache ids from the disk. @param id - dependency id. @param delete - boolean to delete the dependency id after reading @return valueSet - the collection of cache ids.
[ "Call", "this", "method", "to", "read", "a", "specified", "dependency", "id", "which", "contains", "the", "cache", "ids", "from", "the", "disk", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheOnDisk.java#L1310-L1323
beanshell/beanshell
src/main/java/bsh/Invocable.java
Invocable.coerceToType
protected Object coerceToType(Object param, Class<?> type) throws Throwable { """ Coerce parameter values to parameter type and unwrap primitives. @param param the parameter value @param type the parameter type @return unwrapped coerced value @throws Throwable on cast errors """ if (typ...
java
protected Object coerceToType(Object param, Class<?> type) throws Throwable { if (type != Object.class) param = Types.castObject(param, type, Types.CAST); return Primitive.unwrap(param); }
[ "protected", "Object", "coerceToType", "(", "Object", "param", ",", "Class", "<", "?", ">", "type", ")", "throws", "Throwable", "{", "if", "(", "type", "!=", "Object", ".", "class", ")", "param", "=", "Types", ".", "castObject", "(", "param", ",", "typ...
Coerce parameter values to parameter type and unwrap primitives. @param param the parameter value @param type the parameter type @return unwrapped coerced value @throws Throwable on cast errors
[ "Coerce", "parameter", "values", "to", "parameter", "type", "and", "unwrap", "primitives", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Invocable.java#L177-L182
lukas-krecan/JsonUnit
json-unit-spring/src/main/java/net/javacrumbs/jsonunit/spring/JsonUnitResultMatchers.java
JsonUnitResultMatchers.isArray
public ResultMatcher isArray() { """ Fails if the selected JSON is not an Array or is not present. @return """ return new AbstractResultMatcher(path, configuration) { public void doMatch(Object actual) { isPresent(actual); Node node = getNode(actual); ...
java
public ResultMatcher isArray() { return new AbstractResultMatcher(path, configuration) { public void doMatch(Object actual) { isPresent(actual); Node node = getNode(actual); if (node.getNodeType() != ARRAY) { failOnType(node, "an ar...
[ "public", "ResultMatcher", "isArray", "(", ")", "{", "return", "new", "AbstractResultMatcher", "(", "path", ",", "configuration", ")", "{", "public", "void", "doMatch", "(", "Object", "actual", ")", "{", "isPresent", "(", "actual", ")", ";", "Node", "node", ...
Fails if the selected JSON is not an Array or is not present. @return
[ "Fails", "if", "the", "selected", "JSON", "is", "not", "an", "Array", "or", "is", "not", "present", "." ]
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit-spring/src/main/java/net/javacrumbs/jsonunit/spring/JsonUnitResultMatchers.java#L168-L178
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/CFFFontSubset.java
CFFFontSubset.ReconstructPrivateDict
void ReconstructPrivateDict(int Font,OffsetItem[] fdPrivate,IndexBaseItem[] fdPrivateBase, OffsetItem[] fdSubrs) { """ Function Adds the new private dicts (only for the FDs used) to the list @param Font the font @param fdPrivate OffsetItem array one element for each private @param fdPrivateBase IndexBaseItem...
java
void ReconstructPrivateDict(int Font,OffsetItem[] fdPrivate,IndexBaseItem[] fdPrivateBase, OffsetItem[] fdSubrs) { // For each fdarray private dict check if that FD is used. // if is used build a new one by changing the subrs offset // Else do nothing for (int i=0;i<fonts[Font].fdprivateOffsets.len...
[ "void", "ReconstructPrivateDict", "(", "int", "Font", ",", "OffsetItem", "[", "]", "fdPrivate", ",", "IndexBaseItem", "[", "]", "fdPrivateBase", ",", "OffsetItem", "[", "]", "fdSubrs", ")", "{", "// For each fdarray private dict check if that FD is used.", "// if is use...
Function Adds the new private dicts (only for the FDs used) to the list @param Font the font @param fdPrivate OffsetItem array one element for each private @param fdPrivateBase IndexBaseItem array one element for each private @param fdSubrs OffsetItem array one element for each private
[ "Function", "Adds", "the", "new", "private", "dicts", "(", "only", "for", "the", "FDs", "used", ")", "to", "the", "list" ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/CFFFontSubset.java#L1488-L1523
kefirfromperm/kefirbb
src/org/kefirsf/bb/proc/ProcText.java
ProcText.parse
public boolean parse(Context context, ProcPatternElement terminator) throws NestingException { """ Парсит элемент @param context контекст @return true - если удалось распарсить константу false - если не удалось @throws NestingException if nesting is too big. """ // Prepare a child context ...
java
public boolean parse(Context context, ProcPatternElement terminator) throws NestingException { // Prepare a child context Context child = new Context(context); child.checkNesting(); StringBuilder target = new StringBuilder(); child.setTarget(target); if (scope != null) { ...
[ "public", "boolean", "parse", "(", "Context", "context", ",", "ProcPatternElement", "terminator", ")", "throws", "NestingException", "{", "// Prepare a child context", "Context", "child", "=", "new", "Context", "(", "context", ")", ";", "child", ".", "checkNesting",...
Парсит элемент @param context контекст @return true - если удалось распарсить константу false - если не удалось @throws NestingException if nesting is too big.
[ "Парсит", "элемент" ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/proc/ProcText.java#L47-L71
StripesFramework/stripes-stuff
src/main/java/org/stripesstuff/plugin/security/J2EESecurityManager.java
J2EESecurityManager.hasRole
protected Boolean hasRole(ActionBean bean, Method handler, String role) { """ Determine if the current user has the specified role. Note that '*' is a special role that resolves to any role (see the servlet spec. v2.4, section 12.8). @param bean the current action bean @param handler the current event hand...
java
protected Boolean hasRole(ActionBean bean, Method handler, String role) { return bean.getContext().getRequest().isUserInRole(role); }
[ "protected", "Boolean", "hasRole", "(", "ActionBean", "bean", ",", "Method", "handler", ",", "String", "role", ")", "{", "return", "bean", ".", "getContext", "(", ")", ".", "getRequest", "(", ")", ".", "isUserInRole", "(", "role", ")", ";", "}" ]
Determine if the current user has the specified role. Note that '*' is a special role that resolves to any role (see the servlet spec. v2.4, section 12.8). @param bean the current action bean @param handler the current event handler @param role the role to check @return {@code true} if the user has the role, and...
[ "Determine", "if", "the", "current", "user", "has", "the", "specified", "role", ".", "Note", "that", "*", "is", "a", "special", "role", "that", "resolves", "to", "any", "role", "(", "see", "the", "servlet", "spec", ".", "v2", ".", "4", "section", "12",...
train
https://github.com/StripesFramework/stripes-stuff/blob/51ad92b4bd5862ba34d7c18c5829fb00ea3a3811/src/main/java/org/stripesstuff/plugin/security/J2EESecurityManager.java#L164-L167
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.queryByThumbnailUrl
public Iterable<DUser> queryByThumbnailUrl(java.lang.String thumbnailUrl) { """ query-by method for field thumbnailUrl @param thumbnailUrl the specified attribute @return an Iterable of DUsers for the specified thumbnailUrl """ return queryByField(null, DUserMapper.Field.THUMBNAILURL.getFieldName(), thum...
java
public Iterable<DUser> queryByThumbnailUrl(java.lang.String thumbnailUrl) { return queryByField(null, DUserMapper.Field.THUMBNAILURL.getFieldName(), thumbnailUrl); }
[ "public", "Iterable", "<", "DUser", ">", "queryByThumbnailUrl", "(", "java", ".", "lang", ".", "String", "thumbnailUrl", ")", "{", "return", "queryByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "THUMBNAILURL", ".", "getFieldName", "(", ")", ",...
query-by method for field thumbnailUrl @param thumbnailUrl the specified attribute @return an Iterable of DUsers for the specified thumbnailUrl
[ "query", "-", "by", "method", "for", "field", "thumbnailUrl" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L241-L243
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java
DifferentialFunctionFactory.avgPooling2d
public SDVariable avgPooling2d(SDVariable input, Pooling2DConfig pooling2DConfig) { """ Average pooling 2d operation. @param input the inputs to pooling @param pooling2DConfig the configuration @return """ AvgPooling2D avgPooling2D = AvgPooling2D.builder() .input(input) ...
java
public SDVariable avgPooling2d(SDVariable input, Pooling2DConfig pooling2DConfig) { AvgPooling2D avgPooling2D = AvgPooling2D.builder() .input(input) .sameDiff(sameDiff()) .config(pooling2DConfig) .build(); return avgPooling2D.outputVariabl...
[ "public", "SDVariable", "avgPooling2d", "(", "SDVariable", "input", ",", "Pooling2DConfig", "pooling2DConfig", ")", "{", "AvgPooling2D", "avgPooling2D", "=", "AvgPooling2D", ".", "builder", "(", ")", ".", "input", "(", "input", ")", ".", "sameDiff", "(", "sameDi...
Average pooling 2d operation. @param input the inputs to pooling @param pooling2DConfig the configuration @return
[ "Average", "pooling", "2d", "operation", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java#L317-L325
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/DeprecationStatus.java
DeprecationStatus.of
public static <T extends ResourceId> DeprecationStatus<T> of(Status status, T replacement) { """ Returns a {@code DeprecationStatus} object given the status and replacement's identity. """ return newBuilder(status, replacement).build(); }
java
public static <T extends ResourceId> DeprecationStatus<T> of(Status status, T replacement) { return newBuilder(status, replacement).build(); }
[ "public", "static", "<", "T", "extends", "ResourceId", ">", "DeprecationStatus", "<", "T", ">", "of", "(", "Status", "status", ",", "T", "replacement", ")", "{", "return", "newBuilder", "(", "status", ",", "replacement", ")", ".", "build", "(", ")", ";",...
Returns a {@code DeprecationStatus} object given the status and replacement's identity.
[ "Returns", "a", "{" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/DeprecationStatus.java#L333-L335
alkacon/opencms-core
src/org/opencms/importexport/CmsExportHelper.java
CmsExportHelper.writeFile2Rfs
protected void writeFile2Rfs(CmsFile file, String name) throws IOException { """ Writes a single OpenCms VFS file to the RFS export.<p> @param file the OpenCms VFS file to write @param name the name of the file in the export @throws IOException in case of file access issues """ String fileName ...
java
protected void writeFile2Rfs(CmsFile file, String name) throws IOException { String fileName = getRfsFileName(name); File rfsFile = new File(fileName); if (!rfsFile.getParentFile().exists()) { rfsFile.getParentFile().mkdirs(); } rfsFile.createNewFile(); FileO...
[ "protected", "void", "writeFile2Rfs", "(", "CmsFile", "file", ",", "String", "name", ")", "throws", "IOException", "{", "String", "fileName", "=", "getRfsFileName", "(", "name", ")", ";", "File", "rfsFile", "=", "new", "File", "(", "fileName", ")", ";", "i...
Writes a single OpenCms VFS file to the RFS export.<p> @param file the OpenCms VFS file to write @param name the name of the file in the export @throws IOException in case of file access issues
[ "Writes", "a", "single", "OpenCms", "VFS", "file", "to", "the", "RFS", "export", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsExportHelper.java#L214-L225
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.dropRight
public static <T> Collection<T> dropRight(Iterable<T> self, int num) { """ Drops the given number of elements from the tail of this Iterable. <pre class="groovyTestCase"> def strings = [ 'a', 'b', 'c' ] assert strings.dropRight( 0 ) == [ 'a', 'b', 'c' ] assert strings.dropRight( 2 ) == [ 'a' ] assert strings....
java
public static <T> Collection<T> dropRight(Iterable<T> self, int num) { Collection<T> selfCol = self instanceof Collection ? (Collection<T>) self : toList(self); if (selfCol.size() <= num) { return createSimilarCollection(selfCol, 0); } if (num <= 0) { Collection<T...
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "dropRight", "(", "Iterable", "<", "T", ">", "self", ",", "int", "num", ")", "{", "Collection", "<", "T", ">", "selfCol", "=", "self", "instanceof", "Collection", "?", "(", "Collection", ...
Drops the given number of elements from the tail of this Iterable. <pre class="groovyTestCase"> def strings = [ 'a', 'b', 'c' ] assert strings.dropRight( 0 ) == [ 'a', 'b', 'c' ] assert strings.dropRight( 2 ) == [ 'a' ] assert strings.dropRight( 5 ) == [] class AbcIterable implements Iterable<String> { Iterator<String...
[ "Drops", "the", "given", "number", "of", "elements", "from", "the", "tail", "of", "this", "Iterable", ".", "<pre", "class", "=", "groovyTestCase", ">", "def", "strings", "=", "[", "a", "b", "c", "]", "assert", "strings", ".", "dropRight", "(", "0", ")"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L10754-L10767
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/AgreementsInner.java
AgreementsInner.createOrUpdateAsync
public Observable<IntegrationAccountAgreementInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String agreementName, IntegrationAccountAgreementInner agreement) { """ Creates or updates an integration account agreement. @param resourceGroupName The resource group name. @param ...
java
public Observable<IntegrationAccountAgreementInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String agreementName, IntegrationAccountAgreementInner agreement) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, agreementName, agreement)....
[ "public", "Observable", "<", "IntegrationAccountAgreementInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "agreementName", ",", "IntegrationAccountAgreementInner", "agreement", ")", "{", "return", ...
Creates or updates an integration account agreement. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param agreementName The integration account agreement name. @param agreement The integration account agreement. @throws IllegalArgumentException thrown if ...
[ "Creates", "or", "updates", "an", "integration", "account", "agreement", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/AgreementsInner.java#L477-L484
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/http/MultiPartHTTPRequestParser.java
MultiPartHTTPRequestParser.getFileInfoFromInputDataImpl
@Override protected FileInfo getFileInfoFromInputDataImpl(HTTPRequest inputData) { """ This function returns the file info from the request data. @param inputData The input data @return The file info """ //get content Map<String,ContentPart<?>> contentPartsMap=this.getContentPartsAs...
java
@Override protected FileInfo getFileInfoFromInputDataImpl(HTTPRequest inputData) { //get content Map<String,ContentPart<?>> contentPartsMap=this.getContentPartsAsMap(inputData); //get file info FileInfo fileInfo=null; ContentPart<?> contentPart=contentPartsMap.get(this.f...
[ "@", "Override", "protected", "FileInfo", "getFileInfoFromInputDataImpl", "(", "HTTPRequest", "inputData", ")", "{", "//get content", "Map", "<", "String", ",", "ContentPart", "<", "?", ">", ">", "contentPartsMap", "=", "this", ".", "getContentPartsAsMap", "(", "i...
This function returns the file info from the request data. @param inputData The input data @return The file info
[ "This", "function", "returns", "the", "file", "info", "from", "the", "request", "data", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/http/MultiPartHTTPRequestParser.java#L236-L269
alkacon/opencms-core
src/org/opencms/pdftools/CmsPdfResourceHandler.java
CmsPdfResourceHandler.logXhtmlOutput
protected void logXhtmlOutput(CmsResource formatter, CmsResource content, byte[] xhtmlData) { """ Logs the XHTML output.<p> @param formatter the formatter @param content the content resource @param xhtmlData the XHTML data """ try { String xhtmlString = new String(xhtmlData, "UTF-8");...
java
protected void logXhtmlOutput(CmsResource formatter, CmsResource content, byte[] xhtmlData) { try { String xhtmlString = new String(xhtmlData, "UTF-8"); LOG.debug( "(PDF generation) The formatter " + formatter.getRootPath() + " gen...
[ "protected", "void", "logXhtmlOutput", "(", "CmsResource", "formatter", ",", "CmsResource", "content", ",", "byte", "[", "]", "xhtmlData", ")", "{", "try", "{", "String", "xhtmlString", "=", "new", "String", "(", "xhtmlData", ",", "\"UTF-8\"", ")", ";", "LOG...
Logs the XHTML output.<p> @param formatter the formatter @param content the content resource @param xhtmlData the XHTML data
[ "Logs", "the", "XHTML", "output", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/pdftools/CmsPdfResourceHandler.java#L221-L235
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/resources/VersionResource.java
VersionResource.versionCheck
@GET @Path("/check") @Produces(APPLICATION_JSON) @Timed @ExceptionMetered public VersionCheckResponse versionCheck( @QueryParam("client") @DefaultValue("") final String client) { """ Given the client version, returns the version status, i.e. whether or not they should be compatible or not. @par...
java
@GET @Path("/check") @Produces(APPLICATION_JSON) @Timed @ExceptionMetered public VersionCheckResponse versionCheck( @QueryParam("client") @DefaultValue("") final String client) { final PomVersion serverVersion = PomVersion.parse(Version.POM_VERSION); final VersionCompatibility.Status status; ...
[ "@", "GET", "@", "Path", "(", "\"/check\"", ")", "@", "Produces", "(", "APPLICATION_JSON", ")", "@", "Timed", "@", "ExceptionMetered", "public", "VersionCheckResponse", "versionCheck", "(", "@", "QueryParam", "(", "\"client\"", ")", "@", "DefaultValue", "(", "...
Given the client version, returns the version status, i.e. whether or not they should be compatible or not. @param client The client version. @return The VersionCheckResponse object.
[ "Given", "the", "client", "version", "returns", "the", "version", "status", "i", ".", "e", ".", "whether", "or", "not", "they", "should", "be", "compatible", "or", "not", "." ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/resources/VersionResource.java#L64-L82
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/AbstractTopNFunction.java
AbstractTopNFunction.delete
protected void delete(Collector<BaseRow> out, BaseRow inputRow) { """ This is similar to [[retract()]] but always send retraction message regardless of generateRetraction is true or not. """ BaseRowUtil.setRetract(inputRow); out.collect(inputRow); }
java
protected void delete(Collector<BaseRow> out, BaseRow inputRow) { BaseRowUtil.setRetract(inputRow); out.collect(inputRow); }
[ "protected", "void", "delete", "(", "Collector", "<", "BaseRow", ">", "out", ",", "BaseRow", "inputRow", ")", "{", "BaseRowUtil", ".", "setRetract", "(", "inputRow", ")", ";", "out", ".", "collect", "(", "inputRow", ")", ";", "}" ]
This is similar to [[retract()]] but always send retraction message regardless of generateRetraction is true or not.
[ "This", "is", "similar", "to", "[[", "retract", "()", "]]", "but", "always", "send", "retraction", "message", "regardless", "of", "generateRetraction", "is", "true", "or", "not", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/rank/AbstractTopNFunction.java#L252-L255
datasalt/pangool
core/src/main/java/com/datasalt/pangool/io/Mutator.java
Mutator.subSetOf
public static Schema subSetOf(Schema schema, String... subSetFields) { """ Creates a subset of the input Schema exactly with the fields whose names are specified. The name of the schema is auto-generated with a static counter. """ return subSetOf("subSetSchema" + (COUNTER++), schema, subSetFields); }
java
public static Schema subSetOf(Schema schema, String... subSetFields) { return subSetOf("subSetSchema" + (COUNTER++), schema, subSetFields); }
[ "public", "static", "Schema", "subSetOf", "(", "Schema", "schema", ",", "String", "...", "subSetFields", ")", "{", "return", "subSetOf", "(", "\"subSetSchema\"", "+", "(", "COUNTER", "++", ")", ",", "schema", ",", "subSetFields", ")", ";", "}" ]
Creates a subset of the input Schema exactly with the fields whose names are specified. The name of the schema is auto-generated with a static counter.
[ "Creates", "a", "subset", "of", "the", "input", "Schema", "exactly", "with", "the", "fields", "whose", "names", "are", "specified", ".", "The", "name", "of", "the", "schema", "is", "auto", "-", "generated", "with", "a", "static", "counter", "." ]
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/io/Mutator.java#L52-L54
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.joinIgnoreNull
public static <K, V> String joinIgnoreNull(Map<K, V> map, String separator, String keyValueSeparator) { """ 将map转成字符串,忽略null的键和值 @param <K> 键类型 @param <V> 值类型 @param map Map @param separator entry之间的连接符 @param keyValueSeparator kv之间的连接符 @return 连接后的字符串 @since 3.1.1 """ return join(map, separator, k...
java
public static <K, V> String joinIgnoreNull(Map<K, V> map, String separator, String keyValueSeparator) { return join(map, separator, keyValueSeparator, true); }
[ "public", "static", "<", "K", ",", "V", ">", "String", "joinIgnoreNull", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "String", "separator", ",", "String", "keyValueSeparator", ")", "{", "return", "join", "(", "map", ",", "separator", ",", "keyValu...
将map转成字符串,忽略null的键和值 @param <K> 键类型 @param <V> 值类型 @param map Map @param separator entry之间的连接符 @param keyValueSeparator kv之间的连接符 @return 连接后的字符串 @since 3.1.1
[ "将map转成字符串,忽略null的键和值" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L442-L444
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/Iterate.java
Iterate.removeAllIterable
public static <T> boolean removeAllIterable(Iterable<? extends T> iterable, Collection<T> targetCollection) { """ Remove all elements present in Iterable from the target collection, returns true if any element was removed. """ if (iterable == null) { throw new NullPointerException()...
java
public static <T> boolean removeAllIterable(Iterable<? extends T> iterable, Collection<T> targetCollection) { if (iterable == null) { throw new NullPointerException(); } if (iterable instanceof Collection<?>) { return targetCollection.removeAll((Collec...
[ "public", "static", "<", "T", ">", "boolean", "removeAllIterable", "(", "Iterable", "<", "?", "extends", "T", ">", "iterable", ",", "Collection", "<", "T", ">", "targetCollection", ")", "{", "if", "(", "iterable", "==", "null", ")", "{", "throw", "new", ...
Remove all elements present in Iterable from the target collection, returns true if any element was removed.
[ "Remove", "all", "elements", "present", "in", "Iterable", "from", "the", "target", "collection", "returns", "true", "if", "any", "element", "was", "removed", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L1151-L1164
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/circuit/CircuitsConfig.java
CircuitsConfig.imports
public static Map<Circuit, Collection<TileRef>> imports(Media circuitsConfig) { """ Import all circuits from configuration. @param circuitsConfig The circuits configuration (must not be <code>null</code>). @return The circuits imported. @throws LionEngineException If unable to read data. """ Chec...
java
public static Map<Circuit, Collection<TileRef>> imports(Media circuitsConfig) { Check.notNull(circuitsConfig); final Xml root = new Xml(circuitsConfig); final Collection<Xml> nodesCircuit = root.getChildren(NODE_CIRCUIT); final Map<Circuit, Collection<TileRef>> circuits = new ...
[ "public", "static", "Map", "<", "Circuit", ",", "Collection", "<", "TileRef", ">", ">", "imports", "(", "Media", "circuitsConfig", ")", "{", "Check", ".", "notNull", "(", "circuitsConfig", ")", ";", "final", "Xml", "root", "=", "new", "Xml", "(", "circui...
Import all circuits from configuration. @param circuitsConfig The circuits configuration (must not be <code>null</code>). @return The circuits imported. @throws LionEngineException If unable to read data.
[ "Import", "all", "circuits", "from", "configuration", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/circuit/CircuitsConfig.java#L66-L89
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/xml/AFPChainXMLConverter.java
AFPChainXMLConverter.toXML
public synchronized static String toXML(AFPChain afpChain, Atom[] ca1, Atom[]ca2) throws IOException { """ Convert an afpChain to a simple XML representation @param afpChain @return XML representation of the AFPCHain """ StringWriter result = new StringWriter(); toXML(afpChain,result,ca1,ca2); return...
java
public synchronized static String toXML(AFPChain afpChain, Atom[] ca1, Atom[]ca2) throws IOException{ StringWriter result = new StringWriter(); toXML(afpChain,result,ca1,ca2); return result.toString(); }
[ "public", "synchronized", "static", "String", "toXML", "(", "AFPChain", "afpChain", ",", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ")", "throws", "IOException", "{", "StringWriter", "result", "=", "new", "StringWriter", "(", ")", ";", "toXML",...
Convert an afpChain to a simple XML representation @param afpChain @return XML representation of the AFPCHain
[ "Convert", "an", "afpChain", "to", "a", "simple", "XML", "representation" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/xml/AFPChainXMLConverter.java#L44-L48
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/DefaultFeature.java
DefaultFeature.setId
public void setId(String name, Object value) { """ Sets the id property of the feature. This method also allows wiping the current id by setting the name of the id to null. The value will in that case be ignored. @param name the name of the id property, or null if the geometry property is to be wiped @param val...
java
public void setId(String name, Object value) { if (name == null) { idPropertyName = null; idValue = null; } else { idPropertyName= name; idValue = value; } }
[ "public", "void", "setId", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "name", "==", "null", ")", "{", "idPropertyName", "=", "null", ";", "idValue", "=", "null", ";", "}", "else", "{", "idPropertyName", "=", "name", ";", "idV...
Sets the id property of the feature. This method also allows wiping the current id by setting the name of the id to null. The value will in that case be ignored. @param name the name of the id property, or null if the geometry property is to be wiped @param value the value of the id property of this feature
[ "Sets", "the", "id", "property", "of", "the", "feature", ".", "This", "method", "also", "allows", "wiping", "the", "current", "id", "by", "setting", "the", "name", "of", "the", "id", "to", "null", ".", "The", "value", "will", "in", "that", "case", "be"...
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/DefaultFeature.java#L99-L111
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.timestampFormat
protected static void timestampFormat(String pattern, String... attributeNames) { """ Registers date format for specified attributes. This format will be used to convert between Date -> String -> java.sql.Timestamp when using the appropriate getters and setters. <p>For example: <blockquote><pre> public class...
java
protected static void timestampFormat(String pattern, String... attributeNames) { ModelDelegate.timestampFormat(modelClass(), pattern, attributeNames); }
[ "protected", "static", "void", "timestampFormat", "(", "String", "pattern", ",", "String", "...", "attributeNames", ")", "{", "ModelDelegate", ".", "timestampFormat", "(", "modelClass", "(", ")", ",", "pattern", ",", "attributeNames", ")", ";", "}" ]
Registers date format for specified attributes. This format will be used to convert between Date -> String -> java.sql.Timestamp when using the appropriate getters and setters. <p>For example: <blockquote><pre> public class Person extends Model { static { timestampFormat("MM/dd/yyyy hh:mm a", "birth_datetime"); } } P...
[ "Registers", "date", "format", "for", "specified", "attributes", ".", "This", "format", "will", "be", "used", "to", "convert", "between", "Date", "-", ">", "String", "-", ">", "java", ".", "sql", ".", "Timestamp", "when", "using", "the", "appropriate", "ge...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2170-L2172
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/CriteriaReader.java
CriteriaReader.getValue
private Object getValue(FieldType field, byte[] block) { """ Retrieves the value component of a criteria expression. @param field field type @param block block data @return field value """ Object result = null; switch (block[0]) { case 0x07: // Field { resu...
java
private Object getValue(FieldType field, byte[] block) { Object result = null; switch (block[0]) { case 0x07: // Field { result = getFieldType(block); break; } case 0x01: // Constant value { result = getConstantValue...
[ "private", "Object", "getValue", "(", "FieldType", "field", ",", "byte", "[", "]", "block", ")", "{", "Object", "result", "=", "null", ";", "switch", "(", "block", "[", "0", "]", ")", "{", "case", "0x07", ":", "// Field", "{", "result", "=", "getFiel...
Retrieves the value component of a criteria expression. @param field field type @param block block data @return field value
[ "Retrieves", "the", "value", "component", "of", "a", "criteria", "expression", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/CriteriaReader.java#L305-L331
infinispan/infinispan
server/integration/commons/src/main/java/org/infinispan/server/commons/controller/Operations.java
Operations.createReadAttributeOperation
public static ModelNode createReadAttributeOperation(PathAddress address, String name) { """ Creates a read-attribute operation using the specified address and name. @param address a resource path @param name an attribute name @return a read-attribute operation """ return createAttributeOperation(Mo...
java
public static ModelNode createReadAttributeOperation(PathAddress address, String name) { return createAttributeOperation(ModelDescriptionConstants.READ_ATTRIBUTE_OPERATION, address, name); }
[ "public", "static", "ModelNode", "createReadAttributeOperation", "(", "PathAddress", "address", ",", "String", "name", ")", "{", "return", "createAttributeOperation", "(", "ModelDescriptionConstants", ".", "READ_ATTRIBUTE_OPERATION", ",", "address", ",", "name", ")", ";...
Creates a read-attribute operation using the specified address and name. @param address a resource path @param name an attribute name @return a read-attribute operation
[ "Creates", "a", "read", "-", "attribute", "operation", "using", "the", "specified", "address", "and", "name", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/commons/src/main/java/org/infinispan/server/commons/controller/Operations.java#L106-L108
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/CreateInputRequest.java
CreateInputRequest.withTags
public CreateInputRequest withTags(java.util.Map<String, String> tags) { """ A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public CreateInputRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateInputRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "collection", "of", "key", "-", "value", "pairs", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/CreateInputRequest.java#L464-L467
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/tools/BTools.java
BTools.getSDbl
public static String getSDbl( double Value, int DecPrec, boolean ShowPlusSign, int StringLength ) { """ <b>getSDbl</b><br> public static String getSDbl( double Value, int DecPrec, boolean ShowPlusSign, int StringLength )<br> Returns double converted to string.<br> If Value is Double.NaN returns "NaN".<br> If D...
java
public static String getSDbl( double Value, int DecPrec, boolean ShowPlusSign, int StringLength ) { // String Info = ""; // String SDbl = getSDbl( Value, DecPrec, ShowPlusSign ); // if ( SDbl.length() >= StringLength ) return SDbl; // // String SpacesS = " "; String SpacesS = getSpaces( Stri...
[ "public", "static", "String", "getSDbl", "(", "double", "Value", ",", "int", "DecPrec", ",", "boolean", "ShowPlusSign", ",", "int", "StringLength", ")", "{", "//", "String", "Info", "=", "\"\"", ";", "//", "String", "SDbl", "=", "getSDbl", "(", "Value", ...
<b>getSDbl</b><br> public static String getSDbl( double Value, int DecPrec, boolean ShowPlusSign, int StringLength )<br> Returns double converted to string.<br> If Value is Double.NaN returns "NaN".<br> If DecPrec is < 0 is DecPrec set 0.<br> If ShowPlusSign is true:<br> - If Value is > 0 sign is '+'.<br> - If Value is...
[ "<b", ">", "getSDbl<", "/", "b", ">", "<br", ">", "public", "static", "String", "getSDbl", "(", "double", "Value", "int", "DecPrec", "boolean", "ShowPlusSign", "int", "StringLength", ")", "<br", ">", "Returns", "double", "converted", "to", "string", ".", "...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/tools/BTools.java#L222-L236
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/OperationDefinition.java
OperationDefinition.validateAndSet
@SuppressWarnings("deprecation") @Deprecated public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException { """ validates operation against the definition and sets model for the parameters passed. @param operationObject model node of type {@link Mode...
java
@SuppressWarnings("deprecation") @Deprecated public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException { validateOperation(operationObject); for (AttributeDefinition ad : this.parameters) { ad.validateAndSet(operationObject, mo...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "@", "Deprecated", "public", "final", "void", "validateAndSet", "(", "ModelNode", "operationObject", ",", "final", "ModelNode", "model", ")", "throws", "OperationFailedException", "{", "validateOperation", "(", "op...
validates operation against the definition and sets model for the parameters passed. @param operationObject model node of type {@link ModelType#OBJECT}, typically representing an operation request @param model model node in which the value should be stored @throws OperationFailedException if the value is not...
[ "validates", "operation", "against", "the", "definition", "and", "sets", "model", "for", "the", "parameters", "passed", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/OperationDefinition.java#L192-L199
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/org/lightcouch/CouchDatabaseBase.java
CouchDatabaseBase.saveAttachment
public Response saveAttachment(InputStream in, String name, String contentType) { """ Saves an attachment to a new document with a generated <tt>UUID</tt> as the document id. <p>To retrieve an attachment, see {@link #find(String)}. @param in The {@link InputStream} holding the binary data. @param nam...
java
public Response saveAttachment(InputStream in, String name, String contentType) { return saveAttachment(in, name, contentType, null, null); }
[ "public", "Response", "saveAttachment", "(", "InputStream", "in", ",", "String", "name", ",", "String", "contentType", ")", "{", "return", "saveAttachment", "(", "in", ",", "name", ",", "contentType", ",", "null", ",", "null", ")", ";", "}" ]
Saves an attachment to a new document with a generated <tt>UUID</tt> as the document id. <p>To retrieve an attachment, see {@link #find(String)}. @param in The {@link InputStream} holding the binary data. @param name The attachment name. @param contentType The attachment "Content-Type". @return {@link ...
[ "Saves", "an", "attachment", "to", "a", "new", "document", "with", "a", "generated", "<tt", ">", "UUID<", "/", "tt", ">", "as", "the", "document", "id", ".", "<p", ">", "To", "retrieve", "an", "attachment", "see", "{", "@link", "#find", "(", "String", ...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/org/lightcouch/CouchDatabaseBase.java#L342-L344
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java
MetricsClient.createLogMetric
public final LogMetric createLogMetric(String parent, LogMetric metric) { """ Creates a logs-based metric. <p>Sample code: <pre><code> try (MetricsClient metricsClient = MetricsClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); LogMetric metric = LogMetric.newBuilder().build(); LogMetric...
java
public final LogMetric createLogMetric(String parent, LogMetric metric) { CreateLogMetricRequest request = CreateLogMetricRequest.newBuilder().setParent(parent).setMetric(metric).build(); return createLogMetric(request); }
[ "public", "final", "LogMetric", "createLogMetric", "(", "String", "parent", ",", "LogMetric", "metric", ")", "{", "CreateLogMetricRequest", "request", "=", "CreateLogMetricRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "setMetric...
Creates a logs-based metric. <p>Sample code: <pre><code> try (MetricsClient metricsClient = MetricsClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); LogMetric metric = LogMetric.newBuilder().build(); LogMetric response = metricsClient.createLogMetric(parent.toString(), metric); } </code></pre> @par...
[ "Creates", "a", "logs", "-", "based", "metric", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsClient.java#L442-L447
mpetazzoni/ttorrent
bencoding/src/main/java/com/turn/ttorrent/bcodec/BEValue.java
BEValue.getMap
@SuppressWarnings("unchecked") public Map<String, BEValue> getMap() throws InvalidBEncodingException { """ Returns this BEValue as a Map of String keys and BEValue values. @throws InvalidBEncodingException If the value is not a {@link HashMap}. """ if (this.value instanceof HashMap) { return (Ma...
java
@SuppressWarnings("unchecked") public Map<String, BEValue> getMap() throws InvalidBEncodingException { if (this.value instanceof HashMap) { return (Map<String, BEValue>) this.value; } else { throw new InvalidBEncodingException("Expected Map<String, BEValue> !"); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Map", "<", "String", ",", "BEValue", ">", "getMap", "(", ")", "throws", "InvalidBEncodingException", "{", "if", "(", "this", ".", "value", "instanceof", "HashMap", ")", "{", "return", "(", "Map",...
Returns this BEValue as a Map of String keys and BEValue values. @throws InvalidBEncodingException If the value is not a {@link HashMap}.
[ "Returns", "this", "BEValue", "as", "a", "Map", "of", "String", "keys", "and", "BEValue", "values", "." ]
train
https://github.com/mpetazzoni/ttorrent/blob/ecd0e6caf853b63393c4ab63cfd8f20114f73f70/bencoding/src/main/java/com/turn/ttorrent/bcodec/BEValue.java#L175-L182
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/AvatarNodeZkUtil.java
AvatarNodeZkUtil.updateZooKeeper
public static void updateZooKeeper(Configuration originalConf, Configuration conf, boolean toOverwrite, String serviceName, String primaryInstance) throws IOException { """ This method tries to update the information in ZooKeeper For every address of the NameNode it is being run for (fs.default.name, dfs.n...
java
public static void updateZooKeeper(Configuration originalConf, Configuration conf, boolean toOverwrite, String serviceName, String primaryInstance) throws IOException { String connection = conf.get(FSConstants.FS_HA_ZOOKEEPER_QUORUM); if (connection == null) return; AvatarZooKeeperClient zk = ne...
[ "public", "static", "void", "updateZooKeeper", "(", "Configuration", "originalConf", ",", "Configuration", "conf", ",", "boolean", "toOverwrite", ",", "String", "serviceName", ",", "String", "primaryInstance", ")", "throws", "IOException", "{", "String", "connection",...
This method tries to update the information in ZooKeeper For every address of the NameNode it is being run for (fs.default.name, dfs.namenode.dn-address, dfs.namenode.http.address) if they are present. It also creates information for aliases in ZooKeeper for lists of strings in fs.default.name.aliases, dfs.namenode.dn-...
[ "This", "method", "tries", "to", "update", "the", "information", "in", "ZooKeeper", "For", "every", "address", "of", "the", "NameNode", "it", "is", "being", "run", "for", "(", "fs", ".", "default", ".", "name", "dfs", ".", "namenode", ".", "dn", "-", "...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/AvatarNodeZkUtil.java#L263-L288
ironjacamar/ironjacamar
web/src/main/java/org/ironjacamar/web/console/Server.java
Server.invokeOp
public static OpResultInfo invokeOp(String name, int index, String[] args) throws JMException { """ Invoke an operation @param name The bean name @param index The method index @param args The arguments @return The result @exception JMException Thrown if an error occurs """ MBeanServer server = getMB...
java
public static OpResultInfo invokeOp(String name, int index, String[] args) throws JMException { MBeanServer server = getMBeanServer(); ObjectName objName = new ObjectName(name); MBeanInfo info = server.getMBeanInfo(objName); MBeanOperationInfo[] opInfo = info.getOperations(); MBeanOpera...
[ "public", "static", "OpResultInfo", "invokeOp", "(", "String", "name", ",", "int", "index", ",", "String", "[", "]", "args", ")", "throws", "JMException", "{", "MBeanServer", "server", "=", "getMBeanServer", "(", ")", ";", "ObjectName", "objName", "=", "new"...
Invoke an operation @param name The bean name @param index The method index @param args The arguments @return The result @exception JMException Thrown if an error occurs
[ "Invoke", "an", "operation" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/web/src/main/java/org/ironjacamar/web/console/Server.java#L318-L332
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java
AnnotationTypeBuilder.getInstance
public static AnnotationTypeBuilder getInstance(Context context, TypeElement annotationTypeDoc, AnnotationTypeWriter writer) { """ Construct a new AnnotationTypeBuilder. @param context the build context. @param annotationTypeDoc the class being documented. @param writer ...
java
public static AnnotationTypeBuilder getInstance(Context context, TypeElement annotationTypeDoc, AnnotationTypeWriter writer) { return new AnnotationTypeBuilder(context, annotationTypeDoc, writer); }
[ "public", "static", "AnnotationTypeBuilder", "getInstance", "(", "Context", "context", ",", "TypeElement", "annotationTypeDoc", ",", "AnnotationTypeWriter", "writer", ")", "{", "return", "new", "AnnotationTypeBuilder", "(", "context", ",", "annotationTypeDoc", ",", "wri...
Construct a new AnnotationTypeBuilder. @param context the build context. @param annotationTypeDoc the class being documented. @param writer the doclet specific writer. @return an AnnotationTypeBuilder
[ "Construct", "a", "new", "AnnotationTypeBuilder", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java#L92-L96
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/MainFieldHandler.java
MainFieldHandler.syncClonedListener
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled) { """ Set this cloned listener to the same state at this listener. @param field The field this new listener will be added to. @param The new listener to sync to this. @param Has the init method been called? @return ...
java
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled) { if (!bInitCalled) ((MainFieldHandler)listener).init(null, keyName); return super.syncClonedListener(field, listener, true); }
[ "public", "boolean", "syncClonedListener", "(", "BaseField", "field", ",", "FieldListener", "listener", ",", "boolean", "bInitCalled", ")", "{", "if", "(", "!", "bInitCalled", ")", "(", "(", "MainFieldHandler", ")", "listener", ")", ".", "init", "(", "null", ...
Set this cloned listener to the same state at this listener. @param field The field this new listener will be added to. @param The new listener to sync to this. @param Has the init method been called? @return True if I called init.
[ "Set", "this", "cloned", "listener", "to", "the", "same", "state", "at", "this", "listener", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/MainFieldHandler.java#L95-L100
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/marshal/AbstractType.java
AbstractType.compareCollectionMembers
public int compareCollectionMembers(ByteBuffer v1, ByteBuffer v2, ByteBuffer collectionName) { """ An alternative comparison function used by CollectionsType in conjunction with CompositeType. This comparator is only called to compare components of a CompositeType. It gets the value of the previous component a...
java
public int compareCollectionMembers(ByteBuffer v1, ByteBuffer v2, ByteBuffer collectionName) { return compare(v1, v2); }
[ "public", "int", "compareCollectionMembers", "(", "ByteBuffer", "v1", ",", "ByteBuffer", "v2", ",", "ByteBuffer", "collectionName", ")", "{", "return", "compare", "(", "v1", ",", "v2", ")", ";", "}" ]
An alternative comparison function used by CollectionsType in conjunction with CompositeType. This comparator is only called to compare components of a CompositeType. It gets the value of the previous component as argument (or null if it's the first component of the composite). Unless you're doing something very simi...
[ "An", "alternative", "comparison", "function", "used", "by", "CollectionsType", "in", "conjunction", "with", "CompositeType", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/marshal/AbstractType.java#L208-L211
santhosh-tekuri/jlibs
xmldog/src/main/java/jlibs/xml/sax/dog/path/LocationPathAnalyzer.java
LocationPathAnalyzer.compressAnywhere
private static LocationPath compressAnywhere(LocationPath path) { """ "/descendant::book" if there are no predicates on first two steps """ int noOfNulls = 0; Step steps[] = path.steps; Step prevStep = steps[0]; for(int i=1, len=steps.length; i<len; i++){ Step curSt...
java
private static LocationPath compressAnywhere(LocationPath path){ int noOfNulls = 0; Step steps[] = path.steps; Step prevStep = steps[0]; for(int i=1, len=steps.length; i<len; i++){ Step curStep = steps[i]; if(!curStep.predicateSet.hasPosition && prevStep.predica...
[ "private", "static", "LocationPath", "compressAnywhere", "(", "LocationPath", "path", ")", "{", "int", "noOfNulls", "=", "0", ";", "Step", "steps", "[", "]", "=", "path", ".", "steps", ";", "Step", "prevStep", "=", "steps", "[", "0", "]", ";", "for", "...
"/descendant::book" if there are no predicates on first two steps
[ "/", "descendant", "::", "book", "if", "there", "are", "no", "predicates", "on", "first", "two", "steps" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/xmldog/src/main/java/jlibs/xml/sax/dog/path/LocationPathAnalyzer.java#L108-L130
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
Drawer.updateBadge
public void updateBadge(long identifier, StringHolder badge) { """ update the badge for a specific drawerItem identified by its id @param identifier @param badge """ IDrawerItem drawerItem = getDrawerItem(identifier); if (drawerItem instanceof Badgeable) { Badgeable badgeable =...
java
public void updateBadge(long identifier, StringHolder badge) { IDrawerItem drawerItem = getDrawerItem(identifier); if (drawerItem instanceof Badgeable) { Badgeable badgeable = (Badgeable) drawerItem; badgeable.withBadge(badge); updateItem((IDrawerItem) badgeable); ...
[ "public", "void", "updateBadge", "(", "long", "identifier", ",", "StringHolder", "badge", ")", "{", "IDrawerItem", "drawerItem", "=", "getDrawerItem", "(", "identifier", ")", ";", "if", "(", "drawerItem", "instanceof", "Badgeable", ")", "{", "Badgeable", "badgea...
update the badge for a specific drawerItem identified by its id @param identifier @param badge
[ "update", "the", "badge", "for", "a", "specific", "drawerItem", "identified", "by", "its", "id" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java#L665-L672
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/NonFlatRStarTree.java
NonFlatRStarTree.createRoot
private N createRoot(N root, List<E> objects) { """ Returns a root node for bulk load. If the objects are data objects a leaf node will be returned, if the objects are nodes a directory node will be returned. @param root the new root node @param objects the spatial objects to be inserted @return the root no...
java
private N createRoot(N root, List<E> objects) { // insert data for(E entry : objects) { if (entry instanceof LeafEntry) { root.addLeafEntry(entry); } else { root.addDirectoryEntry(entry); } } // set root mbr ((SpatialDirectoryEntry) getRootEntry()).setMBR(roo...
[ "private", "N", "createRoot", "(", "N", "root", ",", "List", "<", "E", ">", "objects", ")", "{", "// insert data", "for", "(", "E", "entry", ":", "objects", ")", "{", "if", "(", "entry", "instanceof", "LeafEntry", ")", "{", "root", ".", "addLeafEntry",...
Returns a root node for bulk load. If the objects are data objects a leaf node will be returned, if the objects are nodes a directory node will be returned. @param root the new root node @param objects the spatial objects to be inserted @return the root node
[ "Returns", "a", "root", "node", "for", "bulk", "load", ".", "If", "the", "objects", "are", "data", "objects", "a", "leaf", "node", "will", "be", "returned", "if", "the", "objects", "are", "nodes", "a", "directory", "node", "will", "be", "returned", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/NonFlatRStarTree.java#L214-L237
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.parseXMLGregorianCalendar
public static XMLGregorianCalendar parseXMLGregorianCalendar(final String calendar, final String format, final TimeZone timeZone) { """ Converts the specified <code>calendar</code> with the specified {@code format} to a new instance of XMLGregorianCalendar. <code>null</code> is returned if the specified <code>dat...
java
public static XMLGregorianCalendar parseXMLGregorianCalendar(final String calendar, final String format, final TimeZone timeZone) { if (N.isNullOrEmpty(calendar) || (calendar.length() == 4 && "null".equalsIgnoreCase(calendar))) { return null; } return createXMLGregorianCalendar...
[ "public", "static", "XMLGregorianCalendar", "parseXMLGregorianCalendar", "(", "final", "String", "calendar", ",", "final", "String", "format", ",", "final", "TimeZone", "timeZone", ")", "{", "if", "(", "N", ".", "isNullOrEmpty", "(", "calendar", ")", "||", "(", ...
Converts the specified <code>calendar</code> with the specified {@code format} to a new instance of XMLGregorianCalendar. <code>null</code> is returned if the specified <code>date</code> is null or empty. @param calendar @param format @param timeZone @return
[ "Converts", "the", "specified", "<code", ">", "calendar<", "/", "code", ">", "with", "the", "specified", "{", "@code", "format", "}", "to", "a", "new", "instance", "of", "XMLGregorianCalendar", ".", "<code", ">", "null<", "/", "code", ">", "is", "returned"...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L533-L539
DataArt/CalculationEngine
calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/PoiWorkbookConverters.java
PoiWorkbookConverters.getEvaluationCell
public static EvaluationCell getEvaluationCell(EvaluationWorkbook evaluationWorkbook, IA1Address addr) { """ Returns {@link EvaluationCell} of given {@link EvaluationWorkbook}. {@link EvaluationWorkbook} should be created with {@link #toEvaluationWorkbook(Workbook)} method. """ return ((PoiProxyWorkbo...
java
public static EvaluationCell getEvaluationCell(EvaluationWorkbook evaluationWorkbook, IA1Address addr) { return ((PoiProxyWorkbook) evaluationWorkbook).getSheet(0).getCell(addr.row(), addr.column()); }
[ "public", "static", "EvaluationCell", "getEvaluationCell", "(", "EvaluationWorkbook", "evaluationWorkbook", ",", "IA1Address", "addr", ")", "{", "return", "(", "(", "PoiProxyWorkbook", ")", "evaluationWorkbook", ")", ".", "getSheet", "(", "0", ")", ".", "getCell", ...
Returns {@link EvaluationCell} of given {@link EvaluationWorkbook}. {@link EvaluationWorkbook} should be created with {@link #toEvaluationWorkbook(Workbook)} method.
[ "Returns", "{" ]
train
https://github.com/DataArt/CalculationEngine/blob/34ce1d9c1f9b57a502906b274311d28580b134e5/calculation-engine/engine-converters/src/main/java/com/dataart/spreadsheetanalytics/engine/PoiWorkbookConverters.java#L81-L83
apereo/cas
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/handler/support/AbstractPreAndPostProcessingAuthenticationHandler.java
AbstractPreAndPostProcessingAuthenticationHandler.createHandlerResult
protected AuthenticationHandlerExecutionResult createHandlerResult(final @NonNull Credential credential, final @NonNull Principal principal) { """ Helper method to construct a handler result on successful authentication events. @param crede...
java
protected AuthenticationHandlerExecutionResult createHandlerResult(final @NonNull Credential credential, final @NonNull Principal principal) { return new DefaultAuthenticationHandlerExecutionResult(this, new BasicCredentialMetaData(credentia...
[ "protected", "AuthenticationHandlerExecutionResult", "createHandlerResult", "(", "final", "@", "NonNull", "Credential", "credential", ",", "final", "@", "NonNull", "Principal", "principal", ")", "{", "return", "new", "DefaultAuthenticationHandlerExecutionResult", "(", "this...
Helper method to construct a handler result on successful authentication events. @param credential the credential on which the authentication was successfully performed. Note that this credential instance may be different from what was originally provided as transformation of the username may have occurred, if one is ...
[ "Helper", "method", "to", "construct", "a", "handler", "result", "on", "successful", "authentication", "events", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/handler/support/AbstractPreAndPostProcessingAuthenticationHandler.java#L84-L88
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayAppend
public static Expression arrayAppend(Expression expression, Expression value) { """ Returned expression results in new array with value appended. """ return x("ARRAY_APPEND(" + expression.toString() + ", " + value.toString() + ")"); }
java
public static Expression arrayAppend(Expression expression, Expression value) { return x("ARRAY_APPEND(" + expression.toString() + ", " + value.toString() + ")"); }
[ "public", "static", "Expression", "arrayAppend", "(", "Expression", "expression", ",", "Expression", "value", ")", "{", "return", "x", "(", "\"ARRAY_APPEND(\"", "+", "expression", ".", "toString", "(", ")", "+", "\", \"", "+", "value", ".", "toString", "(", ...
Returned expression results in new array with value appended.
[ "Returned", "expression", "results", "in", "new", "array", "with", "value", "appended", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L45-L47
j256/ormlite-android
src/main/java/com/j256/ormlite/android/apptools/OrmLiteCursorAdapter.java
OrmLiteCursorAdapter.bindView
@Override public final void bindView(View itemView, Context context, Cursor cursor) { """ Final to prevent subclasses from accidentally overriding. Intentional overriding can be accomplished by overriding {@link #doBindView(View, Context, Cursor)}. @see CursorAdapter#bindView(View, Context, Cursor) """ ...
java
@Override public final void bindView(View itemView, Context context, Cursor cursor) { doBindView(itemView, context, cursor); }
[ "@", "Override", "public", "final", "void", "bindView", "(", "View", "itemView", ",", "Context", "context", ",", "Cursor", "cursor", ")", "{", "doBindView", "(", "itemView", ",", "context", ",", "cursor", ")", ";", "}" ]
Final to prevent subclasses from accidentally overriding. Intentional overriding can be accomplished by overriding {@link #doBindView(View, Context, Cursor)}. @see CursorAdapter#bindView(View, Context, Cursor)
[ "Final", "to", "prevent", "subclasses", "from", "accidentally", "overriding", ".", "Intentional", "overriding", "can", "be", "accomplished", "by", "overriding", "{", "@link", "#doBindView", "(", "View", "Context", "Cursor", ")", "}", "." ]
train
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteCursorAdapter.java#L37-L40
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/i18n/Messages.java
Messages.get
public String get(Key key, Object... arguments) { """ Returns a localized value for a given key stored in messages_xx.properties and passing the given arguments @param key The key enum to lookup up the localized value @param arguments The arguments to use @return The localized value or null value if the give...
java
public String get(Key key, Object... arguments) { return get(key.toString(), arguments); }
[ "public", "String", "get", "(", "Key", "key", ",", "Object", "...", "arguments", ")", "{", "return", "get", "(", "key", ".", "toString", "(", ")", ",", "arguments", ")", ";", "}" ]
Returns a localized value for a given key stored in messages_xx.properties and passing the given arguments @param key The key enum to lookup up the localized value @param arguments The arguments to use @return The localized value or null value if the given key is not configured
[ "Returns", "a", "localized", "value", "for", "a", "given", "key", "stored", "in", "messages_xx", ".", "properties", "and", "passing", "the", "given", "arguments" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/i18n/Messages.java#L74-L76
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-kms/src/main/java/com/ibm/cloud/objectstorage/services/kms/model/EncryptRequest.java
EncryptRequest.getEncryptionContext
public java.util.Map<String, String> getEncryptionContext() { """ <p> Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the <code>Decrypt</code> API or decryption will fail. For more information, see <a href="http://do...
java
public java.util.Map<String, String> getEncryptionContext() { if (encryptionContext == null) { encryptionContext = new com.ibm.cloud.objectstorage.internal.SdkInternalMap<String, String>(); } return encryptionContext; }
[ "public", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "getEncryptionContext", "(", ")", "{", "if", "(", "encryptionContext", "==", "null", ")", "{", "encryptionContext", "=", "new", "com", ".", "ibm", ".", "cloud", ".", "objectsto...
<p> Name-value pair that specifies the encryption context to be used for authenticated encryption. If used here, the same value must be supplied to the <code>Decrypt</code> API or decryption will fail. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html">Encry...
[ "<p", ">", "Name", "-", "value", "pair", "that", "specifies", "the", "encryption", "context", "to", "be", "used", "for", "authenticated", "encryption", ".", "If", "used", "here", "the", "same", "value", "must", "be", "supplied", "to", "the", "<code", ">", ...
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-kms/src/main/java/com/ibm/cloud/objectstorage/services/kms/model/EncryptRequest.java#L338-L343
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/util/ArgumentUtils.java
ArgumentUtils.requireNonNull
public static <T> T requireNonNull(String name, T value) { """ Adds a check that the given number is positive. @param name The name of the argument @param value The value @param <T> The generic type @throws IllegalArgumentException if the argument is not positive @return The value """ Objects.re...
java
public static <T> T requireNonNull(String name, T value) { Objects.requireNonNull(value, "Argument [" + name + "] cannot be null"); return value; }
[ "public", "static", "<", "T", ">", "T", "requireNonNull", "(", "String", "name", ",", "T", "value", ")", "{", "Objects", ".", "requireNonNull", "(", "value", ",", "\"Argument [\"", "+", "name", "+", "\"] cannot be null\"", ")", ";", "return", "value", ";",...
Adds a check that the given number is positive. @param name The name of the argument @param value The value @param <T> The generic type @throws IllegalArgumentException if the argument is not positive @return The value
[ "Adds", "a", "check", "that", "the", "given", "number", "is", "positive", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/ArgumentUtils.java#L52-L55
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHandler.java
ServletHandler.addServlet
public ServletHolder addServlet(String name, String pathSpec, String servletClass) { """ Add a servlet. @param name The servlet name. @param pathSpec A path specification to map this servlet to. @param servletClass The class name of the ser...
java
public ServletHolder addServlet(String name, String pathSpec, String servletClass) { return addServlet(name,pathSpec,servletClass,null); }
[ "public", "ServletHolder", "addServlet", "(", "String", "name", ",", "String", "pathSpec", ",", "String", "servletClass", ")", "{", "return", "addServlet", "(", "name", ",", "pathSpec", ",", "servletClass", ",", "null", ")", ";", "}" ]
Add a servlet. @param name The servlet name. @param pathSpec A path specification to map this servlet to. @param servletClass The class name of the servlet. @return The ServletHolder for the servlet.
[ "Add", "a", "servlet", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHandler.java#L323-L328
alkacon/opencms-core
src/org/opencms/importexport/CmsImportVersion10.java
CmsImportVersion10.addResourceAceRules
protected void addResourceAceRules(Digester digester, String xpath) { """ Adds the XML digester rules for resource access control entries.<p> @param digester the digester to add the rules to @param xpath the base xpath for the rules """ String xp_ace = xpath + N_ACCESSCONTROL_ENTRIES + "/" + N_ACC...
java
protected void addResourceAceRules(Digester digester, String xpath) { String xp_ace = xpath + N_ACCESSCONTROL_ENTRIES + "/" + N_ACCESSCONTROL_ENTRY; digester.addCallMethod(xp_ace, "addAccessControlEntry"); digester.addCallMethod(xp_ace + "/" + N_ACCESSCONTROL_PRINCIPAL, "setAcePrincipalId", 0);...
[ "protected", "void", "addResourceAceRules", "(", "Digester", "digester", ",", "String", "xpath", ")", "{", "String", "xp_ace", "=", "xpath", "+", "N_ACCESSCONTROL_ENTRIES", "+", "\"/\"", "+", "N_ACCESSCONTROL_ENTRY", ";", "digester", ".", "addCallMethod", "(", "xp...
Adds the XML digester rules for resource access control entries.<p> @param digester the digester to add the rules to @param xpath the base xpath for the rules
[ "Adds", "the", "XML", "digester", "rules", "for", "resource", "access", "control", "entries", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion10.java#L3278-L3287
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/sampling/ReservoirItemsSketch.java
ReservoirItemsSketch.insertValueAtPosition
void insertValueAtPosition(final T value, final int pos) { """ Useful during union operation to force-insert a value into the union gadget. Does <em>NOT</em> increment count of items seen. @param value The entry to store in the reservoir @param pos The position at which to store the entry """ if ((p...
java
void insertValueAtPosition(final T value, final int pos) { if ((pos < 0) || (pos >= getNumSamples())) { throw new SketchesArgumentException("Insert position must be between 0 and " + getNumSamples() + ", " + "inclusive. Received: " + pos); } data_.set(pos, value); }
[ "void", "insertValueAtPosition", "(", "final", "T", "value", ",", "final", "int", "pos", ")", "{", "if", "(", "(", "pos", "<", "0", ")", "||", "(", "pos", ">=", "getNumSamples", "(", ")", ")", ")", "{", "throw", "new", "SketchesArgumentException", "(",...
Useful during union operation to force-insert a value into the union gadget. Does <em>NOT</em> increment count of items seen. @param value The entry to store in the reservoir @param pos The position at which to store the entry
[ "Useful", "during", "union", "operation", "to", "force", "-", "insert", "a", "value", "into", "the", "union", "gadget", ".", "Does", "<em", ">", "NOT<", "/", "em", ">", "increment", "count", "of", "items", "seen", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/sampling/ReservoirItemsSketch.java#L566-L573
cdk/cdk
descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java
CIPTool.getCIPChirality
public static CIP_CHIRALITY getCIPChirality(IAtomContainer container, ITetrahedralChirality stereoCenter) { """ Returns the R or S chirality according to the CIP rules, based on the given chirality information. @param container {@link IAtomContainer} to which the <code>stereoCenter</code> belongs. @param...
java
public static CIP_CHIRALITY getCIPChirality(IAtomContainer container, ITetrahedralChirality stereoCenter) { // the LigancyFourChirality is kind of redundant but we keep for an // easy way to get the ILigands array LigancyFourChirality tmp = new LigancyFourChirality(container, stereoCenter); ...
[ "public", "static", "CIP_CHIRALITY", "getCIPChirality", "(", "IAtomContainer", "container", ",", "ITetrahedralChirality", "stereoCenter", ")", "{", "// the LigancyFourChirality is kind of redundant but we keep for an", "// easy way to get the ILigands array", "LigancyFourChirality", "t...
Returns the R or S chirality according to the CIP rules, based on the given chirality information. @param container {@link IAtomContainer} to which the <code>stereoCenter</code> belongs. @param stereoCenter Chiral center for which the CIP chirality is to be determined as {@link ITetrahedralChirality} object. @ret...
[ "Returns", "the", "R", "or", "S", "chirality", "according", "to", "the", "CIP", "rules", "based", "on", "the", "given", "chirality", "information", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/CIPTool.java#L136-L152
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java
GeneratedDUserDaoImpl.queryByRoles
public Iterable<DUser> queryByRoles(java.lang.Object roles) { """ query-by method for field roles @param roles the specified attribute @return an Iterable of DUsers for the specified roles """ return queryByField(null, DUserMapper.Field.ROLES.getFieldName(), roles); }
java
public Iterable<DUser> queryByRoles(java.lang.Object roles) { return queryByField(null, DUserMapper.Field.ROLES.getFieldName(), roles); }
[ "public", "Iterable", "<", "DUser", ">", "queryByRoles", "(", "java", ".", "lang", ".", "Object", "roles", ")", "{", "return", "queryByField", "(", "null", ",", "DUserMapper", ".", "Field", ".", "ROLES", ".", "getFieldName", "(", ")", ",", "roles", ")", ...
query-by method for field roles @param roles the specified attribute @return an Iterable of DUsers for the specified roles
[ "query", "-", "by", "method", "for", "field", "roles" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDUserDaoImpl.java#L223-L225
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.createRule
public static AT_Row createRule(TableRowType type, TableRowStyle style) { """ Creates a new row representing a rule. @param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN} @param style the style for the rule row, must not be null nor {@link Table...
java
public static AT_Row createRule(TableRowType type, TableRowStyle style){ Validate.notNull(type); Validate.validState(type!=TableRowType.UNKNOWN); Validate.validState(type!=TableRowType.CONTENT); Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN); return new AT_Row(){ @Ove...
[ "public", "static", "AT_Row", "createRule", "(", "TableRowType", "type", ",", "TableRowStyle", "style", ")", "{", "Validate", ".", "notNull", "(", "type", ")", ";", "Validate", ".", "validState", "(", "type", "!=", "TableRowType", ".", "UNKNOWN", ")", ";", ...
Creates a new row representing a rule. @param type the type for the rule row, must not be null nor {@link TableRowType#CONTENT} nor {@link TableRowType#UNKNOWN} @param style the style for the rule row, must not be null nor {@link TableRowStyle#UNKNOWN} @return a new row representing a rule @throws {@link NullPointerExc...
[ "Creates", "a", "new", "row", "representing", "a", "rule", "." ]
train
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L60-L78
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getTileGridFromWGS84
public static TileGrid getTileGridFromWGS84(Point point, int zoom) { """ Get the tile grid for the location specified as WGS84 @param point point @param zoom zoom level @return tile grid @since 1.1.0 """ Projection projection = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WORLD_GEODE...
java
public static TileGrid getTileGridFromWGS84(Point point, int zoom) { Projection projection = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); return getTileGrid(point, zoom, projection); }
[ "public", "static", "TileGrid", "getTileGridFromWGS84", "(", "Point", "point", ",", "int", "zoom", ")", "{", "Projection", "projection", "=", "ProjectionFactory", ".", "getProjection", "(", "ProjectionConstants", ".", "EPSG_WORLD_GEODETIC_SYSTEM", ")", ";", "return", ...
Get the tile grid for the location specified as WGS84 @param point point @param zoom zoom level @return tile grid @since 1.1.0
[ "Get", "the", "tile", "grid", "for", "the", "location", "specified", "as", "WGS84" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L556-L560
EdwardRaff/JSAT
JSAT/src/jsat/distributions/kernels/BaseL2Kernel.java
BaseL2Kernel.getSqrdNorm
protected double getSqrdNorm(int i, Vec y, List<Double> qi, List<? extends Vec> vecs, List<Double> cache) { """ Returns the squared L<sup>2</sup> norm between a point in the cache and one with a provided qi value @param i the index in the vector list @param y the other vector @param qi the acceleration values f...
java
protected double getSqrdNorm(int i, Vec y, List<Double> qi, List<? extends Vec> vecs, List<Double> cache) { if(cache == null) return Math.pow(vecs.get(i).pNormDist(2.0, y), 2); return cache.get(i)+qi.get(0)-2*vecs.get(i).dot(y); }
[ "protected", "double", "getSqrdNorm", "(", "int", "i", ",", "Vec", "y", ",", "List", "<", "Double", ">", "qi", ",", "List", "<", "?", "extends", "Vec", ">", "vecs", ",", "List", "<", "Double", ">", "cache", ")", "{", "if", "(", "cache", "==", "nu...
Returns the squared L<sup>2</sup> norm between a point in the cache and one with a provided qi value @param i the index in the vector list @param y the other vector @param qi the acceleration values for the other vector @param vecs the list of vectors to make the collection @param cache the cache of values for each vec...
[ "Returns", "the", "squared", "L<sup", ">", "2<", "/", "sup", ">", "norm", "between", "a", "point", "in", "the", "cache", "and", "one", "with", "a", "provided", "qi", "value" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/kernels/BaseL2Kernel.java#L73-L78
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.iterate
@Pure public static Iterator<Node> iterate(Node parent, String nodeName) { """ Replies an iterator on nodes that have the specified node name. @param parent is the node from which the children must be extracted. @param nodeName is the name of the extracted nodes @return the iterator on the parents. """ ...
java
@Pure public static Iterator<Node> iterate(Node parent, String nodeName) { assert parent != null : AssertMessages.notNullParameter(0); assert nodeName != null && !nodeName.isEmpty() : AssertMessages.notNullParameter(0); return new NameBasedIterator(parent, nodeName); }
[ "@", "Pure", "public", "static", "Iterator", "<", "Node", ">", "iterate", "(", "Node", "parent", ",", "String", "nodeName", ")", "{", "assert", "parent", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "assert", "nodeName"...
Replies an iterator on nodes that have the specified node name. @param parent is the node from which the children must be extracted. @param nodeName is the name of the extracted nodes @return the iterator on the parents.
[ "Replies", "an", "iterator", "on", "nodes", "that", "have", "the", "specified", "node", "name", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1702-L1707
threerings/nenya
core/src/main/java/com/threerings/resource/ResourceManager.java
ResourceManager.checkBundle
public boolean checkBundle (String path) { """ Checks to see if the specified bundle exists, is unpacked and is ready to be used. """ File bfile = getResourceFile(path); return (bfile == null) ? false : new FileResourceBundle(bfile, true, _unpack).isUnpacked(); }
java
public boolean checkBundle (String path) { File bfile = getResourceFile(path); return (bfile == null) ? false : new FileResourceBundle(bfile, true, _unpack).isUnpacked(); }
[ "public", "boolean", "checkBundle", "(", "String", "path", ")", "{", "File", "bfile", "=", "getResourceFile", "(", "path", ")", ";", "return", "(", "bfile", "==", "null", ")", "?", "false", ":", "new", "FileResourceBundle", "(", "bfile", ",", "true", ","...
Checks to see if the specified bundle exists, is unpacked and is ready to be used.
[ "Checks", "to", "see", "if", "the", "specified", "bundle", "exists", "is", "unpacked", "and", "is", "ready", "to", "be", "used", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/resource/ResourceManager.java#L458-L462
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/AbstractFileTypeAnalyzer.java
AbstractFileTypeAnalyzer.newHashSet
protected static Set<String> newHashSet(String... strings) { """ <p> Utility method to help in the creation of the extensions set. This constructs a new Set that can be used in a final static declaration.</p> <p> This implementation was copied from http://stackoverflow.com/questions/2041778/prepare-java-hashs...
java
protected static Set<String> newHashSet(String... strings) { final Set<String> set = new HashSet<>(strings.length); Collections.addAll(set, strings); return set; }
[ "protected", "static", "Set", "<", "String", ">", "newHashSet", "(", "String", "...", "strings", ")", "{", "final", "Set", "<", "String", ">", "set", "=", "new", "HashSet", "<>", "(", "strings", ".", "length", ")", ";", "Collections", ".", "addAll", "(...
<p> Utility method to help in the creation of the extensions set. This constructs a new Set that can be used in a final static declaration.</p> <p> This implementation was copied from http://stackoverflow.com/questions/2041778/prepare-java-hashset-values-by-construction</p> @param strings a list of strings to add to t...
[ "<p", ">", "Utility", "method", "to", "help", "in", "the", "creation", "of", "the", "extensions", "set", ".", "This", "constructs", "a", "new", "Set", "that", "can", "be", "used", "in", "a", "final", "static", "declaration", ".", "<", "/", "p", ">", ...
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/AbstractFileTypeAnalyzer.java#L148-L152
nakamura5akihito/six-util
src/main/java/jp/go/aist/six/util/core/xml/spring327/AbstractMarshaller.java
AbstractMarshaller.marshalStaxResult
protected void marshalStaxResult(Object graph, Result staxResult) throws XmlMappingException { """ Template method for handling {@code StaxResult}s. <p>This implementation delegates to {@code marshalXMLSteamWriter} or {@code marshalXMLEventConsumer}, depending on what is contained in the {@code StaxResult}. @p...
java
protected void marshalStaxResult(Object graph, Result staxResult) throws XmlMappingException { XMLStreamWriter streamWriter = StaxUtils.getXMLStreamWriter(staxResult); if (streamWriter != null) { marshalXmlStreamWriter(graph, streamWriter); } else { XMLEventWriter eventWriter = StaxUtils.getXMLEventWriter...
[ "protected", "void", "marshalStaxResult", "(", "Object", "graph", ",", "Result", "staxResult", ")", "throws", "XmlMappingException", "{", "XMLStreamWriter", "streamWriter", "=", "StaxUtils", ".", "getXMLStreamWriter", "(", "staxResult", ")", ";", "if", "(", "streamW...
Template method for handling {@code StaxResult}s. <p>This implementation delegates to {@code marshalXMLSteamWriter} or {@code marshalXMLEventConsumer}, depending on what is contained in the {@code StaxResult}. @param graph the root of the object graph to marshal @param staxResult a Spring {@link org.springframework....
[ "Template", "method", "for", "handling", "{" ]
train
https://github.com/nakamura5akihito/six-util/blob/a6db388a345e220cea2b1fa6324d15c80c6278b6/src/main/java/jp/go/aist/six/util/core/xml/spring327/AbstractMarshaller.java#L223-L237
metamx/java-util
src/main/java/com/metamx/common/StreamUtils.java
StreamUtils.copyToFileAndClose
public static long copyToFileAndClose(InputStream is, File file, long timeout) throws IOException, TimeoutException { """ Copy bytes from `is` to `file` but timeout if the copy takes too long. The timeout is best effort and not guaranteed. Specifically, `is.read` will not be interrupted. @param is The `In...
java
public static long copyToFileAndClose(InputStream is, File file, long timeout) throws IOException, TimeoutException { file.getParentFile().mkdirs(); try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) { final long retval = copyWithTimeout(is, os, timeout); // Workarround f...
[ "public", "static", "long", "copyToFileAndClose", "(", "InputStream", "is", ",", "File", "file", ",", "long", "timeout", ")", "throws", "IOException", ",", "TimeoutException", "{", "file", ".", "getParentFile", "(", ")", ".", "mkdirs", "(", ")", ";", "try", ...
Copy bytes from `is` to `file` but timeout if the copy takes too long. The timeout is best effort and not guaranteed. Specifically, `is.read` will not be interrupted. @param is The `InputStream` to copy bytes from. It is closed regardless of copy results. @param file The `File` to copy bytes to @param timeout ...
[ "Copy", "bytes", "from", "is", "to", "file", "but", "timeout", "if", "the", "copy", "takes", "too", "long", ".", "The", "timeout", "is", "best", "effort", "and", "not", "guaranteed", ".", "Specifically", "is", ".", "read", "will", "not", "be", "interrupt...
train
https://github.com/metamx/java-util/blob/9d204043da1136e94fb2e2d63e3543a29bf54b4d/src/main/java/com/metamx/common/StreamUtils.java#L81-L93
h2oai/h2o-3
h2o-algos/src/main/java/hex/coxph/Storage.java
Storage.toFrame
private static Frame toFrame(Matrix m, Key<Frame> key) { """ Helper to convert a Matrix into a Frame @param m Matrix @param key Key for output Frame @return Reference to Frame (which is also in DKV) """ H2O.submitTask(new ConvertMatrixToFrame(m, key)).join(); Frame f = DKV.getGet(key); assert ...
java
private static Frame toFrame(Matrix m, Key<Frame> key) { H2O.submitTask(new ConvertMatrixToFrame(m, key)).join(); Frame f = DKV.getGet(key); assert f != null; return f; }
[ "private", "static", "Frame", "toFrame", "(", "Matrix", "m", ",", "Key", "<", "Frame", ">", "key", ")", "{", "H2O", ".", "submitTask", "(", "new", "ConvertMatrixToFrame", "(", "m", ",", "key", ")", ")", ".", "join", "(", ")", ";", "Frame", "f", "="...
Helper to convert a Matrix into a Frame @param m Matrix @param key Key for output Frame @return Reference to Frame (which is also in DKV)
[ "Helper", "to", "convert", "a", "Matrix", "into", "a", "Frame" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/coxph/Storage.java#L60-L65
Red5/red5-client
src/main/java/org/red5/client/net/rtmpt/BaseRTMPTConnection.java
BaseRTMPTConnection.write
@Override public void write(final Packet packet) { """ Send RTMP packet down the connection. @param packet the packet to send """ log.debug("write - state: {}", state); if (closing || state.getState() == RTMP.STATE_DISCONNECTED) { // Connection is being closed, don't sen...
java
@Override public void write(final Packet packet) { log.debug("write - state: {}", state); if (closing || state.getState() == RTMP.STATE_DISCONNECTED) { // Connection is being closed, don't send any new packets return; } IoBuffer data; try { ...
[ "@", "Override", "public", "void", "write", "(", "final", "Packet", "packet", ")", "{", "log", ".", "debug", "(", "\"write - state: {}\"", ",", "state", ")", ";", "if", "(", "closing", "||", "state", ".", "getState", "(", ")", "==", "RTMP", ".", "STATE...
Send RTMP packet down the connection. @param packet the packet to send
[ "Send", "RTMP", "packet", "down", "the", "connection", "." ]
train
https://github.com/Red5/red5-client/blob/f894495b60e59d7cfba647abd9b934237cac9d45/src/main/java/org/red5/client/net/rtmpt/BaseRTMPTConnection.java#L236-L262