repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
188
func_name
stringlengths
7
127
whole_func_string
stringlengths
77
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
77
3.91k
func_code_tokens
listlengths
20
745
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
477
split_name
stringclasses
1 value
func_code_url
stringlengths
111
288
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitAuthor
@Override public R visitAuthor(AuthorTree node, P p) { return defaultAction(node, p); }
java
@Override public R visitAuthor(AuthorTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitAuthor", "(", "AuthorTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L117-L120
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/media/MediaClient.java
MediaClient.getJob
@Deprecated public GetJobResponse getJob(GetJobRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getJobId(), "The parameter jobId should NOT be null or empty string."); InternalRequest internalRequest = createRequest(HttpMethod...
java
@Deprecated public GetJobResponse getJob(GetJobRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getJobId(), "The parameter jobId should NOT be null or empty string."); InternalRequest internalRequest = createRequest(HttpMethod...
[ "@", "Deprecated", "public", "GetJobResponse", "getJob", "(", "GetJobRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getJobId", "(", ")", ",", ...
Retrieve the status of a job. @param request The request object containing all options for retrieving job status. @return The status of a job. @deprecated As of release 0.8.5, replaced by {@link #getTranscodingJob(GetTranscodingJobRequest)}
[ "Retrieve", "the", "status", "of", "a", "job", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/media/MediaClient.java#L281-L288
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/HiCO.java
HiCO.correlationDistance
public int correlationDistance(PCAFilteredResult pca1, PCAFilteredResult pca2, int dimensionality) { // TODO: Can we delay copying the matrixes? // pca of rv1 double[][] v1t = copy(pca1.getEigenvectors()); double[][] v1t_strong = pca1.getStrongEigenvectors(); int lambda1 = pca1.getCorrelationDimensi...
java
public int correlationDistance(PCAFilteredResult pca1, PCAFilteredResult pca2, int dimensionality) { // TODO: Can we delay copying the matrixes? // pca of rv1 double[][] v1t = copy(pca1.getEigenvectors()); double[][] v1t_strong = pca1.getStrongEigenvectors(); int lambda1 = pca1.getCorrelationDimensi...
[ "public", "int", "correlationDistance", "(", "PCAFilteredResult", "pca1", ",", "PCAFilteredResult", "pca2", ",", "int", "dimensionality", ")", "{", "// TODO: Can we delay copying the matrixes?", "// pca of rv1", "double", "[", "]", "[", "]", "v1t", "=", "copy", "(", ...
Computes the correlation distance between the two subspaces defined by the specified PCAs. @param pca1 first PCA @param pca2 second PCA @param dimensionality the dimensionality of the data space @return the correlation distance between the two subspaces defined by the specified PCAs
[ "Computes", "the", "correlation", "distance", "between", "the", "two", "subspaces", "defined", "by", "the", "specified", "PCAs", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/HiCO.java#L302-L352
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/util/MorUtil.java
MorUtil.createExactManagedEntity
public static ManagedEntity createExactManagedEntity(ServerConnection sc, ManagedObjectReference mor) { return (ManagedEntity) createExactManagedObject(sc, mor); }
java
public static ManagedEntity createExactManagedEntity(ServerConnection sc, ManagedObjectReference mor) { return (ManagedEntity) createExactManagedObject(sc, mor); }
[ "public", "static", "ManagedEntity", "createExactManagedEntity", "(", "ServerConnection", "sc", ",", "ManagedObjectReference", "mor", ")", "{", "return", "(", "ManagedEntity", ")", "createExactManagedObject", "(", "sc", ",", "mor", ")", ";", "}" ]
Given a ServerConnection and a MOR return the ME @param sc @param mor @return
[ "Given", "a", "ServerConnection", "and", "a", "MOR", "return", "the", "ME" ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/util/MorUtil.java#L116-L118
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LinearClassifier.java
LinearClassifier.dumpSorted
public void dumpSorted() { Datum<L, F> allFeatures = new BasicDatum<L, F>(features(), (L)null); justificationOf(allFeatures, new PrintWriter(System.err, true), true); }
java
public void dumpSorted() { Datum<L, F> allFeatures = new BasicDatum<L, F>(features(), (L)null); justificationOf(allFeatures, new PrintWriter(System.err, true), true); }
[ "public", "void", "dumpSorted", "(", ")", "{", "Datum", "<", "L", ",", "F", ">", "allFeatures", "=", "new", "BasicDatum", "<", "L", ",", "F", ">", "(", "features", "(", ")", ",", "(", "L", ")", "null", ")", ";", "justificationOf", "(", "allFeatures...
Print all features in the classifier and the weight that they assign to each class. The feature names are printed in sorted order.
[ "Print", "all", "features", "in", "the", "classifier", "and", "the", "weight", "that", "they", "assign", "to", "each", "class", ".", "The", "feature", "names", "are", "printed", "in", "sorted", "order", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LinearClassifier.java#L1204-L1207
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/ui/CmsInlineEditOverlay.java
CmsInlineEditOverlay.getAvailablePosition
private int getAvailablePosition(CmsInlineEntityWidget widget, int absoluteTop) { m_buttons.remove(widget); boolean positionBlocked = true; while (positionBlocked) { positionBlocked = false; for (int pos : m_buttons.values()) { if (((pos - 24) < ab...
java
private int getAvailablePosition(CmsInlineEntityWidget widget, int absoluteTop) { m_buttons.remove(widget); boolean positionBlocked = true; while (positionBlocked) { positionBlocked = false; for (int pos : m_buttons.values()) { if (((pos - 24) < ab...
[ "private", "int", "getAvailablePosition", "(", "CmsInlineEntityWidget", "widget", ",", "int", "absoluteTop", ")", "{", "m_buttons", ".", "remove", "(", "widget", ")", ";", "boolean", "positionBlocked", "=", "true", ";", "while", "(", "positionBlocked", ")", "{",...
Returns the available absolute top position for the given button.<p> @param widget the button widget @param absoluteTop the proposed position @return the available position
[ "Returns", "the", "available", "absolute", "top", "position", "for", "the", "given", "button", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/ui/CmsInlineEditOverlay.java#L371-L387
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/domain/controller/plan/ConcurrentGroupServerUpdatePolicy.java
ConcurrentGroupServerUpdatePolicy.recordServerGroupResult
public void recordServerGroupResult(final String serverGroup, final boolean failed) { synchronized (this) { if (groups.contains(serverGroup)) { responseCount++; if (failed) { this.failed = true; } DomainControllerLo...
java
public void recordServerGroupResult(final String serverGroup, final boolean failed) { synchronized (this) { if (groups.contains(serverGroup)) { responseCount++; if (failed) { this.failed = true; } DomainControllerLo...
[ "public", "void", "recordServerGroupResult", "(", "final", "String", "serverGroup", ",", "final", "boolean", "failed", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "groups", ".", "contains", "(", "serverGroup", ")", ")", "{", "responseCount", ...
Records the result of updating a server group. @param serverGroup the server group's name. Cannot be <code>null</code> @param failed <code>true</code> if the server group update failed; <code>false</code> if it succeeded
[ "Records", "the", "result", "of", "updating", "a", "server", "group", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/plan/ConcurrentGroupServerUpdatePolicy.java#L100-L116
RestComm/sipunit
src/main/java/org/cafesip/sipunit/SipStack.java
SipStack.createSipPhone
public SipPhone createSipPhone(String proxyHost, String proxyProto, int proxyPort, String me) throws InvalidArgumentException, ParseException { return new SipPhone(this, proxyHost, proxyProto, proxyPort, me); }
java
public SipPhone createSipPhone(String proxyHost, String proxyProto, int proxyPort, String me) throws InvalidArgumentException, ParseException { return new SipPhone(this, proxyHost, proxyProto, proxyPort, me); }
[ "public", "SipPhone", "createSipPhone", "(", "String", "proxyHost", ",", "String", "proxyProto", ",", "int", "proxyPort", ",", "String", "me", ")", "throws", "InvalidArgumentException", ",", "ParseException", "{", "return", "new", "SipPhone", "(", "this", ",", "...
This method is used to create a SipPhone object. The SipPhone class simulates a SIP User Agent. The SipPhone object is used to communicate with other SIP agents. Using a SipPhone object, the test program can make one (or more, in future) outgoing calls or (and, in future) receive one (or more, in future) incoming calls...
[ "This", "method", "is", "used", "to", "create", "a", "SipPhone", "object", ".", "The", "SipPhone", "class", "simulates", "a", "SIP", "User", "Agent", ".", "The", "SipPhone", "object", "is", "used", "to", "communicate", "with", "other", "SIP", "agents", "."...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipStack.java#L249-L252
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatednasha/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednasha.java
ApiOvhDedicatednasha.serviceName_partition_partitionName_customSnapshot_name_GET
public OvhCustomSnap serviceName_partition_partitionName_customSnapshot_name_GET(String serviceName, String partitionName, String name) throws IOException { String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/customSnapshot/{name}"; StringBuilder sb = path(qPath, serviceName, partitionName, nam...
java
public OvhCustomSnap serviceName_partition_partitionName_customSnapshot_name_GET(String serviceName, String partitionName, String name) throws IOException { String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/customSnapshot/{name}"; StringBuilder sb = path(qPath, serviceName, partitionName, nam...
[ "public", "OvhCustomSnap", "serviceName_partition_partitionName_customSnapshot_name_GET", "(", "String", "serviceName", ",", "String", "partitionName", ",", "String", "name", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/nasha/{serviceName}/partition/...
Get this object properties REST: GET /dedicated/nasha/{serviceName}/partition/{partitionName}/customSnapshot/{name} @param serviceName [required] The internal name of your storage @param partitionName [required] the given name of partition @param name [required] name of the snapshot API beta
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatednasha/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednasha.java#L149-L154
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java
BpmnParse.parseProperty
public void parseProperty(Element propertyElement, ActivityImpl activity) { String id = propertyElement.attribute("id"); String name = propertyElement.attribute("name"); // If name isn't given, use the id as name if (name == null) { if (id == null) { addError("Invalid property usage on li...
java
public void parseProperty(Element propertyElement, ActivityImpl activity) { String id = propertyElement.attribute("id"); String name = propertyElement.attribute("name"); // If name isn't given, use the id as name if (name == null) { if (id == null) { addError("Invalid property usage on li...
[ "public", "void", "parseProperty", "(", "Element", "propertyElement", ",", "ActivityImpl", "activity", ")", "{", "String", "id", "=", "propertyElement", ".", "attribute", "(", "\"id\"", ")", ";", "String", "name", "=", "propertyElement", ".", "attribute", "(", ...
Parses one property definition. @param propertyElement The 'property' element that defines how a property looks like and is handled.
[ "Parses", "one", "property", "definition", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L3895-L3910
joelittlejohn/jsonschema2pojo
jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/ProjectClasspath.java
ProjectClasspath.getClassLoader
public ClassLoader getClassLoader(MavenProject project, final ClassLoader parent, Log log) throws DependencyResolutionRequiredException { @SuppressWarnings("unchecked") List<String> classpathElements = project.getCompileClasspathElements(); final List<URL> classpathUrls = new ArrayList<>(class...
java
public ClassLoader getClassLoader(MavenProject project, final ClassLoader parent, Log log) throws DependencyResolutionRequiredException { @SuppressWarnings("unchecked") List<String> classpathElements = project.getCompileClasspathElements(); final List<URL> classpathUrls = new ArrayList<>(class...
[ "public", "ClassLoader", "getClassLoader", "(", "MavenProject", "project", ",", "final", "ClassLoader", "parent", ",", "Log", "log", ")", "throws", "DependencyResolutionRequiredException", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "List", "<", "String",...
Provides a class loader that can be used to load classes from this project classpath. @param project the maven project currently being built @param parent a classloader which should be used as the parent of the newly created classloader. @param log object to which details of the found/loaded classpath elements can be ...
[ "Provides", "a", "class", "loader", "that", "can", "be", "used", "to", "load", "classes", "from", "this", "project", "classpath", "." ]
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/ProjectClasspath.java#L56-L81
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.visitSuperClassMethods
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser) throws ClassNotFoundException { return findMethod(method.getJavaClass().getSuperClasses(), method.getMethod().getName(), method.getMethod() .getSignature(), chooser);...
java
public static JavaClassAndMethod visitSuperClassMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser) throws ClassNotFoundException { return findMethod(method.getJavaClass().getSuperClasses(), method.getMethod().getName(), method.getMethod() .getSignature(), chooser);...
[ "public", "static", "JavaClassAndMethod", "visitSuperClassMethods", "(", "JavaClassAndMethod", "method", ",", "JavaClassAndMethodChooser", "chooser", ")", "throws", "ClassNotFoundException", "{", "return", "findMethod", "(", "method", ".", "getJavaClass", "(", ")", ".", ...
Visit all superclass methods which the given method overrides. @param method the method @param chooser chooser which visits each superclass method @return the chosen method, or null if no method is chosen @throws ClassNotFoundException
[ "Visit", "all", "superclass", "methods", "which", "the", "given", "method", "overrides", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L272-L276
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java
SheetDiscussionResourcesImpl.createDiscussion
public Discussion createDiscussion(long sheetId, Discussion discussion) throws SmartsheetException{ Util.throwIfNull(sheetId, discussion); return this.createResource("sheets/" + sheetId + "/discussions", Discussion.class, discussion); }
java
public Discussion createDiscussion(long sheetId, Discussion discussion) throws SmartsheetException{ Util.throwIfNull(sheetId, discussion); return this.createResource("sheets/" + sheetId + "/discussions", Discussion.class, discussion); }
[ "public", "Discussion", "createDiscussion", "(", "long", "sheetId", ",", "Discussion", "discussion", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "sheetId", ",", "discussion", ")", ";", "return", "this", ".", "createResource", "(", ...
Create a discussion on a sheet. It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions @param sheetId the sheet id @param discussion the discussion object @return the created discussion @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestE...
[ "Create", "a", "discussion", "on", "a", "sheet", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetDiscussionResourcesImpl.java#L71-L75
alrocar/POIProxy
es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/servlet/BaseServerResource.java
BaseServerResource.addAdditionalParams
protected void addAdditionalParams(HashMap<String, String> params, ArrayList<Param> extractedParams) { for (String key : params.keySet()) { if (!ParamEnum.from(key)) { extractedParams.add(new Param(key, params.get(key))); } } }
java
protected void addAdditionalParams(HashMap<String, String> params, ArrayList<Param> extractedParams) { for (String key : params.keySet()) { if (!ParamEnum.from(key)) { extractedParams.add(new Param(key, params.get(key))); } } }
[ "protected", "void", "addAdditionalParams", "(", "HashMap", "<", "String", ",", "String", ">", "params", ",", "ArrayList", "<", "Param", ">", "extractedParams", ")", "{", "for", "(", "String", "key", ":", "params", ".", "keySet", "(", ")", ")", "{", "if"...
Adds params found in the URL that are not in the {@link DescribeService} document of the service. Having this, we can add in the URL to POIProxy params from the original service. This should not be a good option when we want to have a single interface, but allows anyone to access the original API adding the original pa...
[ "Adds", "params", "found", "in", "the", "URL", "that", "are", "not", "in", "the", "{", "@link", "DescribeService", "}", "document", "of", "the", "service", ".", "Having", "this", "we", "can", "add", "in", "the", "URL", "to", "POIProxy", "params", "from",...
train
https://github.com/alrocar/POIProxy/blob/e1dabe738a862478b2580e90d5fc4209a2997868/es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/servlet/BaseServerResource.java#L79-L86
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java
XlsLoader.loadMultiple
public Object[] loadMultiple(final InputStream xlsIn, final Class<?>[] classes) throws XlsMapperException, IOException { return loadMultipleDetail(xlsIn, classes).getAll().stream() .map(s -> s.getTarget()) .toArray(); }
java
public Object[] loadMultiple(final InputStream xlsIn, final Class<?>[] classes) throws XlsMapperException, IOException { return loadMultipleDetail(xlsIn, classes).getAll().stream() .map(s -> s.getTarget()) .toArray(); }
[ "public", "Object", "[", "]", "loadMultiple", "(", "final", "InputStream", "xlsIn", ",", "final", "Class", "<", "?", ">", "[", "]", "classes", ")", "throws", "XlsMapperException", ",", "IOException", "{", "return", "loadMultipleDetail", "(", "xlsIn", ",", "c...
Excelファイルの複数シートを読み込み、任意のクラスにマップする。 <p>複数のシートの形式を一度に読み込む際に使用します。</p> @param xlsIn 読み込み元のExcelファイルのストリーム。 @param classes マッピング先のクラスタイプの配列。 @return マッピングした複数のシート。 {@link Configuration#isIgnoreSheetNotFound()}の値がtrueで、シートが見つからない場合、マッピング結果には含まれません。 @throws IllegalArgumentException {@literal xlsIn == null or classes == null...
[ "Excelファイルの複数シートを読み込み、任意のクラスにマップする。", "<p", ">", "複数のシートの形式を一度に読み込む際に使用します。<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java#L246-L251
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/file/meta/InodeTreePersistentState.java
InodeTreePersistentState.applyAndJournal
public void applyAndJournal(Supplier<JournalContext> context, SetAclEntry entry) { try { applySetAcl(entry); context.get().append(JournalEntry.newBuilder().setSetAcl(entry).build()); } catch (Throwable t) { ProcessUtils.fatalError(LOG, t, "Failed to apply %s", entry); throw t; // fatalEr...
java
public void applyAndJournal(Supplier<JournalContext> context, SetAclEntry entry) { try { applySetAcl(entry); context.get().append(JournalEntry.newBuilder().setSetAcl(entry).build()); } catch (Throwable t) { ProcessUtils.fatalError(LOG, t, "Failed to apply %s", entry); throw t; // fatalEr...
[ "public", "void", "applyAndJournal", "(", "Supplier", "<", "JournalContext", ">", "context", ",", "SetAclEntry", "entry", ")", "{", "try", "{", "applySetAcl", "(", "entry", ")", ";", "context", ".", "get", "(", ")", ".", "append", "(", "JournalEntry", ".",...
Sets an ACL for an inode. @param context journal context supplier @param entry set acl entry
[ "Sets", "an", "ACL", "for", "an", "inode", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/file/meta/InodeTreePersistentState.java#L218-L226
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java
PaymentSession.sendPayment
@Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment =...
java
@Nullable public ListenableFuture<PaymentProtocol.Ack> sendPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) throws PaymentProtocolException, VerificationException, IOException { Protos.Payment payment = getPayment(txns, refundAddr, memo); if (payment =...
[ "@", "Nullable", "public", "ListenableFuture", "<", "PaymentProtocol", ".", "Ack", ">", "sendPayment", "(", "List", "<", "Transaction", ">", "txns", ",", "@", "Nullable", "Address", "refundAddr", ",", "@", "Nullable", "String", "memo", ")", "throws", "PaymentP...
Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest. Provide transactions built by the wallet. NOTE: This does not broadcast the transactions to the bitcoin network, it merely sends a Payment message to the merchant confirming the payment. Returns an object wrapping PaymentACK ...
[ "Generates", "a", "Payment", "message", "and", "sends", "the", "payment", "to", "the", "merchant", "who", "sent", "the", "PaymentRequest", ".", "Provide", "transactions", "built", "by", "the", "wallet", ".", "NOTE", ":", "This", "does", "not", "broadcast", "...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/payments/PaymentSession.java#L318-L333
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/StaticSecurityAnalysisEvaluator.java
StaticSecurityAnalysisEvaluator.getStaticSecurityScanResponse
private SecurityReviewAuditResponse getStaticSecurityScanResponse(CollectorItem collectorItem, long beginDate, long endDate) { List<CodeQuality> codeQualities = codeQualityRepository.findByCollectorItemIdAndTimestampIsBetweenOrderByTimestampDesc(collectorItem.getId(), beginDate - 1, endDate + 1); Secur...
java
private SecurityReviewAuditResponse getStaticSecurityScanResponse(CollectorItem collectorItem, long beginDate, long endDate) { List<CodeQuality> codeQualities = codeQualityRepository.findByCollectorItemIdAndTimestampIsBetweenOrderByTimestampDesc(collectorItem.getId(), beginDate - 1, endDate + 1); Secur...
[ "private", "SecurityReviewAuditResponse", "getStaticSecurityScanResponse", "(", "CollectorItem", "collectorItem", ",", "long", "beginDate", ",", "long", "endDate", ")", "{", "List", "<", "CodeQuality", ">", "codeQualities", "=", "codeQualityRepository", ".", "findByCollec...
Reusable method for constructing the CodeQualityAuditResponse object @param collectorItem Collector Item @param beginDate Begin Date @param endDate End Date @return SecurityReviewAuditResponse
[ "Reusable", "method", "for", "constructing", "the", "CodeQualityAuditResponse", "object" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/StaticSecurityAnalysisEvaluator.java#L63-L92
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.toBigInteger
public static final Function<String,BigInteger> toBigInteger(final RoundingMode roundingMode, final Locale locale) { return new ToBigInteger(roundingMode, locale); }
java
public static final Function<String,BigInteger> toBigInteger(final RoundingMode roundingMode, final Locale locale) { return new ToBigInteger(roundingMode, locale); }
[ "public", "static", "final", "Function", "<", "String", ",", "BigInteger", ">", "toBigInteger", "(", "final", "RoundingMode", "roundingMode", ",", "final", "Locale", "locale", ")", "{", "return", "new", "ToBigInteger", "(", "roundingMode", ",", "locale", ")", ...
<p> Converts a String into a BigInteger, using the specified locale for determining decimal point. Rounding mode is used for removing the decimal part of the number. Any fractional part of the input String will be removed. </p> @param roundingMode the rounding mode to be used when setting the scale @param locale the l...
[ "<p", ">", "Converts", "a", "String", "into", "a", "BigInteger", "using", "the", "specified", "locale", "for", "determining", "decimal", "point", ".", "Rounding", "mode", "is", "used", "for", "removing", "the", "decimal", "part", "of", "the", "number", ".", ...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L383-L385
aws/aws-sdk-java
aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java
SimpleDBUtils.encodeRealNumberRange
public static String encodeRealNumberRange(int number, int maxNumDigits, int offsetValue) { long offsetNumber = number + offsetValue; String longString = Long.toString(offsetNumber); int numZeroes = maxNumDigits - longString.length(); StringBuffer strBuffer = new StringBuffer(numZeroes +...
java
public static String encodeRealNumberRange(int number, int maxNumDigits, int offsetValue) { long offsetNumber = number + offsetValue; String longString = Long.toString(offsetNumber); int numZeroes = maxNumDigits - longString.length(); StringBuffer strBuffer = new StringBuffer(numZeroes +...
[ "public", "static", "String", "encodeRealNumberRange", "(", "int", "number", ",", "int", "maxNumDigits", ",", "int", "offsetValue", ")", "{", "long", "offsetNumber", "=", "number", "+", "offsetValue", ";", "String", "longString", "=", "Long", ".", "toString", ...
Encodes real integer value into a string by offsetting and zero-padding number up to the specified number of digits. Use this encoding method if the data range set includes both positive and negative values. @param number integer to be encoded @param maxNumDigits maximum number of digits in the largest absolute value ...
[ "Encodes", "real", "integer", "value", "into", "a", "string", "by", "offsetting", "and", "zero", "-", "padding", "number", "up", "to", "the", "specified", "number", "of", "digits", ".", "Use", "this", "encoding", "method", "if", "the", "data", "range", "se...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-simpledb/src/main/java/com/amazonaws/services/simpledb/util/SimpleDBUtils.java#L146-L156
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.deleteElement
public void deleteElement(String elementId, final String relatedElementId) { elementId = getServerId(elementId); removeContainerElements(elementId); addToRecentList(elementId, null); reloadElements(new String[] {relatedElementId}); }
java
public void deleteElement(String elementId, final String relatedElementId) { elementId = getServerId(elementId); removeContainerElements(elementId); addToRecentList(elementId, null); reloadElements(new String[] {relatedElementId}); }
[ "public", "void", "deleteElement", "(", "String", "elementId", ",", "final", "String", "relatedElementId", ")", "{", "elementId", "=", "getServerId", "(", "elementId", ")", ";", "removeContainerElements", "(", "elementId", ")", ";", "addToRecentList", "(", "elemen...
Deletes an element from the VFS, removes it from all containers and the client side cache.<p> @param elementId the element to delete @param relatedElementId related element to reload after the element has been deleted
[ "Deletes", "an", "element", "from", "the", "VFS", "removes", "it", "from", "all", "containers", "and", "the", "client", "side", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L1110-L1116
tipsy/javalin
src/main/java/io/javalin/Javalin.java
Javalin.sse
public Javalin sse(@NotNull String path, @NotNull Consumer<SseClient> client, @NotNull Set<Role> permittedRoles) { return get(path, new SseHandler(client), permittedRoles); }
java
public Javalin sse(@NotNull String path, @NotNull Consumer<SseClient> client, @NotNull Set<Role> permittedRoles) { return get(path, new SseHandler(client), permittedRoles); }
[ "public", "Javalin", "sse", "(", "@", "NotNull", "String", "path", ",", "@", "NotNull", "Consumer", "<", "SseClient", ">", "client", ",", "@", "NotNull", "Set", "<", "Role", ">", "permittedRoles", ")", "{", "return", "get", "(", "path", ",", "new", "Ss...
Adds a lambda handler for a Server Sent Event connection on the specified path. Requires an access manager to be set on the instance.
[ "Adds", "a", "lambda", "handler", "for", "a", "Server", "Sent", "Event", "connection", "on", "the", "specified", "path", ".", "Requires", "an", "access", "manager", "to", "be", "set", "on", "the", "instance", "." ]
train
https://github.com/tipsy/javalin/blob/68b2f7592f237db1c2b597e645697eb75fdaee53/src/main/java/io/javalin/Javalin.java#L443-L445
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java
ManagedClustersInner.resetAADProfileAsync
public Observable<Void> resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { return resetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { @Override public V...
java
public Observable<Void> resetAADProfileAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { return resetAADProfileWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<Void>, Void>() { @Override public V...
[ "public", "Observable", "<", "Void", ">", "resetAADProfileAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ManagedClusterAADProfile", "parameters", ")", "{", "return", "resetAADProfileWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @param parameters Parameters supplied to the Reset AAD Profile operation for a Managed Cluster. @throws IllegalArg...
[ "Reset", "AAD", "Profile", "of", "a", "managed", "cluster", ".", "Update", "the", "AAD", "Profile", "for", "a", "managed", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L1704-L1711
saxsys/SynchronizeFX
transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java
SychronizeFXWebsocketServer.newChannel
public SynchronizeFxServer newChannel(final Object root, final String channelName, final Executor modelChangeExecutor, final ServerCallback callback) { synchronized (channels) { if (channels.containsKey(channelName)) { throw new IllegalArgumentException("A new Synchronize...
java
public SynchronizeFxServer newChannel(final Object root, final String channelName, final Executor modelChangeExecutor, final ServerCallback callback) { synchronized (channels) { if (channels.containsKey(channelName)) { throw new IllegalArgumentException("A new Synchronize...
[ "public", "SynchronizeFxServer", "newChannel", "(", "final", "Object", "root", ",", "final", "String", "channelName", ",", "final", "Executor", "modelChangeExecutor", ",", "final", "ServerCallback", "callback", ")", "{", "synchronized", "(", "channels", ")", "{", ...
Creates a new {@link SynchronizeFxServer} that synchronizes it's own model. <p> Each {@link SynchronizeFxServer} managed by this servlet must have its own channel name. </p> @param root The root object of the model that should be synchronized. @param channelName The name of the channel at which clients can connect to...
[ "Creates", "a", "new", "{", "@link", "SynchronizeFxServer", "}", "that", "synchronizes", "it", "s", "own", "model", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/transmitter/websocket-transmitter/src/main/java/de/saxsys/synchronizefx/websocket/SychronizeFXWebsocketServer.java#L114-L130
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.failUnknownPropertyInJQLException
public static void failUnknownPropertyInJQLException(SQLiteModelMethod method, Class<? extends Annotation> annotationClazz, AnnotationAttributeType attribute, String fieldName) { throw (new UnknownPropertyInJQLException(method, annotationClazz, attribute, fieldName)); }
java
public static void failUnknownPropertyInJQLException(SQLiteModelMethod method, Class<? extends Annotation> annotationClazz, AnnotationAttributeType attribute, String fieldName) { throw (new UnknownPropertyInJQLException(method, annotationClazz, attribute, fieldName)); }
[ "public", "static", "void", "failUnknownPropertyInJQLException", "(", "SQLiteModelMethod", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationClazz", ",", "AnnotationAttributeType", "attribute", ",", "String", "fieldName", ")", "{", "throw", "(...
Fail unknown property in JQL exception. @param method the method @param annotationClazz the annotation clazz @param attribute the attribute @param fieldName the field name
[ "Fail", "unknown", "property", "in", "JQL", "exception", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L311-L315
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.inclusiveBetween
public static void inclusiveBetween(final double start, final double end, final double value, final String message) { // TODO when breaking BC, consider returning value if (value < start || value > end) { throw new IllegalArgumentException(message); } }
java
public static void inclusiveBetween(final double start, final double end, final double value, final String message) { // TODO when breaking BC, consider returning value if (value < start || value > end) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "inclusiveBetween", "(", "final", "double", "start", ",", "final", "double", "end", ",", "final", "double", "value", ",", "final", "String", "message", ")", "{", "// TODO when breaking BC, consider returning value", "if", "(", "value", ...
Validate that the specified primitive value falls between the two inclusive values specified; otherwise, throws an exception with the specified message. <pre>Validate.inclusiveBetween(0.1, 2.1, 1.1, "Not in range");</pre> @param start the inclusive start value @param end the inclusive end value @param value the val...
[ "Validate", "that", "the", "specified", "primitive", "value", "falls", "between", "the", "two", "inclusive", "values", "specified", ";", "otherwise", "throws", "an", "exception", "with", "the", "specified", "message", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L1102-L1107
glyptodon/guacamole-client
extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java
AuthenticationProviderService.authenticateUser
public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException { // Pull HTTP header from request if present HttpServletRequest request = credentials.getRequest(); if (request != null) { // Get the username from the header configured in gua...
java
public AuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException { // Pull HTTP header from request if present HttpServletRequest request = credentials.getRequest(); if (request != null) { // Get the username from the header configured in gua...
[ "public", "AuthenticatedUser", "authenticateUser", "(", "Credentials", "credentials", ")", "throws", "GuacamoleException", "{", "// Pull HTTP header from request if present", "HttpServletRequest", "request", "=", "credentials", ".", "getRequest", "(", ")", ";", "if", "(", ...
Returns an AuthenticatedUser representing the user authenticated by the given credentials. @param credentials The credentials to use for authentication. @return An AuthenticatedUser representing the user authenticated by the given credentials. @throws GuacamoleException If an error occurs while authenticating the us...
[ "Returns", "an", "AuthenticatedUser", "representing", "the", "user", "authenticated", "by", "the", "given", "credentials", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java#L65-L86
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java
StringUtils.nthOccurrenceOf
public static int nthOccurrenceOf(final String s, final char needle, int n) { checkNotNull(s); checkArgument(n > 0); for (int i = 0; i < s.length(); ++i) { if (needle == s.charAt(i)) { --n; if (n == 0) { return i; } } } return -1; }
java
public static int nthOccurrenceOf(final String s, final char needle, int n) { checkNotNull(s); checkArgument(n > 0); for (int i = 0; i < s.length(); ++i) { if (needle == s.charAt(i)) { --n; if (n == 0) { return i; } } } return -1; }
[ "public", "static", "int", "nthOccurrenceOf", "(", "final", "String", "s", ",", "final", "char", "needle", ",", "int", "n", ")", "{", "checkNotNull", "(", "s", ")", ";", "checkArgument", "(", "n", ">", "0", ")", ";", "for", "(", "int", "i", "=", "0...
* Returns the index of the {@code n}-th occurence of {@code needle} in {@code s}. If {@code needle} does not appear in {@code s}, returns -1. @param s The string to search. Cannot be null. @param needle The character to search for. @param n Return the {@code n}-th occurence
[ "*", "Returns", "the", "index", "of", "the", "{", "@code", "n", "}", "-", "th", "occurence", "of", "{", "@code", "needle", "}", "in", "{", "@code", "s", "}", ".", "If", "{", "@code", "needle", "}", "does", "not", "appear", "in", "{", "@code", "s"...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java#L141-L153
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.defaultIfEmpty
public static <T extends CharSequence> T defaultIfEmpty(final T str, final T defaultStr) { return isEmpty(str) ? defaultStr : str; }
java
public static <T extends CharSequence> T defaultIfEmpty(final T str, final T defaultStr) { return isEmpty(str) ? defaultStr : str; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "defaultIfEmpty", "(", "final", "T", "str", ",", "final", "T", "defaultStr", ")", "{", "return", "isEmpty", "(", "str", ")", "?", "defaultStr", ":", "str", ";", "}" ]
<p>Returns either the passed in CharSequence, or if the CharSequence is empty or {@code null}, the value of {@code defaultStr}.</p> <pre> StringUtils.defaultIfEmpty(null, "NULL") = "NULL" StringUtils.defaultIfEmpty("", "NULL") = "NULL" StringUtils.defaultIfEmpty(" ", "NULL") = " " StringUtils.defaultIfEmpty("bat...
[ "<p", ">", "Returns", "either", "the", "passed", "in", "CharSequence", "or", "if", "the", "CharSequence", "is", "empty", "or", "{", "@code", "null", "}", "the", "value", "of", "{", "@code", "defaultStr", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L7440-L7442
jpardogo/GoogleProgressBar
example/src/main/java/com/jpardogo/android/googleprogressbar/calendarstock/ColorPickerPalette.java
ColorPickerPalette.addSwatchToRow
private void addSwatchToRow(TableRow row, View swatch, int rowNumber) { if (rowNumber % 2 == 0) { row.addView(swatch); } else { row.addView(swatch, 0); } }
java
private void addSwatchToRow(TableRow row, View swatch, int rowNumber) { if (rowNumber % 2 == 0) { row.addView(swatch); } else { row.addView(swatch, 0); } }
[ "private", "void", "addSwatchToRow", "(", "TableRow", "row", ",", "View", "swatch", ",", "int", "rowNumber", ")", "{", "if", "(", "rowNumber", "%", "2", "==", "0", ")", "{", "row", ".", "addView", "(", "swatch", ")", ";", "}", "else", "{", "row", "...
Appends a swatch to the end of the row for even-numbered rows (starting with row 0), to the beginning of a row for odd-numbered rows.
[ "Appends", "a", "swatch", "to", "the", "end", "of", "the", "row", "for", "even", "-", "numbered", "rows", "(", "starting", "with", "row", "0", ")", "to", "the", "beginning", "of", "a", "row", "for", "odd", "-", "numbered", "rows", "." ]
train
https://github.com/jpardogo/GoogleProgressBar/blob/c90bff19179335298ebccea5f4621dd887c55ef1/example/src/main/java/com/jpardogo/android/googleprogressbar/calendarstock/ColorPickerPalette.java#L133-L139
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.txnPollReserve
public QueueItem txnPollReserve(long reservedOfferId, String transactionId) { QueueItem item = getItemQueue().peek(); if (item == null) { TxQueueItem txItem = txMap.remove(reservedOfferId); if (txItem == null) { return null; } item = new Qu...
java
public QueueItem txnPollReserve(long reservedOfferId, String transactionId) { QueueItem item = getItemQueue().peek(); if (item == null) { TxQueueItem txItem = txMap.remove(reservedOfferId); if (txItem == null) { return null; } item = new Qu...
[ "public", "QueueItem", "txnPollReserve", "(", "long", "reservedOfferId", ",", "String", "transactionId", ")", "{", "QueueItem", "item", "=", "getItemQueue", "(", ")", ".", "peek", "(", ")", ";", "if", "(", "item", "==", "null", ")", "{", "TxQueueItem", "tx...
Tries to obtain an item by removing the head of the queue or removing an item previously reserved by invoking {@link #txnOfferReserve(String)} with {@code reservedOfferId}. <p> If the queue item does not have data in-memory it will load the data from the queue store if the queue store is configured and enabled. @param...
[ "Tries", "to", "obtain", "an", "item", "by", "removing", "the", "head", "of", "the", "queue", "or", "removing", "an", "item", "previously", "reserved", "by", "invoking", "{", "@link", "#txnOfferReserve", "(", "String", ")", "}", "with", "{", "@code", "rese...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L182-L202
kiegroup/drools
drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java
DroolsStreamUtils.streamIn
public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException { if (compressed) in = new GZIPInputStream(in); return new DroolsObjectInputStream(in, classLoader).readObject(); }
java
public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException { if (compressed) in = new GZIPInputStream(in); return new DroolsObjectInputStream(in, classLoader).readObject(); }
[ "public", "static", "Object", "streamIn", "(", "InputStream", "in", ",", "ClassLoader", "classLoader", ",", "boolean", "compressed", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "if", "(", "compressed", ")", "in", "=", "new", "GZIPInputStream"...
This method reads the contents from the given input stream and returns the object. The contents in the given stream could be compressed or uncompressed depending on the given flag. It is assumed that the content stream was written by the corresponding streamOut methods of this class. @param in @return @throws IOExcep...
[ "This", "method", "reads", "the", "contents", "from", "the", "given", "input", "stream", "and", "returns", "the", "object", ".", "The", "contents", "in", "the", "given", "stream", "could", "be", "compressed", "or", "uncompressed", "depending", "on", "the", "...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L201-L206
rey5137/material
material/src/main/java/com/rey/material/widget/FloatingActionButton.java
FloatingActionButton.updateLocation
public void updateLocation(int x, int y, int gravity){ if(getParent() != null) updateParams(x, y, gravity, getLayoutParams()); else Log.v(FloatingActionButton.class.getSimpleName(), "updateLocation() is called without parent"); }
java
public void updateLocation(int x, int y, int gravity){ if(getParent() != null) updateParams(x, y, gravity, getLayoutParams()); else Log.v(FloatingActionButton.class.getSimpleName(), "updateLocation() is called without parent"); }
[ "public", "void", "updateLocation", "(", "int", "x", ",", "int", "y", ",", "int", "gravity", ")", "{", "if", "(", "getParent", "(", ")", "!=", "null", ")", "updateParams", "(", "x", ",", "y", ",", "gravity", ",", "getLayoutParams", "(", ")", ")", "...
Update the location of this button. This method only work if it's already attached to a parent view. @param x The x value of anchor point. @param y The y value of anchor point. @param gravity The gravity apply with this button. @see Gravity
[ "Update", "the", "location", "of", "this", "button", ".", "This", "method", "only", "work", "if", "it", "s", "already", "attached", "to", "a", "parent", "view", ".", "@param", "x", "The", "x", "value", "of", "anchor", "point", ".", "@param", "y", "The"...
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/FloatingActionButton.java#L362-L367
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/ScreenField.java
ScreenField.handleCommand
public boolean handleCommand(String strCommand, ScreenField sourceSField, int iUseSameWindow) { boolean bHandled = false; if (!(this instanceof BasePanel)) // BasePanel already called doCommand. bHandled = this.doCommand(strCommand, sourceSField, iUseSameWindow); // Do I handle it? ...
java
public boolean handleCommand(String strCommand, ScreenField sourceSField, int iUseSameWindow) { boolean bHandled = false; if (!(this instanceof BasePanel)) // BasePanel already called doCommand. bHandled = this.doCommand(strCommand, sourceSField, iUseSameWindow); // Do I handle it? ...
[ "public", "boolean", "handleCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iUseSameWindow", ")", "{", "boolean", "bHandled", "=", "false", ";", "if", "(", "!", "(", "this", "instanceof", "BasePanel", ")", ")", "// BaseP...
Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't process, pass to parent (with me as the source). <br />Note: Never pass to a parent or child that matches t...
[ "Process", "the", "command", ".", "<br", "/", ">", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "<br", "/", ">", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/ScreenField.java#L246-L257
wildfly/wildfly-maven-plugin
core/src/main/java/org/wildfly/plugin/core/Assertions.java
Assertions.requiresNotNullOrNotEmptyParameter
static <E, T extends Collection<E>> T requiresNotNullOrNotEmptyParameter(final String name, final T value) throws IllegalArgumentException { Assert.checkNotNullParam(name, value); Assert.checkNotEmptyParam(name, value); return value; }
java
static <E, T extends Collection<E>> T requiresNotNullOrNotEmptyParameter(final String name, final T value) throws IllegalArgumentException { Assert.checkNotNullParam(name, value); Assert.checkNotEmptyParam(name, value); return value; }
[ "static", "<", "E", ",", "T", "extends", "Collection", "<", "E", ">", ">", "T", "requiresNotNullOrNotEmptyParameter", "(", "final", "String", "name", ",", "final", "T", "value", ")", "throws", "IllegalArgumentException", "{", "Assert", ".", "checkNotNullParam", ...
Checks if the parameter is {@code null} or empty and throws an {@link IllegalArgumentException} if it is. @param name the name of the parameter @param value the value to check @return the parameter value @throws IllegalArgumentException if the object representing the parameter is {@code null}
[ "Checks", "if", "the", "parameter", "is", "{", "@code", "null", "}", "or", "empty", "and", "throws", "an", "{", "@link", "IllegalArgumentException", "}", "if", "it", "is", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Assertions.java#L57-L61
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/BatchHelper.java
BatchHelper.queue
public <T> void queue(StorageRequest<T> req, JsonBatchCallback<T> callback) throws IOException { checkState( !requestsExecutor.isShutdown() && !requestsExecutor.isTerminated(), "requestsExecutor should not be terminated to queue batch requests"); if (maxRequestsPerBatch == 1) { responseFut...
java
public <T> void queue(StorageRequest<T> req, JsonBatchCallback<T> callback) throws IOException { checkState( !requestsExecutor.isShutdown() && !requestsExecutor.isTerminated(), "requestsExecutor should not be terminated to queue batch requests"); if (maxRequestsPerBatch == 1) { responseFut...
[ "public", "<", "T", ">", "void", "queue", "(", "StorageRequest", "<", "T", ">", "req", ",", "JsonBatchCallback", "<", "T", ">", "callback", ")", "throws", "IOException", "{", "checkState", "(", "!", "requestsExecutor", ".", "isShutdown", "(", ")", "&&", ...
Adds an additional request to the batch, and possibly flushes the current contents of the batch if {@code maxRequestsPerBatch} has been reached.
[ "Adds", "an", "additional", "request", "to", "the", "batch", "and", "possibly", "flushes", "the", "current", "contents", "of", "the", "batch", "if", "{" ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/BatchHelper.java#L155-L171
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexSettingsReader.java
IndexSettingsReader.readSettings
public static String readSettings(String root, String index) throws IOException { if (root == null) { return readSettings(index); } return readSettings(root, index, Defaults.IndexSettingsFileName); }
java
public static String readSettings(String root, String index) throws IOException { if (root == null) { return readSettings(index); } return readSettings(root, index, Defaults.IndexSettingsFileName); }
[ "public", "static", "String", "readSettings", "(", "String", "root", ",", "String", "index", ")", "throws", "IOException", "{", "if", "(", "root", "==", "null", ")", "{", "return", "readSettings", "(", "index", ")", ";", "}", "return", "readSettings", "(",...
Read index settings @param root dir within the classpath @param index index name @return Settings @throws IOException if connection with elasticsearch is failing
[ "Read", "index", "settings" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexSettingsReader.java#L57-L62
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.writeMapFile
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { FileWriter fw = new FileWriter(mapFileName); XMLOutputFactory xof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = ...
java
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { FileWriter fw = new FileWriter(mapFileName); XMLOutputFactory xof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = ...
[ "private", "void", "writeMapFile", "(", "String", "mapFileName", ",", "File", "jarFile", ",", "boolean", "mapClassMethods", ")", "throws", "IOException", ",", "XMLStreamException", ",", "ClassNotFoundException", ",", "IntrospectionException", "{", "FileWriter", "fw", ...
Generate an IKVM map file. @param mapFileName map file name @param jarFile jar file containing code to be mapped @param mapClassMethods true if we want to produce .Net style class method names @throws IOException @throws XMLStreamException @throws ClassNotFoundException @throws IntrospectionException
[ "Generate", "an", "IKVM", "map", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L111-L132
overview/mime-types
src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java
MimeTypeDetector.detectMimeType
public String detectMimeType(String filename, Callable<byte[]> getBytes) throws GetBytesException { Supplier<CompletionStage<byte[]>> supplier = () -> { try { return CompletableFuture.completedFuture(getBytes.call()); } catch (Exception ex) { throw new CompletionEx...
java
public String detectMimeType(String filename, Callable<byte[]> getBytes) throws GetBytesException { Supplier<CompletionStage<byte[]>> supplier = () -> { try { return CompletableFuture.completedFuture(getBytes.call()); } catch (Exception ex) { throw new CompletionEx...
[ "public", "String", "detectMimeType", "(", "String", "filename", ",", "Callable", "<", "byte", "[", "]", ">", "getBytes", ")", "throws", "GetBytesException", "{", "Supplier", "<", "CompletionStage", "<", "byte", "[", "]", ">", ">", "supplier", "=", "(", ")...
Synchronously detects a MIME type from a filename and bytes. <p> This method follows the Shared Mime Info database's <a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#idm140625828606432">Recommended Checking Order</a>. The only difference: it tests for <tt>text/plain</tt...
[ "Synchronously", "detects", "a", "MIME", "type", "from", "a", "filename", "and", "bytes", "." ]
train
https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L192-L201
haifengl/smile
math/src/main/java/smile/stat/distribution/AbstractDistribution.java
AbstractDistribution.quantile
protected double quantile(double p, double xmin, double xmax, double eps) { if (eps <= 0.0) { throw new IllegalArgumentException("Invalid epsilon: " + eps); } while (Math.abs(xmax - xmin) > eps) { double xmed = (xmax + xmin) / 2; if (cdf(x...
java
protected double quantile(double p, double xmin, double xmax, double eps) { if (eps <= 0.0) { throw new IllegalArgumentException("Invalid epsilon: " + eps); } while (Math.abs(xmax - xmin) > eps) { double xmed = (xmax + xmin) / 2; if (cdf(x...
[ "protected", "double", "quantile", "(", "double", "p", ",", "double", "xmin", ",", "double", "xmax", ",", "double", "eps", ")", "{", "if", "(", "eps", "<=", "0.0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid epsilon: \"", "+", "ep...
Inversion of CDF by bisection numeric root finding of "cdf(x) = p" for continuous distribution.
[ "Inversion", "of", "CDF", "by", "bisection", "numeric", "root", "finding", "of", "cdf", "(", "x", ")", "=", "p", "for", "continuous", "distribution", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/stat/distribution/AbstractDistribution.java#L89-L104
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryAbstractImpl.java
ConnectionFactoryAbstractImpl.initializeJdbcConnection
protected void initializeJdbcConnection(Connection con, JdbcConnectionDescriptor jcd) throws LookupException { try { PlatformFactory.getPlatformFor(jcd).initializeJdbcConnection(jcd, con); } catch (PlatformException e) { throw new ...
java
protected void initializeJdbcConnection(Connection con, JdbcConnectionDescriptor jcd) throws LookupException { try { PlatformFactory.getPlatformFor(jcd).initializeJdbcConnection(jcd, con); } catch (PlatformException e) { throw new ...
[ "protected", "void", "initializeJdbcConnection", "(", "Connection", "con", ",", "JdbcConnectionDescriptor", "jcd", ")", "throws", "LookupException", "{", "try", "{", "PlatformFactory", ".", "getPlatformFor", "(", "jcd", ")", ".", "initializeJdbcConnection", "(", "jcd"...
Initialize the connection with the specified properties in OJB configuration files and platform depended properties. Invoke this method after a NEW connection is created, not if re-using from pool. @see org.apache.ojb.broker.platforms.PlatformFactory @see org.apache.ojb.broker.platforms.Platform
[ "Initialize", "the", "connection", "with", "the", "specified", "properties", "in", "OJB", "configuration", "files", "and", "platform", "depended", "properties", ".", "Invoke", "this", "method", "after", "a", "NEW", "connection", "is", "created", "not", "if", "re...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/ConnectionFactoryAbstractImpl.java#L153-L164
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java
SVGHyperCube.drawFilled
public static Element drawFilled(SVGPlot svgp, String cls, Projection2D proj, NumberVector min, NumberVector max) { Element group = svgp.svgElement(SVGConstants.SVG_G_TAG); ArrayList<double[]> edges = getVisibleEdges(proj, min, max); double[] rv_min = proj.fastProjectDataToRenderSpace(min); recDrawSides...
java
public static Element drawFilled(SVGPlot svgp, String cls, Projection2D proj, NumberVector min, NumberVector max) { Element group = svgp.svgElement(SVGConstants.SVG_G_TAG); ArrayList<double[]> edges = getVisibleEdges(proj, min, max); double[] rv_min = proj.fastProjectDataToRenderSpace(min); recDrawSides...
[ "public", "static", "Element", "drawFilled", "(", "SVGPlot", "svgp", ",", "String", "cls", ",", "Projection2D", "proj", ",", "NumberVector", "min", ",", "NumberVector", "max", ")", "{", "Element", "group", "=", "svgp", ".", "svgElement", "(", "SVGConstants", ...
Filled hypercube. @param svgp SVG Plot @param cls CSS class to use. @param proj Visualization projection @param min First corner @param max Opposite corner @return group element
[ "Filled", "hypercube", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java#L135-L141
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/MethodUtils.java
MethodUtils.invokeExactStaticMethod
public static Object invokeExactStaticMethod(Class<?> objectClass, String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { return invokeExactStaticMethod(objectClass, methodName, EMPTY_OBJECT_ARRAY, EMPTY_CLASS_PARAMETERS); }
java
public static Object invokeExactStaticMethod(Class<?> objectClass, String methodName) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { return invokeExactStaticMethod(objectClass, methodName, EMPTY_OBJECT_ARRAY, EMPTY_CLASS_PARAMETERS); }
[ "public", "static", "Object", "invokeExactStaticMethod", "(", "Class", "<", "?", ">", "objectClass", ",", "String", "methodName", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "return", "invokeExactStaticMeth...
Invoke a static method that has no parameters. @param objectClass invoke static method on this class @param methodName get method with this name @return the value returned by the invoked method @throws NoSuchMethodException if there is no such accessible method @throws InvocationTargetException wraps an exception thro...
[ "Invoke", "a", "static", "method", "that", "has", "no", "parameters", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/MethodUtils.java#L518-L521
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/RtmpClient.java
RtmpClient.sendRpc
@Deprecated public int sendRpc(String endpoint, String service, String method, Object... args) { RemotingMessage message = createRemotingMessage(endpoint, service, method, args); Invoke invoke = createAmf3InvokeSkeleton(null, message); send(invoke); return invoke.getInvokeId(); ...
java
@Deprecated public int sendRpc(String endpoint, String service, String method, Object... args) { RemotingMessage message = createRemotingMessage(endpoint, service, method, args); Invoke invoke = createAmf3InvokeSkeleton(null, message); send(invoke); return invoke.getInvokeId(); ...
[ "@", "Deprecated", "public", "int", "sendRpc", "(", "String", "endpoint", ",", "String", "service", ",", "String", "method", ",", "Object", "...", "args", ")", "{", "RemotingMessage", "message", "=", "createRemotingMessage", "(", "endpoint", ",", "service", ",...
Send a remote procedure call. @param endpoint The endpoint of the call @param service The service handling the call @param method The method to call @param args Optional args to the call @return The id of the callback @deprecated Due to method resolution ambiguities, this method is due to be removed within the next cou...
[ "Send", "a", "remote", "procedure", "call", "." ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/RtmpClient.java#L612-L619
twilio/authy-java
src/main/java/com/authy/AuthyUtil.java
AuthyUtil.validateSignature
private static boolean validateSignature(Map<String, String> parameters, Map<String, String> headers, String method, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException { if (headers == null) throw new OneTouchException("No headers sent"); if (!headers.contain...
java
private static boolean validateSignature(Map<String, String> parameters, Map<String, String> headers, String method, String url, String apiKey) throws OneTouchException, UnsupportedEncodingException { if (headers == null) throw new OneTouchException("No headers sent"); if (!headers.contain...
[ "private", "static", "boolean", "validateSignature", "(", "Map", "<", "String", ",", "String", ">", "parameters", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "String", "method", ",", "String", "url", ",", "String", "apiKey", ")", "throws...
Validates the request information to @param parameters The request parameters(all of them) @param headers The headers of the request @param url The url of the request. @param apiKey the security token from the authy library @return true if the signature ios valid, false otherwise @throws UnsupportedEncod...
[ "Validates", "the", "request", "information", "to" ]
train
https://github.com/twilio/authy-java/blob/55e3a5ff57a93b3eb36f5b59e8824e60af2b8b91/src/main/java/com/authy/AuthyUtil.java#L55-L81
ModeShape/modeshape
sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java
DataTypeParser.parseExactNumericType
protected DataType parseExactNumericType( DdlTokenStream tokens ) throws ParsingException { DataType dataType = null; String typeName = null; if (tokens.matchesAnyOf("INTEGER", "INT", "SMALLINT")) { dataType = new DataType(); typeName = consume(tokens, dataType, false); ...
java
protected DataType parseExactNumericType( DdlTokenStream tokens ) throws ParsingException { DataType dataType = null; String typeName = null; if (tokens.matchesAnyOf("INTEGER", "INT", "SMALLINT")) { dataType = new DataType(); typeName = consume(tokens, dataType, false); ...
[ "protected", "DataType", "parseExactNumericType", "(", "DdlTokenStream", "tokens", ")", "throws", "ParsingException", "{", "DataType", "dataType", "=", "null", ";", "String", "typeName", "=", "null", ";", "if", "(", "tokens", ".", "matchesAnyOf", "(", "\"INTEGER\"...
Parses SQL-92 Exact numeric data types. <exact numeric type> ::= NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ] | INTEGER | INT | SMALLINT @param tokens ...
[ "Parses", "SQL", "-", "92", "Exact", "numeric", "data", "types", ".", "<exact", "numeric", "type", ">", "::", "=", "NUMERIC", "[", "<left", "paren", ">", "<precision", ">", "[", "<comma", ">", "<scale", ">", "]", "<right", "paren", ">", "]", "|", "DE...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/datatype/DataTypeParser.java#L451-L485
apache/fluo
modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java
Bytes.contentEqualsUnchecked
private boolean contentEqualsUnchecked(byte[] bytes, int offset, int len) { if (length != len) { return false; } return compareToUnchecked(bytes, offset, len) == 0; }
java
private boolean contentEqualsUnchecked(byte[] bytes, int offset, int len) { if (length != len) { return false; } return compareToUnchecked(bytes, offset, len) == 0; }
[ "private", "boolean", "contentEqualsUnchecked", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "len", ")", "{", "if", "(", "length", "!=", "len", ")", "{", "return", "false", ";", "}", "return", "compareToUnchecked", "(", "bytes", ",",...
Returns true if this Bytes object equals another. This method doesn't check it's arguments. @since 1.2.0
[ "Returns", "true", "if", "this", "Bytes", "object", "equals", "another", ".", "This", "method", "doesn", "t", "check", "it", "s", "arguments", "." ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/api/src/main/java/org/apache/fluo/api/data/Bytes.java#L308-L314
apache/groovy
src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java
ClassNodeUtils.addGeneratedConstructor
public static ConstructorNode addGeneratedConstructor(ClassNode classNode, int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code) { ConstructorNode consNode = classNode.addConstructor(modifiers, parameters, exceptions, code); markAsGenerated(classNode, consNode); return c...
java
public static ConstructorNode addGeneratedConstructor(ClassNode classNode, int modifiers, Parameter[] parameters, ClassNode[] exceptions, Statement code) { ConstructorNode consNode = classNode.addConstructor(modifiers, parameters, exceptions, code); markAsGenerated(classNode, consNode); return c...
[ "public", "static", "ConstructorNode", "addGeneratedConstructor", "(", "ClassNode", "classNode", ",", "int", "modifiers", ",", "Parameter", "[", "]", "parameters", ",", "ClassNode", "[", "]", "exceptions", ",", "Statement", "code", ")", "{", "ConstructorNode", "co...
Add a method that is marked as @Generated. @see ClassNode#addConstructor(int, Parameter[], ClassNode[], Statement)
[ "Add", "a", "method", "that", "is", "marked", "as", "@Generated", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java#L121-L125
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java
JDBCResultSet.getBlob
public Blob getBlob(int columnIndex) throws SQLException { Object o = getObject(columnIndex); if (o == null) { return null; } if (o instanceof BlobDataID) { return new JDBCBlobClient(session, (BlobDataID) o); } else if (o instanceof Blob) { ...
java
public Blob getBlob(int columnIndex) throws SQLException { Object o = getObject(columnIndex); if (o == null) { return null; } if (o instanceof BlobDataID) { return new JDBCBlobClient(session, (BlobDataID) o); } else if (o instanceof Blob) { ...
[ "public", "Blob", "getBlob", "(", "int", "columnIndex", ")", "throws", "SQLException", "{", "Object", "o", "=", "getObject", "(", "columnIndex", ")", ";", "if", "(", "o", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "o", "instanceof",...
<!-- start generic documentation --> Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>Blob</code> object in the Java programming language. <!-- end generic documentation --> <!-- start release-specific documentation --> <div class="ReleaseSpecificDocument...
[ "<!", "--", "start", "generic", "documentation", "--", ">", "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "a", "<code", ">", "B...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSet.java#L4218-L4237
VoltDB/voltdb
src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java
SSLConfiguration.createKeyManagers
private static KeyManagerFactory createKeyManagers(String filepath, String keystorePassword, String keyPassword) throws FileNotFoundException, KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException { KeyStore keyStore = KeyStore.getInstance("JKS"); ...
java
private static KeyManagerFactory createKeyManagers(String filepath, String keystorePassword, String keyPassword) throws FileNotFoundException, KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException, UnrecoverableKeyException { KeyStore keyStore = KeyStore.getInstance("JKS"); ...
[ "private", "static", "KeyManagerFactory", "createKeyManagers", "(", "String", "filepath", ",", "String", "keystorePassword", ",", "String", "keyPassword", ")", "throws", "FileNotFoundException", ",", "KeyStoreException", ",", "IOException", ",", "NoSuchAlgorithmException", ...
Creates the key managers required to initiate the {@link SSLContext}, using a JKS keystore as an input. @param filepath - the path to the JKS keystore. @param keystorePassword - the keystore's password. @param keyPassword - the key's passsword. @return {@link KeyManager} array that will be used to initiate the {@link ...
[ "Creates", "the", "key", "managers", "required", "to", "initiate", "the", "{", "@link", "SSLContext", "}", "using", "a", "JKS", "keystore", "as", "an", "input", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java#L132-L141
haifengl/smile
demo/src/main/java/smile/demo/classification/ClassificationDemo.java
ClassificationDemo.paintOnCanvas
protected PlotCanvas paintOnCanvas(double[][] data, int[] label) { PlotCanvas canvas = ScatterPlot.plot(data, pointLegend); for (int i = 0; i < data.length; i++) { canvas.point(pointLegend, Palette.COLORS[label[i]], data[i]); } return canvas; }
java
protected PlotCanvas paintOnCanvas(double[][] data, int[] label) { PlotCanvas canvas = ScatterPlot.plot(data, pointLegend); for (int i = 0; i < data.length; i++) { canvas.point(pointLegend, Palette.COLORS[label[i]], data[i]); } return canvas; }
[ "protected", "PlotCanvas", "paintOnCanvas", "(", "double", "[", "]", "[", "]", "data", ",", "int", "[", "]", "label", ")", "{", "PlotCanvas", "canvas", "=", "ScatterPlot", ".", "plot", "(", "data", ",", "pointLegend", ")", ";", "for", "(", "int", "i", ...
paint given data with label on canvas @param data the data point(s) to paint, only support 2D or 3D features @param label the data label for classification
[ "paint", "given", "data", "with", "label", "on", "canvas" ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/demo/src/main/java/smile/demo/classification/ClassificationDemo.java#L123-L129
enioka/jqm
jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java
Helpers.createMessage
static void createMessage(String textMessage, JobInstance jobInstance, DbConn cnx) { cnx.runUpdate("message_insert", jobInstance.getId(), textMessage); }
java
static void createMessage(String textMessage, JobInstance jobInstance, DbConn cnx) { cnx.runUpdate("message_insert", jobInstance.getId(), textMessage); }
[ "static", "void", "createMessage", "(", "String", "textMessage", ",", "JobInstance", "jobInstance", ",", "DbConn", "cnx", ")", "{", "cnx", ".", "runUpdate", "(", "\"message_insert\"", ",", "jobInstance", ".", "getId", "(", ")", ",", "textMessage", ")", ";", ...
Create a text message that will be stored in the database. Must be called inside a transaction.
[ "Create", "a", "text", "message", "that", "will", "be", "stored", "in", "the", "database", ".", "Must", "be", "called", "inside", "a", "transaction", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/Helpers.java#L190-L193
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/transform/transformpolicy_stats.java
transformpolicy_stats.get
public static transformpolicy_stats get(nitro_service service, String name) throws Exception{ transformpolicy_stats obj = new transformpolicy_stats(); obj.set_name(name); transformpolicy_stats response = (transformpolicy_stats) obj.stat_resource(service); return response; }
java
public static transformpolicy_stats get(nitro_service service, String name) throws Exception{ transformpolicy_stats obj = new transformpolicy_stats(); obj.set_name(name); transformpolicy_stats response = (transformpolicy_stats) obj.stat_resource(service); return response; }
[ "public", "static", "transformpolicy_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "transformpolicy_stats", "obj", "=", "new", "transformpolicy_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ...
Use this API to fetch statistics of transformpolicy_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "transformpolicy_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/transform/transformpolicy_stats.java#L169-L174
looly/hutool
hutool-db/src/main/java/cn/hutool/db/Session.java
Session.setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException { if (getConnection().getMetaData().supportsTransactionIsolationLevel(level) == false) { throw new SQLException(StrUtil.format("Transaction isolation [{}] not support!", level)); } getConnection().setTransactionIsolation(level); }
java
public void setTransactionIsolation(int level) throws SQLException { if (getConnection().getMetaData().supportsTransactionIsolationLevel(level) == false) { throw new SQLException(StrUtil.format("Transaction isolation [{}] not support!", level)); } getConnection().setTransactionIsolation(level); }
[ "public", "void", "setTransactionIsolation", "(", "int", "level", ")", "throws", "SQLException", "{", "if", "(", "getConnection", "(", ")", ".", "getMetaData", "(", ")", ".", "supportsTransactionIsolationLevel", "(", "level", ")", "==", "false", ")", "{", "thr...
设置事务的隔离级别<br> Connection.TRANSACTION_NONE 驱动不支持事务<br> Connection.TRANSACTION_READ_UNCOMMITTED 允许脏读、不可重复读和幻读<br> Connection.TRANSACTION_READ_COMMITTED 禁止脏读,但允许不可重复读和幻读<br> Connection.TRANSACTION_REPEATABLE_READ 禁止脏读和不可重复读,单运行幻读<br> Connection.TRANSACTION_SERIALIZABLE 禁止脏读、不可重复读和幻读<br> @param level 隔离级别 @throws SQLExce...
[ "设置事务的隔离级别<br", ">" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/Session.java#L246-L251
apereo/cas
support/cas-server-support-actions/src/main/java/org/apereo/cas/web/flow/login/CreateTicketGrantingTicketAction.java
CreateTicketGrantingTicketAction.addMessageDescriptorToMessageContext
protected static void addMessageDescriptorToMessageContext(final MessageContext context, final MessageDescriptor warning) { val builder = new MessageBuilder() .warning() .code(warning.getCode()) .defaultText(warning.getDefaultMessage()) .args((Object[]) warning.ge...
java
protected static void addMessageDescriptorToMessageContext(final MessageContext context, final MessageDescriptor warning) { val builder = new MessageBuilder() .warning() .code(warning.getCode()) .defaultText(warning.getDefaultMessage()) .args((Object[]) warning.ge...
[ "protected", "static", "void", "addMessageDescriptorToMessageContext", "(", "final", "MessageContext", "context", ",", "final", "MessageDescriptor", "warning", ")", "{", "val", "builder", "=", "new", "MessageBuilder", "(", ")", ".", "warning", "(", ")", ".", "code...
Adds a warning message to the message context. @param context Message context. @param warning Warning message.
[ "Adds", "a", "warning", "message", "to", "the", "message", "context", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-actions/src/main/java/org/apereo/cas/web/flow/login/CreateTicketGrantingTicketAction.java#L78-L85
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.valueOf
public static BigDecimal valueOf(long val) { if (val >= 0 && val < zeroThroughTen.length) return zeroThroughTen[(int)val]; else if (val != INFLATED) return new BigDecimal(null, val, 0, 0); return new BigDecimal(INFLATED_BIGINT, val, 0, 0); }
java
public static BigDecimal valueOf(long val) { if (val >= 0 && val < zeroThroughTen.length) return zeroThroughTen[(int)val]; else if (val != INFLATED) return new BigDecimal(null, val, 0, 0); return new BigDecimal(INFLATED_BIGINT, val, 0, 0); }
[ "public", "static", "BigDecimal", "valueOf", "(", "long", "val", ")", "{", "if", "(", "val", ">=", "0", "&&", "val", "<", "zeroThroughTen", ".", "length", ")", "return", "zeroThroughTen", "[", "(", "int", ")", "val", "]", ";", "else", "if", "(", "val...
Translates a {@code long} value into a {@code BigDecimal} with a scale of zero. This {@literal "static factory method"} is provided in preference to a ({@code long}) constructor because it allows for reuse of frequently used {@code BigDecimal} values. @param val value of the {@code BigDecimal}. @return a {@code BigDe...
[ "Translates", "a", "{", "@code", "long", "}", "value", "into", "a", "{", "@code", "BigDecimal", "}", "with", "a", "scale", "of", "zero", ".", "This", "{", "@literal", "static", "factory", "method", "}", "is", "provided", "in", "preference", "to", "a", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L1219-L1225
stripe/stripe-java
src/main/java/com/stripe/net/OAuth.java
OAuth.getClientId
private static String getClientId(Map<String, Object> params, RequestOptions options) throws AuthenticationException { String clientId = Stripe.clientId; if ((options != null) && (options.getClientId() != null)) { clientId = options.getClientId(); } if ((params != null) && (params.get("clien...
java
private static String getClientId(Map<String, Object> params, RequestOptions options) throws AuthenticationException { String clientId = Stripe.clientId; if ((options != null) && (options.getClientId() != null)) { clientId = options.getClientId(); } if ((params != null) && (params.get("clien...
[ "private", "static", "String", "getClientId", "(", "Map", "<", "String", ",", "Object", ">", "params", ",", "RequestOptions", "options", ")", "throws", "AuthenticationException", "{", "String", "clientId", "=", "Stripe", ".", "clientId", ";", "if", "(", "(", ...
Returns the client_id to use in OAuth requests. @param params the request parameters. @param options the request options. @return the client_id.
[ "Returns", "the", "client_id", "to", "use", "in", "OAuth", "requests", "." ]
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/net/OAuth.java#L90-L112
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DefaultJavaDocRenderer.java
DefaultJavaDocRenderer.renderJavaDocTag
protected String renderJavaDocTag(final String name, final String value, final SortableLocation location) { final String nameKey = name != null ? name.trim() : ""; final String valueKey = value != null ? value.trim() : ""; // All Done. return "(" + nameKey + "): " + harmonizeNewlines(va...
java
protected String renderJavaDocTag(final String name, final String value, final SortableLocation location) { final String nameKey = name != null ? name.trim() : ""; final String valueKey = value != null ? value.trim() : ""; // All Done. return "(" + nameKey + "): " + harmonizeNewlines(va...
[ "protected", "String", "renderJavaDocTag", "(", "final", "String", "name", ",", "final", "String", "value", ",", "final", "SortableLocation", "location", ")", "{", "final", "String", "nameKey", "=", "name", "!=", "null", "?", "name", ".", "trim", "(", ")", ...
Override this method to yield another @param name The name of a JavaDoc tag. @param value The value of a JavaDoc tag. @param location the SortableLocation where the JavaDocData was harvested. Never {@code null}. @return The XSD documentation for the supplied JavaDoc tag.
[ "Override", "this", "method", "to", "yield", "another" ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/DefaultJavaDocRenderer.java#L81-L87
deeplearning4j/deeplearning4j
nd4j/nd4j-serde/nd4j-aeron/src/main/java/org/nd4j/aeron/ndarrayholder/InMemoryNDArrayHolder.java
InMemoryNDArrayHolder.getTad
@Override public INDArray getTad(int idx, int... dimensions) { return arr.get().tensorAlongDimension(idx, dimensions); }
java
@Override public INDArray getTad(int idx, int... dimensions) { return arr.get().tensorAlongDimension(idx, dimensions); }
[ "@", "Override", "public", "INDArray", "getTad", "(", "int", "idx", ",", "int", "...", "dimensions", ")", "{", "return", "arr", ".", "get", "(", ")", ".", "tensorAlongDimension", "(", "idx", ",", "dimensions", ")", ";", "}" ]
Retrieve a partial view of the ndarray. This method uses tensor along dimension internally Note this will call dup() @param idx the index of the tad to get @param dimensions the dimensions to use @return the tensor along dimension based on the index and dimensions from the master array.
[ "Retrieve", "a", "partial", "view", "of", "the", "ndarray", ".", "This", "method", "uses", "tensor", "along", "dimension", "internally", "Note", "this", "will", "call", "dup", "()" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-serde/nd4j-aeron/src/main/java/org/nd4j/aeron/ndarrayholder/InMemoryNDArrayHolder.java#L92-L95
Coveros/selenified
src/main/java/com/coveros/selenified/application/WaitFor.java
WaitFor.popupEquals
private double popupEquals(double seconds, String expectedPopupText) { double end = System.currentTimeMillis() + (seconds * 1000); while (!app.get().alert().equals(expectedPopupText) && System.currentTimeMillis() < end) ; return Math.min((seconds * 1000) - (end - System.currentTimeMillis()), sec...
java
private double popupEquals(double seconds, String expectedPopupText) { double end = System.currentTimeMillis() + (seconds * 1000); while (!app.get().alert().equals(expectedPopupText) && System.currentTimeMillis() < end) ; return Math.min((seconds * 1000) - (end - System.currentTimeMillis()), sec...
[ "private", "double", "popupEquals", "(", "double", "seconds", ",", "String", "expectedPopupText", ")", "{", "double", "end", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "(", "seconds", "*", "1000", ")", ";", "while", "(", "!", "app", ".", "ge...
Wait for a popup to have the expected text, and then returns the amount of time that was waited @param seconds - maximum amount of time to wait in seconds @param expectedPopupText - the expected text to wait for @return double: the total time waited
[ "Wait", "for", "a", "popup", "to", "have", "the", "expected", "text", "and", "then", "returns", "the", "amount", "of", "time", "that", "was", "waited" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/WaitFor.java#L418-L422
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java
DOMDifferenceEngine.compareNodeLists
private ComparisonState compareNodeLists(Iterable<Node> controlSeq, final XPathContext controlContext, Iterable<Node> testSeq, final XPathContext testContext) { ComparisonState ...
java
private ComparisonState compareNodeLists(Iterable<Node> controlSeq, final XPathContext controlContext, Iterable<Node> testSeq, final XPathContext testContext) { ComparisonState ...
[ "private", "ComparisonState", "compareNodeLists", "(", "Iterable", "<", "Node", ">", "controlSeq", ",", "final", "XPathContext", "controlContext", ",", "Iterable", "<", "Node", ">", "testSeq", ",", "final", "XPathContext", "testContext", ")", "{", "ComparisonState",...
Matches nodes of two node lists and invokes compareNode on each pair. <p>Also performs CHILD_LOOKUP comparisons for each node that couldn't be matched to one of the "other" list.</p>
[ "Matches", "nodes", "of", "two", "node", "lists", "and", "invokes", "compareNode", "on", "each", "pair", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/diff/DOMDifferenceEngine.java#L537-L580
tvesalainen/util
util/src/main/java/org/vesalainen/util/concurrent/TaggableThread.java
TaggableThread.addCompleter
public static void addCompleter(BiConsumer<Map<Object,Object>,Long> completer) { Thread currentThread = Thread.currentThread(); if (currentThread instanceof TaggableThread) { TaggableThread taggableThread = (TaggableThread) currentThread; taggableThread.addMe(co...
java
public static void addCompleter(BiConsumer<Map<Object,Object>,Long> completer) { Thread currentThread = Thread.currentThread(); if (currentThread instanceof TaggableThread) { TaggableThread taggableThread = (TaggableThread) currentThread; taggableThread.addMe(co...
[ "public", "static", "void", "addCompleter", "(", "BiConsumer", "<", "Map", "<", "Object", ",", "Object", ">", ",", "Long", ">", "completer", ")", "{", "Thread", "currentThread", "=", "Thread", ".", "currentThread", "(", ")", ";", "if", "(", "currentThread"...
Add a completer whose parameters are tag map and elapsed time in milliseconds. After thread run completers are called. @param completer
[ "Add", "a", "completer", "whose", "parameters", "are", "tag", "map", "and", "elapsed", "time", "in", "milliseconds", ".", "After", "thread", "run", "completers", "are", "called", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/concurrent/TaggableThread.java#L46-L54
davidmoten/geo
geo/src/main/java/com/github/davidmoten/geo/GeoHash.java
GeoHash.encodeHash
public static String encodeHash(LatLong p, int length) { return encodeHash(p.getLat(), p.getLon(), length); }
java
public static String encodeHash(LatLong p, int length) { return encodeHash(p.getLat(), p.getLon(), length); }
[ "public", "static", "String", "encodeHash", "(", "LatLong", "p", ",", "int", "length", ")", "{", "return", "encodeHash", "(", "p", ".", "getLat", "(", ")", ",", "p", ".", "getLon", "(", ")", ",", "length", ")", ";", "}" ]
Returns a geohash of given length for the given WGS84 point. @param p point @param length length of hash @return hash at point of given length
[ "Returns", "a", "geohash", "of", "given", "length", "for", "the", "given", "WGS84", "point", "." ]
train
https://github.com/davidmoten/geo/blob/e90d2f406133cd9b60d54a3e6bdb7423d7fcce37/geo/src/main/java/com/github/davidmoten/geo/GeoHash.java#L318-L320
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/IntStream.java
IntStream.peek
@NotNull public IntStream peek(@NotNull final IntConsumer action) { return new IntStream(params, new IntPeek(iterator, action)); }
java
@NotNull public IntStream peek(@NotNull final IntConsumer action) { return new IntStream(params, new IntPeek(iterator, action)); }
[ "@", "NotNull", "public", "IntStream", "peek", "(", "@", "NotNull", "final", "IntConsumer", "action", ")", "{", "return", "new", "IntStream", "(", "params", ",", "new", "IntPeek", "(", "iterator", ",", "action", ")", ")", ";", "}" ]
Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream. Handy method for debugging purposes. <p>This is an intermediate operation. @param action the action to be performed on each element @return the ne...
[ "Returns", "a", "stream", "consisting", "of", "the", "elements", "of", "this", "stream", "additionally", "performing", "the", "provided", "action", "on", "each", "element", "as", "elements", "are", "consumed", "from", "the", "resulting", "stream", ".", "Handy", ...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/IntStream.java#L680-L683
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsChacc.java
CmsChacc.checkNewEntry
protected boolean checkNewEntry(String name, int arrayPosition) { m_errorMessages.clear(); boolean inArray = false; if (getTypes(false)[arrayPosition] != null) { inArray = true; } if (!inArray) { m_errorMessages.add(key(Messages.ERR_PERMISSION_SELECT_TYPE...
java
protected boolean checkNewEntry(String name, int arrayPosition) { m_errorMessages.clear(); boolean inArray = false; if (getTypes(false)[arrayPosition] != null) { inArray = true; } if (!inArray) { m_errorMessages.add(key(Messages.ERR_PERMISSION_SELECT_TYPE...
[ "protected", "boolean", "checkNewEntry", "(", "String", "name", ",", "int", "arrayPosition", ")", "{", "m_errorMessages", ".", "clear", "(", ")", ";", "boolean", "inArray", "=", "false", ";", "if", "(", "getTypes", "(", "false", ")", "[", "arrayPosition", ...
Validates the user input when creating a new access control entry.<p> @param name the name of the new user/group @param arrayPosition the position in the types array @return true if everything is ok, otherwise false
[ "Validates", "the", "user", "input", "when", "creating", "a", "new", "access", "control", "entry", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsChacc.java#L1012-L1029
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/jni/Serial.java
Serial.write
public synchronized static void write(int fd, byte[] ... data) throws IOException { for(byte[] single : data) { // write the data contents to the serial port via JNI native method write(fd, single, single.length); } }
java
public synchronized static void write(int fd, byte[] ... data) throws IOException { for(byte[] single : data) { // write the data contents to the serial port via JNI native method write(fd, single, single.length); } }
[ "public", "synchronized", "static", "void", "write", "(", "int", "fd", ",", "byte", "[", "]", "...", "data", ")", "throws", "IOException", "{", "for", "(", "byte", "[", "]", "single", ":", "data", ")", "{", "// write the data contents to the serial port via JN...
<p>Sends one of more bytes arrays to the serial device identified by the given file descriptor.</p> @param fd The file descriptor of the serial port/device. @param data One or more byte arrays of data to be transmitted. (variable-length-argument)
[ "<p", ">", "Sends", "one", "of", "more", "bytes", "arrays", "to", "the", "serial", "device", "identified", "by", "the", "given", "file", "descriptor", ".", "<", "/", "p", ">" ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/jni/Serial.java#L708-L713
mboudreau/Alternator
src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java
DynamoDBMapper.mergeConfig
private DynamoDBMapperConfig mergeConfig(DynamoDBMapperConfig config) { if ( config != this.config ) config = new DynamoDBMapperConfig(this.config, config); return config; }
java
private DynamoDBMapperConfig mergeConfig(DynamoDBMapperConfig config) { if ( config != this.config ) config = new DynamoDBMapperConfig(this.config, config); return config; }
[ "private", "DynamoDBMapperConfig", "mergeConfig", "(", "DynamoDBMapperConfig", "config", ")", "{", "if", "(", "config", "!=", "this", ".", "config", ")", "config", "=", "new", "DynamoDBMapperConfig", "(", "this", ".", "config", ",", "config", ")", ";", "return...
Merges the config object given with the one specified at construction and returns the result.
[ "Merges", "the", "config", "object", "given", "with", "the", "one", "specified", "at", "construction", "and", "returns", "the", "result", "." ]
train
https://github.com/mboudreau/Alternator/blob/4b230ac843494cb10e46ddc2848f5b5d377d7b72/src/main/java/com/amazonaws/services/dynamodb/datamodeling/DynamoDBMapper.java#L1312-L1316
landawn/AbacusUtil
src/com/landawn/abacus/util/CSVUtil.java
CSVUtil.exportCSV
public static long exportCSV(final File out, final Connection conn, final String querySQL, final long offset, final long count, final boolean writeTitle, final boolean quoted) throws UncheckedSQLException, UncheckedIOException { return exportCSV(out, conn, querySQL, null, offset, count, writeTitle...
java
public static long exportCSV(final File out, final Connection conn, final String querySQL, final long offset, final long count, final boolean writeTitle, final boolean quoted) throws UncheckedSQLException, UncheckedIOException { return exportCSV(out, conn, querySQL, null, offset, count, writeTitle...
[ "public", "static", "long", "exportCSV", "(", "final", "File", "out", ",", "final", "Connection", "conn", ",", "final", "String", "querySQL", ",", "final", "long", "offset", ",", "final", "long", "count", ",", "final", "boolean", "writeTitle", ",", "final", ...
Exports the data from database to CVS. @param out @param conn @param querySQL @param offset @param count @param writeTitle @param quoted @return
[ "Exports", "the", "data", "from", "database", "to", "CVS", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CSVUtil.java#L707-L710
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java
JdbcCpoAdapter.existsObject
@Override public <T> long existsObject(String name, T obj, Collection<CpoWhere> wheres) throws CpoException { Connection c = null; long objCount = -1; try { c = getReadConnection(); objCount = existsObject(name, obj, c, wheres); } catch (Exception e) { throw new CpoException("exist...
java
@Override public <T> long existsObject(String name, T obj, Collection<CpoWhere> wheres) throws CpoException { Connection c = null; long objCount = -1; try { c = getReadConnection(); objCount = existsObject(name, obj, c, wheres); } catch (Exception e) { throw new CpoException("exist...
[ "@", "Override", "public", "<", "T", ">", "long", "existsObject", "(", "String", "name", ",", "T", "obj", ",", "Collection", "<", "CpoWhere", ">", "wheres", ")", "throws", "CpoException", "{", "Connection", "c", "=", "null", ";", "long", "objCount", "=",...
The CpoAdapter will check to see if this object exists in the datasource. <p/> <pre>Example: <code> <p/> class SomeObject so = new SomeObject(); long count = 0; class CpoAdapter cpo = null; <p/> <p/> try { cpo = new JdbcCpoAdapter(new JdbcDataSourceInfo(driver, url, user, password,1,1,false)); } catch (CpoException ce)...
[ "The", "CpoAdapter", "will", "check", "to", "see", "if", "this", "object", "exists", "in", "the", "datasource", ".", "<p", "/", ">", "<pre", ">", "Example", ":", "<code", ">", "<p", "/", ">", "class", "SomeObject", "so", "=", "new", "SomeObject", "()",...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L1009-L1025
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/MessageBundleScriptCreator.java
MessageBundleScriptCreator.doCreateScript
protected Reader doCreateScript(Properties props) { BundleStringJsonifier bsj = new BundleStringJsonifier(props, addQuoteToMessageKey); String script = template.toString(); String messages = bsj.serializeBundles().toString(); script = script.replaceFirst("@namespace", RegexUtil.adaptReplacementToMatcher(namespa...
java
protected Reader doCreateScript(Properties props) { BundleStringJsonifier bsj = new BundleStringJsonifier(props, addQuoteToMessageKey); String script = template.toString(); String messages = bsj.serializeBundles().toString(); script = script.replaceFirst("@namespace", RegexUtil.adaptReplacementToMatcher(namespa...
[ "protected", "Reader", "doCreateScript", "(", "Properties", "props", ")", "{", "BundleStringJsonifier", "bsj", "=", "new", "BundleStringJsonifier", "(", "props", ",", "addQuoteToMessageKey", ")", ";", "String", "script", "=", "template", ".", "toString", "(", ")",...
Returns the JS script from the message properties @param props the message properties @return the JS script from the message properties
[ "Returns", "the", "JS", "script", "from", "the", "message", "properties" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/message/MessageBundleScriptCreator.java#L255-L263
teatrove/teatrove
build-tools/teatools/src/main/java/org/teatrove/teatools/TextCompiler.java
TextCompiler.createTextSourceReader
public static SourceReader createTextSourceReader(char[] text) { Reader r = new BufferedReader(new CharArrayReader(text)); return new SourceReader(r, BEGIN_CODE_TAG, END_CODE_TAG); }
java
public static SourceReader createTextSourceReader(char[] text) { Reader r = new BufferedReader(new CharArrayReader(text)); return new SourceReader(r, BEGIN_CODE_TAG, END_CODE_TAG); }
[ "public", "static", "SourceReader", "createTextSourceReader", "(", "char", "[", "]", "text", ")", "{", "Reader", "r", "=", "new", "BufferedReader", "(", "new", "CharArrayReader", "(", "text", ")", ")", ";", "return", "new", "SourceReader", "(", "r", ",", "...
A utility method that creates a Tea SourceReader for the specified text. The text should contain Tea code. <p> This method can be used to create a SourceReader for a section of text. @param text the Text to read @return a SourceReader for the specified text
[ "A", "utility", "method", "that", "creates", "a", "Tea", "SourceReader", "for", "the", "specified", "text", ".", "The", "text", "should", "contain", "Tea", "code", ".", "<p", ">", "This", "method", "can", "be", "used", "to", "create", "a", "SourceReader", ...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/teatools/src/main/java/org/teatrove/teatools/TextCompiler.java#L45-L49
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/descriptor/JsonModelDescriptorReader.java
JsonModelDescriptorReader.findInJson
private static JsonElement findInJson(JsonElement jsonElement, String jsonPath) { final String[] route = JSON_PATH_PATTERN.split(jsonPath); JsonElement result = jsonElement; for (String key : route) { key = key.trim(); if (key.isEmpty()) continue; ...
java
private static JsonElement findInJson(JsonElement jsonElement, String jsonPath) { final String[] route = JSON_PATH_PATTERN.split(jsonPath); JsonElement result = jsonElement; for (String key : route) { key = key.trim(); if (key.isEmpty()) continue; ...
[ "private", "static", "JsonElement", "findInJson", "(", "JsonElement", "jsonElement", ",", "String", "jsonPath", ")", "{", "final", "String", "[", "]", "route", "=", "JSON_PATH_PATTERN", ".", "split", "(", "jsonPath", ")", ";", "JsonElement", "result", "=", "js...
Finds an element in GSON's JSON document representation @param jsonElement A (potentially complex) element to search in @param jsonPath Path in the given JSON to the desired table. Levels are dot-separated. E.g. 'model._output.variable_importances'. @return JsonElement, if found. Otherwise {@link JsonNull}.
[ "Finds", "an", "element", "in", "GSON", "s", "JSON", "document", "representation" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/descriptor/JsonModelDescriptorReader.java#L103-L127
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/jta/UserTransactionFactory.java
UserTransactionFactory.getReference
public static Reference getReference(Serializable object) throws NamingException { ByteArrayOutputStream outStream; try { outStream = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(outStream); out.writeObject(object); ...
java
public static Reference getReference(Serializable object) throws NamingException { ByteArrayOutputStream outStream; try { outStream = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(outStream); out.writeObject(object); ...
[ "public", "static", "Reference", "getReference", "(", "Serializable", "object", ")", "throws", "NamingException", "{", "ByteArrayOutputStream", "outStream", ";", "try", "{", "outStream", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "ObjectOutputStream", "out", ...
Method to return reference for serialized object.(i.e. KunderJTAUserTransaction) @param object serilized object. @return reference to that object. @throws NamingException naming exception.
[ "Method", "to", "return", "reference", "for", "serialized", "object", ".", "(", "i", ".", "e", ".", "KunderJTAUserTransaction", ")" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/jta/UserTransactionFactory.java#L84-L102
azkaban/azkaban
azkaban-common/src/main/java/azkaban/server/AzkabanServer.java
AzkabanServer.loadConfigurationFromAzkabanHome
private static Props loadConfigurationFromAzkabanHome() { final String azkabanHome = System.getenv("AZKABAN_HOME"); if (azkabanHome == null) { logger.error("AZKABAN_HOME not set. Will try default."); return null; } if (!new File(azkabanHome).isDirectory() || !new File(azkabanHome).canRead()...
java
private static Props loadConfigurationFromAzkabanHome() { final String azkabanHome = System.getenv("AZKABAN_HOME"); if (azkabanHome == null) { logger.error("AZKABAN_HOME not set. Will try default."); return null; } if (!new File(azkabanHome).isDirectory() || !new File(azkabanHome).canRead()...
[ "private", "static", "Props", "loadConfigurationFromAzkabanHome", "(", ")", "{", "final", "String", "azkabanHome", "=", "System", ".", "getenv", "(", "\"AZKABAN_HOME\"", ")", ";", "if", "(", "azkabanHome", "==", "null", ")", "{", "logger", ".", "error", "(", ...
Loads the Azkaban property file from the AZKABAN_HOME conf directory @return Props instance
[ "Loads", "the", "Azkaban", "property", "file", "from", "the", "AZKABAN_HOME", "conf", "directory" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/server/AzkabanServer.java#L126-L145
pwheel/spring-security-oauth2-client
src/main/java/com/racquettrack/security/oauth/OAuth2UserDetailsService.java
OAuth2UserDetailsService.getUserId
protected I getUserId(Map<String, Object> userInfo) { I id; String idAsString = (String) userInfo.get(oAuth2ServiceProperties.getUserIdName()); if (idConverter != null) { id = idConverter.convert(idAsString); } else { id = (I) idAsString; } return...
java
protected I getUserId(Map<String, Object> userInfo) { I id; String idAsString = (String) userInfo.get(oAuth2ServiceProperties.getUserIdName()); if (idConverter != null) { id = idConverter.convert(idAsString); } else { id = (I) idAsString; } return...
[ "protected", "I", "getUserId", "(", "Map", "<", "String", ",", "Object", ">", "userInfo", ")", "{", "I", "id", ";", "String", "idAsString", "=", "(", "String", ")", "userInfo", ".", "get", "(", "oAuth2ServiceProperties", ".", "getUserIdName", "(", ")", "...
Gets the user id from the JSON object returned by the OAuth Provider. Uses the {@link OAuth2ServiceProperties#getUserIdName()} to obtain the property from the map. @param userInfo The JSON string converted into a {@link Map}. @return The user id, a {@link UUID}.
[ "Gets", "the", "user", "id", "from", "the", "JSON", "object", "returned", "by", "the", "OAuth", "Provider", ".", "Uses", "the", "{" ]
train
https://github.com/pwheel/spring-security-oauth2-client/blob/c0258823493e268495c9752c5d752f74c6809c6b/src/main/java/com/racquettrack/security/oauth/OAuth2UserDetailsService.java#L112-L122
alkacon/opencms-core
src/org/opencms/main/CmsShellCommands.java
CmsShellCommands.createFolder
@SuppressWarnings("deprecation") public CmsResource createFolder(String targetFolder, String folderName) throws Exception { if (m_cms.existsResource(targetFolder + folderName)) { m_shell.getOut().println( getMessages().key(Messages.GUI_SHELL_FOLDER_ALREADY_EXISTS_1, targetFolder...
java
@SuppressWarnings("deprecation") public CmsResource createFolder(String targetFolder, String folderName) throws Exception { if (m_cms.existsResource(targetFolder + folderName)) { m_shell.getOut().println( getMessages().key(Messages.GUI_SHELL_FOLDER_ALREADY_EXISTS_1, targetFolder...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "CmsResource", "createFolder", "(", "String", "targetFolder", ",", "String", "folderName", ")", "throws", "Exception", "{", "if", "(", "m_cms", ".", "existsResource", "(", "targetFolder", "+", "folder...
Creates a new folder in the given target folder.<p> @param targetFolder the target folder @param folderName the new folder to create in the target folder @return the created folder @throws Exception if somthing goes wrong
[ "Creates", "a", "new", "folder", "in", "the", "given", "target", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsShellCommands.java#L332-L341
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java
Operators.binaryPromotion
Type binaryPromotion(Type t1, Type t2) { Type unboxedT1 = types.unboxedTypeOrType(t1); Type unboxedT2 = types.unboxedTypeOrType(t2); if (unboxedT1.isNumeric() && unboxedT2.isNumeric()) { if (unboxedT1.hasTag(TypeTag.DOUBLE) || unboxedT2.hasTag(TypeTag.DOUBLE)) { retu...
java
Type binaryPromotion(Type t1, Type t2) { Type unboxedT1 = types.unboxedTypeOrType(t1); Type unboxedT2 = types.unboxedTypeOrType(t2); if (unboxedT1.isNumeric() && unboxedT2.isNumeric()) { if (unboxedT1.hasTag(TypeTag.DOUBLE) || unboxedT2.hasTag(TypeTag.DOUBLE)) { retu...
[ "Type", "binaryPromotion", "(", "Type", "t1", ",", "Type", "t2", ")", "{", "Type", "unboxedT1", "=", "types", ".", "unboxedTypeOrType", "(", "t1", ")", ";", "Type", "unboxedT2", "=", "types", ".", "unboxedTypeOrType", "(", "t2", ")", ";", "if", "(", "u...
Perform binary promotion of a pair of types; this routine implements JLS 5.6.2. If the input types are not supported by unary promotion, if such types are identical to a type C, then C is returned, otherwise Object is returned.
[ "Perform", "binary", "promotion", "of", "a", "pair", "of", "types", ";", "this", "routine", "implements", "JLS", "5", ".", "6", ".", "2", ".", "If", "the", "input", "types", "are", "not", "supported", "by", "unary", "promotion", "if", "such", "types", ...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java#L125-L144
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_firewall_ipOnFirewall_rule_POST
public OvhFirewallNetworkRule ip_firewall_ipOnFirewall_rule_POST(String ip, String ipOnFirewall, OvhFirewallActionEnum action, Long destinationPort, OvhFirewallProtocolEnum protocol, OvhFirewallSequenceRangeEnum sequence, String source, Long sourcePort, OvhFirewallOptionTCP tcpOption) throws IOException { String qPat...
java
public OvhFirewallNetworkRule ip_firewall_ipOnFirewall_rule_POST(String ip, String ipOnFirewall, OvhFirewallActionEnum action, Long destinationPort, OvhFirewallProtocolEnum protocol, OvhFirewallSequenceRangeEnum sequence, String source, Long sourcePort, OvhFirewallOptionTCP tcpOption) throws IOException { String qPat...
[ "public", "OvhFirewallNetworkRule", "ip_firewall_ipOnFirewall_rule_POST", "(", "String", "ip", ",", "String", "ipOnFirewall", ",", "OvhFirewallActionEnum", "action", ",", "Long", "destinationPort", ",", "OvhFirewallProtocolEnum", "protocol", ",", "OvhFirewallSequenceRangeEnum",...
AntiDDOS option. Add new rule on your IP REST: POST /ip/{ip}/firewall/{ipOnFirewall}/rule @param protocol [required] Network protocol @param destinationPort [required] Destination port for your rule. Only with TCP/UDP protocol @param action [required] Action on this rule @param tcpOption [required] Option on your rule...
[ "AntiDDOS", "option", ".", "Add", "new", "rule", "on", "your", "IP" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1100-L1113
apache/incubator-druid
server/src/main/java/org/apache/druid/server/coordinator/helper/NewestSegmentFirstIterator.java
NewestSegmentFirstIterator.filterSkipIntervals
@VisibleForTesting static List<Interval> filterSkipIntervals(Interval totalInterval, List<Interval> skipIntervals) { final List<Interval> filteredIntervals = new ArrayList<>(skipIntervals.size() + 1); DateTime remainingStart = totalInterval.getStart(); DateTime remainingEnd = totalInterval.getEnd(); ...
java
@VisibleForTesting static List<Interval> filterSkipIntervals(Interval totalInterval, List<Interval> skipIntervals) { final List<Interval> filteredIntervals = new ArrayList<>(skipIntervals.size() + 1); DateTime remainingStart = totalInterval.getStart(); DateTime remainingEnd = totalInterval.getEnd(); ...
[ "@", "VisibleForTesting", "static", "List", "<", "Interval", ">", "filterSkipIntervals", "(", "Interval", "totalInterval", ",", "List", "<", "Interval", ">", "skipIntervals", ")", "{", "final", "List", "<", "Interval", ">", "filteredIntervals", "=", "new", "Arra...
Returns a list of intervals which are contained by totalInterval but don't ovarlap with skipIntervals. @param totalInterval total interval @param skipIntervals intervals to skip. This should be sorted by {@link Comparators#intervalsByStartThenEnd()}.
[ "Returns", "a", "list", "of", "intervals", "which", "are", "contained", "by", "totalInterval", "but", "don", "t", "ovarlap", "with", "skipIntervals", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/server/coordinator/helper/NewestSegmentFirstIterator.java#L458-L488
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildMethodTags
public void buildMethodTags(XMLNode node, Content methodsContentTree) { methodWriter.addMemberTags((ExecutableElement)currentMember, methodsContentTree); ExecutableElement method = (ExecutableElement)currentMember; if (method.getSimpleName().toString().compareTo("writeExternal") == 0 ...
java
public void buildMethodTags(XMLNode node, Content methodsContentTree) { methodWriter.addMemberTags((ExecutableElement)currentMember, methodsContentTree); ExecutableElement method = (ExecutableElement)currentMember; if (method.getSimpleName().toString().compareTo("writeExternal") == 0 ...
[ "public", "void", "buildMethodTags", "(", "XMLNode", "node", ",", "Content", "methodsContentTree", ")", "{", "methodWriter", ".", "addMemberTags", "(", "(", "ExecutableElement", ")", "currentMember", ",", "methodsContentTree", ")", ";", "ExecutableElement", "method", ...
Build the method tags. @param node the XML element that specifies which components to document @param methodsContentTree content tree to which the documentation will be added
[ "Build", "the", "method", "tags", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L366-L378
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/server/ServerBuilder.java
ServerBuilder.setIcon
public ServerBuilder setIcon(BufferedImage icon, String fileType) { delegate.setIcon(icon, fileType); return this; }
java
public ServerBuilder setIcon(BufferedImage icon, String fileType) { delegate.setIcon(icon, fileType); return this; }
[ "public", "ServerBuilder", "setIcon", "(", "BufferedImage", "icon", ",", "String", "fileType", ")", "{", "delegate", ".", "setIcon", "(", "icon", ",", "fileType", ")", ";", "return", "this", ";", "}" ]
Sets the server's icon. @param icon The icon of the server. @param fileType The type of the icon, e.g. "png" or "jpg". @return The current instance in order to chain call methods.
[ "Sets", "the", "server", "s", "icon", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/server/ServerBuilder.java#L120-L123
jayantk/jklol
src/com/jayantkrish/jklol/ccg/SyntacticCategory.java
SyntacticCategory.getWithoutFeatures
public SyntacticCategory getWithoutFeatures() { if (isAtomic()) { return createAtomic(value, DEFAULT_FEATURE_VALUE, -1); } else { return createFunctional(getDirection(), returnType.getWithoutFeatures(), argumentType.getWithoutFeatures()); } }
java
public SyntacticCategory getWithoutFeatures() { if (isAtomic()) { return createAtomic(value, DEFAULT_FEATURE_VALUE, -1); } else { return createFunctional(getDirection(), returnType.getWithoutFeatures(), argumentType.getWithoutFeatures()); } }
[ "public", "SyntacticCategory", "getWithoutFeatures", "(", ")", "{", "if", "(", "isAtomic", "(", ")", ")", "{", "return", "createAtomic", "(", "value", ",", "DEFAULT_FEATURE_VALUE", ",", "-", "1", ")", ";", "}", "else", "{", "return", "createFunctional", "(",...
Get a syntactic category identical to this one except with all feature values replaced by the default value. @return
[ "Get", "a", "syntactic", "category", "identical", "to", "this", "one", "except", "with", "all", "feature", "values", "replaced", "by", "the", "default", "value", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/SyntacticCategory.java#L369-L376
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkElementNotPresent
@Conditioned @Et("Je vérifie que '(.*)-(.*)' n'est pas présent[\\.|\\?]") @And("I check that '(.*)-(.*)' is not present[\\.|\\?]") public void checkElementNotPresent(String page, String elementName, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { checkElement...
java
@Conditioned @Et("Je vérifie que '(.*)-(.*)' n'est pas présent[\\.|\\?]") @And("I check that '(.*)-(.*)' is not present[\\.|\\?]") public void checkElementNotPresent(String page, String elementName, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { checkElement...
[ "@", "Conditioned", "@", "Et", "(", "\"Je vérifie que '(.*)-(.*)' n'est pas présent[\\\\.|\\\\?]\")\r", "", "@", "And", "(", "\"I check that '(.*)-(.*)' is not present[\\\\.|\\\\?]\"", ")", "public", "void", "checkElementNotPresent", "(", "String", "page", ",", "String", "ele...
Checks if an html element is not present. @param page The concerned page of elementName @param elementName The key of the PageElement to check @param conditions list of 'expected' values condition and 'actual' values ({@link com.github.noraui.gherkin.GherkinStepCondition}). @throws TechnicalException is throws if you ...
[ "Checks", "if", "an", "html", "element", "is", "not", "present", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L777-L782
voldemort/voldemort
src/java/voldemort/server/gossip/Gossiper.java
Gossiper.gossipKey
protected void gossipKey(Node node, String key) { if(logger.isDebugEnabled()) { logger.debug("Gossiping key " + key); } /* * Retrieve local and remote versions of the key. Uses AdminClient for * remote as well as local operations (rather than going directly to ...
java
protected void gossipKey(Node node, String key) { if(logger.isDebugEnabled()) { logger.debug("Gossiping key " + key); } /* * Retrieve local and remote versions of the key. Uses AdminClient for * remote as well as local operations (rather than going directly to ...
[ "protected", "void", "gossipKey", "(", "Node", "node", ",", "String", "key", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Gossiping key \"", "+", "key", ")", ";", "}", "/*\n * Retrieve lo...
Perform Gossip on a specified metadata key with a remote node. As metadata is data, vector clocks are used to determine causality. <p> Method is <code>protected</code> rather than <code>private</code>, so that it may be overridden if the behaviour for handling concurrent values of the same key was to be changed e.g., i...
[ "Perform", "Gossip", "on", "a", "specified", "metadata", "key", "with", "a", "remote", "node", ".", "As", "metadata", "is", "data", "vector", "clocks", "are", "used", "to", "determine", "causality", ".", "<p", ">", "Method", "is", "<code", ">", "protected<...
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/server/gossip/Gossiper.java#L150-L206
sarl/sarl
products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/commands/ExtraLanguageListCommandModule.java
ExtraLanguageListCommandModule.provideExtraLanguageListCommand
@SuppressWarnings("static-method") @Provides @Singleton public ExtraLanguageListCommand provideExtraLanguageListCommand(BootLogger bootLogger, Provider<IExtraLanguageContributions> contributions) { return new ExtraLanguageListCommand(bootLogger, contributions); }
java
@SuppressWarnings("static-method") @Provides @Singleton public ExtraLanguageListCommand provideExtraLanguageListCommand(BootLogger bootLogger, Provider<IExtraLanguageContributions> contributions) { return new ExtraLanguageListCommand(bootLogger, contributions); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "@", "Provides", "@", "Singleton", "public", "ExtraLanguageListCommand", "provideExtraLanguageListCommand", "(", "BootLogger", "bootLogger", ",", "Provider", "<", "IExtraLanguageContributions", ">", "contributions", ")...
Provide the command for displaying the available extra-language generators. @param bootLogger the logger. @param contributions the provider of the extra-language contributions. @return the command.
[ "Provide", "the", "command", "for", "displaying", "the", "available", "extra", "-", "language", "generators", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/products/sarlc/src/main/java/io/sarl/lang/sarlc/modules/commands/ExtraLanguageListCommandModule.java#L56-L62
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuRenderer.java
SelectMultiMenuRenderer.renderOption
protected void renderOption(ResponseWriter rw, UISelectItem selectItem, String[] selectedOption, int index) throws IOException { String itemLabel = selectItem.getItemLabel(); final String itemDescription = selectItem.getItemDescription(); final Object itemValue = selectItem.getItemValue(); boolean isItemLa...
java
protected void renderOption(ResponseWriter rw, UISelectItem selectItem, String[] selectedOption, int index) throws IOException { String itemLabel = selectItem.getItemLabel(); final String itemDescription = selectItem.getItemDescription(); final Object itemValue = selectItem.getItemValue(); boolean isItemLa...
[ "protected", "void", "renderOption", "(", "ResponseWriter", "rw", ",", "UISelectItem", "selectItem", ",", "String", "[", "]", "selectedOption", ",", "int", "index", ")", "throws", "IOException", "{", "String", "itemLabel", "=", "selectItem", ".", "getItemLabel", ...
Renders a single &lt;option&gt; tag. For some reason, <code>SelectItem</code> and <code>UISelectItem</code> don't share a common interface, so this method is repeated twice. @param rw The response writer @param selectItem The current SelectItem @param selectedOption the currently selected option @throws IOException th...
[ "Renders", "a", "single", "&lt", ";", "option&gt", ";", "tag", ".", "For", "some", "reason", "<code", ">", "SelectItem<", "/", "code", ">", "and", "<code", ">", "UISelectItem<", "/", "code", ">", "don", "t", "share", "a", "common", "interface", "so", "...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectMultiMenu/SelectMultiMenuRenderer.java#L614-L625
openengsb/openengsb
api/workflow/src/main/java/org/openengsb/core/workflow/api/model/ProcessBag.java
ProcessBag.addProperty
public void addProperty(String key, Object value) throws ProcessBagException { if (properties.containsKey(key)) { throw new ProcessBagException(key + " already used!"); } else { properties.put(key, value); } }
java
public void addProperty(String key, Object value) throws ProcessBagException { if (properties.containsKey(key)) { throw new ProcessBagException(key + " already used!"); } else { properties.put(key, value); } }
[ "public", "void", "addProperty", "(", "String", "key", ",", "Object", "value", ")", "throws", "ProcessBagException", "{", "if", "(", "properties", ".", "containsKey", "(", "key", ")", ")", "{", "throw", "new", "ProcessBagException", "(", "key", "+", "\" alre...
Adds a new property only if it does not exist already @throws ProcessBagException if the key is already present
[ "Adds", "a", "new", "property", "only", "if", "it", "does", "not", "exist", "already" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/workflow/src/main/java/org/openengsb/core/workflow/api/model/ProcessBag.java#L134-L140
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java
TransactionWriteRequest.addDelete
public TransactionWriteRequest addDelete(Object key, DynamoDBTransactionWriteExpression transactionWriteExpression) { return addDelete(key, transactionWriteExpression, null /* returnValuesOnConditionCheckFailure */); }
java
public TransactionWriteRequest addDelete(Object key, DynamoDBTransactionWriteExpression transactionWriteExpression) { return addDelete(key, transactionWriteExpression, null /* returnValuesOnConditionCheckFailure */); }
[ "public", "TransactionWriteRequest", "addDelete", "(", "Object", "key", ",", "DynamoDBTransactionWriteExpression", "transactionWriteExpression", ")", "{", "return", "addDelete", "(", "key", ",", "transactionWriteExpression", ",", "null", "/* returnValuesOnConditionCheckFailure ...
Adds delete operation (to be executed on the object represented by key) to the list of transaction write operations. transactionWriteExpression is used to conditionally delete the object represented by key.
[ "Adds", "delete", "operation", "(", "to", "be", "executed", "on", "the", "object", "represented", "by", "key", ")", "to", "the", "list", "of", "transaction", "write", "operations", ".", "transactionWriteExpression", "is", "used", "to", "conditionally", "delete",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java#L112-L114
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/authentication/AuthenticationApi.java
AuthenticationApi.retrieveAuthScheme
public ModelApiResponse retrieveAuthScheme(AuthSchemeLookupData lookupData) throws AuthenticationApiException { try { ApiRequestAuthSchemeLookupData req = new ApiRequestAuthSchemeLookupData(); req.data(lookupData); return authenticationApi.tenantInfo(req); } catch (Ap...
java
public ModelApiResponse retrieveAuthScheme(AuthSchemeLookupData lookupData) throws AuthenticationApiException { try { ApiRequestAuthSchemeLookupData req = new ApiRequestAuthSchemeLookupData(); req.data(lookupData); return authenticationApi.tenantInfo(req); } catch (Ap...
[ "public", "ModelApiResponse", "retrieveAuthScheme", "(", "AuthSchemeLookupData", "lookupData", ")", "throws", "AuthenticationApiException", "{", "try", "{", "ApiRequestAuthSchemeLookupData", "req", "=", "new", "ApiRequestAuthSchemeLookupData", "(", ")", ";", "req", ".", "...
Get authentication scheme. Get the authentication scheme by user name or tenant name. The return value is &#39;saml&#39; if the contact center has [Security Assertion Markup Language](https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language) (SAML) enabled; otherwise, the return value is &#39;basic&#39;. @...
[ "Get", "authentication", "scheme", ".", "Get", "the", "authentication", "scheme", "by", "user", "name", "or", "tenant", "name", ".", "The", "return", "value", "is", "&#39", ";", "saml&#39", ";", "if", "the", "contact", "center", "has", "[", "Security", "As...
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/authentication/AuthenticationApi.java#L185-L193
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/tools/ExtAtomContainerManipulator.java
ExtAtomContainerManipulator.getExplicitHydrogenCount
public static int getExplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom) { int hCount = 0; for (IAtom iAtom : atomContainer.getConnectedAtomsList(atom)) { IAtom connectedAtom = iAtom; if (connectedAtom.getSymbol().equals("H")) { hCount++; }...
java
public static int getExplicitHydrogenCount(IAtomContainer atomContainer, IAtom atom) { int hCount = 0; for (IAtom iAtom : atomContainer.getConnectedAtomsList(atom)) { IAtom connectedAtom = iAtom; if (connectedAtom.getSymbol().equals("H")) { hCount++; }...
[ "public", "static", "int", "getExplicitHydrogenCount", "(", "IAtomContainer", "atomContainer", ",", "IAtom", "atom", ")", "{", "int", "hCount", "=", "0", ";", "for", "(", "IAtom", "iAtom", ":", "atomContainer", ".", "getConnectedAtomsList", "(", "atom", ")", "...
Returns The number of explicit hydrogens for a given IAtom. @param atomContainer @param atom @return The number of explicit hydrogens on the given IAtom.
[ "Returns", "The", "number", "of", "explicit", "hydrogens", "for", "a", "given", "IAtom", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/tools/ExtAtomContainerManipulator.java#L188-L197
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/io/IOUtil.java
IOUtil.writeKryo
public static <T> void writeKryo(T obj, OutputStream file) { try { Output output = new Output(buffer.get()); new KryoReflectionFactorySupport().writeClassAndObject(output, obj); output.close(); IOUtils.write(CompressionUtil.encodeBZ(Arrays.copyOf(output.getBuffer(), output.position())), file...
java
public static <T> void writeKryo(T obj, OutputStream file) { try { Output output = new Output(buffer.get()); new KryoReflectionFactorySupport().writeClassAndObject(output, obj); output.close(); IOUtils.write(CompressionUtil.encodeBZ(Arrays.copyOf(output.getBuffer(), output.position())), file...
[ "public", "static", "<", "T", ">", "void", "writeKryo", "(", "T", "obj", ",", "OutputStream", "file", ")", "{", "try", "{", "Output", "output", "=", "new", "Output", "(", "buffer", ".", "get", "(", ")", ")", ";", "new", "KryoReflectionFactorySupport", ...
Write kryo. @param <T> the type parameter @param obj the obj @param file the file
[ "Write", "kryo", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/io/IOUtil.java#L97-L107
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertexIterator.java
ManagementGroupVertexIterator.allConnectionsFromOtherStage
private boolean allConnectionsFromOtherStage(final ManagementGroupVertex groupVertex, final boolean forward) { if (forward) { for (int i = 0; i < groupVertex.getNumberOfBackwardEdges(); i++) { if (this.stage == groupVertex.getBackwardEdge(i).getSource().getStageNumber()) { return false; } } } el...
java
private boolean allConnectionsFromOtherStage(final ManagementGroupVertex groupVertex, final boolean forward) { if (forward) { for (int i = 0; i < groupVertex.getNumberOfBackwardEdges(); i++) { if (this.stage == groupVertex.getBackwardEdge(i).getSource().getStageNumber()) { return false; } } } el...
[ "private", "boolean", "allConnectionsFromOtherStage", "(", "final", "ManagementGroupVertex", "groupVertex", ",", "final", "boolean", "forward", ")", "{", "if", "(", "forward", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "groupVertex", ".", "ge...
Checks if for the given group vertex all incoming (if forward is <code>true</code>) or outgoing edges (if forward is <code>false</code>) come from other stages than the one the given vertex is in. @param groupVertex the group vertex to check for @param forward <code>true</code> if incoming edges should be considered, ...
[ "Checks", "if", "for", "the", "given", "group", "vertex", "all", "incoming", "(", "if", "forward", "is", "<code", ">", "true<", "/", "code", ">", ")", "or", "outgoing", "edges", "(", "if", "forward", "is", "<code", ">", "false<", "/", "code", ">", ")...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGroupVertexIterator.java#L193-L210
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceCreator.java
V1InstanceCreator.buildProject
public BuildProject buildProject(String name, String reference, Map<String, Object> attributes) { BuildProject buildProject = new BuildProject(instance); buildProject.setName(name); buildProject.setReference(reference); addAttributes(buildProject, attributes); buildProject.save(...
java
public BuildProject buildProject(String name, String reference, Map<String, Object> attributes) { BuildProject buildProject = new BuildProject(instance); buildProject.setName(name); buildProject.setReference(reference); addAttributes(buildProject, attributes); buildProject.save(...
[ "public", "BuildProject", "buildProject", "(", "String", "name", ",", "String", "reference", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "BuildProject", "buildProject", "=", "new", "BuildProject", "(", "instance", ")", ";", "buildPro...
Create a new Build Project with a name and reference. @param name Initial name. @param reference Reference value. @param attributes additional attributes for the BuildProject. @return A newly minted Build Project that exists in the VersionOne system.
[ "Create", "a", "new", "Build", "Project", "with", "a", "name", "and", "reference", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L878-L886
SonarSource/sonarqube
sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java
PluginClassloaderFactory.apiMask
private static Mask apiMask() { return new Mask() .addInclusion("org/sonar/api/") .addInclusion("org/sonar/check/") .addInclusion("org/codehaus/stax2/") .addInclusion("org/codehaus/staxmate/") .addInclusion("com/ctc/wstx/") .addInclusion("org/slf4j/") // SLF4J bridges. Do ...
java
private static Mask apiMask() { return new Mask() .addInclusion("org/sonar/api/") .addInclusion("org/sonar/check/") .addInclusion("org/codehaus/stax2/") .addInclusion("org/codehaus/staxmate/") .addInclusion("com/ctc/wstx/") .addInclusion("org/slf4j/") // SLF4J bridges. Do ...
[ "private", "static", "Mask", "apiMask", "(", ")", "{", "return", "new", "Mask", "(", ")", ".", "addInclusion", "(", "\"org/sonar/api/\"", ")", ".", "addInclusion", "(", "\"org/sonar/check/\"", ")", ".", "addInclusion", "(", "\"org/codehaus/stax2/\"", ")", ".", ...
The resources (packages) that API exposes to plugins. Other core classes (SonarQube, MyBatis, ...) can't be accessed. <p>To sum-up, these are the classes packaged in sonar-plugin-api.jar or available as a transitive dependency of sonar-plugin-api</p>
[ "The", "resources", "(", "packages", ")", "that", "API", "exposes", "to", "plugins", ".", "Other", "core", "classes", "(", "SonarQube", "MyBatis", "...", ")", "can", "t", "be", "accessed", ".", "<p", ">", "To", "sum", "-", "up", "these", "are", "the", ...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java#L123-L148
lucastheisen/jsch-extension
src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java
TunnelConnection.getTunnel
public Tunnel getTunnel( String destinationHostname, int destinationPort ) { return tunnelsByDestination.get( hostnamePortKey( destinationHostname, destinationPort ) ); }
java
public Tunnel getTunnel( String destinationHostname, int destinationPort ) { return tunnelsByDestination.get( hostnamePortKey( destinationHostname, destinationPort ) ); }
[ "public", "Tunnel", "getTunnel", "(", "String", "destinationHostname", ",", "int", "destinationPort", ")", "{", "return", "tunnelsByDestination", ".", "get", "(", "hostnamePortKey", "(", "destinationHostname", ",", "destinationPort", ")", ")", ";", "}" ]
Returns the tunnel matching the supplied values, or <code>null</code> if there isn't one that matches. @param destinationHostname The tunnels destination hostname @param destinationPort The tunnels destination port @return The tunnel matching the supplied values
[ "Returns", "the", "tunnel", "matching", "the", "supplied", "values", "or", "<code", ">", "null<", "/", "code", ">", "if", "there", "isn", "t", "one", "that", "matches", "." ]
train
https://github.com/lucastheisen/jsch-extension/blob/3c5bfae84d63e8632828a10721f2e605b68d749a/src/main/java/com/pastdev/jsch/tunnel/TunnelConnection.java#L113-L116
hawkular/hawkular-alerts
engine/src/main/java/org/hawkular/alerts/engine/impl/AlertsEngineImpl.java
AlertsEngineImpl.onTriggerChange
@Override public void onTriggerChange(Operation operation, String tenantId, String triggerId) { log.debugf("Executing: %s tenantId: %s triggerId: %s", operation, tenantId, triggerId); switch (operation) { case ADD: case UPDATE: Trigger reloadTrigger = new Trig...
java
@Override public void onTriggerChange(Operation operation, String tenantId, String triggerId) { log.debugf("Executing: %s tenantId: %s triggerId: %s", operation, tenantId, triggerId); switch (operation) { case ADD: case UPDATE: Trigger reloadTrigger = new Trig...
[ "@", "Override", "public", "void", "onTriggerChange", "(", "Operation", "operation", ",", "String", "tenantId", ",", "String", "triggerId", ")", "{", "log", ".", "debugf", "(", "\"Executing: %s tenantId: %s triggerId: %s\"", ",", "operation", ",", "tenantId", ",", ...
/* This listener method is invoked on distributed scenarios. When a trigger is modified, PartitionManager detects which node holds the trigger and send the event. Local node is responsible to remove/reload the trigger from AlertsEngine memory.
[ "/", "*", "This", "listener", "method", "is", "invoked", "on", "distributed", "scenarios", ".", "When", "a", "trigger", "is", "modified", "PartitionManager", "detects", "which", "node", "holds", "the", "trigger", "and", "send", "the", "event", ".", "Local", ...
train
https://github.com/hawkular/hawkular-alerts/blob/b4a0c2909b38e03e72cc1828219562ee8fcbf426/engine/src/main/java/org/hawkular/alerts/engine/impl/AlertsEngineImpl.java#L803-L817
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/VoiceApi.java
VoiceApi.singleStepTransfer
public void singleStepTransfer( String connId, String destination, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { Voice...
java
public void singleStepTransfer( String connId, String destination, String location, KeyValueCollection userData, KeyValueCollection reasons, KeyValueCollection extensions ) throws WorkspaceApiException { try { Voice...
[ "public", "void", "singleStepTransfer", "(", "String", "connId", ",", "String", "destination", ",", "String", "location", ",", "KeyValueCollection", "userData", ",", "KeyValueCollection", "reasons", ",", "KeyValueCollection", "extensions", ")", "throws", "WorkspaceApiEx...
Perform a single-step transfer to the specified destination. @param connId The connection ID of the call to transfer. @param destination The number where the call should be transferred. @param location Name of the remote location in the form of <SwitchName> or <T-ServerApplicationName>@<SwitchName>. This value is used ...
[ "Perform", "a", "single", "-", "step", "transfer", "to", "the", "specified", "destination", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/VoiceApi.java#L971-L995
keyboardsurfer/Crouton
library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java
Crouton.makeText
public static Crouton makeText(Activity activity, CharSequence text, Style style, int viewGroupResId) { return new Crouton(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId)); }
java
public static Crouton makeText(Activity activity, CharSequence text, Style style, int viewGroupResId) { return new Crouton(activity, text, style, (ViewGroup) activity.findViewById(viewGroupResId)); }
[ "public", "static", "Crouton", "makeText", "(", "Activity", "activity", ",", "CharSequence", "text", ",", "Style", "style", ",", "int", "viewGroupResId", ")", "{", "return", "new", "Crouton", "(", "activity", ",", "text", ",", "style", ",", "(", "ViewGroup",...
Creates a {@link Crouton} with provided text and style for a given activity. @param activity The {@link Activity} that represents the context in which the Crouton should exist. @param text The text you want to display. @param style The style that this {@link Crouton} should be created with. @param viewGroupResId The r...
[ "Creates", "a", "{", "@link", "Crouton", "}", "with", "provided", "text", "and", "style", "for", "a", "given", "activity", "." ]
train
https://github.com/keyboardsurfer/Crouton/blob/7806b15e4d52793e1f5aeaa4a55b1e220289e619/library/src/main/java/de/keyboardsurfer/android/widget/crouton/Crouton.java#L232-L234
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.querySingleTypedResult
public <T> T querySingleTypedResult(String sql, String[] args, int column) { return db.querySingleTypedResult(sql, args, column); }
java
public <T> T querySingleTypedResult(String sql, String[] args, int column) { return db.querySingleTypedResult(sql, args, column); }
[ "public", "<", "T", ">", "T", "querySingleTypedResult", "(", "String", "sql", ",", "String", "[", "]", "args", ",", "int", "column", ")", "{", "return", "db", ".", "querySingleTypedResult", "(", "sql", ",", "args", ",", "column", ")", ";", "}" ]
Query the SQL for a single result typed object @param <T> result value type @param sql sql statement @param args arguments @param column column index @return result, null if no result @since 3.1.0
[ "Query", "the", "SQL", "for", "a", "single", "result", "typed", "object" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L1019-L1021
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.addInstance
public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException { this.logger.finer( "Adding an instance to the application " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "instances...
java
public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException { this.logger.finer( "Adding an instance to the application " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "instances...
[ "public", "void", "addInstance", "(", "String", "applicationName", ",", "String", "parentInstancePath", ",", "Instance", "instance", ")", "throws", "ApplicationWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Adding an instance to the application \"", "+"...
Adds an instance into an application. @param applicationName the application name @param parentInstancePath the path of the parent instance (null to create a root instance) @param instance the instance to add @throws ApplicationWsException if a problem occurred with the instance management
[ "Adds", "an", "instance", "into", "an", "application", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L236-L249