repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
Appendium/objectlabkit
utils-excel/src/main/java/net/objectlab/kit/util/excel/ExcelCell.java
ExcelCell.newCell
public ExcelCell newCell(String url, String label) { return row.newCell().link(url, label); }
java
public ExcelCell newCell(String url, String label) { return row.newCell().link(url, label); }
[ "public", "ExcelCell", "newCell", "(", "String", "url", ",", "String", "label", ")", "{", "return", "row", ".", "newCell", "(", ")", ".", "link", "(", "url", ",", "label", ")", ";", "}" ]
Add a hyperlink @param url URL @param label Label for the cell @return the cell
[ "Add", "a", "hyperlink" ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils-excel/src/main/java/net/objectlab/kit/util/excel/ExcelCell.java#L71-L73
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/DoubleArrayList.java
DoubleArrayList.replaceFromToWithFrom
public void replaceFromToWithFrom(int from, int to, AbstractDoubleList other, int otherFrom) { // overridden for performance only. if (! (other instanceof DoubleArrayList)) { // slower super.replaceFromToWithFrom(from,to,other,otherFrom); return; } int length=to-from+1; if (length>0) { checkRangeF...
java
public void replaceFromToWithFrom(int from, int to, AbstractDoubleList other, int otherFrom) { // overridden for performance only. if (! (other instanceof DoubleArrayList)) { // slower super.replaceFromToWithFrom(from,to,other,otherFrom); return; } int length=to-from+1; if (length>0) { checkRangeF...
[ "public", "void", "replaceFromToWithFrom", "(", "int", "from", ",", "int", "to", ",", "AbstractDoubleList", "other", ",", "int", "otherFrom", ")", "{", "// overridden for performance only.\r", "if", "(", "!", "(", "other", "instanceof", "DoubleArrayList", ")", ")"...
Replaces a number of elements in the receiver with the same number of elements of another list. Replaces elements in the receiver, between <code>from</code> (inclusive) and <code>to</code> (inclusive), with elements of <code>other</code>, starting from <code>otherFrom</code> (inclusive). @param from the position of th...
[ "Replaces", "a", "number", "of", "elements", "in", "the", "receiver", "with", "the", "same", "number", "of", "elements", "of", "another", "list", ".", "Replaces", "elements", "in", "the", "receiver", "between", "<code", ">", "from<", "/", "code", ">", "(",...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/DoubleArrayList.java#L347-L360
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IterableExtensions.java
IterableExtensions.forEach
public static <T> void forEach(Iterable<T> iterable, Procedure1<? super T> procedure) { IteratorExtensions.forEach(iterable.iterator(), procedure); }
java
public static <T> void forEach(Iterable<T> iterable, Procedure1<? super T> procedure) { IteratorExtensions.forEach(iterable.iterator(), procedure); }
[ "public", "static", "<", "T", ">", "void", "forEach", "(", "Iterable", "<", "T", ">", "iterable", ",", "Procedure1", "<", "?", "super", "T", ">", "procedure", ")", "{", "IteratorExtensions", ".", "forEach", "(", "iterable", ".", "iterator", "(", ")", "...
Applies {@code procedure} for each element of the given iterable. @param iterable the iterable. May not be <code>null</code>. @param procedure the procedure. May not be <code>null</code>.
[ "Applies", "{", "@code", "procedure", "}", "for", "each", "element", "of", "the", "given", "iterable", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/IterableExtensions.java#L397-L399
apache/incubator-zipkin
zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/EnsureIndexTemplate.java
EnsureIndexTemplate.apply
static void apply(HttpCall.Factory callFactory, String name, String indexTemplate) throws IOException { HttpUrl templateUrl = callFactory.baseUrl.newBuilder("_template").addPathSegment(name).build(); Request getTemplate = new Request.Builder().url(templateUrl).tag("get-template").build(); try { ...
java
static void apply(HttpCall.Factory callFactory, String name, String indexTemplate) throws IOException { HttpUrl templateUrl = callFactory.baseUrl.newBuilder("_template").addPathSegment(name).build(); Request getTemplate = new Request.Builder().url(templateUrl).tag("get-template").build(); try { ...
[ "static", "void", "apply", "(", "HttpCall", ".", "Factory", "callFactory", ",", "String", "name", ",", "String", "indexTemplate", ")", "throws", "IOException", "{", "HttpUrl", "templateUrl", "=", "callFactory", ".", "baseUrl", ".", "newBuilder", "(", "\"_templat...
This is a blocking call, used inside a lazy. That's because no writes should occur until the template is available.
[ "This", "is", "a", "blocking", "call", "used", "inside", "a", "lazy", ".", "That", "s", "because", "no", "writes", "should", "occur", "until", "the", "template", "is", "available", "." ]
train
https://github.com/apache/incubator-zipkin/blob/89b2fab983fc626b3be32ce9d7cf64b3f01f1a87/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/EnsureIndexTemplate.java#L32-L47
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.createOrUpdateAtResourceLevel
public ManagementLockObjectInner createOrUpdateAtResourceLevel(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName, ManagementLockObjectInner parameters) { return createOrUpdateAtResourceLevelWithServiceResponseAsync(re...
java
public ManagementLockObjectInner createOrUpdateAtResourceLevel(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName, ManagementLockObjectInner parameters) { return createOrUpdateAtResourceLevelWithServiceResponseAsync(re...
[ "public", "ManagementLockObjectInner", "createOrUpdateAtResourceLevel", "(", "String", "resourceGroupName", ",", "String", "resourceProviderNamespace", ",", "String", "parentResourcePath", ",", "String", "resourceType", ",", "String", "resourceName", ",", "String", "lockName"...
Creates or updates a management lock at the resource level or any level below the resource. When you apply a lock at a parent scope, all child resources inherit the same lock. To create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles,...
[ "Creates", "or", "updates", "a", "management", "lock", "at", "the", "resource", "level", "or", "any", "level", "below", "the", "resource", ".", "When", "you", "apply", "a", "lock", "at", "a", "parent", "scope", "all", "child", "resources", "inherit", "the"...
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#L689-L691
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.getAtResourceLevelAsync
public Observable<ManagementLockObjectInner> getAtResourceLevelAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName) { return getAtResourceLevelWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace,...
java
public Observable<ManagementLockObjectInner> getAtResourceLevelAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName) { return getAtResourceLevelWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace,...
[ "public", "Observable", "<", "ManagementLockObjectInner", ">", "getAtResourceLevelAsync", "(", "String", "resourceGroupName", ",", "String", "resourceProviderNamespace", ",", "String", "parentResourcePath", ",", "String", "resourceType", ",", "String", "resourceName", ",", ...
Get the management lock of a resource or any level below resource. @param resourceGroupName The name of the resource group. @param resourceProviderNamespace The namespace of the resource provider. @param parentResourcePath An extra path parameter needed in some services, like SQL Databases. @param resourceType The typ...
[ "Get", "the", "management", "lock", "of", "a", "resource", "or", "any", "level", "below", "resource", "." ]
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#L965-L972
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/rest/commonshttp/CommonsHttpTransport.java
CommonsHttpTransport.afterExecute
private void afterExecute(HttpMethod method) throws IOException { AuthState hostAuthState = method.getHostAuthState(); if (hostAuthState.isPreemptive() || hostAuthState.isAuthAttempted()) { AuthScheme authScheme = hostAuthState.getAuthScheme(); if (authScheme instanceof SpnegoAu...
java
private void afterExecute(HttpMethod method) throws IOException { AuthState hostAuthState = method.getHostAuthState(); if (hostAuthState.isPreemptive() || hostAuthState.isAuthAttempted()) { AuthScheme authScheme = hostAuthState.getAuthScheme(); if (authScheme instanceof SpnegoAu...
[ "private", "void", "afterExecute", "(", "HttpMethod", "method", ")", "throws", "IOException", "{", "AuthState", "hostAuthState", "=", "method", ".", "getHostAuthState", "(", ")", ";", "if", "(", "hostAuthState", ".", "isPreemptive", "(", ")", "||", "hostAuthStat...
Close any authentication resources that we may still have open and perform any after-response duties that we need to perform. @param method The method that has been executed @throws IOException If any issues arise during post processing
[ "Close", "any", "authentication", "resources", "that", "we", "may", "still", "have", "open", "and", "perform", "any", "after", "-", "response", "duties", "that", "we", "need", "to", "perform", "." ]
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/rest/commonshttp/CommonsHttpTransport.java#L698-L715
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractAuthLogicHandler.java
AbstractAuthLogicHandler.addKeepAliveHeaders
public static void addKeepAliveHeaders(Map<String, List<String>> headers) { StringUtilities.addValueToHeader(headers, "Keep-Alive", HttpProxyConstants.DEFAULT_KEEP_ALIVE_TIME, true); StringUtilities.addValueToHeader(headers, "Proxy-Connection", "keep-Alive", true); }
java
public static void addKeepAliveHeaders(Map<String, List<String>> headers) { StringUtilities.addValueToHeader(headers, "Keep-Alive", HttpProxyConstants.DEFAULT_KEEP_ALIVE_TIME, true); StringUtilities.addValueToHeader(headers, "Proxy-Connection", "keep-Alive", true); }
[ "public", "static", "void", "addKeepAliveHeaders", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", ")", "{", "StringUtilities", ".", "addValueToHeader", "(", "headers", ",", "\"Keep-Alive\"", ",", "HttpProxyConstants", ".", "DEFAULT_K...
Try to force proxy connection to be kept alive. @param headers the request headers
[ "Try", "to", "force", "proxy", "connection", "to", "be", "kept", "alive", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/proxy/handlers/http/AbstractAuthLogicHandler.java#L110-L115
aspectran/aspectran
core/src/main/java/com/aspectran/core/support/i18n/message/ResourceBundleMessageSource.java
ResourceBundleMessageSource.resolveCode
@Override protected MessageFormat resolveCode(String code, Locale locale) { MessageFormat messageFormat = null; for (int i = 0; messageFormat == null && i < this.basenames.length; i++) { ResourceBundle bundle = getResourceBundle(this.basenames[i], locale); if (bundle != null)...
java
@Override protected MessageFormat resolveCode(String code, Locale locale) { MessageFormat messageFormat = null; for (int i = 0; messageFormat == null && i < this.basenames.length; i++) { ResourceBundle bundle = getResourceBundle(this.basenames[i], locale); if (bundle != null)...
[ "@", "Override", "protected", "MessageFormat", "resolveCode", "(", "String", "code", ",", "Locale", "locale", ")", "{", "MessageFormat", "messageFormat", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "messageFormat", "==", "null", "&&", "i", "<"...
Resolves the given message code as key in the registered resource bundles, using a cached MessageFormat instance per message code.
[ "Resolves", "the", "given", "message", "code", "as", "key", "in", "the", "registered", "resource", "bundles", "using", "a", "cached", "MessageFormat", "instance", "per", "message", "code", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/support/i18n/message/ResourceBundleMessageSource.java#L228-L238
GCRC/nunaliit
nunaliit2-couch-client/src/main/java/ca/carleton/gcrc/couch/fsentry/FSEntryBuffer.java
FSEntryBuffer.getPositionedBuffer
static public FSEntry getPositionedBuffer(String path, byte[] content) throws Exception { List<String> pathFrags = FSEntrySupport.interpretPath(path); // Start at leaf and work our way back int index = pathFrags.size() - 1; FSEntry root = new FSEntryBuffer(pathFrags.get(index), content); --index; whil...
java
static public FSEntry getPositionedBuffer(String path, byte[] content) throws Exception { List<String> pathFrags = FSEntrySupport.interpretPath(path); // Start at leaf and work our way back int index = pathFrags.size() - 1; FSEntry root = new FSEntryBuffer(pathFrags.get(index), content); --index; whil...
[ "static", "public", "FSEntry", "getPositionedBuffer", "(", "String", "path", ",", "byte", "[", "]", "content", ")", "throws", "Exception", "{", "List", "<", "String", ">", "pathFrags", "=", "FSEntrySupport", ".", "interpretPath", "(", "path", ")", ";", "// S...
Create a virtual tree hierarchy with a buffer supporting the leaf. @param path Position of the buffer in the hierarchy, including its name @param content The actual buffer backing the end leaf @return The FSEntry root for this hierarchy @throws Exception Invalid parameter
[ "Create", "a", "virtual", "tree", "hierarchy", "with", "a", "buffer", "supporting", "the", "leaf", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-couch-client/src/main/java/ca/carleton/gcrc/couch/fsentry/FSEntryBuffer.java#L24-L40
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractSignalEventDefinitionBuilder.java
AbstractSignalEventDefinitionBuilder.camundaInAllVariables
public B camundaInAllVariables(String variables, boolean local) { CamundaIn param = modelInstance.newInstance(CamundaIn.class); param.setCamundaVariables(variables); if (local) { param.setCamundaLocal(local); } addExtensionElement(param); return myself; }
java
public B camundaInAllVariables(String variables, boolean local) { CamundaIn param = modelInstance.newInstance(CamundaIn.class); param.setCamundaVariables(variables); if (local) { param.setCamundaLocal(local); } addExtensionElement(param); return myself; }
[ "public", "B", "camundaInAllVariables", "(", "String", "variables", ",", "boolean", "local", ")", "{", "CamundaIn", "param", "=", "modelInstance", ".", "newInstance", "(", "CamundaIn", ".", "class", ")", ";", "param", ".", "setCamundaVariables", "(", "variables"...
Sets a "camunda:in" parameter to pass all the process variables of the signal-throwing process instance to the signal-catching process instance @param variables a String flag to declare that all of the signal-throwing process-instance variables should be passed @param local a Boolean flag to declare that only the loca...
[ "Sets", "a", "camunda", ":", "in", "parameter", "to", "pass", "all", "the", "process", "variables", "of", "the", "signal", "-", "throwing", "process", "instance", "to", "the", "signal", "-", "catching", "process", "instance" ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractSignalEventDefinitionBuilder.java#L95-L107
apache/spark
common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java
TransportClient.sendRpcSync
public ByteBuffer sendRpcSync(ByteBuffer message, long timeoutMs) { final SettableFuture<ByteBuffer> result = SettableFuture.create(); sendRpc(message, new RpcResponseCallback() { @Override public void onSuccess(ByteBuffer response) { ByteBuffer copy = ByteBuffer.allocate(response.remaining...
java
public ByteBuffer sendRpcSync(ByteBuffer message, long timeoutMs) { final SettableFuture<ByteBuffer> result = SettableFuture.create(); sendRpc(message, new RpcResponseCallback() { @Override public void onSuccess(ByteBuffer response) { ByteBuffer copy = ByteBuffer.allocate(response.remaining...
[ "public", "ByteBuffer", "sendRpcSync", "(", "ByteBuffer", "message", ",", "long", "timeoutMs", ")", "{", "final", "SettableFuture", "<", "ByteBuffer", ">", "result", "=", "SettableFuture", ".", "create", "(", ")", ";", "sendRpc", "(", "message", ",", "new", ...
Synchronously sends an opaque message to the RpcHandler on the server-side, waiting for up to a specified timeout for a response.
[ "Synchronously", "sends", "an", "opaque", "message", "to", "the", "RpcHandler", "on", "the", "server", "-", "side", "waiting", "for", "up", "to", "a", "specified", "timeout", "for", "a", "response", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java#L234-L260
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_menu_POST
public OvhOvhPabxMenu billingAccount_ovhPabx_serviceName_menu_POST(String billingAccount, String serviceName, Long greetSound, Long greetSoundTts, Long invalidSound, Long invalidSoundTts, String name) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/menu"; StringBuilder sb = pa...
java
public OvhOvhPabxMenu billingAccount_ovhPabx_serviceName_menu_POST(String billingAccount, String serviceName, Long greetSound, Long greetSoundTts, Long invalidSound, Long invalidSoundTts, String name) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/menu"; StringBuilder sb = pa...
[ "public", "OvhOvhPabxMenu", "billingAccount_ovhPabx_serviceName_menu_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "greetSound", ",", "Long", "greetSoundTts", ",", "Long", "invalidSound", ",", "Long", "invalidSoundTts", ",", "String", ...
Create a new menu REST: POST /telephony/{billingAccount}/ovhPabx/{serviceName}/menu @param greetSound [required] The id of the OvhPabxSound played to greet @param invalidSound [required] The id of the OvhPabxSound played when the caller uses an invalid DTMF @param invalidSoundTts [required] The text to speech sound pl...
[ "Create", "a", "new", "menu" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7600-L7611
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
MethodUtils.distance
private static int distance(final Class<?>[] classArray, final Class<?>[] toClassArray) { int answer = 0; if (!ClassUtils.isAssignable(classArray, toClassArray, true)) { return -1; } for (int offset = 0; offset < classArray.length; offset++) { // Note Inheritance...
java
private static int distance(final Class<?>[] classArray, final Class<?>[] toClassArray) { int answer = 0; if (!ClassUtils.isAssignable(classArray, toClassArray, true)) { return -1; } for (int offset = 0; offset < classArray.length; offset++) { // Note Inheritance...
[ "private", "static", "int", "distance", "(", "final", "Class", "<", "?", ">", "[", "]", "classArray", ",", "final", "Class", "<", "?", ">", "[", "]", "toClassArray", ")", "{", "int", "answer", "=", "0", ";", "if", "(", "!", "ClassUtils", ".", "isAs...
<p>Returns the aggregate number of inheritance hops between assignable argument class types. Returns -1 if the arguments aren't assignable. Fills a specific purpose for getMatchingMethod and is not generalized.</p> @param classArray @param toClassArray @return the aggregate number of inheritance hops between assignab...
[ "<p", ">", "Returns", "the", "aggregate", "number", "of", "inheritance", "hops", "between", "assignable", "argument", "class", "types", ".", "Returns", "-", "1", "if", "the", "arguments", "aren", "t", "assignable", ".", "Fills", "a", "specific", "purpose", "...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java#L769-L788
javaruntype/javaruntype
src/main/java/org/javaruntype/cache/ConcurrentCache.java
ConcurrentCache.computeAndGet
public V computeAndGet(final K key, final V value) { V result = this.cache.get(key); if (result == null) { result = this.cache.putIfAbsent(key, value); if (result == null) { result = value; final int excessElements = this.cache.size() - this.maxEle...
java
public V computeAndGet(final K key, final V value) { V result = this.cache.get(key); if (result == null) { result = this.cache.putIfAbsent(key, value); if (result == null) { result = value; final int excessElements = this.cache.size() - this.maxEle...
[ "public", "V", "computeAndGet", "(", "final", "K", "key", ",", "final", "V", "value", ")", "{", "V", "result", "=", "this", ".", "cache", ".", "get", "(", "key", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "this", ".", ...
<p> Puts a value into the cache and returns it. If a value already existed for the same key, the existing value is not modified and is returned instead of the one passed as parameter. This ensures only one object for each key exists at a time. </p> @param key the key to which the value will be assigned @param value th...
[ "<p", ">", "Puts", "a", "value", "into", "the", "cache", "and", "returns", "it", ".", "If", "a", "value", "already", "existed", "for", "the", "same", "key", "the", "existing", "value", "is", "not", "modified", "and", "is", "returned", "instead", "of", ...
train
https://github.com/javaruntype/javaruntype/blob/d3c522d16fd2295d09a11570d8c951c4821eff0a/src/main/java/org/javaruntype/cache/ConcurrentCache.java#L116-L131
ziccardi/jnrpe
jnrpe-server/src/main/java/it/jnrpe/server/CommandsSection.java
CommandsSection.addCommand
public void addCommand(final String commandName, final String pluginName, final String commandLine) { commandsList.add(new Command(commandName, pluginName, commandLine)); }
java
public void addCommand(final String commandName, final String pluginName, final String commandLine) { commandsList.add(new Command(commandName, pluginName, commandLine)); }
[ "public", "void", "addCommand", "(", "final", "String", "commandName", ",", "final", "String", "pluginName", ",", "final", "String", "commandLine", ")", "{", "commandsList", ".", "add", "(", "new", "Command", "(", "commandName", ",", "pluginName", ",", "comman...
Adds a command to the section. @param commandName The command name @param pluginName The plugin name @param commandLine The command line
[ "Adds", "a", "command", "to", "the", "section", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-server/src/main/java/it/jnrpe/server/CommandsSection.java#L102-L104
authlete/authlete-java-common
src/main/java/com/authlete/common/api/AuthleteApiImpl.java
AuthleteApiImpl.callServiceOwnerPostApi
private <TResponse> TResponse callServiceOwnerPostApi( String path, Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException { return callServiceOwnerPostApi(path, (Map<String, String>)null, requestBody, responseClass); }
java
private <TResponse> TResponse callServiceOwnerPostApi( String path, Object requestBody, Class<TResponse> responseClass) throws AuthleteApiException { return callServiceOwnerPostApi(path, (Map<String, String>)null, requestBody, responseClass); }
[ "private", "<", "TResponse", ">", "TResponse", "callServiceOwnerPostApi", "(", "String", "path", ",", "Object", "requestBody", ",", "Class", "<", "TResponse", ">", "responseClass", ")", "throws", "AuthleteApiException", "{", "return", "callServiceOwnerPostApi", "(", ...
Call an API with HTTP POST method and Service Owner credentials (without query parameters).
[ "Call", "an", "API", "with", "HTTP", "POST", "method", "and", "Service", "Owner", "credentials", "(", "without", "query", "parameters", ")", "." ]
train
https://github.com/authlete/authlete-java-common/blob/49c94c483713cbf5a04d805ff7dbd83766c9c964/src/main/java/com/authlete/common/api/AuthleteApiImpl.java#L305-L309
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/util/ContentMetadata.java
ContentMetadata.addCustomMetadata
public ContentMetadata addCustomMetadata(String key, String value) { customMetadata.put(key, value); return this; }
java
public ContentMetadata addCustomMetadata(String key, String value) { customMetadata.put(key, value); return this; }
[ "public", "ContentMetadata", "addCustomMetadata", "(", "String", "key", ",", "String", "value", ")", "{", "customMetadata", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds any custom metadata associated with the qualifying content item @param key Name of the custom data @param value Value for the custom data @return {@link ContentMetadata} object for method chaining
[ "Adds", "any", "custom", "metadata", "associated", "with", "the", "qualifying", "content", "item" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/util/ContentMetadata.java#L156-L159
apache/incubator-shardingsphere
sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java
SQLBuilder.toSQL
public String toSQL(final MasterSlaveRule masterSlaveRule, final ShardingDataSourceMetaData shardingDataSourceMetaData) { StringBuilder result = new StringBuilder(); for (Object each : segments) { if (each instanceof SchemaPlaceholder) { result.append(shardingDataSourceMetaDa...
java
public String toSQL(final MasterSlaveRule masterSlaveRule, final ShardingDataSourceMetaData shardingDataSourceMetaData) { StringBuilder result = new StringBuilder(); for (Object each : segments) { if (each instanceof SchemaPlaceholder) { result.append(shardingDataSourceMetaDa...
[ "public", "String", "toSQL", "(", "final", "MasterSlaveRule", "masterSlaveRule", ",", "final", "ShardingDataSourceMetaData", "shardingDataSourceMetaData", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Object", "each", ...
Convert to SQL unit. @param masterSlaveRule master slave rule @param shardingDataSourceMetaData sharding data source meta data @return SQL
[ "Convert", "to", "SQL", "unit", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-rewrite/src/main/java/org/apache/shardingsphere/core/rewrite/SQLBuilder.java#L131-L141
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebSiteRequest.java
WebSiteRequest.getURL
public String getURL(String url, Object optParam) throws IOException { return getURL(url, optParam, true); }
java
public String getURL(String url, Object optParam) throws IOException { return getURL(url, optParam, true); }
[ "public", "String", "getURL", "(", "String", "url", ",", "Object", "optParam", ")", "throws", "IOException", "{", "return", "getURL", "(", "url", ",", "optParam", ",", "true", ")", ";", "}" ]
Gets the URL String with the given parameters embedded, keeping the current settings. @param url the context-relative URL, with a beginning slash @param optParam any number of additional parameters. This parameter can accept several types of objects. The following is a list of supported objects an...
[ "Gets", "the", "URL", "String", "with", "the", "given", "parameters", "embedded", "keeping", "the", "current", "settings", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebSiteRequest.java#L477-L479
gallandarakhneorg/afc
advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java
ZoomablePane.getPanSensitivity
public double getPanSensitivity(boolean unitSensitivityModifier, boolean hugeSensivityModifier) { if (unitSensitivityModifier) { return DEFAULT_PAN_SENSITIVITY; } final double sens = getPanSensitivity(); if (hugeSensivityModifier) { return sens * LARGE_MOVE_FACTOR; } return sens; }
java
public double getPanSensitivity(boolean unitSensitivityModifier, boolean hugeSensivityModifier) { if (unitSensitivityModifier) { return DEFAULT_PAN_SENSITIVITY; } final double sens = getPanSensitivity(); if (hugeSensivityModifier) { return sens * LARGE_MOVE_FACTOR; } return sens; }
[ "public", "double", "getPanSensitivity", "(", "boolean", "unitSensitivityModifier", ",", "boolean", "hugeSensivityModifier", ")", "{", "if", "(", "unitSensitivityModifier", ")", "{", "return", "DEFAULT_PAN_SENSITIVITY", ";", "}", "final", "double", "sens", "=", "getPa...
Replies the sensibility of the panning moves after applying dynamic user interaction modifiers. The sensibility is a strictly positive number that is multiplied to the distance covered by the mouse motion for obtaining the move to apply to the document. The default value is 1. <p>This function is usually used for comp...
[ "Replies", "the", "sensibility", "of", "the", "panning", "moves", "after", "applying", "dynamic", "user", "interaction", "modifiers", ".", "The", "sensibility", "is", "a", "strictly", "positive", "number", "that", "is", "multiplied", "to", "the", "distance", "co...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/nodefx/src/main/java/org/arakhne/afc/nodefx/ZoomablePane.java#L816-L825
JCTools/JCTools
jctools-experimental/src/main/java/org/jctools/queues/MpscRelaxedArrayQueue.java
MpscRelaxedArrayQueue.validateProducerClaim
private boolean validateProducerClaim( final int activeCycleIndex, final long producerCycleClaim, final long cycleId, final int positionOnCycle, final int cycleLengthLog2, final boolean slowProducer) { final long producerPosition = producerPosition(positionOnC...
java
private boolean validateProducerClaim( final int activeCycleIndex, final long producerCycleClaim, final long cycleId, final int positionOnCycle, final int cycleLengthLog2, final boolean slowProducer) { final long producerPosition = producerPosition(positionOnC...
[ "private", "boolean", "validateProducerClaim", "(", "final", "int", "activeCycleIndex", ",", "final", "long", "producerCycleClaim", ",", "final", "long", "cycleId", ",", "final", "int", "positionOnCycle", ",", "final", "int", "cycleLengthLog2", ",", "final", "boolea...
Validate a producer claim to find out if is an overclaim (beyond the producer limit). @return {@code true} if the claim is valid, {@code false} otherwise.
[ "Validate", "a", "producer", "claim", "to", "find", "out", "if", "is", "an", "overclaim", "(", "beyond", "the", "producer", "limit", ")", "." ]
train
https://github.com/JCTools/JCTools/blob/9250fe316ec84209cbba0a41682f341256df781e/jctools-experimental/src/main/java/org/jctools/queues/MpscRelaxedArrayQueue.java#L380-L399
datastax/java-driver
core/src/main/java/com/datastax/oss/driver/internal/core/metadata/token/ByteOrderedTokenRange.java
ByteOrderedTokenRange.toBigInteger
private BigInteger toBigInteger(ByteBuffer bb, int significantBytes) { byte[] bytes = Bytes.getArray(bb); byte[] target; if (significantBytes != bytes.length) { target = new byte[significantBytes]; System.arraycopy(bytes, 0, target, 0, bytes.length); } else { target = bytes; } ...
java
private BigInteger toBigInteger(ByteBuffer bb, int significantBytes) { byte[] bytes = Bytes.getArray(bb); byte[] target; if (significantBytes != bytes.length) { target = new byte[significantBytes]; System.arraycopy(bytes, 0, target, 0, bytes.length); } else { target = bytes; } ...
[ "private", "BigInteger", "toBigInteger", "(", "ByteBuffer", "bb", ",", "int", "significantBytes", ")", "{", "byte", "[", "]", "bytes", "=", "Bytes", ".", "getArray", "(", "bb", ")", ";", "byte", "[", "]", "target", ";", "if", "(", "significantBytes", "!=...
For example if the token is 0x01 but significantBytes is 2, the result is 8 (0x0100).
[ "For", "example", "if", "the", "token", "is", "0x01", "but", "significantBytes", "is", "2", "the", "result", "is", "8", "(", "0x0100", ")", "." ]
train
https://github.com/datastax/java-driver/blob/612a63f2525618e2020e86c9ad75ab37adba6132/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/token/ByteOrderedTokenRange.java#L107-L117
haifengl/smile
data/src/main/java/smile/data/BinarySparseDataset.java
BinarySparseDataset.get
public int get(int i, int j) { if (i < 0 || i >= size()) { throw new IllegalArgumentException("Invalid index: i = " + i); } int[] x = get(i).x; if (x.length == 0) { return 0; } int low = 0; int high = x.length - 1; int mid...
java
public int get(int i, int j) { if (i < 0 || i >= size()) { throw new IllegalArgumentException("Invalid index: i = " + i); } int[] x = get(i).x; if (x.length == 0) { return 0; } int low = 0; int high = x.length - 1; int mid...
[ "public", "int", "get", "(", "int", "i", ",", "int", "j", ")", "{", "if", "(", "i", "<", "0", "||", "i", ">=", "size", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid index: i = \"", "+", "i", ")", ";", "}", "int", ...
Returns the value at entry (i, j) by binary search. @param i the row index. @param j the column index.
[ "Returns", "the", "value", "at", "entry", "(", "i", "j", ")", "by", "binary", "search", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/data/src/main/java/smile/data/BinarySparseDataset.java#L133-L160
undertow-io/undertow
core/src/main/java/io/undertow/server/protocol/http/ALPNOfferedClientHelloExplorer.java
ALPNOfferedClientHelloExplorer.exploreRecord
private static List<Integer> exploreRecord( ByteBuffer input) throws SSLException { // client version byte helloMajorVersion = input.get(); byte helloMinorVersion = input.get(); if (helloMajorVersion != 3 && helloMinorVersion != 3) { //we only care about TLS 1.2 ...
java
private static List<Integer> exploreRecord( ByteBuffer input) throws SSLException { // client version byte helloMajorVersion = input.get(); byte helloMinorVersion = input.get(); if (helloMajorVersion != 3 && helloMinorVersion != 3) { //we only care about TLS 1.2 ...
[ "private", "static", "List", "<", "Integer", ">", "exploreRecord", "(", "ByteBuffer", "input", ")", "throws", "SSLException", "{", "// client version", "byte", "helloMajorVersion", "=", "input", ".", "get", "(", ")", ";", "byte", "helloMinorVersion", "=", "input...
/* struct { uint32 gmt_unix_time; opaque random_bytes[28]; } Random; opaque SessionID<0..32>; uint8 CipherSuite[2]; enum { null(0), (255) } CompressionMethod; struct { ProtocolVersion client_version; Random random; SessionID session_id; CipherSuite cipher_suites<2..2^16-2>; CompressionMethod compression_methods<1.....
[ "/", "*", "struct", "{", "uint32", "gmt_unix_time", ";", "opaque", "random_bytes", "[", "28", "]", ";", "}", "Random", ";" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/protocol/http/ALPNOfferedClientHelloExplorer.java#L198-L233
jenkinsci/jenkins
core/src/main/java/hudson/console/ConsoleLogFilter.java
ConsoleLogFilter.decorateLogger
public OutputStream decorateLogger(@Nonnull Computer computer, OutputStream logger) throws IOException, InterruptedException { return logger; // by default no-op }
java
public OutputStream decorateLogger(@Nonnull Computer computer, OutputStream logger) throws IOException, InterruptedException { return logger; // by default no-op }
[ "public", "OutputStream", "decorateLogger", "(", "@", "Nonnull", "Computer", "computer", ",", "OutputStream", "logger", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "logger", ";", "// by default no-op", "}" ]
Called to decorate logger for master/agent communication. @param computer Agent computer for which the logger is getting decorated. Useful to do contextual decoration. @since 1.632
[ "Called", "to", "decorate", "logger", "for", "master", "/", "agent", "communication", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/console/ConsoleLogFilter.java#L104-L106
atomix/copycat
server/src/main/java/io/atomix/copycat/server/storage/compaction/MinorCompactionTask.java
MinorCompactionTask.mergeReleasedEntries
private void mergeReleasedEntries(Segment segment, Segment compactSegment) { for (long i = segment.firstIndex(); i <= segment.lastIndex(); i++) { if (!segment.isLive(i)) { compactSegment.release(i); } } }
java
private void mergeReleasedEntries(Segment segment, Segment compactSegment) { for (long i = segment.firstIndex(); i <= segment.lastIndex(); i++) { if (!segment.isLive(i)) { compactSegment.release(i); } } }
[ "private", "void", "mergeReleasedEntries", "(", "Segment", "segment", ",", "Segment", "compactSegment", ")", "{", "for", "(", "long", "i", "=", "segment", ".", "firstIndex", "(", ")", ";", "i", "<=", "segment", ".", "lastIndex", "(", ")", ";", "i", "++",...
Updates the new compact segment with entries that were released from the given segment during compaction.
[ "Updates", "the", "new", "compact", "segment", "with", "entries", "that", "were", "released", "from", "the", "given", "segment", "during", "compaction", "." ]
train
https://github.com/atomix/copycat/blob/c90b88ccd5c63d6ea0b49fb77c25e2f3272a7b10/server/src/main/java/io/atomix/copycat/server/storage/compaction/MinorCompactionTask.java#L200-L206
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.recoverDeletedSecretAsync
public Observable<SecretBundle> recoverDeletedSecretAsync(String vaultBaseUrl, String secretName) { return recoverDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName).map(new Func1<ServiceResponse<SecretBundle>, SecretBundle>() { @Override public SecretBundle call(ServiceRespo...
java
public Observable<SecretBundle> recoverDeletedSecretAsync(String vaultBaseUrl, String secretName) { return recoverDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName).map(new Func1<ServiceResponse<SecretBundle>, SecretBundle>() { @Override public SecretBundle call(ServiceRespo...
[ "public", "Observable", "<", "SecretBundle", ">", "recoverDeletedSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ")", "{", "return", "recoverDeletedSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ")", ".", "map", "(", ...
Recovers the deleted secret to the latest version. Recovers the deleted secret in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation requires the secrets/recover permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param sec...
[ "Recovers", "the", "deleted", "secret", "to", "the", "latest", "version", ".", "Recovers", "the", "deleted", "secret", "in", "the", "specified", "vault", ".", "This", "operation", "can", "only", "be", "performed", "on", "a", "soft", "-", "delete", "enabled",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L4845-L4852
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/WriterTableProcessor.java
WriterTableProcessor.flushWithSingleRetry
private CompletableFuture<TableWriterFlushResult> flushWithSingleRetry(DirectSegmentAccess segment, TimeoutTimer timer) { return Futures.exceptionallyComposeExpecting( flushOnce(segment, timer), this::canRetryFlushException, () -> { reconcileTa...
java
private CompletableFuture<TableWriterFlushResult> flushWithSingleRetry(DirectSegmentAccess segment, TimeoutTimer timer) { return Futures.exceptionallyComposeExpecting( flushOnce(segment, timer), this::canRetryFlushException, () -> { reconcileTa...
[ "private", "CompletableFuture", "<", "TableWriterFlushResult", ">", "flushWithSingleRetry", "(", "DirectSegmentAccess", "segment", ",", "TimeoutTimer", "timer", ")", "{", "return", "Futures", ".", "exceptionallyComposeExpecting", "(", "flushOnce", "(", "segment", ",", "...
Performs a flush attempt, and retries it in case it failed with {@link BadAttributeUpdateException} for the {@link TableAttributes#INDEX_OFFSET} attribute. In case of a retry, it reconciles the cached value for the {@link TableAttributes#INDEX_OFFSET} attribute and updates any internal state. @param segment A {@link ...
[ "Performs", "a", "flush", "attempt", "and", "retries", "it", "in", "case", "it", "failed", "with", "{", "@link", "BadAttributeUpdateException", "}", "for", "the", "{", "@link", "TableAttributes#INDEX_OFFSET", "}", "attribute", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/WriterTableProcessor.java#L252-L260
enioka/jqm
jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/JqmEngineFactory.java
JqmEngineFactory.initializeMetadata
public static void initializeMetadata() { // TODO: merge inside meta API. DbConn cnx = null; try { cnx = Helpers.getNewDbSession(); Helpers.updateConfiguration(cnx); cnx.commit(); } catch (Exception e) { throw ne...
java
public static void initializeMetadata() { // TODO: merge inside meta API. DbConn cnx = null; try { cnx = Helpers.getNewDbSession(); Helpers.updateConfiguration(cnx); cnx.commit(); } catch (Exception e) { throw ne...
[ "public", "static", "void", "initializeMetadata", "(", ")", "{", "// TODO: merge inside meta API.", "DbConn", "cnx", "=", "null", ";", "try", "{", "cnx", "=", "Helpers", ".", "getNewDbSession", "(", ")", ";", "Helpers", ".", "updateConfiguration", "(", "cnx", ...
If the database you use is brand new (empty tables) you may want to use this to initialize the metadata instead of using the meta API.
[ "If", "the", "database", "you", "use", "is", "brand", "new", "(", "empty", "tables", ")", "you", "may", "want", "to", "use", "this", "to", "initialize", "the", "metadata", "instead", "of", "using", "the", "meta", "API", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/JqmEngineFactory.java#L46-L64
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java
ExecutorFilter.init
private void init(Executor executor, boolean manageableExecutor, IoEventType... eventTypes) { if (executor == null) { throw new NullPointerException("executor"); } initEventTypes(eventTypes); this.executor = executor; this.manageableExecutor = manageableExecutor; ...
java
private void init(Executor executor, boolean manageableExecutor, IoEventType... eventTypes) { if (executor == null) { throw new NullPointerException("executor"); } initEventTypes(eventTypes); this.executor = executor; this.manageableExecutor = manageableExecutor; ...
[ "private", "void", "init", "(", "Executor", "executor", ",", "boolean", "manageableExecutor", ",", "IoEventType", "...", "eventTypes", ")", "{", "if", "(", "executor", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"executor\"", ")", ";...
Creates a new instance of ExecutorFilter. This private constructor is called by all the public constructor. @param executor The underlying {@link Executor} in charge of managing the Thread pool. @param manageableExecutor Tells if the Executor's Life Cycle can be managed or not @param eventTypes The lit of event which ...
[ "Creates", "a", "new", "instance", "of", "ExecutorFilter", ".", "This", "private", "constructor", "is", "called", "by", "all", "the", "public", "constructor", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/filter/executor/ExecutorFilter.java#L552-L560
facebookarchive/hive-dwrf
hive-dwrf/src/main/java/com/facebook/hive/orc/InStream.java
InStream.create
public static InStream create(String name, ByteBuffer input, CompressionCodec codec, int bufferSize, boolean useVInts) throws IOException { if (codec == null) { return new UncompressedStream(name, input, useVInts); } else { return new CompressedStream(name, input, codec, bufferSize, useVInts);...
java
public static InStream create(String name, ByteBuffer input, CompressionCodec codec, int bufferSize, boolean useVInts) throws IOException { if (codec == null) { return new UncompressedStream(name, input, useVInts); } else { return new CompressedStream(name, input, codec, bufferSize, useVInts);...
[ "public", "static", "InStream", "create", "(", "String", "name", ",", "ByteBuffer", "input", ",", "CompressionCodec", "codec", ",", "int", "bufferSize", ",", "boolean", "useVInts", ")", "throws", "IOException", "{", "if", "(", "codec", "==", "null", ")", "{"...
This should only be used if the data happens to already be in memory, e.g. for tests
[ "This", "should", "only", "be", "used", "if", "the", "data", "happens", "to", "already", "be", "in", "memory", "e", ".", "g", ".", "for", "tests" ]
train
https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf/src/main/java/com/facebook/hive/orc/InStream.java#L489-L496
rhuss/jolokia
agent/jvm/src/main/java/org/jolokia/jvmagent/JvmAgent.java
JvmAgent.awaitServerInitialization
private static void awaitServerInitialization(JvmAgentConfig pConfig, final Instrumentation instrumentation) { List<ServerDetector> detectors = MBeanServerHandler.lookupDetectors(); for (ServerDetector detector : detectors) { detector.jvmAgentStartup(instrumentation); } }
java
private static void awaitServerInitialization(JvmAgentConfig pConfig, final Instrumentation instrumentation) { List<ServerDetector> detectors = MBeanServerHandler.lookupDetectors(); for (ServerDetector detector : detectors) { detector.jvmAgentStartup(instrumentation); } }
[ "private", "static", "void", "awaitServerInitialization", "(", "JvmAgentConfig", "pConfig", ",", "final", "Instrumentation", "instrumentation", ")", "{", "List", "<", "ServerDetector", ">", "detectors", "=", "MBeanServerHandler", ".", "lookupDetectors", "(", ")", ";",...
Lookup the server detectors and notify detector about the JVM startup @param instrumentation @see ServerDetector#jvmAgentStartup(Instrumentation)
[ "Lookup", "the", "server", "detectors", "and", "notify", "detector", "about", "the", "JVM", "startup" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/JvmAgent.java#L121-L126
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java
AbstractMonteCarloProduct.getValuesForModifiedData
public Map<String, Object> getValuesForModifiedData(MonteCarloSimulationInterface model, Map<String,Object> dataModified) throws CalculationException { return getValuesForModifiedData(0.0, model, dataModified); }
java
public Map<String, Object> getValuesForModifiedData(MonteCarloSimulationInterface model, Map<String,Object> dataModified) throws CalculationException { return getValuesForModifiedData(0.0, model, dataModified); }
[ "public", "Map", "<", "String", ",", "Object", ">", "getValuesForModifiedData", "(", "MonteCarloSimulationInterface", "model", ",", "Map", "<", "String", ",", "Object", ">", "dataModified", ")", "throws", "CalculationException", "{", "return", "getValuesForModifiedDat...
This method returns the value under shifted market data (or model parameters). In its default implementation it does bump (creating a new model) and revalue. Override the way the new model is created, to implemented improved techniques (proxy scheme, re-calibration). @param model The model used to price the product, e...
[ "This", "method", "returns", "the", "value", "under", "shifted", "market", "data", "(", "or", "model", "parameters", ")", ".", "In", "its", "default", "implementation", "it", "does", "bump", "(", "creating", "a", "new", "model", ")", "and", "revalue", ".",...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java#L194-L197
btrplace/scheduler
btrpsl/src/main/java/org/btrplace/btrpsl/tree/BtrPlaceTree.java
BtrPlaceTree.append
public void append(Token t, String msg) { errors.append(t.getLine(), t.getCharPositionInLine(), msg); }
java
public void append(Token t, String msg) { errors.append(t.getLine(), t.getCharPositionInLine(), msg); }
[ "public", "void", "append", "(", "Token", "t", ",", "String", "msg", ")", "{", "errors", ".", "append", "(", "t", ".", "getLine", "(", ")", ",", "t", ".", "getCharPositionInLine", "(", ")", ",", "msg", ")", ";", "}" ]
Add an error message related to a given token @param t the token that points to the error @param msg the error message
[ "Add", "an", "error", "message", "related", "to", "a", "given", "token" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/btrpsl/src/main/java/org/btrplace/btrpsl/tree/BtrPlaceTree.java#L113-L115
james-hu/jabb-core
src/main/java/net/sf/jabb/util/text/PasswordUtility.java
PasswordUtility.unmaskInUrl
public static String unmaskInUrl(String url, String password){ String result = null; if (url != null){ Matcher urlMatcher = URL_PATTERN.matcher(url); if (urlMatcher.find()) { int s = url.indexOf(PASSWORD_IN_URL_MASK); if (s >= 0){ StringBuilder sb = new StringBuilder(); sb.append(url...
java
public static String unmaskInUrl(String url, String password){ String result = null; if (url != null){ Matcher urlMatcher = URL_PATTERN.matcher(url); if (urlMatcher.find()) { int s = url.indexOf(PASSWORD_IN_URL_MASK); if (s >= 0){ StringBuilder sb = new StringBuilder(); sb.append(url...
[ "public", "static", "String", "unmaskInUrl", "(", "String", "url", ",", "String", "password", ")", "{", "String", "result", "=", "null", ";", "if", "(", "url", "!=", "null", ")", "{", "Matcher", "urlMatcher", "=", "URL_PATTERN", ".", "matcher", "(", "url...
Unmask password in URL. @param url The URL in which the password part had been masked. @param password The clear password @return The URL with clear password.
[ "Unmask", "password", "in", "URL", "." ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/text/PasswordUtility.java#L67-L86
stevespringett/Alpine
alpine/src/main/java/alpine/persistence/AlpineQueryManager.java
AlpineQueryManager.createManagedUser
public ManagedUser createManagedUser(final String username, final String fullname, final String email, final String passwordHash, final boolean forcePasswordChange, final boolean nonExpiryPassword, final boolean suspended) { pm.cu...
java
public ManagedUser createManagedUser(final String username, final String fullname, final String email, final String passwordHash, final boolean forcePasswordChange, final boolean nonExpiryPassword, final boolean suspended) { pm.cu...
[ "public", "ManagedUser", "createManagedUser", "(", "final", "String", "username", ",", "final", "String", "fullname", ",", "final", "String", "email", ",", "final", "String", "passwordHash", ",", "final", "boolean", "forcePasswordChange", ",", "final", "boolean", ...
Creates a new ManagedUser object. @param username The username for the user @param fullname The fullname of the user @param email The users email address @param passwordHash The hashed password @param forcePasswordChange Whether or not user needs to change password on next login or not @param nonExpiryPassword Whether ...
[ "Creates", "a", "new", "ManagedUser", "object", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/persistence/AlpineQueryManager.java#L250-L266
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/internal/util/Closeables.java
Closeables.closeAndConvert
public static void closeAndConvert(@Nullable final Closeable closeable, final boolean swallowIOException) { if (closeable != null) { try { closeable.close(); } catch (final IOException e) { if (!swallowIOException) { throw new CannotCloseException(e.getLocalizedMessage(), e); } LOG.warn(e.g...
java
public static void closeAndConvert(@Nullable final Closeable closeable, final boolean swallowIOException) { if (closeable != null) { try { closeable.close(); } catch (final IOException e) { if (!swallowIOException) { throw new CannotCloseException(e.getLocalizedMessage(), e); } LOG.warn(e.g...
[ "public", "static", "void", "closeAndConvert", "(", "@", "Nullable", "final", "Closeable", "closeable", ",", "final", "boolean", "swallowIOException", ")", "{", "if", "(", "closeable", "!=", "null", ")", "{", "try", "{", "closeable", ".", "close", "(", ")", ...
Closes a {@link Closeable} and swallows an occurring {@link IOException} if argument {@code swallowIOException} is {@code true}, otherwise the {@code IOException} will be converted into a runtime exception. <p> This method does nothing if a null reference is passed as {@code closeable}. @param closeable the {@code Clo...
[ "Closes", "a", "{", "@link", "Closeable", "}", "and", "swallows", "an", "occurring", "{", "@link", "IOException", "}", "if", "argument", "{", "@code", "swallowIOException", "}", "is", "{", "@code", "true", "}", "otherwise", "the", "{", "@code", "IOException"...
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/internal/util/Closeables.java#L80-L91
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/application/AbstractApplication.java
AbstractApplication.launchNow
protected static void launchNow(final Class<? extends Application> appClass, final String... args) { Application.launch(appClass, args); }
java
protected static void launchNow(final Class<? extends Application> appClass, final String... args) { Application.launch(appClass, args); }
[ "protected", "static", "void", "launchNow", "(", "final", "Class", "<", "?", "extends", "Application", ">", "appClass", ",", "final", "String", "...", "args", ")", "{", "Application", ".", "launch", "(", "appClass", ",", "args", ")", ";", "}" ]
Launch the Given JavaFX Application (without any preloader). @param appClass the JavaFX application class to launch @param args arguments passed to java command line
[ "Launch", "the", "Given", "JavaFX", "Application", "(", "without", "any", "preloader", ")", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/application/AbstractApplication.java#L143-L145
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.getSubscriptionWorkerForRevisions
public <T> SubscriptionWorker<Revision<T>> getSubscriptionWorkerForRevisions(Class<T> clazz, String subscriptionName, String database) { return getSubscriptionWorkerForRevisions(clazz, new SubscriptionWorkerOptions(subscriptionName), database); }
java
public <T> SubscriptionWorker<Revision<T>> getSubscriptionWorkerForRevisions(Class<T> clazz, String subscriptionName, String database) { return getSubscriptionWorkerForRevisions(clazz, new SubscriptionWorkerOptions(subscriptionName), database); }
[ "public", "<", "T", ">", "SubscriptionWorker", "<", "Revision", "<", "T", ">", ">", "getSubscriptionWorkerForRevisions", "(", "Class", "<", "T", ">", "clazz", ",", "String", "subscriptionName", ",", "String", "database", ")", "{", "return", "getSubscriptionWorke...
It opens a subscription and starts pulling documents since a last processed document for that subscription. The connection options determine client and server cooperation rules like document batch sizes or a timeout in a matter of which a client needs to acknowledge that batch has been processed. The acknowledgment is ...
[ "It", "opens", "a", "subscription", "and", "starts", "pulling", "documents", "since", "a", "last", "processed", "document", "for", "that", "subscription", ".", "The", "connection", "options", "determine", "client", "and", "server", "cooperation", "rules", "like", ...
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L333-L335
jglobus/JGlobus
axis/src/main/java/org/globus/axis/transport/HTTPUtils.java
HTTPUtils.setHTTPVersion
public static void setHTTPVersion(Stub stub, boolean http10) { stub._setProperty(MessageContext.HTTP_TRANSPORT_VERSION, (http10) ? HTTPConstants.HEADER_PROTOCOL_V10 : HTTPConstants.HEADER_PROTOCOL_V11); }
java
public static void setHTTPVersion(Stub stub, boolean http10) { stub._setProperty(MessageContext.HTTP_TRANSPORT_VERSION, (http10) ? HTTPConstants.HEADER_PROTOCOL_V10 : HTTPConstants.HEADER_PROTOCOL_V11); }
[ "public", "static", "void", "setHTTPVersion", "(", "Stub", "stub", ",", "boolean", "http10", ")", "{", "stub", ".", "_setProperty", "(", "MessageContext", ".", "HTTP_TRANSPORT_VERSION", ",", "(", "http10", ")", "?", "HTTPConstants", ".", "HEADER_PROTOCOL_V10", "...
Sets on option on the stub to control what HTTP protocol version should be used. @param stub The stub to set the property on @param http10 If true, HTTP 1.0 will be used. Otherwise HTTP 1.1 will be used.
[ "Sets", "on", "option", "on", "the", "stub", "to", "control", "what", "HTTP", "protocol", "version", "should", "be", "used", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/axis/src/main/java/org/globus/axis/transport/HTTPUtils.java#L81-L86
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.getRootEntry
private CmsClientSitemapEntry getRootEntry(String rootPath, String targetPath) throws CmsSecurityException, CmsException { String sitePath = "/"; if ((rootPath != null)) { sitePath = getCmsObject().getRequestContext().removeSiteRoot(rootPath); } CmsJspNavElement navEleme...
java
private CmsClientSitemapEntry getRootEntry(String rootPath, String targetPath) throws CmsSecurityException, CmsException { String sitePath = "/"; if ((rootPath != null)) { sitePath = getCmsObject().getRequestContext().removeSiteRoot(rootPath); } CmsJspNavElement navEleme...
[ "private", "CmsClientSitemapEntry", "getRootEntry", "(", "String", "rootPath", ",", "String", "targetPath", ")", "throws", "CmsSecurityException", ",", "CmsException", "{", "String", "sitePath", "=", "\"/\"", ";", "if", "(", "(", "rootPath", "!=", "null", ")", "...
Reeds the site root entry.<p> @param rootPath the root path of the sitemap root @param targetPath the target path to open @return the site root entry @throws CmsSecurityException in case of insufficient permissions @throws CmsException if something goes wrong
[ "Reeds", "the", "site", "root", "entry", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L2592-L2609
voldemort/voldemort
contrib/restclient/src/java/voldemort/restclient/admin/CoordinatorAdminCommand.java
CoordinatorAdminCommand.executeHelp
public static void executeHelp(String[] args, PrintStream stream) throws Exception { String subCmd = (args.length > 0) ? args[0] : ""; args = CoordinatorAdminUtils.copyArrayCutFirst(args); if(subCmd.equals("get")) { SubCommandGet.printHelp(stream); } else if(subCmd.equals("pu...
java
public static void executeHelp(String[] args, PrintStream stream) throws Exception { String subCmd = (args.length > 0) ? args[0] : ""; args = CoordinatorAdminUtils.copyArrayCutFirst(args); if(subCmd.equals("get")) { SubCommandGet.printHelp(stream); } else if(subCmd.equals("pu...
[ "public", "static", "void", "executeHelp", "(", "String", "[", "]", "args", ",", "PrintStream", "stream", ")", "throws", "Exception", "{", "String", "subCmd", "=", "(", "args", ".", "length", ">", "0", ")", "?", "args", "[", "0", "]", ":", "\"\"", ";...
Parses command-line input and prints help menu. @throws Exception
[ "Parses", "command", "-", "line", "input", "and", "prints", "help", "menu", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/contrib/restclient/src/java/voldemort/restclient/admin/CoordinatorAdminCommand.java#L71-L84
jenetics/jenetics
jenetics.ext/src/main/java/io/jenetics/ext/util/TreeNode.java
TreeNode.ofTree
public static <T> TreeNode<T> ofTree(final Tree<? extends T, ?> tree) { return ofTree(tree, Function.identity()); }
java
public static <T> TreeNode<T> ofTree(final Tree<? extends T, ?> tree) { return ofTree(tree, Function.identity()); }
[ "public", "static", "<", "T", ">", "TreeNode", "<", "T", ">", "ofTree", "(", "final", "Tree", "<", "?", "extends", "T", ",", "?", ">", "tree", ")", "{", "return", "ofTree", "(", "tree", ",", "Function", ".", "identity", "(", ")", ")", ";", "}" ]
Return a new {@code TreeNode} from the given source {@code tree}. The whole tree is copied. @param tree the source tree the new tree-node is created from @param <T> the current tree value type @return a new {@code TreeNode} from the given source {@code tree} @throws NullPointerException if the source {@code tree} is {...
[ "Return", "a", "new", "{", "@code", "TreeNode", "}", "from", "the", "given", "source", "{", "@code", "tree", "}", ".", "The", "whole", "tree", "is", "copied", "." ]
train
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics.ext/src/main/java/io/jenetics/ext/util/TreeNode.java#L512-L514
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.asDate
public static <T extends Comparable<?>> DateExpression<T> asDate(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new DatePath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceo...
java
public static <T extends Comparable<?>> DateExpression<T> asDate(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new DatePath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin instanceo...
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", ">", ">", "DateExpression", "<", "T", ">", "asDate", "(", "Expression", "<", "T", ">", "expr", ")", "{", "Expression", "<", "T", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extrac...
Create a new DateExpression @param expr the date Expression @return new DateExpression
[ "Create", "a", "new", "DateExpression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L1938-L1959
phax/ph-commons
ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java
AbstractMapBasedWALDAO.internalDeleteItem
@MustBeLocked (ELockType.WRITE) @Nullable protected final IMPLTYPE internalDeleteItem (@Nullable final String sID, final boolean bInvokeCallbacks) { if (StringHelper.hasNoText (sID)) return null; final IMPLTYPE aDeletedItem = m_aMap.remove (sID); if (aDeletedItem == null) return null; ...
java
@MustBeLocked (ELockType.WRITE) @Nullable protected final IMPLTYPE internalDeleteItem (@Nullable final String sID, final boolean bInvokeCallbacks) { if (StringHelper.hasNoText (sID)) return null; final IMPLTYPE aDeletedItem = m_aMap.remove (sID); if (aDeletedItem == null) return null; ...
[ "@", "MustBeLocked", "(", "ELockType", ".", "WRITE", ")", "@", "Nullable", "protected", "final", "IMPLTYPE", "internalDeleteItem", "(", "@", "Nullable", "final", "String", "sID", ",", "final", "boolean", "bInvokeCallbacks", ")", "{", "if", "(", "StringHelper", ...
Delete the item by removing it from the map. If something was remove the onDeleteItem callback is invoked. Must only be invoked inside a write-lock. @param sID The ID to be removed. May be <code>null</code>. @param bInvokeCallbacks <code>true</code> to invoke callbacks, <code>false</code> to not do so. @return The del...
[ "Delete", "the", "item", "by", "removing", "it", "from", "the", "map", ".", "If", "something", "was", "remove", "the", "onDeleteItem", "callback", "is", "invoked", ".", "Must", "only", "be", "invoked", "inside", "a", "write", "-", "lock", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-dao/src/main/java/com/helger/dao/wal/AbstractMapBasedWALDAO.java#L406-L426
apereo/cas
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java
LdapUtils.executeModifyOperation
public static boolean executeModifyOperation(final String currentDn, final ConnectionFactory connectionFactory, final LdapEntry entry) { final Map<String, Set<String>> attributes = entry.getAttributes().stream() .collect(Collectors.toMap(LdapAttribute::getName, ldapAttribute -> new HashSet<>(ldapAtt...
java
public static boolean executeModifyOperation(final String currentDn, final ConnectionFactory connectionFactory, final LdapEntry entry) { final Map<String, Set<String>> attributes = entry.getAttributes().stream() .collect(Collectors.toMap(LdapAttribute::getName, ldapAttribute -> new HashSet<>(ldapAtt...
[ "public", "static", "boolean", "executeModifyOperation", "(", "final", "String", "currentDn", ",", "final", "ConnectionFactory", "connectionFactory", ",", "final", "LdapEntry", "entry", ")", "{", "final", "Map", "<", "String", ",", "Set", "<", "String", ">", ">"...
Execute modify operation boolean. @param currentDn the current dn @param connectionFactory the connection factory @param entry the entry @return true/false
[ "Execute", "modify", "operation", "boolean", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L385-L390
meltmedia/cadmium
core/src/main/java/com/meltmedia/cadmium/core/config/ConfigManager.java
ConfigManager.getPropertiesByContext
public Properties getPropertiesByContext(ServletContext context, String path) { return reader.getProperties(context, path, log); }
java
public Properties getPropertiesByContext(ServletContext context, String path) { return reader.getProperties(context, path, log); }
[ "public", "Properties", "getPropertiesByContext", "(", "ServletContext", "context", ",", "String", "path", ")", "{", "return", "reader", ".", "getProperties", "(", "context", ",", "path", ",", "log", ")", ";", "}" ]
Read in properties based on a ServletContext and a path to a config file
[ "Read", "in", "properties", "based", "on", "a", "ServletContext", "and", "a", "path", "to", "a", "config", "file" ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/core/src/main/java/com/meltmedia/cadmium/core/config/ConfigManager.java#L136-L139
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.makeCall
public void makeCall( String destination, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicemakecallData data = new VoicemakecallData(); data.desti...
java
public void makeCall( String destination, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { VoicemakecallData data = new VoicemakecallData(); data.desti...
[ "public", "void", "makeCall", "(", "String", "destination", ",", "KeyValueCollection", "userData", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiException", "{", "try", "{", "VoicemakecallData", "data", "=", ...
Make a new call to the specified destination. @param destination The number to call. @param userData A key/value pairs list of the user data that should be attached to the call. @param reasons Information on causes for, and results of, actions taken by the user of the current DN. For details about reasons, refer to the...
[ "Make", "a", "new", "call", "to", "the", "specified", "destination", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L497-L517
RobAustin/low-latency-primitive-concurrent-queues
src/main/java/uk/co/boundedbuffer/ConcurrentBlockingIntQueue.java
ConcurrentBlockingIntQueue.peek
public int peek(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { // non volatile read ( which is quicker ) final int readLocation = this.consumerReadLocation; blockForReadSpace(timeout, unit, readLocation); // purposely not volatile as the read...
java
public int peek(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException { // non volatile read ( which is quicker ) final int readLocation = this.consumerReadLocation; blockForReadSpace(timeout, unit, readLocation); // purposely not volatile as the read...
[ "public", "int", "peek", "(", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", ",", "TimeoutException", "{", "// non volatile read ( which is quicker )", "final", "int", "readLocation", "=", "this", ".", "consumerReadLocation", ";", ...
Retrieves, but does not remove, the head of this queue. @param timeout how long to wait before giving up, in units of <tt>unit</tt> @param unit a <tt>TimeUnit</tt> determining how to interpret the <tt>timeout</tt> parameter @return the head of this queue @throws java.util.concurrent.TimeoutException if timeout time...
[ "Retrieves", "but", "does", "not", "remove", "the", "head", "of", "this", "queue", "." ]
train
https://github.com/RobAustin/low-latency-primitive-concurrent-queues/blob/ffcf95a8135750c0b23cd486346a1f68a4724b1c/src/main/java/uk/co/boundedbuffer/ConcurrentBlockingIntQueue.java#L161-L172
craftercms/profile
security-provider/src/main/java/org/craftercms/security/authorization/impl/AccessDeniedHandlerImpl.java
AccessDeniedHandlerImpl.handle
@Override public void handle(RequestContext context, AccessDeniedException e) throws SecurityProviderException, IOException { saveException(context, e); if (StringUtils.isNotEmpty(getErrorPageUrl())) { forwardToErrorPage(context); } else { sendError(e, context); ...
java
@Override public void handle(RequestContext context, AccessDeniedException e) throws SecurityProviderException, IOException { saveException(context, e); if (StringUtils.isNotEmpty(getErrorPageUrl())) { forwardToErrorPage(context); } else { sendError(e, context); ...
[ "@", "Override", "public", "void", "handle", "(", "RequestContext", "context", ",", "AccessDeniedException", "e", ")", "throws", "SecurityProviderException", ",", "IOException", "{", "saveException", "(", "context", ",", "e", ")", ";", "if", "(", "StringUtils", ...
Forwards to the error page, but if not error page was specified, a 403 error is sent. @param context the request context @param e the exception with the reason of the access deny
[ "Forwards", "to", "the", "error", "page", "but", "if", "not", "error", "page", "was", "specified", "a", "403", "error", "is", "sent", "." ]
train
https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/authorization/impl/AccessDeniedHandlerImpl.java#L67-L76
js-lib-com/commons
src/main/java/js/util/Params.java
Params.notEmpty
public static void notEmpty(String parameter, String name) throws IllegalArgumentException { if (parameter != null && parameter.isEmpty()) { throw new IllegalArgumentException(name + " is empty."); } }
java
public static void notEmpty(String parameter, String name) throws IllegalArgumentException { if (parameter != null && parameter.isEmpty()) { throw new IllegalArgumentException(name + " is empty."); } }
[ "public", "static", "void", "notEmpty", "(", "String", "parameter", ",", "String", "name", ")", "throws", "IllegalArgumentException", "{", "if", "(", "parameter", "!=", "null", "&&", "parameter", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalAr...
Test if string parameter is strict not empty. If parameter to test is null this test method does not rise exception. @param parameter invocation string parameter, @param name the name of invocation parameter. @throws IllegalArgumentException if <code>parameter</code> is empty.
[ "Test", "if", "string", "parameter", "is", "strict", "not", "empty", ".", "If", "parameter", "to", "test", "is", "null", "this", "test", "method", "does", "not", "rise", "exception", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Params.java#L81-L85
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java
BaseBuffer.bufferToFields
public int bufferToFields(FieldList record, int iFieldsTypes, boolean bDisplayOption, int iMoveMode) { m_iFieldsTypes = iFieldsTypes; return this.bufferToFields(record, bDisplayOption, iMoveMode); }
java
public int bufferToFields(FieldList record, int iFieldsTypes, boolean bDisplayOption, int iMoveMode) { m_iFieldsTypes = iFieldsTypes; return this.bufferToFields(record, bDisplayOption, iMoveMode); }
[ "public", "int", "bufferToFields", "(", "FieldList", "record", ",", "int", "iFieldsTypes", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "m_iFieldsTypes", "=", "iFieldsTypes", ";", "return", "this", ".", "bufferToFields", "(", "record", ",...
Move the output buffer to all the fields. This is the same as the bufferToFields method, specifying the fieldTypes to move. @param record The target record. @param iFieldTypes The field types to move. @param bDisplayOption The display option for the movetofield call. @param iMoveMove The move mode for the movetofield c...
[ "Move", "the", "output", "buffer", "to", "all", "the", "fields", ".", "This", "is", "the", "same", "as", "the", "bufferToFields", "method", "specifying", "the", "fieldTypes", "to", "move", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/buff/BaseBuffer.java#L198-L202
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusLine.java
BusLine.getBusItinerary
public BusItinerary getBusItinerary(String name, Comparator<String> nameComparator) { if (name == null) { return null; } final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator; for (final BusItinerary itinerary : this.itineraries) { if (cmp.compare(nam...
java
public BusItinerary getBusItinerary(String name, Comparator<String> nameComparator) { if (name == null) { return null; } final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator; for (final BusItinerary itinerary : this.itineraries) { if (cmp.compare(nam...
[ "public", "BusItinerary", "getBusItinerary", "(", "String", "name", ",", "Comparator", "<", "String", ">", "nameComparator", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "final", "Comparator", "<", "String", ">", "cmp", ...
Replies the bus itinerary with the specified name. @param name is the desired name @param nameComparator is used to compare the names. @return a bus itinerary or <code>null</code>
[ "Replies", "the", "bus", "itinerary", "with", "the", "specified", "name", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusLine.java#L606-L617
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FDBigInteger.java
FDBigInteger.add
private FDBigInteger add(FDBigInteger other) { FDBigInteger big, small; int bigLen, smallLen; int tSize = this.size(); int oSize = other.size(); if (tSize >= oSize) { big = this; bigLen = tSize; small = other; smallLen = oSize; ...
java
private FDBigInteger add(FDBigInteger other) { FDBigInteger big, small; int bigLen, smallLen; int tSize = this.size(); int oSize = other.size(); if (tSize >= oSize) { big = this; bigLen = tSize; small = other; smallLen = oSize; ...
[ "private", "FDBigInteger", "add", "(", "FDBigInteger", "other", ")", "{", "FDBigInteger", "big", ",", "small", ";", "int", "bigLen", ",", "smallLen", ";", "int", "tSize", "=", "this", ".", "size", "(", ")", ";", "int", "oSize", "=", "other", ".", "size...
/*@ @ assignable \nothing; @ ensures \result.value() == \old(this.value() + other.value()); @
[ "/", "*" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FDBigInteger.java#L1181-L1213
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/MithraManager.java
MithraManager.executeTransactionalCommand
public <R> R executeTransactionalCommand(final TransactionalCommand<R> command, final TransactionStyle style) throws MithraBusinessException { String commandName = command.getClass().getName(); MithraTransaction tx = this.getCurrentTransaction(); if (tx != null) { ...
java
public <R> R executeTransactionalCommand(final TransactionalCommand<R> command, final TransactionStyle style) throws MithraBusinessException { String commandName = command.getClass().getName(); MithraTransaction tx = this.getCurrentTransaction(); if (tx != null) { ...
[ "public", "<", "R", ">", "R", "executeTransactionalCommand", "(", "final", "TransactionalCommand", "<", "R", ">", "command", ",", "final", "TransactionStyle", "style", ")", "throws", "MithraBusinessException", "{", "String", "commandName", "=", "command", ".", "ge...
executes the given transactional command with the custom transaction style. @param command @param style @throws MithraBusinessException
[ "executes", "the", "given", "transactional", "command", "with", "the", "custom", "transaction", "style", "." ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/MithraManager.java#L524-L566
CloudSlang/cs-actions
cs-date-time/src/main/java/io/cloudslang/content/datetime/services/DateTimeService.java
DateTimeService.getCurrentDateTime
public static String getCurrentDateTime(final String localeLang, final String localeCountry, final String timezone, final String dateFormat) throws Exception { final DateTimeFormatter formatter = getDateTimeFormatter(localeLang, localeCountry, timezone, dateFormat); final DateTime datetime = DateTime.no...
java
public static String getCurrentDateTime(final String localeLang, final String localeCountry, final String timezone, final String dateFormat) throws Exception { final DateTimeFormatter formatter = getDateTimeFormatter(localeLang, localeCountry, timezone, dateFormat); final DateTime datetime = DateTime.no...
[ "public", "static", "String", "getCurrentDateTime", "(", "final", "String", "localeLang", ",", "final", "String", "localeCountry", ",", "final", "String", "timezone", ",", "final", "String", "dateFormat", ")", "throws", "Exception", "{", "final", "DateTimeFormatter"...
Check the current date and time, and returns a java DateAndTime formatted string of it. If locale is specified, it will return the date and time string based on the locale. Otherwise, default locale will be used. @param localeLang The locale language for date and time string. If localeLang is 'unix' the localeCount...
[ "Check", "the", "current", "date", "and", "time", "and", "returns", "a", "java", "DateAndTime", "formatted", "string", "of", "it", ".", "If", "locale", "is", "specified", "it", "will", "return", "the", "date", "and", "time", "string", "based", "on", "the",...
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-date-time/src/main/java/io/cloudslang/content/datetime/services/DateTimeService.java#L55-L63
webmetrics/browsermob-proxy
src/main/java/cz/mallat/uasparser/OnlineUpdateUASparser.java
OnlineUpdateUASparser.getVersionFromServer
protected String getVersionFromServer() throws IOException { URL url = new URL(VERSION_CHECK_URL); InputStream is = url.openStream(); try { byte[] buff = new byte[4048]; int len = is.read(buff); return new String(buff, 0, len); } finally { is.close(); } }
java
protected String getVersionFromServer() throws IOException { URL url = new URL(VERSION_CHECK_URL); InputStream is = url.openStream(); try { byte[] buff = new byte[4048]; int len = is.read(buff); return new String(buff, 0, len); } finally { is.close(); } }
[ "protected", "String", "getVersionFromServer", "(", ")", "throws", "IOException", "{", "URL", "url", "=", "new", "URL", "(", "VERSION_CHECK_URL", ")", ";", "InputStream", "is", "=", "url", ".", "openStream", "(", ")", ";", "try", "{", "byte", "[", "]", "...
Gets the current version from user-agent-string.info @return @throws IOException
[ "Gets", "the", "current", "version", "from", "user", "-", "agent", "-", "string", ".", "info" ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/cz/mallat/uasparser/OnlineUpdateUASparser.java#L64-L74
JM-Lab/utils-java9
src/main/java/kr/jm/utils/helper/JMJson.java
JMJson.withJsonFile
public static <T> T withJsonFile(File jsonFile, Class<T> c) { try { return jsonMapper.readValue(jsonFile, c); } catch (Exception e) { return JMExceptionManager.handleExceptionAndReturnNull(log, e, "withJsonFile", jsonFile); } }
java
public static <T> T withJsonFile(File jsonFile, Class<T> c) { try { return jsonMapper.readValue(jsonFile, c); } catch (Exception e) { return JMExceptionManager.handleExceptionAndReturnNull(log, e, "withJsonFile", jsonFile); } }
[ "public", "static", "<", "T", ">", "T", "withJsonFile", "(", "File", "jsonFile", ",", "Class", "<", "T", ">", "c", ")", "{", "try", "{", "return", "jsonMapper", ".", "readValue", "(", "jsonFile", ",", "c", ")", ";", "}", "catch", "(", "Exception", ...
With json file t. @param <T> the type parameter @param jsonFile the json file @param c the c @return the t
[ "With", "json", "file", "t", "." ]
train
https://github.com/JM-Lab/utils-java9/blob/ee80235b2760396a616cf7563cbdc98d4affe8e1/src/main/java/kr/jm/utils/helper/JMJson.java#L233-L240
blinkfox/zealot
src/main/java/com/blinkfox/zealot/config/ZealotConfigManager.java
ZealotConfigManager.initLoad
public void initLoad(String configClass, String xmlLocations, String handlerLocations) { // 设置配置的文件路径的值,并开始加载ZealotConfig配置信息 this.xmlLocations = xmlLocations; this.handlerLocations = handlerLocations; this.initLoad(configClass); }
java
public void initLoad(String configClass, String xmlLocations, String handlerLocations) { // 设置配置的文件路径的值,并开始加载ZealotConfig配置信息 this.xmlLocations = xmlLocations; this.handlerLocations = handlerLocations; this.initLoad(configClass); }
[ "public", "void", "initLoad", "(", "String", "configClass", ",", "String", "xmlLocations", ",", "String", "handlerLocations", ")", "{", "// 设置配置的文件路径的值,并开始加载ZealotConfig配置信息", "this", ".", "xmlLocations", "=", "xmlLocations", ";", "this", ".", "handlerLocations", "=",...
初始化加载Zealot的配置信息到缓存中. @param configClass 系统中Zealot的class路径 @param xmlLocations zealot的XML文件所在的位置,多个用逗号隔开 @param handlerLocations zealot的自定义handler处理器所在的位置,多个用逗号隔开
[ "初始化加载Zealot的配置信息到缓存中", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/config/ZealotConfigManager.java#L78-L83
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGraphNodeGetDependencies
public static int cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode dependencies[], long numDependencies[]) { return checkResult(cuGraphNodeGetDependenciesNative(hNode, dependencies, numDependencies)); }
java
public static int cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode dependencies[], long numDependencies[]) { return checkResult(cuGraphNodeGetDependenciesNative(hNode, dependencies, numDependencies)); }
[ "public", "static", "int", "cuGraphNodeGetDependencies", "(", "CUgraphNode", "hNode", ",", "CUgraphNode", "dependencies", "[", "]", ",", "long", "numDependencies", "[", "]", ")", "{", "return", "checkResult", "(", "cuGraphNodeGetDependenciesNative", "(", "hNode", ",...
Returns a node's dependencies.<br> <br> Returns a list of \p node's dependencies. \p dependencies may be NULL, in which case this function will return the number of dependencies in \p numDependencies. Otherwise, \p numDependencies entries will be filled in. If \p numDependencies is higher than the actual number of depe...
[ "Returns", "a", "node", "s", "dependencies", ".", "<br", ">", "<br", ">", "Returns", "a", "list", "of", "\\", "p", "node", "s", "dependencies", ".", "\\", "p", "dependencies", "may", "be", "NULL", "in", "which", "case", "this", "function", "will", "ret...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L12781-L12784
mgormley/pacaya
src/main/java/edu/jhu/pacaya/sch/tasks/SumPaths.java
SumPaths.approxSumPaths
public static double approxSumPaths(WeightedIntDiGraph g, RealVector startWeights, RealVector endWeights, Iterator<DiEdge> seq, DoubleConsumer c) { // we keep track of the total weight of discovered paths ending along // each edge and the total weight // of all paths ending at each n...
java
public static double approxSumPaths(WeightedIntDiGraph g, RealVector startWeights, RealVector endWeights, Iterator<DiEdge> seq, DoubleConsumer c) { // we keep track of the total weight of discovered paths ending along // each edge and the total weight // of all paths ending at each n...
[ "public", "static", "double", "approxSumPaths", "(", "WeightedIntDiGraph", "g", ",", "RealVector", "startWeights", ",", "RealVector", "endWeights", ",", "Iterator", "<", "DiEdge", ">", "seq", ",", "DoubleConsumer", "c", ")", "{", "// we keep track of the total weight ...
Computes the approximate sum of paths through the graph where the weight of each path is the product of edge weights along the path; If consumer c is not null, it will be given the intermediate estimates as they are available
[ "Computes", "the", "approximate", "sum", "of", "paths", "through", "the", "graph", "where", "the", "weight", "of", "each", "path", "is", "the", "product", "of", "edge", "weights", "along", "the", "path", ";" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/sch/tasks/SumPaths.java#L170-L213
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java
TopologyBuilder.setBolt
public BoltDeclarer setBolt(String id, IRichBolt bolt, Number parallelism_hint) throws IllegalArgumentException { validateUnusedId(id); initCommon(id, bolt, parallelism_hint); _bolts.put(id, bolt); return new BoltGetter(id); }
java
public BoltDeclarer setBolt(String id, IRichBolt bolt, Number parallelism_hint) throws IllegalArgumentException { validateUnusedId(id); initCommon(id, bolt, parallelism_hint); _bolts.put(id, bolt); return new BoltGetter(id); }
[ "public", "BoltDeclarer", "setBolt", "(", "String", "id", ",", "IRichBolt", "bolt", ",", "Number", "parallelism_hint", ")", "throws", "IllegalArgumentException", "{", "validateUnusedId", "(", "id", ")", ";", "initCommon", "(", "id", ",", "bolt", ",", "parallelis...
Define a new bolt in this topology with the specified amount of parallelism. @param id the id of this component. This id is referenced by other components that want to consume this bolt's outputs. @param bolt the bolt @param parallelism_hint the number of tasks that should be assigned to execute this bolt. Each task w...
[ "Define", "a", "new", "bolt", "in", "this", "topology", "with", "the", "specified", "amount", "of", "parallelism", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java#L186-L191
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountBatchConfigurationsInner.java
IntegrationAccountBatchConfigurationsInner.createOrUpdate
public BatchConfigurationInner createOrUpdate(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration)...
java
public BatchConfigurationInner createOrUpdate(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration)...
[ "public", "BatchConfigurationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "batchConfigurationName", ",", "BatchConfigurationInner", "batchConfiguration", ")", "{", "return", "createOrUpdateWithServiceRespons...
Create or update a batch configuration for an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param batchConfigurationName The batch configuration name. @param batchConfiguration The batch configuration. @throws IllegalArgumentExceptio...
[ "Create", "or", "update", "a", "batch", "configuration", "for", "an", "integration", "account", "." ]
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/IntegrationAccountBatchConfigurationsInner.java#L273-L275
netceteragroup/trema-core
src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java
ChangesAnalyzer.createChange
protected Change createChange(String key) { String language = importSource.getLanguage(); String importedValue = importSource.getValue(key); Status importedStatus = importSource.getStatus(key); // basic change Change change = new Change(Change.TYPE_NO_CHANGE, language, key, importedValue, importedS...
java
protected Change createChange(String key) { String language = importSource.getLanguage(); String importedValue = importSource.getValue(key); Status importedStatus = importSource.getStatus(key); // basic change Change change = new Change(Change.TYPE_NO_CHANGE, language, key, importedValue, importedS...
[ "protected", "Change", "createChange", "(", "String", "key", ")", "{", "String", "language", "=", "importSource", ".", "getLanguage", "(", ")", ";", "String", "importedValue", "=", "importSource", ".", "getValue", "(", "key", ")", ";", "Status", "importedStatu...
Creates a <code>Change</code> object for a given key. Note that only the conflict attributes of the change (i.e. conflicting/non-conflicting, acceptable/not acceptable, to be accepted/not to be accepted and the values to be accepted) are <b>not</b> set. Use {@link ChangesAnalyzer#setConflictAttributes(Change)} for that...
[ "Creates", "a", "<code", ">", "Change<", "/", "code", ">", "object", "for", "a", "given", "key", ".", "Note", "that", "only", "the", "conflict", "attributes", "of", "the", "change", "(", "i", ".", "e", ".", "conflicting", "/", "non", "-", "conflicting"...
train
https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java#L94-L132
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java
ManagedDatabasesInner.beginUpdate
public ManagedDatabaseInner beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).toBlocking().single().body(); }
java
public ManagedDatabaseInner beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).toBlocking().single().body(); }
[ "public", "ManagedDatabaseInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "ManagedDatabaseUpdate", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroup...
Updates an existing database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param databaseName The name of the database. @param parameters The...
[ "Updates", "an", "existing", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L955-L957
xwiki/xwiki-rendering
xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultLinkCheckerThread.java
DefaultLinkCheckerThread.sendEvent
private void sendEvent(String url, Map<String, Object> data) { // Dynamically look for an Observation Manager and only send the event if one can be found. try { ObservationManager observationManager = this.observationManagerProvider.get(); observationManager.notify(new Invali...
java
private void sendEvent(String url, Map<String, Object> data) { // Dynamically look for an Observation Manager and only send the event if one can be found. try { ObservationManager observationManager = this.observationManagerProvider.get(); observationManager.notify(new Invali...
[ "private", "void", "sendEvent", "(", "String", "url", ",", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "// Dynamically look for an Observation Manager and only send the event if one can be found.", "try", "{", "ObservationManager", "observationManager", "=",...
Send an {@link InvalidURLEvent} event. @param url the failing URL @param data the Map containing data (link url, link source reference, state object)
[ "Send", "an", "{", "@link", "InvalidURLEvent", "}", "event", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultLinkCheckerThread.java#L227-L238
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterHeartbeatManager.java
ClusterHeartbeatManager.pingMemberIfRequired
private void pingMemberIfRequired(long now, Member member) { if (!icmpEnabled || icmpParallelMode) { return; } long lastHeartbeat = heartbeatFailureDetector.lastHeartbeat(member); if ((now - lastHeartbeat) >= legacyIcmpCheckThresholdMillis) { runPingTask(member);...
java
private void pingMemberIfRequired(long now, Member member) { if (!icmpEnabled || icmpParallelMode) { return; } long lastHeartbeat = heartbeatFailureDetector.lastHeartbeat(member); if ((now - lastHeartbeat) >= legacyIcmpCheckThresholdMillis) { runPingTask(member);...
[ "private", "void", "pingMemberIfRequired", "(", "long", "now", ",", "Member", "member", ")", "{", "if", "(", "!", "icmpEnabled", "||", "icmpParallelMode", ")", "{", "return", ";", "}", "long", "lastHeartbeat", "=", "heartbeatFailureDetector", ".", "lastHeartbeat...
Pings the {@code member} if {@link GroupProperty#ICMP_ENABLED} is true and more than {@link #HEART_BEAT_INTERVAL_FACTOR} heartbeats have passed.
[ "Pings", "the", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterHeartbeatManager.java#L576-L585
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.processSprintData
protected void processSprintData(Feature feature, Sprint sprint) { // sSprintChangeDate - does not exist in Jira feature.setsSprintChangeDate(""); // sSprintIsDeleted - does not exist in Jira feature.setsSprintIsDeleted("False"); feature.setsSprintID(sprint.getId()); fe...
java
protected void processSprintData(Feature feature, Sprint sprint) { // sSprintChangeDate - does not exist in Jira feature.setsSprintChangeDate(""); // sSprintIsDeleted - does not exist in Jira feature.setsSprintIsDeleted("False"); feature.setsSprintID(sprint.getId()); fe...
[ "protected", "void", "processSprintData", "(", "Feature", "feature", ",", "Sprint", "sprint", ")", "{", "// sSprintChangeDate - does not exist in Jira", "feature", ".", "setsSprintChangeDate", "(", "\"\"", ")", ";", "// sSprintIsDeleted - does not exist in Jira", "feature", ...
Process Sprint data for a feature, updating the passed in feature @param feature @param sprint
[ "Process", "Sprint", "data", "for", "a", "feature", "updating", "the", "passed", "in", "feature" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L574-L593
PureSolTechnologies/genesis
commons.cassandra/src/main/java/com/puresoltechnologies/genesis/commons/cassandra/CassandraUtils.java
CassandraUtils.connectCluster
public static Cluster connectCluster(String host, int port) { Builder clusterBuilder = Cluster.builder(); // Socket Options SocketOptions socketOptions = new SocketOptions(); socketOptions.setConnectTimeoutMillis(60000); socketOptions.setKeepAlive(true); socketOptions.setReadTimeoutMillis(30000); return clusterB...
java
public static Cluster connectCluster(String host, int port) { Builder clusterBuilder = Cluster.builder(); // Socket Options SocketOptions socketOptions = new SocketOptions(); socketOptions.setConnectTimeoutMillis(60000); socketOptions.setKeepAlive(true); socketOptions.setReadTimeoutMillis(30000); return clusterB...
[ "public", "static", "Cluster", "connectCluster", "(", "String", "host", ",", "int", "port", ")", "{", "Builder", "clusterBuilder", "=", "Cluster", ".", "builder", "(", ")", ";", "// Socket Options", "SocketOptions", "socketOptions", "=", "new", "SocketOptions", ...
Connects to the specified host and port. @param host is the host name to connect to. @param port if the port to connect to. @return A {@link Cluster} object is returned.
[ "Connects", "to", "the", "specified", "host", "and", "port", "." ]
train
https://github.com/PureSolTechnologies/genesis/blob/1031027c5edcfeaad670896802058f78a2f7b159/commons.cassandra/src/main/java/com/puresoltechnologies/genesis/commons/cassandra/CassandraUtils.java#L50-L59
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/policy/HiveRegistrationPolicyBase.java
HiveRegistrationPolicyBase.getTable
protected HiveTable getTable(Path path, String dbName, String tableName) throws IOException { HiveTable.Builder tableBuilder = new HiveTable.Builder().withDbName(dbName).withTableName(tableName); if (!this.emptyInputPathFlag) { tableBuilder = tableBuilder.withSerdeManaager(HiveSerDeManager.get(this.prop...
java
protected HiveTable getTable(Path path, String dbName, String tableName) throws IOException { HiveTable.Builder tableBuilder = new HiveTable.Builder().withDbName(dbName).withTableName(tableName); if (!this.emptyInputPathFlag) { tableBuilder = tableBuilder.withSerdeManaager(HiveSerDeManager.get(this.prop...
[ "protected", "HiveTable", "getTable", "(", "Path", "path", ",", "String", "dbName", ",", "String", "tableName", ")", "throws", "IOException", "{", "HiveTable", ".", "Builder", "tableBuilder", "=", "new", "HiveTable", ".", "Builder", "(", ")", ".", "withDbName"...
A base implementation for creating a non bucketed, external {@link HiveTable} for a {@link Path}. @param path a {@link Path} used to create the {@link HiveTable}. @param dbName the database name for the created {@link HiveTable}. @param tableName the table name for the created {@link HiveTable}. @return a {@link HiveT...
[ "A", "base", "implementation", "for", "creating", "a", "non", "bucketed", "external", "{", "@link", "HiveTable", "}", "for", "a", "{", "@link", "Path", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/policy/HiveRegistrationPolicyBase.java#L348-L371
datacleaner/DataCleaner
engine/env/spark/src/main/java/org/datacleaner/spark/SparkRunner.java
SparkRunner.findFile
private URI findFile(final String filePath, final boolean upload) { try { URI fileURI; try { fileURI = _hadoopDefaultFS.getUri().resolve(filePath); } catch (final Exception e) { fileURI = null; } if ((fileURI == null ||...
java
private URI findFile(final String filePath, final boolean upload) { try { URI fileURI; try { fileURI = _hadoopDefaultFS.getUri().resolve(filePath); } catch (final Exception e) { fileURI = null; } if ((fileURI == null ||...
[ "private", "URI", "findFile", "(", "final", "String", "filePath", ",", "final", "boolean", "upload", ")", "{", "try", "{", "URI", "fileURI", ";", "try", "{", "fileURI", "=", "_hadoopDefaultFS", ".", "getUri", "(", ")", ".", "resolve", "(", "filePath", ")...
Tries to find a file on HDFS, and optionally uploads it if not found. @param filePath Path of the file to find @param upload true if file upload should be attempted. @return Either the resolved URI, or the uploaded file.
[ "Tries", "to", "find", "a", "file", "on", "HDFS", "and", "optionally", "uploads", "it", "if", "not", "found", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/env/spark/src/main/java/org/datacleaner/spark/SparkRunner.java#L88-L112
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWriteDriver.java
GeoJsonWriteDriver.writeCRS
private void writeCRS(JsonGenerator jsonGenerator, String[] authorityAndSRID) throws IOException { if (authorityAndSRID[1] != null) { jsonGenerator.writeObjectFieldStart("crs"); jsonGenerator.writeStringField("type", "name"); jsonGenerator.writeObjectFieldStart("properties");...
java
private void writeCRS(JsonGenerator jsonGenerator, String[] authorityAndSRID) throws IOException { if (authorityAndSRID[1] != null) { jsonGenerator.writeObjectFieldStart("crs"); jsonGenerator.writeStringField("type", "name"); jsonGenerator.writeObjectFieldStart("properties");...
[ "private", "void", "writeCRS", "(", "JsonGenerator", "jsonGenerator", ",", "String", "[", "]", "authorityAndSRID", ")", "throws", "IOException", "{", "if", "(", "authorityAndSRID", "[", "1", "]", "!=", "null", ")", "{", "jsonGenerator", ".", "writeObjectFieldSta...
Write the CRS in the geojson @param jsonGenerator @param authorityAndSRID @throws IOException
[ "Write", "the", "CRS", "in", "the", "geojson" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWriteDriver.java#L630-L641
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getWebMercatorBoundingBox
public static BoundingBox getWebMercatorBoundingBox(long x, long y, int zoom) { double tileSize = tileSizeWithZoom(zoom); double minLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + (x * tileSize); double maxLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + ((x + 1) * tileS...
java
public static BoundingBox getWebMercatorBoundingBox(long x, long y, int zoom) { double tileSize = tileSizeWithZoom(zoom); double minLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + (x * tileSize); double maxLon = (-1 * ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH) + ((x + 1) * tileS...
[ "public", "static", "BoundingBox", "getWebMercatorBoundingBox", "(", "long", "x", ",", "long", "y", ",", "int", "zoom", ")", "{", "double", "tileSize", "=", "tileSizeWithZoom", "(", "zoom", ")", ";", "double", "minLon", "=", "(", "-", "1", "*", "Projection...
Get the Web Mercator tile bounding box from the Google Maps API tile coordinates and zoom level @param x x coordinate @param y y coordinate @param zoom zoom level @return bounding box
[ "Get", "the", "Web", "Mercator", "tile", "bounding", "box", "from", "the", "Google", "Maps", "API", "tile", "coordinates", "and", "zoom", "level" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L347-L363
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.readParagraphVectors
public static ParagraphVectors readParagraphVectors(File file) throws IOException { Word2Vec w2v = readWord2Vec(file); // and "convert" it to ParaVec model + optionally trying to restore labels information ParagraphVectors vectors = new ParagraphVectors.Builder(w2v.getConfiguration()) ...
java
public static ParagraphVectors readParagraphVectors(File file) throws IOException { Word2Vec w2v = readWord2Vec(file); // and "convert" it to ParaVec model + optionally trying to restore labels information ParagraphVectors vectors = new ParagraphVectors.Builder(w2v.getConfiguration()) ...
[ "public", "static", "ParagraphVectors", "readParagraphVectors", "(", "File", "file", ")", "throws", "IOException", "{", "Word2Vec", "w2v", "=", "readWord2Vec", "(", "file", ")", ";", "// and \"convert\" it to ParaVec model + optionally trying to restore labels information", "...
This method restores ParagraphVectors model previously saved with writeParagraphVectors() @return
[ "This", "method", "restores", "ParagraphVectors", "model", "previously", "saved", "with", "writeParagraphVectors", "()" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L730-L760
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/dptxlator/DPTXlator.java
DPTXlator.logThrow
final KNXFormatException logThrow(LogLevel level, String msg, String excMsg, String item) { final KNXFormatException e = new KNXFormatException(excMsg != null ? excMsg : msg, item); if (excMsg != null) logger.log(level, dpt.getID() + " - " + msg, e); else logger.log(level, dpt.getID() + " - " ...
java
final KNXFormatException logThrow(LogLevel level, String msg, String excMsg, String item) { final KNXFormatException e = new KNXFormatException(excMsg != null ? excMsg : msg, item); if (excMsg != null) logger.log(level, dpt.getID() + " - " + msg, e); else logger.log(level, dpt.getID() + " - " ...
[ "final", "KNXFormatException", "logThrow", "(", "LogLevel", "level", ",", "String", "msg", ",", "String", "excMsg", ",", "String", "item", ")", "{", "final", "KNXFormatException", "e", "=", "new", "KNXFormatException", "(", "excMsg", "!=", "null", "?", "excMsg...
Helper which logs message and creates a format exception. <p> Adds the current dpt ID as prefix to log output. @param level log level @param msg log output, exception message if <code>excMsg</code> is <code>null</code> @param excMsg exception message, if <code>null</code> <code>msg</code> is used @param item item in K...
[ "Helper", "which", "logs", "message", "and", "creates", "a", "format", "exception", ".", "<p", ">", "Adds", "the", "current", "dpt", "ID", "as", "prefix", "to", "log", "output", "." ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/dptxlator/DPTXlator.java#L477-L487
apereo/cas
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java
LdapUtils.executePasswordModifyOperation
public static boolean executePasswordModifyOperation(final String currentDn, final ConnectionFactory connectionFactory, final String oldPassword, fin...
java
public static boolean executePasswordModifyOperation(final String currentDn, final ConnectionFactory connectionFactory, final String oldPassword, fin...
[ "public", "static", "boolean", "executePasswordModifyOperation", "(", "final", "String", "currentDn", ",", "final", "ConnectionFactory", "connectionFactory", ",", "final", "String", "oldPassword", ",", "final", "String", "newPassword", ",", "final", "AbstractLdapPropertie...
Execute a password modify operation. @param currentDn the current dn @param connectionFactory the connection factory @param oldPassword the old password @param newPassword the new password @param type the type @return true /false
[ "Execute", "a", "password", "modify", "operation", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L314-L345
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/protocol/ResourceResolver.java
ResourceResolver.resolveResource
public File resolveResource(String resourceLocation, String downloadLocation) throws ResourceDownloadError { int indexOf = resourceLocation.indexOf(':'); if (indexOf == -1) { final String url = downloadLocation; final String msg = "Unknown protocol"; throw...
java
public File resolveResource(String resourceLocation, String downloadLocation) throws ResourceDownloadError { int indexOf = resourceLocation.indexOf(':'); if (indexOf == -1) { final String url = downloadLocation; final String msg = "Unknown protocol"; throw...
[ "public", "File", "resolveResource", "(", "String", "resourceLocation", ",", "String", "downloadLocation", ")", "throws", "ResourceDownloadError", "{", "int", "indexOf", "=", "resourceLocation", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "indexOf", "=="...
Retrieves a resource from the {@code resourceLocation} and saves it to {@code downloadLocation}. @param resourceLocation {@link String}, the resource location url @param downloadLocation {@link String}, the download location path @return {@link File}, the local downloaded resource file @throws ResourceDownloadError Th...
[ "Retrieves", "a", "resource", "from", "the", "{", "@code", "resourceLocation", "}", "and", "saves", "it", "to", "{", "@code", "downloadLocation", "}", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/protocol/ResourceResolver.java#L66-L110
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/internal/ExtensionFactory.java
ExtensionFactory.getExtensionIssueManagement
public ExtensionIssueManagement getExtensionIssueManagement(String system, String url) { return getExtensionIssueManagement(new DefaultExtensionIssueManagement(system, url)); }
java
public ExtensionIssueManagement getExtensionIssueManagement(String system, String url) { return getExtensionIssueManagement(new DefaultExtensionIssueManagement(system, url)); }
[ "public", "ExtensionIssueManagement", "getExtensionIssueManagement", "(", "String", "system", ",", "String", "url", ")", "{", "return", "getExtensionIssueManagement", "(", "new", "DefaultExtensionIssueManagement", "(", "system", ",", "url", ")", ")", ";", "}" ]
Store and return a weak reference equals to the passed {@link ExtensionIssueManagement} elements. @param system the name of the issue management system (jira, bugzilla, etc.) @param url the URL of that extension in the issues management system @return unique instance of {@link ExtensionIssueManagement} equals to the p...
[ "Store", "and", "return", "a", "weak", "reference", "equals", "to", "the", "passed", "{", "@link", "ExtensionIssueManagement", "}", "elements", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/internal/ExtensionFactory.java#L157-L160
alkacon/opencms-core
src/org/opencms/loader/CmsResourceManager.java
CmsResourceManager.matchResourceType
public boolean matchResourceType(String name, int id) { if (hasResourceType(name)) { try { return getResourceType(name).getTypeId() == id; } catch (Exception e) { // should never happen because we already checked with hasResourceType, still have to ...
java
public boolean matchResourceType(String name, int id) { if (hasResourceType(name)) { try { return getResourceType(name).getTypeId() == id; } catch (Exception e) { // should never happen because we already checked with hasResourceType, still have to ...
[ "public", "boolean", "matchResourceType", "(", "String", "name", ",", "int", "id", ")", "{", "if", "(", "hasResourceType", "(", "name", ")", ")", "{", "try", "{", "return", "getResourceType", "(", "name", ")", ".", "getTypeId", "(", ")", "==", "id", ";...
Checks if there is a resource type with a given name whose id matches the given id.<p> This will return 'false' if no resource type with the given name is registered.<p> @param name a resource type name @param id a resource type id @return true if a matching resource type with the given name and id was found
[ "Checks", "if", "there", "is", "a", "resource", "type", "with", "a", "given", "name", "whose", "id", "matches", "the", "given", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsResourceManager.java#L1207-L1221
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java
CmsAreaSelectPanel.getXForY
private int getXForY(int newX, int newY) { int width = (int)Math.floor((newY - m_firstY) / m_heightToWidth); int result = m_firstX + width; if (((m_firstX - newX) * (m_firstX - result)) < 0) { result = m_firstX - width; } return result; }
java
private int getXForY(int newX, int newY) { int width = (int)Math.floor((newY - m_firstY) / m_heightToWidth); int result = m_firstX + width; if (((m_firstX - newX) * (m_firstX - result)) < 0) { result = m_firstX - width; } return result; }
[ "private", "int", "getXForY", "(", "int", "newX", ",", "int", "newY", ")", "{", "int", "width", "=", "(", "int", ")", "Math", ".", "floor", "(", "(", "newY", "-", "m_firstY", ")", "/", "m_heightToWidth", ")", ";", "int", "result", "=", "m_firstX", ...
Calculates the matching X (left/width) value in case of a fixed height/width ratio.<p> @param newX the cursor X offset to the selection area @param newY the cursor Y offset to the selection area @return the matching X value
[ "Calculates", "the", "matching", "X", "(", "left", "/", "width", ")", "value", "in", "case", "of", "a", "fixed", "height", "/", "width", "ratio", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java#L655-L663
kkopacz/agiso-core
bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ObjectUtils.java
ObjectUtils.equalsChecker
public static boolean equalsChecker(Object object1, Object object2) { return null == object1? null == object2 : object1.equals(object2); }
java
public static boolean equalsChecker(Object object1, Object object2) { return null == object1? null == object2 : object1.equals(object2); }
[ "public", "static", "boolean", "equalsChecker", "(", "Object", "object1", ",", "Object", "object2", ")", "{", "return", "null", "==", "object1", "?", "null", "==", "object2", ":", "object1", ".", "equals", "(", "object2", ")", ";", "}" ]
Porównuje dwa obiekty wykorzystując standardową metodę <code>equals</code> obiektu przekazanego parametrem wywołania <code>object1</code>. Zwraca <code>true</code> jeśli oba przekazane do porównania obiekty nie są określone (mają wartość <code>null</code>).
[ "Porównuje", "dwa", "obiekty", "wykorzystując", "standardową", "metodę", "<code", ">", "equals<", "/", "code", ">", "obiektu", "przekazanego", "parametrem", "wywołania", "<code", ">", "object1<", "/", "code", ">", ".", "Zwraca", "<code", ">", "true<", "/", "co...
train
https://github.com/kkopacz/agiso-core/blob/b994ec0146be1fe3f10829d69cd719bdbdebe1c5/bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ObjectUtils.java#L239-L241
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java
DiscussionCommentResourcesImpl.addComment
public Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException{ return this.createResource("sheets/" + sheetId + "/discussions/" + discussionId + "/comments", Comment.class, comment); }
java
public Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException{ return this.createResource("sheets/" + sheetId + "/discussions/" + discussionId + "/comments", Comment.class, comment); }
[ "public", "Comment", "addComment", "(", "long", "sheetId", ",", "long", "discussionId", ",", "Comment", "comment", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"sheets/\"", "+", "sheetId", "+", "\"/discussions/\"", "+"...
Add a comment to a discussion. It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments</p> @param sheetId the sheet id @param discussionId the discussion id @param comment the comment to add @return the created comment @throws IllegalArgumentException if any argument is null o...
[ "Add", "a", "comment", "to", "a", "discussion", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java#L63-L65
podio/podio-java
src/main/java/com/podio/user/UserAPI.java
UserAPI.setProperty
public void setProperty(String key, boolean value) { getResourceFactory() .getApiResource("/user/property/" + key) .entity(new PropertyValue(value), MediaType.APPLICATION_JSON_TYPE).put(); }
java
public void setProperty(String key, boolean value) { getResourceFactory() .getApiResource("/user/property/" + key) .entity(new PropertyValue(value), MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "setProperty", "(", "String", "key", ",", "boolean", "value", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/user/property/\"", "+", "key", ")", ".", "entity", "(", "new", "PropertyValue", "(", "value", ")", ",", ...
Sets the value of the property for the active user with the given name. The property is specific to the auth client used. @param key The key of the property @param value The value of the property
[ "Sets", "the", "value", "of", "the", "property", "for", "the", "active", "user", "with", "the", "given", "name", ".", "The", "property", "is", "specific", "to", "the", "auth", "client", "used", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/user/UserAPI.java#L186-L191
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseBigInteger
@Nullable public static BigInteger parseBigInteger (@Nullable final String sStr, @Nonnegative final int nRadix) { return parseBigInteger (sStr, nRadix, null); }
java
@Nullable public static BigInteger parseBigInteger (@Nullable final String sStr, @Nonnegative final int nRadix) { return parseBigInteger (sStr, nRadix, null); }
[ "@", "Nullable", "public", "static", "BigInteger", "parseBigInteger", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nonnegative", "final", "int", "nRadix", ")", "{", "return", "parseBigInteger", "(", "sStr", ",", "nRadix", ",", "null", ")", ";"...
Parse the given {@link String} as {@link BigInteger} with the specified radix. @param sStr The String to parse. May be <code>null</code>. @param nRadix The radix to use. Must be &ge; {@link Character#MIN_RADIX} and &le; {@link Character#MAX_RADIX}. @return <code>null</code> if the string does not represent a valid val...
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "{", "@link", "BigInteger", "}", "with", "the", "specified", "radix", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L1399-L1403
spacecowboy/NoNonsense-FilePicker
sample/src/main/java/com/nononsenseapps/filepicker/sample/multimedia/MultimediaPickerFragment.java
MultimediaPickerFragment.onCreateViewHolder
@NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { switch (viewType) { case VIEWTYPE_IMAGE_CHECKABLE: return new CheckableViewHolder(LayoutInflater.from(getActivity()) .inflate(R.layout.listi...
java
@NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { switch (viewType) { case VIEWTYPE_IMAGE_CHECKABLE: return new CheckableViewHolder(LayoutInflater.from(getActivity()) .inflate(R.layout.listi...
[ "@", "NonNull", "@", "Override", "public", "RecyclerView", ".", "ViewHolder", "onCreateViewHolder", "(", "@", "NonNull", "ViewGroup", "parent", ",", "int", "viewType", ")", "{", "switch", "(", "viewType", ")", "{", "case", "VIEWTYPE_IMAGE_CHECKABLE", ":", "retur...
We override this method and provide some special views for images. This is necessary to work around a bug on older Android versions (4.0.3 for example) where setting a "tint" would just make the entire image a square of solid color. <p/> So the special layouts used here are merely "untinted" copies from the library. @...
[ "We", "override", "this", "method", "and", "provide", "some", "special", "views", "for", "images", ".", "This", "is", "necessary", "to", "work", "around", "a", "bug", "on", "older", "Android", "versions", "(", "4", ".", "0", ".", "3", "for", "example", ...
train
https://github.com/spacecowboy/NoNonsense-FilePicker/blob/396ef7fa5e87791170791f9d94c78f6e42a7679a/sample/src/main/java/com/nononsenseapps/filepicker/sample/multimedia/MultimediaPickerFragment.java#L99-L112
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/DefaultTransactionManager.java
DefaultTransactionManager.canRecover
private boolean canRecover(final TxConfig config, final Throwable e) { boolean commit = config.getRollbackOn().size() > 0; //check rollback clauses for (Class<? extends Exception> rollBackOn : config.getRollbackOn()) { //if one matched, try to perform a rollback if (rol...
java
private boolean canRecover(final TxConfig config, final Throwable e) { boolean commit = config.getRollbackOn().size() > 0; //check rollback clauses for (Class<? extends Exception> rollBackOn : config.getRollbackOn()) { //if one matched, try to perform a rollback if (rol...
[ "private", "boolean", "canRecover", "(", "final", "TxConfig", "config", ",", "final", "Throwable", "e", ")", "{", "boolean", "commit", "=", "config", ".", "getRollbackOn", "(", ")", ".", "size", "(", ")", ">", "0", ";", "//check rollback clauses", "for", "...
Returns True if rollback DID NOT HAPPEN (i.e. if commit should continue). @param config transaction configuration @param e The exception to test for rollback
[ "Returns", "True", "if", "rollback", "DID", "NOT", "HAPPEN", "(", "i", ".", "e", ".", "if", "commit", "should", "continue", ")", "." ]
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/DefaultTransactionManager.java#L151-L174
upwork/java-upwork
src/com/Upwork/api/Routers/Reports/Time.java
Time.getByFreelancerLimited
public JSONObject getByFreelancerLimited(String freelancerId, HashMap<String, String> params) throws JSONException { return oClient.get("/timereports/v1/providers/" + freelancerId + "/hours", params); }
java
public JSONObject getByFreelancerLimited(String freelancerId, HashMap<String, String> params) throws JSONException { return oClient.get("/timereports/v1/providers/" + freelancerId + "/hours", params); }
[ "public", "JSONObject", "getByFreelancerLimited", "(", "String", "freelancerId", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/timereports/v1/providers/\"", "+", "freelance...
Generating Freelancer's Specific Reports (hide financial info) @param freelancerId Freelancer's ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Generating", "Freelancer", "s", "Specific", "Reports", "(", "hide", "financial", "info", ")" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Reports/Time.java#L130-L132
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/io/gpio/BpiPin.java
BpiPin.createDigitalPin
protected static Pin createDigitalPin(int address, String name) { return createDigitalPin(BpiGpioProvider.NAME, address, name); }
java
protected static Pin createDigitalPin(int address, String name) { return createDigitalPin(BpiGpioProvider.NAME, address, name); }
[ "protected", "static", "Pin", "createDigitalPin", "(", "int", "address", ",", "String", "name", ")", "{", "return", "createDigitalPin", "(", "BpiGpioProvider", ".", "NAME", ",", "address", ",", "name", ")", ";", "}" ]
this pin is permanently pulled up; pin pull settings do not work
[ "this", "pin", "is", "permanently", "pulled", "up", ";", "pin", "pull", "settings", "do", "not", "work" ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/io/gpio/BpiPin.java#L76-L78
mabe02/lanterna
src/main/java/com/googlecode/lanterna/TextCharacter.java
TextCharacter.withModifiers
public TextCharacter withModifiers(Collection<SGR> modifiers) { EnumSet<SGR> newSet = EnumSet.copyOf(modifiers); if(modifiers.equals(newSet)) { return this; } return new TextCharacter(character, foregroundColor, backgroundColor, newSet); }
java
public TextCharacter withModifiers(Collection<SGR> modifiers) { EnumSet<SGR> newSet = EnumSet.copyOf(modifiers); if(modifiers.equals(newSet)) { return this; } return new TextCharacter(character, foregroundColor, backgroundColor, newSet); }
[ "public", "TextCharacter", "withModifiers", "(", "Collection", "<", "SGR", ">", "modifiers", ")", "{", "EnumSet", "<", "SGR", ">", "newSet", "=", "EnumSet", ".", "copyOf", "(", "modifiers", ")", ";", "if", "(", "modifiers", ".", "equals", "(", "newSet", ...
Returns a copy of this TextCharacter with specified list of SGR modifiers. None of the currently active SGR codes will be carried over to the copy, only those in the passed in value. @param modifiers SGR modifiers the copy should have @return Copy of the TextCharacter with a different set of SGR modifiers
[ "Returns", "a", "copy", "of", "this", "TextCharacter", "with", "specified", "list", "of", "SGR", "modifiers", ".", "None", "of", "the", "currently", "active", "SGR", "codes", "will", "be", "carried", "over", "to", "the", "copy", "only", "those", "in", "the...
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/TextCharacter.java#L250-L256
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java
CommerceTierPriceEntryPersistenceImpl.findByCompanyId
@Override public List<CommerceTierPriceEntry> findByCompanyId(long companyId, int start, int end) { return findByCompanyId(companyId, start, end, null); }
java
@Override public List<CommerceTierPriceEntry> findByCompanyId(long companyId, int start, int end) { return findByCompanyId(companyId, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceTierPriceEntry", ">", "findByCompanyId", "(", "long", "companyId", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCompanyId", "(", "companyId", ",", "start", ",", "end", ",", "null", ")", ...
Returns a range of all the commerce tier price entries where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result ...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "tier", "price", "entries", "where", "companyId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java#L2055-L2059
cuba-platform/yarg
core/modules/core/src/com/haulmont/yarg/formatters/impl/XLSFormatter.java
XLSFormatter.copyCellFromTemplate
private HSSFCell copyCellFromTemplate(HSSFCell templateCell, HSSFRow resultRow, int resultColumn, BandData band) { checkThreadInterrupted(); if (templateCell == null) return null; HSSFCell resultCell = resultRow.createCell(resultColumn); HSSFCellStyle templateStyle = templateCell.getCe...
java
private HSSFCell copyCellFromTemplate(HSSFCell templateCell, HSSFRow resultRow, int resultColumn, BandData band) { checkThreadInterrupted(); if (templateCell == null) return null; HSSFCell resultCell = resultRow.createCell(resultColumn); HSSFCellStyle templateStyle = templateCell.getCe...
[ "private", "HSSFCell", "copyCellFromTemplate", "(", "HSSFCell", "templateCell", ",", "HSSFRow", "resultRow", ",", "int", "resultColumn", ",", "BandData", "band", ")", "{", "checkThreadInterrupted", "(", ")", ";", "if", "(", "templateCell", "==", "null", ")", "re...
copies template cell to result row into result column. Fills this cell with data from band @param templateCell - template cell @param resultRow - result row @param resultColumn - result column @param band - band
[ "copies", "template", "cell", "to", "result", "row", "into", "result", "column", ".", "Fills", "this", "cell", "with", "data", "from", "band" ]
train
https://github.com/cuba-platform/yarg/blob/d157286cbe29448f3e1f445e8c5dd88808351da0/core/modules/core/src/com/haulmont/yarg/formatters/impl/XLSFormatter.java#L595-L624
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java
AbstractRegionPainter.decodeColor
protected final Color decodeColor(String key, float hOffset, float sOffset, float bOffset, int aOffset) { if (UIManager.getLookAndFeel() instanceof SeaGlassLookAndFeel) { SeaGlassLookAndFeel laf = (SeaGlassLookAndFeel) UIManager.getLookAndFeel(); return laf.getDerivedColor(key, hOffset,...
java
protected final Color decodeColor(String key, float hOffset, float sOffset, float bOffset, int aOffset) { if (UIManager.getLookAndFeel() instanceof SeaGlassLookAndFeel) { SeaGlassLookAndFeel laf = (SeaGlassLookAndFeel) UIManager.getLookAndFeel(); return laf.getDerivedColor(key, hOffset,...
[ "protected", "final", "Color", "decodeColor", "(", "String", "key", ",", "float", "hOffset", ",", "float", "sOffset", ",", "float", "bOffset", ",", "int", "aOffset", ")", "{", "if", "(", "UIManager", ".", "getLookAndFeel", "(", ")", "instanceof", "SeaGlassLo...
Decodes and returns a color, which is derived from a base color in UI defaults. @param key A key corresponding to the value in the UI Defaults table of UIManager where the base color is defined @param hOffset The hue offset used for derivation. @param sOffset The saturation offset used for derivation. @param b...
[ "Decodes", "and", "returns", "a", "color", "which", "is", "derived", "from", "a", "base", "color", "in", "UI", "defaults", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java#L249-L260
albfernandez/itext2
src/main/java/com/lowagie/text/Chunk.java
Chunk.setRemoteGoto
public Chunk setRemoteGoto(String filename, int page) { return setAttribute(REMOTEGOTO, new Object[] { filename, Integer.valueOf(page) }); }
java
public Chunk setRemoteGoto(String filename, int page) { return setAttribute(REMOTEGOTO, new Object[] { filename, Integer.valueOf(page) }); }
[ "public", "Chunk", "setRemoteGoto", "(", "String", "filename", ",", "int", "page", ")", "{", "return", "setAttribute", "(", "REMOTEGOTO", ",", "new", "Object", "[", "]", "{", "filename", ",", "Integer", ".", "valueOf", "(", "page", ")", "}", ")", ";", ...
Sets a goto for a remote destination for this <CODE>Chunk</CODE>. @param filename the file name of the destination document @param page the page of the destination to go to. First page is 1 @return this <CODE>Chunk</CODE>
[ "Sets", "a", "goto", "for", "a", "remote", "destination", "for", "this", "<CODE", ">", "Chunk<", "/", "CODE", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Chunk.java#L706-L708
BlueBrain/bluima
modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patch.java
diff_match_patch.diff_lineMode
private LinkedList<Diff> diff_lineMode(String text1, String text2, long deadline) { // Scan the text on a line-by-line basis first. LinesToCharsResult b = diff_linesToChars(text1, text2); text1 = b.chars1; text2 = b.chars2; List<String> linearray = b.lineArray; ...
java
private LinkedList<Diff> diff_lineMode(String text1, String text2, long deadline) { // Scan the text on a line-by-line basis first. LinesToCharsResult b = diff_linesToChars(text1, text2); text1 = b.chars1; text2 = b.chars2; List<String> linearray = b.lineArray; ...
[ "private", "LinkedList", "<", "Diff", ">", "diff_lineMode", "(", "String", "text1", ",", "String", "text2", ",", "long", "deadline", ")", "{", "// Scan the text on a line-by-line basis first.", "LinesToCharsResult", "b", "=", "diff_linesToChars", "(", "text1", ",", ...
Do a quick line-level diff on both strings, then rediff the parts for greater accuracy. This speedup can produce non-minimal diffs. @param text1 Old string to be diffed. @param text2 New string to be diffed. @param deadline Time when the diff should be complete by. @return Linked List of Diff objects.
[ "Do", "a", "quick", "line", "-", "level", "diff", "on", "both", "strings", "then", "rediff", "the", "parts", "for", "greater", "accuracy", ".", "This", "speedup", "can", "produce", "non", "-", "minimal", "diffs", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patch.java#L314-L373
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java
PageFlowUtils.addActionErrorExpression
public static void addActionErrorExpression( HttpServletRequest request, String propertyName, String expression, Object[] messageArgs ) { ExpressionMessage msg = new ExpressionMessage( expression, messageArgs ); InternalUtils.addActionError( propertyN...
java
public static void addActionErrorExpression( HttpServletRequest request, String propertyName, String expression, Object[] messageArgs ) { ExpressionMessage msg = new ExpressionMessage( expression, messageArgs ); InternalUtils.addActionError( propertyN...
[ "public", "static", "void", "addActionErrorExpression", "(", "HttpServletRequest", "request", ",", "String", "propertyName", ",", "String", "expression", ",", "Object", "[", "]", "messageArgs", ")", "{", "ExpressionMessage", "msg", "=", "new", "ExpressionMessage", "...
Add a property-related message as an expression that will be evaluated and shown with the Errors and Error tags. @param request the current ServletRequest. @param propertyName the name of the property with which to associate this error. @param expression the JSP 2.0-style expression (e.g., <code>${pageFlow.myProperty}...
[ "Add", "a", "property", "-", "related", "message", "as", "an", "expression", "that", "will", "be", "evaluated", "and", "shown", "with", "the", "Errors", "and", "Error", "tags", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowUtils.java#L1102-L1107
OpenLiberty/open-liberty
dev/com.ibm.ws.security.authorization.builtin/src/com/ibm/ws/security/authorization/builtin/internal/BuiltinAuthorizationService.java
BuiltinAuthorizationService.validateInput
private void validateInput(String resourceName, Collection<String> requiredRoles) { if (requiredRoles == null) { throw new NullPointerException("requiredRoles cannot be null."); } else if (resourceName == null) { throw new NullPointerException("resourceName cannot be null."); ...
java
private void validateInput(String resourceName, Collection<String> requiredRoles) { if (requiredRoles == null) { throw new NullPointerException("requiredRoles cannot be null."); } else if (resourceName == null) { throw new NullPointerException("resourceName cannot be null."); ...
[ "private", "void", "validateInput", "(", "String", "resourceName", ",", "Collection", "<", "String", ">", "requiredRoles", ")", "{", "if", "(", "requiredRoles", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"requiredRoles cannot be null.\"",...
Validate that the input parameters are not null. @param resourceName the name of the resource @param requiredRoles the Collection of required roles @throws NullPointerException when either input is null
[ "Validate", "that", "the", "input", "parameters", "are", "not", "null", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authorization.builtin/src/com/ibm/ws/security/authorization/builtin/internal/BuiltinAuthorizationService.java#L499-L505
redkale/redkale
src/org/redkale/net/http/HttpRequest.java
HttpRequest.getParameter
public String getParameter(String name, String defaultValue) { parseBody(); return params.getValue(name, defaultValue); }
java
public String getParameter(String name, String defaultValue) { parseBody(); return params.getValue(name, defaultValue); }
[ "public", "String", "getParameter", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "parseBody", "(", ")", ";", "return", "params", ".", "getValue", "(", "name", ",", "defaultValue", ")", ";", "}" ]
获取指定的参数值, 没有返回默认值 @param name 参数名 @param defaultValue 默认值 @return 参数值
[ "获取指定的参数值", "没有返回默认值" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpRequest.java#L1272-L1275
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java
ParallelRunner.deserializeFromFile
public <T extends State> void deserializeFromFile(final T state, final Path inputFilePath) { this.futures.add(new NamedFuture(this.executor.submit(new Callable<Void>() { @Override public Void call() throws Exception { SerializationUtils.deserializeState(ParallelRunner.this.fs, inputFilePath, st...
java
public <T extends State> void deserializeFromFile(final T state, final Path inputFilePath) { this.futures.add(new NamedFuture(this.executor.submit(new Callable<Void>() { @Override public Void call() throws Exception { SerializationUtils.deserializeState(ParallelRunner.this.fs, inputFilePath, st...
[ "public", "<", "T", "extends", "State", ">", "void", "deserializeFromFile", "(", "final", "T", "state", ",", "final", "Path", "inputFilePath", ")", "{", "this", ".", "futures", ".", "add", "(", "new", "NamedFuture", "(", "this", ".", "executor", ".", "su...
Deserialize a {@link State} object from a file. <p> This method submits a task to deserialize the {@link State} object and returns immediately after the task is submitted. </p> @param state an empty {@link State} object to which the deserialized content will be populated @param inputFilePath the input file to read fr...
[ "Deserialize", "a", "{", "@link", "State", "}", "object", "from", "a", "file", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java#L169-L178
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readHistoryProject
public CmsHistoryProject readHistoryProject(CmsDbContext dbc, int publishTag) throws CmsException { return getHistoryDriver(dbc).readProject(dbc, publishTag); }
java
public CmsHistoryProject readHistoryProject(CmsDbContext dbc, int publishTag) throws CmsException { return getHistoryDriver(dbc).readProject(dbc, publishTag); }
[ "public", "CmsHistoryProject", "readHistoryProject", "(", "CmsDbContext", "dbc", ",", "int", "publishTag", ")", "throws", "CmsException", "{", "return", "getHistoryDriver", "(", "dbc", ")", ".", "readProject", "(", "dbc", ",", "publishTag", ")", ";", "}" ]
Returns a historical project entry.<p> @param dbc the current database context @param publishTag the publish tag of the project @return the requested historical project entry @throws CmsException if something goes wrong
[ "Returns", "a", "historical", "project", "entry", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L6983-L6986