repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
lucidworks/spark-solr
src/main/java/com/lucidworks/spark/query/SolrTermVector.java
SolrTermVector.newInstance
public static SolrTermVector newInstance(String docId, HashingTF hashingTF, NamedList<Object> termList) { """ Converts doc-level term vector information the Solr QueryResponse into a SolrTermVector. """ int termCount = termList.size(); int[] indices = new int[termCount]; double[] weights = new dou...
java
public static SolrTermVector newInstance(String docId, HashingTF hashingTF, NamedList<Object> termList) { int termCount = termList.size(); int[] indices = new int[termCount]; double[] weights = new double[termCount]; String[] terms = new String[termCount]; Iterator<Map.Entry<String,Object>> termsIt...
[ "public", "static", "SolrTermVector", "newInstance", "(", "String", "docId", ",", "HashingTF", "hashingTF", ",", "NamedList", "<", "Object", ">", "termList", ")", "{", "int", "termCount", "=", "termList", ".", "size", "(", ")", ";", "int", "[", "]", "indic...
Converts doc-level term vector information the Solr QueryResponse into a SolrTermVector.
[ "Converts", "doc", "-", "level", "term", "vector", "information", "the", "Solr", "QueryResponse", "into", "a", "SolrTermVector", "." ]
train
https://github.com/lucidworks/spark-solr/blob/8ff1b3cdd99041be6070077c18ec9c1cd7257cc3/src/main/java/com/lucidworks/spark/query/SolrTermVector.java#L31-L58
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/FileSystem.java
FileSystem.copyFromLocalFile
@Deprecated public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException { """ The src file is on the local disk. Add it to FS at the given dst name. delSrc indicates if the source should be removed """ copyFromLocalFile(delSrc, true, src, dst); }
java
@Deprecated public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException { copyFromLocalFile(delSrc, true, src, dst); }
[ "@", "Deprecated", "public", "void", "copyFromLocalFile", "(", "boolean", "delSrc", ",", "Path", "src", ",", "Path", "dst", ")", "throws", "IOException", "{", "copyFromLocalFile", "(", "delSrc", ",", "true", ",", "src", ",", "dst", ")", ";", "}" ]
The src file is on the local disk. Add it to FS at the given dst name. delSrc indicates if the source should be removed
[ "The", "src", "file", "is", "on", "the", "local", "disk", ".", "Add", "it", "to", "FS", "at", "the", "given", "dst", "name", ".", "delSrc", "indicates", "if", "the", "source", "should", "be", "removed" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/FileSystem.java#L1651-L1655
sniffy/sniffy
sniffy-core/src/main/java/io/sniffy/LegacySpy.java
LegacySpy.verifyAtMostOnce
@Deprecated public C verifyAtMostOnce(Threads threadMatcher, Query query) throws WrongNumberOfQueriesError { """ Alias for {@link #verifyBetween(int, int, Threads, Query)} with arguments 0, 1, {@code threads}, {@code queryType} @since 2.2 """ return verify(SqlQueries.atMostOneQuery().threads(threa...
java
@Deprecated public C verifyAtMostOnce(Threads threadMatcher, Query query) throws WrongNumberOfQueriesError { return verify(SqlQueries.atMostOneQuery().threads(threadMatcher).type(adapter(query))); }
[ "@", "Deprecated", "public", "C", "verifyAtMostOnce", "(", "Threads", "threadMatcher", ",", "Query", "query", ")", "throws", "WrongNumberOfQueriesError", "{", "return", "verify", "(", "SqlQueries", ".", "atMostOneQuery", "(", ")", ".", "threads", "(", "threadMatch...
Alias for {@link #verifyBetween(int, int, Threads, Query)} with arguments 0, 1, {@code threads}, {@code queryType} @since 2.2
[ "Alias", "for", "{" ]
train
https://github.com/sniffy/sniffy/blob/7bdddb9593e6b6e9fe5c7c87519f864acbc3a5c0/sniffy-core/src/main/java/io/sniffy/LegacySpy.java#L290-L293
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getCertificatePolicyAsync
public ServiceFuture<CertificatePolicy> getCertificatePolicyAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<CertificatePolicy> serviceCallback) { """ Lists the policy for a certificate. The GetCertificatePolicy operation returns the specified certificate policy resources in the specified ...
java
public ServiceFuture<CertificatePolicy> getCertificatePolicyAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<CertificatePolicy> serviceCallback) { return ServiceFuture.fromResponse(getCertificatePolicyWithServiceResponseAsync(vaultBaseUrl, certificateName), serviceCallback); }
[ "public", "ServiceFuture", "<", "CertificatePolicy", ">", "getCertificatePolicyAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "final", "ServiceCallback", "<", "CertificatePolicy", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ...
Lists the policy for a certificate. The GetCertificatePolicy operation returns the specified certificate policy resources in the specified key vault. This operation requires the certificates/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name...
[ "Lists", "the", "policy", "for", "a", "certificate", ".", "The", "GetCertificatePolicy", "operation", "returns", "the", "specified", "certificate", "policy", "resources", "in", "the", "specified", "key", "vault", ".", "This", "operation", "requires", "the", "certi...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7166-L7168
awslabs/amazon-sqs-java-extended-client-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClientBase.java
AmazonSQSExtendedClientBase.deleteMessageBatch
public DeleteMessageBatchResult deleteMessageBatch(String queueUrl, List<DeleteMessageBatchRequestEntry> entries) throws AmazonServiceException, AmazonClientException { """ <p> Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on eac...
java
public DeleteMessageBatchResult deleteMessageBatch(String queueUrl, List<DeleteMessageBatchRequestEntry> entries) throws AmazonServiceException, AmazonClientException { return amazonSqsToBeExtended.deleteMessageBatch(queueUrl, entries); }
[ "public", "DeleteMessageBatchResult", "deleteMessageBatch", "(", "String", "queueUrl", ",", "List", "<", "DeleteMessageBatchRequestEntry", ">", "entries", ")", "throws", "AmazonServiceException", ",", "AmazonClientException", "{", "return", "amazonSqsToBeExtended", ".", "de...
<p> Deletes up to ten messages from the specified queue. This is a batch version of DeleteMessage. The result of the delete action on each message is reported individually in the response. </p> <p> <b>IMPORTANT:</b> Because the batch request can result in a combination of successful and unsuccessful actions, you should...
[ "<p", ">", "Deletes", "up", "to", "ten", "messages", "from", "the", "specified", "queue", ".", "This", "is", "a", "batch", "version", "of", "DeleteMessage", ".", "The", "result", "of", "the", "delete", "action", "on", "each", "message", "is", "reported", ...
train
https://github.com/awslabs/amazon-sqs-java-extended-client-lib/blob/df0c6251b99e682d6179938fe784590e662b84ea/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClientBase.java#L1768-L1772
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/proxy/ClientPNCounterProxy.java
ClientPNCounterProxy.updateObservedReplicaTimestamps
private void updateObservedReplicaTimestamps(List<Entry<String, Long>> receivedLogicalTimestamps) { """ Updates the locally observed CRDT vector clock atomically. This method is thread safe and can be called concurrently. The method will only update the clock if the {@code receivedLogicalTimestamps} is higher th...
java
private void updateObservedReplicaTimestamps(List<Entry<String, Long>> receivedLogicalTimestamps) { final VectorClock received = toVectorClock(receivedLogicalTimestamps); for (; ; ) { final VectorClock currentClock = this.observedClock; if (currentClock.isAfter(received)) { ...
[ "private", "void", "updateObservedReplicaTimestamps", "(", "List", "<", "Entry", "<", "String", ",", "Long", ">", ">", "receivedLogicalTimestamps", ")", "{", "final", "VectorClock", "received", "=", "toVectorClock", "(", "receivedLogicalTimestamps", ")", ";", "for",...
Updates the locally observed CRDT vector clock atomically. This method is thread safe and can be called concurrently. The method will only update the clock if the {@code receivedLogicalTimestamps} is higher than the currently observed vector clock. @param receivedLogicalTimestamps logical timestamps received from a re...
[ "Updates", "the", "locally", "observed", "CRDT", "vector", "clock", "atomically", ".", "This", "method", "is", "thread", "safe", "and", "can", "be", "called", "concurrently", ".", "The", "method", "will", "only", "update", "the", "clock", "if", "the", "{", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/proxy/ClientPNCounterProxy.java#L413-L424
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.extractTaskID
public static String extractTaskID(String path, String identifier) { """ Extract Hadoop Task ID from path @param path path to extract attempt id @param identifier identifier to extract id @return task id """ LOG.debug("extract task id for {}", path); if (path.contains(HADOOP_ATTEMPT)) { String...
java
public static String extractTaskID(String path, String identifier) { LOG.debug("extract task id for {}", path); if (path.contains(HADOOP_ATTEMPT)) { String prf = path.substring(path.indexOf(HADOOP_ATTEMPT)); if (prf.contains("/")) { return TaskAttemptID.forName(prf.substring(0, prf.indexOf("...
[ "public", "static", "String", "extractTaskID", "(", "String", "path", ",", "String", "identifier", ")", "{", "LOG", ".", "debug", "(", "\"extract task id for {}\"", ",", "path", ")", ";", "if", "(", "path", ".", "contains", "(", "HADOOP_ATTEMPT", ")", ")", ...
Extract Hadoop Task ID from path @param path path to extract attempt id @param identifier identifier to extract id @return task id
[ "Extract", "Hadoop", "Task", "ID", "from", "path" ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L371-L391
zaproxy/zaproxy
src/org/parosproxy/paros/core/scanner/VariantAbstractQuery.java
VariantAbstractQuery.getEscapedName
protected String getEscapedName(HttpMessage msg, String name) { """ Gets parameter's name in encoded/escaped form. <p> Default implementation is to URL encode the name. @param msg the message that contains the parameter @param name the name to escape @return the escaped name @since 2.5.0 @see URLEncoder#e...
java
protected String getEscapedName(HttpMessage msg, String name) { return name != null ? AbstractPlugin.getURLEncode(name) : ""; }
[ "protected", "String", "getEscapedName", "(", "HttpMessage", "msg", ",", "String", "name", ")", "{", "return", "name", "!=", "null", "?", "AbstractPlugin", ".", "getURLEncode", "(", "name", ")", ":", "\"\"", ";", "}" ]
Gets parameter's name in encoded/escaped form. <p> Default implementation is to URL encode the name. @param msg the message that contains the parameter @param name the name to escape @return the escaped name @since 2.5.0 @see URLEncoder#encode(String, String)
[ "Gets", "parameter", "s", "name", "in", "encoded", "/", "escaped", "form", ".", "<p", ">", "Default", "implementation", "is", "to", "URL", "encode", "the", "name", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/VariantAbstractQuery.java#L92-L94
reactor/reactor-netty
src/main/java/reactor/netty/udp/UdpClient.java
UdpClient.doOnLifecycle
public final UdpClient doOnLifecycle(Consumer<? super Bootstrap> doOnConnect, Consumer<? super Connection> doOnConnected, Consumer<? super Connection> doOnDisconnected) { """ Setup all lifecycle callbacks called on or after {@link io.netty.channel.Channel} has been connected and after it has been disconnect...
java
public final UdpClient doOnLifecycle(Consumer<? super Bootstrap> doOnConnect, Consumer<? super Connection> doOnConnected, Consumer<? super Connection> doOnDisconnected) { Objects.requireNonNull(doOnConnect, "doOnConnect"); Objects.requireNonNull(doOnConnected, "doOnConnected"); Objects.requireNonNull(doOnDi...
[ "public", "final", "UdpClient", "doOnLifecycle", "(", "Consumer", "<", "?", "super", "Bootstrap", ">", "doOnConnect", ",", "Consumer", "<", "?", "super", "Connection", ">", "doOnConnected", ",", "Consumer", "<", "?", "super", "Connection", ">", "doOnDisconnected...
Setup all lifecycle callbacks called on or after {@link io.netty.channel.Channel} has been connected and after it has been disconnected. @param doOnConnect a consumer observing client start event @param doOnConnected a consumer observing client started event @param doOnDisconnected a consumer observing client stop eve...
[ "Setup", "all", "lifecycle", "callbacks", "called", "on", "or", "after", "{", "@link", "io", ".", "netty", ".", "channel", ".", "Channel", "}", "has", "been", "connected", "and", "after", "it", "has", "been", "disconnected", "." ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/udp/UdpClient.java#L221-L228
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/tokens/TagLinkToken.java
TagLinkToken.explainScore
public String explainScore(StringWrapper s, StringWrapper t) { """ explainScore returns an explanation of how the string distance was computed. @param S StringWrapper @param T StringWrapper @return String """ String S = s.unwrap(), T = t.unwrap(); StringBuffer buff = new StringBuffer(); b...
java
public String explainScore(StringWrapper s, StringWrapper t) { String S = s.unwrap(), T = t.unwrap(); StringBuffer buff = new StringBuffer(); buff.append("\n****TagLinkToken****\n"); buff.append("Si=" + S + ", Tj=" + T + "\n"); double totalScore = 0.0; if (S.equals(T)) { matched = ...
[ "public", "String", "explainScore", "(", "StringWrapper", "s", ",", "StringWrapper", "t", ")", "{", "String", "S", "=", "s", ".", "unwrap", "(", ")", ",", "T", "=", "t", ".", "unwrap", "(", ")", ";", "StringBuffer", "buff", "=", "new", "StringBuffer", ...
explainScore returns an explanation of how the string distance was computed. @param S StringWrapper @param T StringWrapper @return String
[ "explainScore", "returns", "an", "explanation", "of", "how", "the", "string", "distance", "was", "computed", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/tokens/TagLinkToken.java#L103-L155
nobuoka/android-lib-ZXingCaptureActivity
src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java
CaptureActivityIntents.setResultDisplayDurationInMs
public static void setResultDisplayDurationInMs(Intent intent, long duration) { """ Set desired duration for which to pause after a successful scan to {@code Intent}. @param intent Target intent. @param duration Desired duration in milliseconds. """ intent.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_M...
java
public static void setResultDisplayDurationInMs(Intent intent, long duration) { intent.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, duration); }
[ "public", "static", "void", "setResultDisplayDurationInMs", "(", "Intent", "intent", ",", "long", "duration", ")", "{", "intent", ".", "putExtra", "(", "Intents", ".", "Scan", ".", "RESULT_DISPLAY_DURATION_MS", ",", "duration", ")", ";", "}" ]
Set desired duration for which to pause after a successful scan to {@code Intent}. @param intent Target intent. @param duration Desired duration in milliseconds.
[ "Set", "desired", "duration", "for", "which", "to", "pause", "after", "a", "successful", "scan", "to", "{" ]
train
https://github.com/nobuoka/android-lib-ZXingCaptureActivity/blob/17aaa7cf75520d3f2e03db9796b7e8c1d1f1b1e6/src/main/java/info/vividcode/android/zxing/CaptureActivityIntents.java#L194-L196
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/richclient/framework/impl/RichClientFramework.java
RichClientFramework.areEndPointsEqual
@Override public boolean areEndPointsEqual(Object ep1, Object ep2) { """ The channel framework EP's don't have their own equals method - so one is implemented here by comparing the various parts of the EP. @see com.ibm.ws.sib.jfapchannel.framework.Framework#areEndPointsEqual(java.lang.Object, java.lang.Obj...
java
@Override public boolean areEndPointsEqual(Object ep1, Object ep2) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "areEndPointsEqual", new Object[] { ep1, ep2 }); boolean isEqual = false; if (ep1 instanceof CFEndPoint && ep2 instanc...
[ "@", "Override", "public", "boolean", "areEndPointsEqual", "(", "Object", "ep1", ",", "Object", "ep2", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "("...
The channel framework EP's don't have their own equals method - so one is implemented here by comparing the various parts of the EP. @see com.ibm.ws.sib.jfapchannel.framework.Framework#areEndPointsEqual(java.lang.Object, java.lang.Object)
[ "The", "channel", "framework", "EP", "s", "don", "t", "have", "their", "own", "equals", "method", "-", "so", "one", "is", "implemented", "here", "by", "comparing", "the", "various", "parts", "of", "the", "EP", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/richclient/framework/impl/RichClientFramework.java#L572-L597
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/JobApi.java
JobApi.playJob
public Job playJob(Object projectIdOrPath, int jobId) throws GitLabApiException { """ Play specified job in a project. <pre><code>GitLab Endpoint: POST /projects/:id/jobs/:job_id/play</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path @param job...
java
public Job playJob(Object projectIdOrPath, int jobId) throws GitLabApiException { GitLabApiForm formData = null; Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play"); return (response.readEntity(Job.class)); }
[ "public", "Job", "playJob", "(", "Object", "projectIdOrPath", ",", "int", "jobId", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "null", ";", "Response", "response", "=", "post", "(", "Status", ".", "CREATED", ",", "formData", ","...
Play specified job in a project. <pre><code>GitLab Endpoint: POST /projects/:id/jobs/:job_id/play</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path @param jobId the ID to play job @return job instance which just played @throws GitLabApiException if any e...
[ "Play", "specified", "job", "in", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L489-L493
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/propertysheet/PropertySheetTableModel.java
PropertySheetTableModel.setValueAt
@Override public void setValueAt(Object value, int rowIndex, int columnIndex) { """ Sets the value at the specified row and column. This will have no effect unless the row is a property and the column is {@link #VALUE_COLUMN}. @param value @param rowIndex @param columnIndex @see javax.swing.table.TableM...
java
@Override public void setValueAt(Object value, int rowIndex, int columnIndex) { Item item = getPropertySheetElement(rowIndex); if (item.isProperty()) { if (columnIndex == VALUE_COLUMN) { try { item.getProperty().setValue(value); } catch...
[ "@", "Override", "public", "void", "setValueAt", "(", "Object", "value", ",", "int", "rowIndex", ",", "int", "columnIndex", ")", "{", "Item", "item", "=", "getPropertySheetElement", "(", "rowIndex", ")", ";", "if", "(", "item", ".", "isProperty", "(", ")",...
Sets the value at the specified row and column. This will have no effect unless the row is a property and the column is {@link #VALUE_COLUMN}. @param value @param rowIndex @param columnIndex @see javax.swing.table.TableModel#setValueAt(java.lang.Object, int, int)
[ "Sets", "the", "value", "at", "the", "specified", "row", "and", "column", ".", "This", "will", "have", "no", "effect", "unless", "the", "row", "is", "a", "property", "and", "the", "column", "is", "{", "@link", "#VALUE_COLUMN", "}", "." ]
train
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertySheetTableModel.java#L382-L394
cdk/cdk
base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java
BondManipulator.getMaximumBondOrder
public static IBond.Order getMaximumBondOrder(IBond.Order firstOrder, IBond.Order secondOrder) { """ Returns the maximum bond order for the two bond orders. @param firstOrder first bond order to compare @param secondOrder second bond order to compare @return The maximum bond order found """...
java
public static IBond.Order getMaximumBondOrder(IBond.Order firstOrder, IBond.Order secondOrder) { if (firstOrder == Order.UNSET) { if (secondOrder == Order.UNSET) throw new IllegalArgumentException("Both bond orders are unset"); return secondOrder; } if (secondOrder == Ord...
[ "public", "static", "IBond", ".", "Order", "getMaximumBondOrder", "(", "IBond", ".", "Order", "firstOrder", ",", "IBond", ".", "Order", "secondOrder", ")", "{", "if", "(", "firstOrder", "==", "Order", ".", "UNSET", ")", "{", "if", "(", "secondOrder", "==",...
Returns the maximum bond order for the two bond orders. @param firstOrder first bond order to compare @param secondOrder second bond order to compare @return The maximum bond order found
[ "Returns", "the", "maximum", "bond", "order", "for", "the", "two", "bond", "orders", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/tools/manipulator/BondManipulator.java#L247-L261
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICETransportManager.java
ICETransportManager.sessionEstablished
@Override public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc, JingleSession jingleSession) throws NotConnectedException, InterruptedException { """ Implement a Session Listener to relay candidates after establishment """ if (lc instanceof ICECandidate) { ...
java
@Override public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc, JingleSession jingleSession) throws NotConnectedException, InterruptedException { if (lc instanceof ICECandidate) { if (((ICECandidate) lc).getType().equals(Type.relay)) { RTPBr...
[ "@", "Override", "public", "void", "sessionEstablished", "(", "PayloadType", "pt", ",", "TransportCandidate", "rc", ",", "TransportCandidate", "lc", ",", "JingleSession", "jingleSession", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "if", ...
Implement a Session Listener to relay candidates after establishment
[ "Implement", "a", "Session", "Listener", "to", "relay", "candidates", "after", "establishment" ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICETransportManager.java#L61-L68
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
WebSocketClientHandshaker.processHandshake
public final ChannelFuture processHandshake(final Channel channel, HttpResponse response) { """ Process the opening handshake initiated by {@link #handshake}}. @param channel Channel @param response HTTP response containing the closing handshake details @return future the {@link ChannelFuture} which is not...
java
public final ChannelFuture processHandshake(final Channel channel, HttpResponse response) { return processHandshake(channel, response, channel.newPromise()); }
[ "public", "final", "ChannelFuture", "processHandshake", "(", "final", "Channel", "channel", ",", "HttpResponse", "response", ")", "{", "return", "processHandshake", "(", "channel", ",", "response", ",", "channel", ".", "newPromise", "(", ")", ")", ";", "}" ]
Process the opening handshake initiated by {@link #handshake}}. @param channel Channel @param response HTTP response containing the closing handshake details @return future the {@link ChannelFuture} which is notified once the handshake completes.
[ "Process", "the", "opening", "handshake", "initiated", "by", "{", "@link", "#handshake", "}}", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java#L373-L375
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/model/Account.java
Account.getAccountInfo
public AccountInfo getAccountInfo() throws Exception { """ Gets your current account information. @return information account information @throws IOException unexpected error. """ final JSONObject jsonObject = toJSONObject(client.get(getUri(), null)); return new AccountInfo(client, jsonO...
java
public AccountInfo getAccountInfo() throws Exception { final JSONObject jsonObject = toJSONObject(client.get(getUri(), null)); return new AccountInfo(client, jsonObject); }
[ "public", "AccountInfo", "getAccountInfo", "(", ")", "throws", "Exception", "{", "final", "JSONObject", "jsonObject", "=", "toJSONObject", "(", "client", ".", "get", "(", "getUri", "(", ")", ",", "null", ")", ")", ";", "return", "new", "AccountInfo", "(", ...
Gets your current account information. @return information account information @throws IOException unexpected error.
[ "Gets", "your", "current", "account", "information", "." ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/model/Account.java#L47-L53
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafety.java
ThreadSafety.mutableEnclosingInstance
public Type mutableEnclosingInstance(Optional<ClassTree> tree, ClassType type) { """ Returns an enclosing instance for the specified type if it is thread-safe. """ if (tree.isPresent() && !CanBeStaticAnalyzer.referencesOuter( tree.get(), ASTHelpers.getSymbol(tree.get()), state)) { ...
java
public Type mutableEnclosingInstance(Optional<ClassTree> tree, ClassType type) { if (tree.isPresent() && !CanBeStaticAnalyzer.referencesOuter( tree.get(), ASTHelpers.getSymbol(tree.get()), state)) { return null; } Type enclosing = type.getEnclosingType(); while (!Type.noType.eq...
[ "public", "Type", "mutableEnclosingInstance", "(", "Optional", "<", "ClassTree", ">", "tree", ",", "ClassType", "type", ")", "{", "if", "(", "tree", ".", "isPresent", "(", ")", "&&", "!", "CanBeStaticAnalyzer", ".", "referencesOuter", "(", "tree", ".", "get"...
Returns an enclosing instance for the specified type if it is thread-safe.
[ "Returns", "an", "enclosing", "instance", "for", "the", "specified", "type", "if", "it", "is", "thread", "-", "safe", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafety.java#L662-L681
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmpty
@CodingStyleguideUnaware public static <T extends Iterable <?>> T notEmpty (final T aValue, @Nonnull final Supplier <? extends String> aName) { """ Check that the passed {@link Iterable} is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. ...
java
@CodingStyleguideUnaware public static <T extends Iterable <?>> T notEmpty (final T aValue, @Nonnull final Supplier <? extends String> aName) { notNull (aValue, aName); if (isEnabled ()) if (!aValue.iterator ().hasNext ()) throw new IllegalArgumentException ("The value of the iterable '" + aNa...
[ "@", "CodingStyleguideUnaware", "public", "static", "<", "T", "extends", "Iterable", "<", "?", ">", ">", "T", "notEmpty", "(", "final", "T", "aValue", ",", "@", "Nonnull", "final", "Supplier", "<", "?", "extends", "String", ">", "aName", ")", "{", "notNu...
Check that the passed {@link Iterable} is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param aName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if the passed value is empty
[ "Check", "that", "the", "passed", "{", "@link", "Iterable", "}", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L803-L811
codeprimate-software/cp-elements
src/main/java/org/cp/elements/process/ProcessAdapter.java
ProcessAdapter.newProcessAdapter
public static ProcessAdapter newProcessAdapter(Process process) { """ Factory method used to construct an instance of {@link ProcessAdapter} initialized with the given {@link Process}. @param process {@link Process} object to adapt/wrap with an instance of {@link ProcessAdapter}. @return a newly constructed {@...
java
public static ProcessAdapter newProcessAdapter(Process process) { return newProcessAdapter(process, newProcessContext(process).ranBy(SystemUtils.USERNAME) .ranIn(FileSystemUtils.WORKING_DIRECTORY).usingEnvironmentVariables()); }
[ "public", "static", "ProcessAdapter", "newProcessAdapter", "(", "Process", "process", ")", "{", "return", "newProcessAdapter", "(", "process", ",", "newProcessContext", "(", "process", ")", ".", "ranBy", "(", "SystemUtils", ".", "USERNAME", ")", ".", "ranIn", "(...
Factory method used to construct an instance of {@link ProcessAdapter} initialized with the given {@link Process}. @param process {@link Process} object to adapt/wrap with an instance of {@link ProcessAdapter}. @return a newly constructed {@link ProcessAdapter} adapting/wrapping the given {@link Process}. @throws Ille...
[ "Factory", "method", "used", "to", "construct", "an", "instance", "of", "{", "@link", "ProcessAdapter", "}", "initialized", "with", "the", "given", "{", "@link", "Process", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/process/ProcessAdapter.java#L96-L99
apereo/cas
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java
PrincipalAttributeMultifactorAuthenticationTrigger.resolveMultifactorAuthenticationProvider
protected Set<Event> resolveMultifactorAuthenticationProvider(final Optional<RequestContext> context, final RegisteredService service, final Principal principal) { """ Resolve multifa...
java
protected Set<Event> resolveMultifactorAuthenticationProvider(final Optional<RequestContext> context, final RegisteredService service, final Principal principal) { val globalPrinci...
[ "protected", "Set", "<", "Event", ">", "resolveMultifactorAuthenticationProvider", "(", "final", "Optional", "<", "RequestContext", ">", "context", ",", "final", "RegisteredService", "service", ",", "final", "Principal", "principal", ")", "{", "val", "globalPrincipalA...
Resolve multifactor authentication provider set. @param context the context @param service the service @param principal the principal @return the set
[ "Resolve", "multifactor", "authentication", "provider", "set", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/trigger/PrincipalAttributeMultifactorAuthenticationTrigger.java#L85-L96
code4everything/util
src/main/java/com/zhazhapan/util/BeanUtils.java
BeanUtils.converter
@SuppressWarnings("unchecked") private static String converter(String fieldName, Object object) { """ 手动转换 {@link List} 和 {@link Map} @param fieldName 字段名 @param object 对象 @return json对象 """ StringBuilder builder = new StringBuilder(); if (Checker.isNotEmpty(fieldName)) { ...
java
@SuppressWarnings("unchecked") private static String converter(String fieldName, Object object) { StringBuilder builder = new StringBuilder(); if (Checker.isNotEmpty(fieldName)) { builder.append("\"").append(fieldName).append("\":"); } if (object instanceof Collection) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "String", "converter", "(", "String", "fieldName", ",", "Object", "object", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "Checker", ".", ...
手动转换 {@link List} 和 {@link Map} @param fieldName 字段名 @param object 对象 @return json对象
[ "手动转换", "{", "@link", "List", "}", "和", "{", "@link", "Map", "}" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/BeanUtils.java#L363-L385
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/ras/SibTr.java
SibTr.formatBytes
public static String formatBytes (byte[] data, int start, int count) { """ Produce a formatted view of a byte array. Duplicate output lines are suppressed to save space. Formatting of the byte array starts at the specified position and continues for the specified number of bytes or the end of the data. <p> @...
java
public static String formatBytes (byte[] data, int start, int count) { return formatBytes(data, start, count, true); }
[ "public", "static", "String", "formatBytes", "(", "byte", "[", "]", "data", ",", "int", "start", ",", "int", "count", ")", "{", "return", "formatBytes", "(", "data", ",", "start", ",", "count", ",", "true", ")", ";", "}" ]
Produce a formatted view of a byte array. Duplicate output lines are suppressed to save space. Formatting of the byte array starts at the specified position and continues for the specified number of bytes or the end of the data. <p> @param data the byte array to be formatted @param start position to start formatting t...
[ "Produce", "a", "formatted", "view", "of", "a", "byte", "array", ".", "Duplicate", "output", "lines", "are", "suppressed", "to", "save", "space", ".", "Formatting", "of", "the", "byte", "array", "starts", "at", "the", "specified", "position", "and", "continu...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.utils/src/com/ibm/ws/sib/utils/ras/SibTr.java#L1440-L1442
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.illegalArgumentIf
public static void illegalArgumentIf(boolean tester, String msg, Object... args) { """ Throws out an {@link IllegalArgumentException} with error message specified if `tester` is `true`. @param tester when `true` then throw out the exception. @param msg the error message format pattern. @param args the err...
java
public static void illegalArgumentIf(boolean tester, String msg, Object... args) { if (tester) { throw new IllegalArgumentException(S.fmt(msg, args)); } }
[ "public", "static", "void", "illegalArgumentIf", "(", "boolean", "tester", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "tester", ")", "{", "throw", "new", "IllegalArgumentException", "(", "S", ".", "fmt", "(", "msg", ",", "ar...
Throws out an {@link IllegalArgumentException} with error message specified if `tester` is `true`. @param tester when `true` then throw out the exception. @param msg the error message format pattern. @param args the error message format arguments.
[ "Throws", "out", "an", "{", "@link", "IllegalArgumentException", "}", "with", "error", "message", "specified", "if", "tester", "is", "true", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L695-L699
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/processor/jasper/DataSourceProcessor.java
DataSourceProcessor.setAttributes
public void setAttributes(final Map<String, Attribute> attributes) { """ All the attributes needed either by the processors for each datasource row or by the jasper template. @param attributes the attributes. """ this.internalAttributes = attributes; this.allAttributes.putAll(attributes); ...
java
public void setAttributes(final Map<String, Attribute> attributes) { this.internalAttributes = attributes; this.allAttributes.putAll(attributes); }
[ "public", "void", "setAttributes", "(", "final", "Map", "<", "String", ",", "Attribute", ">", "attributes", ")", "{", "this", ".", "internalAttributes", "=", "attributes", ";", "this", ".", "allAttributes", ".", "putAll", "(", "attributes", ")", ";", "}" ]
All the attributes needed either by the processors for each datasource row or by the jasper template. @param attributes the attributes.
[ "All", "the", "attributes", "needed", "either", "by", "the", "processors", "for", "each", "datasource", "row", "or", "by", "the", "jasper", "template", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/processor/jasper/DataSourceProcessor.java#L153-L156
Crab2died/Excel4J
src/main/java/com/github/crab2died/utils/RegularUtils.java
RegularUtils.match
public static String match(String pattern, String reg) { """ <p>正则提取匹配到的内容,默认提取索引为0</p> <p>例如:</p> <p> author : Crab2Died date : 2017年06月02日 15:49:51 @param pattern 匹配目标内容 @param reg 正则表达式 @return 提取内容集合 """ String match = null; List<String> matches = match(pattern, reg, 0); ...
java
public static String match(String pattern, String reg) { String match = null; List<String> matches = match(pattern, reg, 0); if (null != matches && matches.size() > 0) { match = matches.get(0); } return match; }
[ "public", "static", "String", "match", "(", "String", "pattern", ",", "String", "reg", ")", "{", "String", "match", "=", "null", ";", "List", "<", "String", ">", "matches", "=", "match", "(", "pattern", ",", "reg", ",", "0", ")", ";", "if", "(", "n...
<p>正则提取匹配到的内容,默认提取索引为0</p> <p>例如:</p> <p> author : Crab2Died date : 2017年06月02日 15:49:51 @param pattern 匹配目标内容 @param reg 正则表达式 @return 提取内容集合
[ "<p", ">", "正则提取匹配到的内容", "默认提取索引为0<", "/", "p", ">", "<p", ">", "例如:<", "/", "p", ">", "<p", ">", "author", ":", "Crab2Died", "date", ":", "2017年06月02日", "15", ":", "49", ":", "51" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/utils/RegularUtils.java#L94-L102
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.findCacheConfigOrNull
public CacheSimpleConfig findCacheConfigOrNull(String name) { """ Returns the cache config with the given name or {@code null} if there is none. The name is matched by pattern to the configuration and by stripping the partition ID qualifier from the given {@code name}. @param name name of the cache config @r...
java
public CacheSimpleConfig findCacheConfigOrNull(String name) { name = getBaseName(name); return lookupByPattern(configPatternMatcher, cacheConfigs, name); }
[ "public", "CacheSimpleConfig", "findCacheConfigOrNull", "(", "String", "name", ")", "{", "name", "=", "getBaseName", "(", "name", ")", ";", "return", "lookupByPattern", "(", "configPatternMatcher", ",", "cacheConfigs", ",", "name", ")", ";", "}" ]
Returns the cache config with the given name or {@code null} if there is none. The name is matched by pattern to the configuration and by stripping the partition ID qualifier from the given {@code name}. @param name name of the cache config @return the cache configuration or {@code null} if none was found @throws Conf...
[ "Returns", "the", "cache", "config", "with", "the", "given", "name", "or", "{", "@code", "null", "}", "if", "there", "is", "none", ".", "The", "name", "is", "matched", "by", "pattern", "to", "the", "configuration", "and", "by", "stripping", "the", "parti...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L540-L543
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONAssert.java
JSONAssert.assertEquals
public static void assertEquals(JSONObject expected, JSONObject actual, JSONCompareMode compareMode) throws JSONException { """ Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an {@link AssertionError}. @param expected Expected JSONObject @param actual ...
java
public static void assertEquals(JSONObject expected, JSONObject actual, JSONCompareMode compareMode) throws JSONException { assertEquals("", expected, actual, compareMode); }
[ "public", "static", "void", "assertEquals", "(", "JSONObject", "expected", ",", "JSONObject", "actual", ",", "JSONCompareMode", "compareMode", ")", "throws", "JSONException", "{", "assertEquals", "(", "\"\"", ",", "expected", ",", "actual", ",", "compareMode", ")"...
Asserts that the JSONObject provided matches the expected JSONObject. If it isn't it throws an {@link AssertionError}. @param expected Expected JSONObject @param actual JSONObject to compare @param compareMode Specifies which comparison mode to use @throws JSONException JSON parsing error
[ "Asserts", "that", "the", "JSONObject", "provided", "matches", "the", "expected", "JSONObject", ".", "If", "it", "isn", "t", "it", "throws", "an", "{", "@link", "AssertionError", "}", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L585-L588
carewebframework/carewebframework-core
org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/processor/AbstractProcessor.java
AbstractProcessor.registerTransform
public void registerTransform(String pattern, AbstractTransform transform) { """ Registers a file transform. @param pattern One or more file patterns separated by commas. @param transform The transform. """ transforms.add(new Transform(new WildcardFileFilter(pattern.split("\\,")), transform)); ...
java
public void registerTransform(String pattern, AbstractTransform transform) { transforms.add(new Transform(new WildcardFileFilter(pattern.split("\\,")), transform)); }
[ "public", "void", "registerTransform", "(", "String", "pattern", ",", "AbstractTransform", "transform", ")", "{", "transforms", ".", "add", "(", "new", "Transform", "(", "new", "WildcardFileFilter", "(", "pattern", ".", "split", "(", "\"\\\\,\"", ")", ")", ","...
Registers a file transform. @param pattern One or more file patterns separated by commas. @param transform The transform.
[ "Registers", "a", "file", "transform", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/processor/AbstractProcessor.java#L107-L109
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java
GeometryFactory.createPolygon
public Polygon createPolygon(Bbox bbox) { """ Create a new {@link Polygon} from a {@link Bbox}. @param bbox Bounding box to convert into a {@link Polygon}. @return Returns a {@link Polygon} object. """ Coordinate tl = new Coordinate(bbox.getX(), bbox.getY()); Coordinate tr = new Coordinate(bbox.getX()...
java
public Polygon createPolygon(Bbox bbox) { Coordinate tl = new Coordinate(bbox.getX(), bbox.getY()); Coordinate tr = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY()); Coordinate br = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY() + bbox.getHeight()); Coordinate bl = new Coordinate(bbox.getX(...
[ "public", "Polygon", "createPolygon", "(", "Bbox", "bbox", ")", "{", "Coordinate", "tl", "=", "new", "Coordinate", "(", "bbox", ".", "getX", "(", ")", ",", "bbox", ".", "getY", "(", ")", ")", ";", "Coordinate", "tr", "=", "new", "Coordinate", "(", "b...
Create a new {@link Polygon} from a {@link Bbox}. @param bbox Bounding box to convert into a {@link Polygon}. @return Returns a {@link Polygon} object.
[ "Create", "a", "new", "{", "@link", "Polygon", "}", "from", "a", "{", "@link", "Bbox", "}", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/geometry/GeometryFactory.java#L196-L203
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.performMaintenance
public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmName) { """ The operation to perform maintenance on a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if pa...
java
public OperationStatusResponseInner performMaintenance(String resourceGroupName, String vmName) { return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().body(); }
[ "public", "OperationStatusResponseInner", "performMaintenance", "(", "String", "resourceGroupName", ",", "String", "vmName", ")", "{", "return", "performMaintenanceWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ")", ".", "toBlocking", "(", ")", ".", ...
The operation to perform maintenance on a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws Runtime...
[ "The", "operation", "to", "perform", "maintenance", "on", "a", "virtual", "machine", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L2469-L2471
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.isNull
@Throws(IllegalNotNullArgumentException.class) public static void isNull(@Nullable final Object reference, @Nullable final String name) { """ Ensures that a given argument is {@code null}. Normally, the usage of {@code null} arguments is disregarded by the authors of quality-check. Still, there are certain ci...
java
@Throws(IllegalNotNullArgumentException.class) public static void isNull(@Nullable final Object reference, @Nullable final String name) { if (reference != null) { throw new IllegalNotNullArgumentException(name, reference); } }
[ "@", "Throws", "(", "IllegalNotNullArgumentException", ".", "class", ")", "public", "static", "void", "isNull", "(", "@", "Nullable", "final", "Object", "reference", ",", "@", "Nullable", "final", "String", "name", ")", "{", "if", "(", "reference", "!=", "nu...
Ensures that a given argument is {@code null}. Normally, the usage of {@code null} arguments is disregarded by the authors of quality-check. Still, there are certain circumstances where null is required, e.g. the primary key of an entity before it is written to the database for the first time. In such cases it is ok t...
[ "Ensures", "that", "a", "given", "argument", "is", "{", "@code", "null", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1211-L1216
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java
Annotation.getClassAccessors
public static JMapAccessor getClassAccessors(Class<?> clazz, String fieldName, boolean isOpposite) { """ Checks if this field contains a definition of accessors for the name given as input. @param clazz class to check @param fieldName name to find @param isOpposite true if accessor methods to check belong to th...
java
public static JMapAccessor getClassAccessors(Class<?> clazz, String fieldName, boolean isOpposite){ return getAccessor(clazz, clazz.getAnnotations(),fieldName,isOpposite); }
[ "public", "static", "JMapAccessor", "getClassAccessors", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ",", "boolean", "isOpposite", ")", "{", "return", "getAccessor", "(", "clazz", ",", "clazz", ".", "getAnnotations", "(", ")", ",", "fie...
Checks if this field contains a definition of accessors for the name given as input. @param clazz class to check @param fieldName name to find @param isOpposite true if accessor methods to check belong to the opposite field, false otherwise @return JMapAccessor if exists, null otherwise
[ "Checks", "if", "this", "field", "contains", "a", "definition", "of", "accessors", "for", "the", "name", "given", "as", "input", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/annotations/Annotation.java#L131-L133
baratine/baratine
web/src/main/java/com/caucho/v5/health/warning/WarningSystem.java
WarningSystem.sendWarning
public void sendWarning(Object source, Throwable e) { """ Send a warning message to any registered handlers. A high priority warning only goes to all handlers, high priority first. High priority handlers do not receive non-high priority warnings. @param source source of the message, usually you @param msg te...
java
public void sendWarning(Object source, Throwable e) { try { e.printStackTrace(); String msg = e.toString(); String s = getClass().getSimpleName() + ": " + e; // if warning is high-priority then send to high priority handlers first System.err.println(s); fo...
[ "public", "void", "sendWarning", "(", "Object", "source", ",", "Throwable", "e", ")", "{", "try", "{", "e", ".", "printStackTrace", "(", ")", ";", "String", "msg", "=", "e", ".", "toString", "(", ")", ";", "String", "s", "=", "getClass", "(", ")", ...
Send a warning message to any registered handlers. A high priority warning only goes to all handlers, high priority first. High priority handlers do not receive non-high priority warnings. @param source source of the message, usually you @param msg test to print or send as an alert @param isHighPriority set true to se...
[ "Send", "a", "warning", "message", "to", "any", "registered", "handlers", ".", "A", "high", "priority", "warning", "only", "goes", "to", "all", "handlers", "high", "priority", "first", ".", "High", "priority", "handlers", "do", "not", "receive", "non", "-", ...
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/health/warning/WarningSystem.java#L117-L153
hortonworks/dstream
dstream-api/src/main/java/io/dstream/utils/PropertiesHelper.java
PropertiesHelper.loadProperties
public static Properties loadProperties(String propertyFilePath) { """ Will create an instance of {@link Properties} object loaded from the properties file identified by the given <i>propertyFilePath</i> relative to the root of the classpath @param propertyFilePath path to the property file. @return """ ...
java
public static Properties loadProperties(String propertyFilePath){ Properties prop = new Properties(); InputStream is = null; ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { is = cl.getResourceAsStream(propertyFilePath); Assert.notNull(is, "Failed to obtain InputStream for " + proper...
[ "public", "static", "Properties", "loadProperties", "(", "String", "propertyFilePath", ")", "{", "Properties", "prop", "=", "new", "Properties", "(", ")", ";", "InputStream", "is", "=", "null", ";", "ClassLoader", "cl", "=", "Thread", ".", "currentThread", "("...
Will create an instance of {@link Properties} object loaded from the properties file identified by the given <i>propertyFilePath</i> relative to the root of the classpath @param propertyFilePath path to the property file. @return
[ "Will", "create", "an", "instance", "of", "{", "@link", "Properties", "}", "object", "loaded", "from", "the", "properties", "file", "identified", "by", "the", "given", "<i", ">", "propertyFilePath<", "/", "i", ">", "relative", "to", "the", "root", "of", "t...
train
https://github.com/hortonworks/dstream/blob/3a106c0f14725b028fe7fe2dbc660406d9a5f142/dstream-api/src/main/java/io/dstream/utils/PropertiesHelper.java#L38-L59
playn/playn
scene/src/playn/scene/LayerUtil.java
LayerUtil.layerUnderPoint
public static Layer layerUnderPoint (Layer root, float x, float y) { """ Gets the layer underneath the given screen coordinates, ignoring hit testers. This is useful for inspecting the scene graph for debugging purposes, and is not intended for use is shipped code. The layer returned is the one that has a size a...
java
public static Layer layerUnderPoint (Layer root, float x, float y) { Point p = new Point(x, y); root.transform().inverseTransform(p, p); p.x += root.originX(); p.y += root.originY(); return layerUnderPoint(root, p); }
[ "public", "static", "Layer", "layerUnderPoint", "(", "Layer", "root", ",", "float", "x", ",", "float", "y", ")", "{", "Point", "p", "=", "new", "Point", "(", "x", ",", "y", ")", ";", "root", ".", "transform", "(", ")", ".", "inverseTransform", "(", ...
Gets the layer underneath the given screen coordinates, ignoring hit testers. This is useful for inspecting the scene graph for debugging purposes, and is not intended for use is shipped code. The layer returned is the one that has a size and is the deepest within the graph and contains the coordinate.
[ "Gets", "the", "layer", "underneath", "the", "given", "screen", "coordinates", "ignoring", "hit", "testers", ".", "This", "is", "useful", "for", "inspecting", "the", "scene", "graph", "for", "debugging", "purposes", "and", "is", "not", "intended", "for", "use"...
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/LayerUtil.java#L159-L165
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/validate/ValidationException.java
ValidationException.throwExceptionIfNeeded
public static void throwExceptionIfNeeded(String correlationId, List<ValidationResult> results, boolean strict) throws ValidationException { """ Throws ValidationException based on errors in validation results. If validation results have no errors, than no exception is thrown. @param correlationId (optional...
java
public static void throwExceptionIfNeeded(String correlationId, List<ValidationResult> results, boolean strict) throws ValidationException { ValidationException ex = fromResults(correlationId, results, strict); if (ex != null) throw ex; }
[ "public", "static", "void", "throwExceptionIfNeeded", "(", "String", "correlationId", ",", "List", "<", "ValidationResult", ">", "results", ",", "boolean", "strict", ")", "throws", "ValidationException", "{", "ValidationException", "ex", "=", "fromResults", "(", "co...
Throws ValidationException based on errors in validation results. If validation results have no errors, than no exception is thrown. @param correlationId (optional) transaction id to trace execution through call chain. @param results list of validation results that may contain errors @param strict true to...
[ "Throws", "ValidationException", "based", "on", "errors", "in", "validation", "results", ".", "If", "validation", "results", "have", "no", "errors", "than", "no", "exception", "is", "thrown", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/validate/ValidationException.java#L114-L119
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java
AbstractHistogram.getCountBetweenValues
public long getCountBetweenValues(final long lowValue, final long highValue) throws ArrayIndexOutOfBoundsException { """ Get the count of recorded values within a range of value levels (inclusive to within the histogram's resolution). @param lowValue The lower value bound on the range for which to provide the...
java
public long getCountBetweenValues(final long lowValue, final long highValue) throws ArrayIndexOutOfBoundsException { final int lowIndex = Math.max(0, countsArrayIndex(lowValue)); final int highIndex = Math.min(countsArrayIndex(highValue), (countsArrayLength - 1)); long count = 0; for (in...
[ "public", "long", "getCountBetweenValues", "(", "final", "long", "lowValue", ",", "final", "long", "highValue", ")", "throws", "ArrayIndexOutOfBoundsException", "{", "final", "int", "lowIndex", "=", "Math", ".", "max", "(", "0", ",", "countsArrayIndex", "(", "lo...
Get the count of recorded values within a range of value levels (inclusive to within the histogram's resolution). @param lowValue The lower value bound on the range for which to provide the recorded count. Will be rounded down with {@link Histogram#lowestEquivalentValue lowestEquivalentValue}. @param highValue The h...
[ "Get", "the", "count", "of", "recorded", "values", "within", "a", "range", "of", "value", "levels", "(", "inclusive", "to", "within", "the", "histogram", "s", "resolution", ")", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/AbstractHistogram.java#L1267-L1275
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Correlation
public static double Correlation(double[] p, double[] q) { """ Gets the Correlation distance between two points. @param p A point in space. @param q A point in space. @return The Correlation distance between x and y. """ double x = 0; double y = 0; for (int i = 0; i < p.length; i...
java
public static double Correlation(double[] p, double[] q) { double x = 0; double y = 0; for (int i = 0; i < p.length; i++) { x += -p[i]; y += -q[i]; } x /= p.length; y /= q.length; double num = 0; double den1 = 0; double ...
[ "public", "static", "double", "Correlation", "(", "double", "[", "]", "p", ",", "double", "[", "]", "q", ")", "{", "double", "x", "=", "0", ";", "double", "y", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "p", ".", "length"...
Gets the Correlation distance between two points. @param p A point in space. @param q A point in space. @return The Correlation distance between x and y.
[ "Gets", "the", "Correlation", "distance", "between", "two", "points", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L283-L308
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ModulesInner.java
ModulesInner.updateAsync
public Observable<ModuleInner> updateAsync(String resourceGroupName, String automationAccountName, String moduleName, ModuleUpdateParameters parameters) { """ Update the module identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the auto...
java
public Observable<ModuleInner> updateAsync(String resourceGroupName, String automationAccountName, String moduleName, ModuleUpdateParameters parameters) { return updateWithServiceResponseAsync(resourceGroupName, automationAccountName, moduleName, parameters).map(new Func1<ServiceResponse<ModuleInner>, ModuleInn...
[ "public", "Observable", "<", "ModuleInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "moduleName", ",", "ModuleUpdateParameters", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(",...
Update the module identified by module name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param moduleName The name of module. @param parameters The update parameters for module. @throws IllegalArgumentException thrown if parameters fail th...
[ "Update", "the", "module", "identified", "by", "module", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/ModulesInner.java#L415-L422
ops4j/org.ops4j.pax.exam1
ops4j-quickbuild-core/src/main/java/org/ops4j/pax/exam/quickbuild/internal/DefaultSnapshotBuilder.java
DefaultSnapshotBuilder.newSnapshotElement
private SnapshotElement newSnapshotElement( String name, Handle handle, QType type ) throws IOException { """ Create a new SnapshotElement instance of name, handle and type. Helper method. @param name name identifier of a snapshot entry @param handle store handle @param type the type @return n...
java
private SnapshotElement newSnapshotElement( String name, Handle handle, QType type ) throws IOException { return new DefaultSnapshotElement( name, m_store.getLocation( handle ), type, handle.getIdentification() ); }
[ "private", "SnapshotElement", "newSnapshotElement", "(", "String", "name", ",", "Handle", "handle", ",", "QType", "type", ")", "throws", "IOException", "{", "return", "new", "DefaultSnapshotElement", "(", "name", ",", "m_store", ".", "getLocation", "(", "handle", ...
Create a new SnapshotElement instance of name, handle and type. Helper method. @param name name identifier of a snapshot entry @param handle store handle @param type the type @return new instance of type {@link SnapshotElement} @throws IOException in case something goes wrong when dealing with you supplied handl...
[ "Create", "a", "new", "SnapshotElement", "instance", "of", "name", "handle", "and", "type", ".", "Helper", "method", "." ]
train
https://github.com/ops4j/org.ops4j.pax.exam1/blob/7c8742208117ff91bd24bcd3a185d2d019f7000f/ops4j-quickbuild-core/src/main/java/org/ops4j/pax/exam/quickbuild/internal/DefaultSnapshotBuilder.java#L97-L101
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newChunk
public Chunk newChunk(String id, String phrase, Span<Term> span) { """ Creates a chunk object to load an existing chunk. It receives it's ID as an argument. The Chunk is added to the document object. @param id chunk's ID. @param head the chunk head. @param phrase type of the phrase. @param terms the list of th...
java
public Chunk newChunk(String id, String phrase, Span<Term> span) { idManager.updateCounter(AnnotationType.CHUNK, id); Chunk newChunk = new Chunk(id, span); newChunk.setPhrase(phrase); annotationContainer.add(newChunk, Layer.CHUNKS, AnnotationType.CHUNK); return newChunk; }
[ "public", "Chunk", "newChunk", "(", "String", "id", ",", "String", "phrase", ",", "Span", "<", "Term", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "CHUNK", ",", "id", ")", ";", "Chunk", "newChunk", "=", "new", ...
Creates a chunk object to load an existing chunk. It receives it's ID as an argument. The Chunk is added to the document object. @param id chunk's ID. @param head the chunk head. @param phrase type of the phrase. @param terms the list of the terms in the chunk. @return a new chunk.
[ "Creates", "a", "chunk", "object", "to", "load", "an", "existing", "chunk", ".", "It", "receives", "it", "s", "ID", "as", "an", "argument", ".", "The", "Chunk", "is", "added", "to", "the", "document", "object", "." ]
train
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L704-L710
google/closure-templates
java/src/com/google/template/soy/data/SanitizedContents.java
SanitizedContents.constantCss
public static SanitizedContent constantCss(@CompileTimeConstant final String constant) { """ Wraps an assumed-safe CSS constant. <p>This only accepts compile-time constants, based on the assumption that CSSes that are controlled by the application (and not user input) are considered safe. """ return fr...
java
public static SanitizedContent constantCss(@CompileTimeConstant final String constant) { return fromConstant(constant, ContentKind.CSS, Dir.LTR); }
[ "public", "static", "SanitizedContent", "constantCss", "(", "@", "CompileTimeConstant", "final", "String", "constant", ")", "{", "return", "fromConstant", "(", "constant", ",", "ContentKind", ".", "CSS", ",", "Dir", ".", "LTR", ")", ";", "}" ]
Wraps an assumed-safe CSS constant. <p>This only accepts compile-time constants, based on the assumption that CSSes that are controlled by the application (and not user input) are considered safe.
[ "Wraps", "an", "assumed", "-", "safe", "CSS", "constant", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/data/SanitizedContents.java#L218-L220
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java
JavascriptObject.invokeJavascriptReturnValue
protected <T> T invokeJavascriptReturnValue(String function, Class<T> returnType, Object... args) { """ Invoke the specified JavaScript function in the JavaScript runtime. @param <T> @param function The function to invoke @param returnType The type of object to return @param args Any arguments to pass to the...
java
protected <T> T invokeJavascriptReturnValue(String function, Class<T> returnType, Object... args) { Object returnObject = invokeJavascript(function, args); if (returnObject != null) { return (T) returnObject; } else { return null; } }
[ "protected", "<", "T", ">", "T", "invokeJavascriptReturnValue", "(", "String", "function", ",", "Class", "<", "T", ">", "returnType", ",", "Object", "...", "args", ")", "{", "Object", "returnObject", "=", "invokeJavascript", "(", "function", ",", "args", ")"...
Invoke the specified JavaScript function in the JavaScript runtime. @param <T> @param function The function to invoke @param returnType The type of object to return @param args Any arguments to pass to the function @return The result of the function.
[ "Invoke", "the", "specified", "JavaScript", "function", "in", "the", "JavaScript", "runtime", "." ]
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L264-L271
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java
SegmentAggregator.reconcileOperation
private CompletableFuture<WriterFlushResult> reconcileOperation(StorageOperation op, SegmentProperties storageInfo, TimeoutTimer timer) { """ Attempts to reconcile the given StorageOperation. @param op The Operation to reconcile. @param storageInfo The current state of the Segment in Storage. @param ...
java
private CompletableFuture<WriterFlushResult> reconcileOperation(StorageOperation op, SegmentProperties storageInfo, TimeoutTimer timer) { CompletableFuture<WriterFlushResult> result; if (isAppendOperation(op)) { result = reconcileAppendOperation((AggregatedAppendOperation) op, storageInfo, ...
[ "private", "CompletableFuture", "<", "WriterFlushResult", ">", "reconcileOperation", "(", "StorageOperation", "op", ",", "SegmentProperties", "storageInfo", ",", "TimeoutTimer", "timer", ")", "{", "CompletableFuture", "<", "WriterFlushResult", ">", "result", ";", "if", ...
Attempts to reconcile the given StorageOperation. @param op The Operation to reconcile. @param storageInfo The current state of the Segment in Storage. @param timer Timer for the operation. @return A CompletableFuture containing a FlushResult with the number of bytes reconciled, or failed with a Reconci...
[ "Attempts", "to", "reconcile", "the", "given", "StorageOperation", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L1277-L1294
google/flatbuffers
java/com/google/flatbuffers/Table.java
Table.__union
protected Table __union(Table t, int offset) { """ Initialize any Table-derived type to point to the union at the given `offset`. @param t A `Table`-derived type that should point to the union at `offset`. @param offset An `int` index into the Table's ByteBuffer. @return Returns the Table that points to the u...
java
protected Table __union(Table t, int offset) { offset += bb_pos; t.bb_pos = offset + bb.getInt(offset); t.bb = bb; t.vtable_start = t.bb_pos - bb.getInt(t.bb_pos); t.vtable_size = bb.getShort(t.vtable_start); return t; }
[ "protected", "Table", "__union", "(", "Table", "t", ",", "int", "offset", ")", "{", "offset", "+=", "bb_pos", ";", "t", ".", "bb_pos", "=", "offset", "+", "bb", ".", "getInt", "(", "offset", ")", ";", "t", ".", "bb", "=", "bb", ";", "t", ".", "...
Initialize any Table-derived type to point to the union at the given `offset`. @param t A `Table`-derived type that should point to the union at `offset`. @param offset An `int` index into the Table's ByteBuffer. @return Returns the Table that points to the union at `offset`.
[ "Initialize", "any", "Table", "-", "derived", "type", "to", "point", "to", "the", "union", "at", "the", "given", "offset", "." ]
train
https://github.com/google/flatbuffers/blob/6cc30b3272d79c85db7d4871ac0aa69541dc89de/java/com/google/flatbuffers/Table.java#L171-L178
gocd/gocd
base/src/main/java/com/thoughtworks/go/util/DirectoryScanner.java
DirectoryScanner.isSymlink
private boolean isSymlink(File base, Vector pathElements) { """ Do we have to traverse a symlink when trying to reach path from basedir? @param base base File (dir). @param pathElements Vector of path elements (dirs...file). @since Ant 1.6 """ if (pathElements.size() > 0) { String curre...
java
private boolean isSymlink(File base, Vector pathElements) { if (pathElements.size() > 0) { String current = (String) pathElements.remove(0); try { return FileUtil.isSymbolicLink(base, current) || isSymlink(new File(base, current), pathElements); ...
[ "private", "boolean", "isSymlink", "(", "File", "base", ",", "Vector", "pathElements", ")", "{", "if", "(", "pathElements", ".", "size", "(", ")", ">", "0", ")", "{", "String", "current", "=", "(", "String", ")", "pathElements", ".", "remove", "(", "0"...
Do we have to traverse a symlink when trying to reach path from basedir? @param base base File (dir). @param pathElements Vector of path elements (dirs...file). @since Ant 1.6
[ "Do", "we", "have", "to", "traverse", "a", "symlink", "when", "trying", "to", "reach", "path", "from", "basedir?" ]
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/base/src/main/java/com/thoughtworks/go/util/DirectoryScanner.java#L1595-L1609
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/AbstractLongList.java
AbstractLongList.beforeInsertAllOfFromTo
public void beforeInsertAllOfFromTo(int index, AbstractLongList other, int from, int to) { """ Inserts the part of the specified list between <code>otherFrom</code> (inclusive) and <code>otherTo</code> (inclusive) before the specified position into the receiver. Shifts the element currently at that position (if a...
java
public void beforeInsertAllOfFromTo(int index, AbstractLongList other, int from, int to) { int length=to-from+1; this.beforeInsertDummies(index, length); this.replaceFromToWithFrom(index, index+length-1, other, from); }
[ "public", "void", "beforeInsertAllOfFromTo", "(", "int", "index", ",", "AbstractLongList", "other", ",", "int", "from", ",", "int", "to", ")", "{", "int", "length", "=", "to", "-", "from", "+", "1", ";", "this", ".", "beforeInsertDummies", "(", "index", ...
Inserts the part of the specified list between <code>otherFrom</code> (inclusive) and <code>otherTo</code> (inclusive) before the specified position into the receiver. Shifts the element currently at that position (if any) and any subsequent elements to the right. @param index index before which to insert first elemen...
[ "Inserts", "the", "part", "of", "the", "specified", "list", "between", "<code", ">", "otherFrom<", "/", "code", ">", "(", "inclusive", ")", "and", "<code", ">", "otherTo<", "/", "code", ">", "(", "inclusive", ")", "before", "the", "specified", "position", ...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/AbstractLongList.java#L73-L77
esigate/esigate
esigate-core/src/main/java/org/esigate/vars/VariablesResolver.java
VariablesResolver.replaceAllVariables
public static String replaceAllVariables(String strVars, DriverRequest request) { """ Replace all ESI variables found in strVars by their matching value in vars.properties. @param strVars a String containing variables. @param request @return The resulting String """ String result = strVars; ...
java
public static String replaceAllVariables(String strVars, DriverRequest request) { String result = strVars; if (VariablesResolver.containsVariable(strVars)) { Matcher matcher = VAR_PATTERN.matcher(strVars); while (matcher.find()) { String group = matcher.group(); ...
[ "public", "static", "String", "replaceAllVariables", "(", "String", "strVars", ",", "DriverRequest", "request", ")", "{", "String", "result", "=", "strVars", ";", "if", "(", "VariablesResolver", ".", "containsVariable", "(", "strVars", ")", ")", "{", "Matcher", ...
Replace all ESI variables found in strVars by their matching value in vars.properties. @param strVars a String containing variables. @param request @return The resulting String
[ "Replace", "all", "ESI", "variables", "found", "in", "strVars", "by", "their", "matching", "value", "in", "vars", ".", "properties", "." ]
train
https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/vars/VariablesResolver.java#L143-L183
lastaflute/lasta-di
src/main/java/org/lastaflute/di/util/LdiSrl.java
LdiSrl.initBeansProp
public static String initBeansProp(String capitalizedName) { """ Adjust initial character(s) as beans property. <br> Basically same as initUncap() method except only when it starts with two upper case character, for example, 'EMecha' @param capitalizedName The capitalized name for beans property. (NotNull) @re...
java
public static String initBeansProp(String capitalizedName) { // according to Java Beans rule assertObjectNotNull("capitalizedName", capitalizedName); if (is_Null_or_TrimmedEmpty(capitalizedName)) { return capitalizedName; } if (isInitTwoUpperCase(capitalizedName)) { // for ex...
[ "public", "static", "String", "initBeansProp", "(", "String", "capitalizedName", ")", "{", "// according to Java Beans rule", "assertObjectNotNull", "(", "\"capitalizedName\"", ",", "capitalizedName", ")", ";", "if", "(", "is_Null_or_TrimmedEmpty", "(", "capitalizedName", ...
Adjust initial character(s) as beans property. <br> Basically same as initUncap() method except only when it starts with two upper case character, for example, 'EMecha' @param capitalizedName The capitalized name for beans property. (NotNull) @return The name as beans property that initial is adjusted. (NotNull)
[ "Adjust", "initial", "character", "(", "s", ")", "as", "beans", "property", ".", "<br", ">", "Basically", "same", "as", "initUncap", "()", "method", "except", "only", "when", "it", "starts", "with", "two", "upper", "case", "character", "for", "example", "E...
train
https://github.com/lastaflute/lasta-di/blob/c4e123610c53a04cc836c5e456660e32d613447b/src/main/java/org/lastaflute/di/util/LdiSrl.java#L2051-L2060
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/CommandGroupJComponentBuilder.java
CommandGroupJComponentBuilder.buildGroupModel
protected final Object buildGroupModel(Object parentModel, CommandGroup commandGroup, int level) { """ Implementation wrapping around the {@link #buildGroupComponent(JComponent, CommandGroup, int)} """ return buildGroupComponent((JComponent) parentModel, commandGroup, level); }
java
protected final Object buildGroupModel(Object parentModel, CommandGroup commandGroup, int level) { return buildGroupComponent((JComponent) parentModel, commandGroup, level); }
[ "protected", "final", "Object", "buildGroupModel", "(", "Object", "parentModel", ",", "CommandGroup", "commandGroup", ",", "int", "level", ")", "{", "return", "buildGroupComponent", "(", "(", "JComponent", ")", "parentModel", ",", "commandGroup", ",", "level", ")"...
Implementation wrapping around the {@link #buildGroupComponent(JComponent, CommandGroup, int)}
[ "Implementation", "wrapping", "around", "the", "{" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/CommandGroupJComponentBuilder.java#L78-L81
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSceneObject.java
GVRSceneObject.expandBoundingVolume
public final BoundingVolume expandBoundingVolume(final Vector3f point) { """ Expand the current volume by the given point @param point point to add to bounding volume. @return the updated BoundingVolume. """ return expandBoundingVolume(point.x, point.y, point.z); }
java
public final BoundingVolume expandBoundingVolume(final Vector3f point) { return expandBoundingVolume(point.x, point.y, point.z); }
[ "public", "final", "BoundingVolume", "expandBoundingVolume", "(", "final", "Vector3f", "point", ")", "{", "return", "expandBoundingVolume", "(", "point", ".", "x", ",", "point", ".", "y", ",", "point", ".", "z", ")", ";", "}" ]
Expand the current volume by the given point @param point point to add to bounding volume. @return the updated BoundingVolume.
[ "Expand", "the", "current", "volume", "by", "the", "given", "point" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSceneObject.java#L1272-L1274
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/WicketImageExtensions.java
WicketImageExtensions.getNonCachingImage
public static NonCachingImage getNonCachingImage(final String wicketId, final String contentType, final Byte[] data) { """ Gets a non caching image from the given wicketId, contentType and the Byte array data. @param wicketId the id from the image for the html template. @param contentType the content type ...
java
public static NonCachingImage getNonCachingImage(final String wicketId, final String contentType, final Byte[] data) { final byte[] byteArrayData = ArrayUtils.toPrimitive(data); return getNonCachingImage(wicketId, contentType, byteArrayData); }
[ "public", "static", "NonCachingImage", "getNonCachingImage", "(", "final", "String", "wicketId", ",", "final", "String", "contentType", ",", "final", "Byte", "[", "]", "data", ")", "{", "final", "byte", "[", "]", "byteArrayData", "=", "ArrayUtils", ".", "toPri...
Gets a non caching image from the given wicketId, contentType and the Byte array data. @param wicketId the id from the image for the html template. @param contentType the content type of the image. @param data the data for the image as an Byte array. @return the non caching image
[ "Gets", "a", "non", "caching", "image", "from", "the", "given", "wicketId", "contentType", "and", "the", "Byte", "array", "data", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/WicketImageExtensions.java#L94-L99
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/Vertigo.java
Vertigo.undeployNetwork
public Vertigo undeployNetwork(String cluster, String name) { """ Undeploys a complete network from the given cluster.<p> This method does not require a network configuration for undeployment. Vertigo will load the configuration from the fault-tolerant data store and undeploy components internally. This allow...
java
public Vertigo undeployNetwork(String cluster, String name) { return undeployNetwork(cluster, name, null); }
[ "public", "Vertigo", "undeployNetwork", "(", "String", "cluster", ",", "String", "name", ")", "{", "return", "undeployNetwork", "(", "cluster", ",", "name", ",", "null", ")", ";", "}" ]
Undeploys a complete network from the given cluster.<p> This method does not require a network configuration for undeployment. Vertigo will load the configuration from the fault-tolerant data store and undeploy components internally. This allows networks to be undeployed without the network configuration. @param clus...
[ "Undeploys", "a", "complete", "network", "from", "the", "given", "cluster", ".", "<p", ">" ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/Vertigo.java#L598-L600
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.createAsync
public Observable<StorageAccountInner> createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { """ Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different pro...
java
public Observable<StorageAccountInner> createAsync(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<StorageAccountInner>, StorageAccountInner>() { ...
[ "public", "Observable", "<", "StorageAccountInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "StorageAccountCreateParameters", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "resourceGroupName", ","...
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact sa...
[ "Asynchronously", "creates", "a", "new", "storage", "account", "with", "the", "specified", "parameters", ".", "If", "an", "account", "is", "already", "created", "and", "a", "subsequent", "create", "request", "is", "issued", "with", "different", "properties", "th...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L254-L261
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/ThreadPoolListenerImpl.java
ThreadPoolListenerImpl.threadStarted
public void threadStarted(ThreadPool tp, int activeThreads, int maxThreads) { """ /* (non-Javadoc) @see com.ibm.ws.util.ThreadPoolListener#threadStarted(com.ibm.ws.util.ThreadPool, int, int) Only need to push the messaging engine at thread started time. This should be a one off cost. """ if (TraceComp...
java
public void threadStarted(ThreadPool tp, int activeThreads, int maxThreads) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "threadStarted", new Object[]{tp, new Integer(activeThreads), new Integer(maxThreads)}); if (TraceComponent.isAnyTracingEnabled() && (tc.is...
[ "public", "void", "threadStarted", "(", "ThreadPool", "tp", ",", "int", "activeThreads", ",", "int", "maxThreads", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", ...
/* (non-Javadoc) @see com.ibm.ws.util.ThreadPoolListener#threadStarted(com.ibm.ws.util.ThreadPool, int, int) Only need to push the messaging engine at thread started time. This should be a one off cost.
[ "/", "*", "(", "non", "-", "Javadoc", ")", "@see", "com", ".", "ibm", ".", "ws", ".", "util", ".", "ThreadPoolListener#threadStarted", "(", "com", ".", "ibm", ".", "ws", ".", "util", ".", "ThreadPool", "int", "int", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/ThreadPoolListenerImpl.java#L61-L71
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/dbserver/Client.java
Client.renderMenuItems
@SuppressWarnings("SameParameterValue") public synchronized List<Message> renderMenuItems(Message.MenuIdentifier targetMenu, CdjStatus.TrackSourceSlot slot, CdjStatus.TrackType trackType, Message availableResponse) throws IOException { """ Gathe...
java
@SuppressWarnings("SameParameterValue") public synchronized List<Message> renderMenuItems(Message.MenuIdentifier targetMenu, CdjStatus.TrackSourceSlot slot, CdjStatus.TrackType trackType, Message availableResponse) throws IOException { final ...
[ "@", "SuppressWarnings", "(", "\"SameParameterValue\"", ")", "public", "synchronized", "List", "<", "Message", ">", "renderMenuItems", "(", "Message", ".", "MenuIdentifier", "targetMenu", ",", "CdjStatus", ".", "TrackSourceSlot", "slot", ",", "CdjStatus", ".", "Trac...
Gather up all the responses that are available for a menu request. Will involve multiple requests if the number of responses available is larger than our maximum batch size (see {@link #getMenuBatchSize()}. @param targetMenu the destination for the response to this query @param slot the media library of interest for t...
[ "Gather", "up", "all", "the", "responses", "that", "are", "available", "for", "a", "menu", "request", ".", "Will", "involve", "multiple", "requests", "if", "the", "number", "of", "responses", "available", "is", "larger", "than", "our", "maximum", "batch", "s...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/dbserver/Client.java#L510-L519
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java
AccountsInner.beginCreate
public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { """ Creates the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store acco...
java
public DataLakeStoreAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeStoreAccountParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
[ "public", "DataLakeStoreAccountInner", "beginCreate", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "CreateDataLakeStoreAccountParameters", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountN...
Creates the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store account. @param parameters Parameters supplied to create the Data Lake Store account. @throws IllegalArgumentException thrown if parameters fail the validatio...
[ "Creates", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/AccountsInner.java#L716-L718
tweea/matrixjavalib-main-common
src/main/java/net/matrix/lang/Reflections.java
Reflections.getClassGenricType
public static Class getClassGenricType(final Class clazz, final int index) { """ 通过反射,获得 Class 定义中声明的父类的泛型参数的类型。 如无法找到,返回 Object.class。 如: <pre> public UserDao extends HibernateDao&lt;User, Long&gt; </pre> @param clazz clazz The class to introspect @param index the Index of the generic ddeclaration,st...
java
public static Class getClassGenricType(final Class clazz, final int index) { Type genType = clazz.getGenericSuperclass(); if (!(genType instanceof ParameterizedType)) { LOG.warn("{}'s superclass not ParameterizedType", clazz.getSimpleName()); return Object.class; } Type[] params = ((Parameterize...
[ "public", "static", "Class", "getClassGenricType", "(", "final", "Class", "clazz", ",", "final", "int", "index", ")", "{", "Type", "genType", "=", "clazz", ".", "getGenericSuperclass", "(", ")", ";", "if", "(", "!", "(", "genType", "instanceof", "Parameteriz...
通过反射,获得 Class 定义中声明的父类的泛型参数的类型。 如无法找到,返回 Object.class。 如: <pre> public UserDao extends HibernateDao&lt;User, Long&gt; </pre> @param clazz clazz The class to introspect @param index the Index of the generic ddeclaration,start from 0. @return the index generic declaration, or Object.class if cannot be determined
[ "通过反射,获得", "Class", "定义中声明的父类的泛型参数的类型。", "如无法找到,返回", "Object", ".", "class。", "如:" ]
train
https://github.com/tweea/matrixjavalib-main-common/blob/ac8f98322a422e3ef76c3e12d47b98268cec7006/src/main/java/net/matrix/lang/Reflections.java#L322-L342
vtatai/srec
core/src/main/java/com/github/srec/command/method/MethodCommand.java
MethodCommand.asString
protected String asString(String name, Map<String, Value> params, ExecutionContext context) { """ Gets a parameter value as a Java String. @param name The parameter name @param params The parameters @param context The EC @return The String """ return coerceToString(params.get(name), context); ...
java
protected String asString(String name, Map<String, Value> params, ExecutionContext context) { return coerceToString(params.get(name), context); }
[ "protected", "String", "asString", "(", "String", "name", ",", "Map", "<", "String", ",", "Value", ">", "params", ",", "ExecutionContext", "context", ")", "{", "return", "coerceToString", "(", "params", ".", "get", "(", "name", ")", ",", "context", ")", ...
Gets a parameter value as a Java String. @param name The parameter name @param params The parameters @param context The EC @return The String
[ "Gets", "a", "parameter", "value", "as", "a", "Java", "String", "." ]
train
https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/method/MethodCommand.java#L163-L165
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/SQLExceptionHandler.java
SQLExceptionHandler.handleDeleteException
public String handleDeleteException(SQLException e, ItemData item) throws RepositoryException, InvalidItemStateException { """ Handle delete Exceptions. @param e - an SQLException @param item - context ItemData @return String with error message @throws RepositoryException if <code>RepositoryExceptio...
java
public String handleDeleteException(SQLException e, ItemData item) throws RepositoryException, InvalidItemStateException { StringBuilder message = new StringBuilder("["); message.append(containerName).append("] DELETE ").append(item.isNode() ? "NODE. " : "PROPERTY. "); String errMessage = e....
[ "public", "String", "handleDeleteException", "(", "SQLException", "e", ",", "ItemData", "item", ")", "throws", "RepositoryException", ",", "InvalidItemStateException", "{", "StringBuilder", "message", "=", "new", "StringBuilder", "(", "\"[\"", ")", ";", "message", "...
Handle delete Exceptions. @param e - an SQLException @param item - context ItemData @return String with error message @throws RepositoryException if <code>RepositoryException</code> should be thrown @throws InvalidItemStateException if <code>InvalidItemStateException</code> should be thrown
[ "Handle", "delete", "Exceptions", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/SQLExceptionHandler.java#L364-L394
real-logic/agrona
agrona/src/main/java/org/agrona/DeadlineTimerWheel.java
DeadlineTimerWheel.scheduleTimer
public long scheduleTimer(final long deadline) { """ Schedule a timer for a given absolute time as a deadline in {@link #timeUnit()}s. A timerId will be assigned and returned for future reference. @param deadline after which the timer should expire. @return timerId for the scheduled timer """ fina...
java
public long scheduleTimer(final long deadline) { final long ticks = Math.max((deadline - startTime) >> resolutionBitsToShift, currentTick); final int wheelIndex = (int)(ticks & wheelMask); final long[] array = wheel[wheelIndex]; for (int i = 0; i < array.length; i++) { ...
[ "public", "long", "scheduleTimer", "(", "final", "long", "deadline", ")", "{", "final", "long", "ticks", "=", "Math", ".", "max", "(", "(", "deadline", "-", "startTime", ")", ">>", "resolutionBitsToShift", ",", "currentTick", ")", ";", "final", "int", "whe...
Schedule a timer for a given absolute time as a deadline in {@link #timeUnit()}s. A timerId will be assigned and returned for future reference. @param deadline after which the timer should expire. @return timerId for the scheduled timer
[ "Schedule", "a", "timer", "for", "a", "given", "absolute", "time", "as", "a", "deadline", "in", "{", "@link", "#timeUnit", "()", "}", "s", ".", "A", "timerId", "will", "be", "assigned", "and", "returned", "for", "future", "reference", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/DeadlineTimerWheel.java#L205-L229
Bedework/bw-util
bw-util-misc/src/main/java/org/bedework/util/misc/Util.java
Util.getList
public static List<String> getList(final String val, final boolean emptyOk) throws Throwable { """ Turn a comma separated list into a List. Throws exception for invalid list. @param val String comma separated list @param emptyOk Empty elements are OK @return List of elements, never null @throws Throwabl...
java
public static List<String> getList(final String val, final boolean emptyOk) throws Throwable { List<String> l = new LinkedList<String>(); if ((val == null) || (val.length() == 0)) { return l; } StringTokenizer st = new StringTokenizer(val, ",", false); while (st.hasMoreTokens()) { Stri...
[ "public", "static", "List", "<", "String", ">", "getList", "(", "final", "String", "val", ",", "final", "boolean", "emptyOk", ")", "throws", "Throwable", "{", "List", "<", "String", ">", "l", "=", "new", "LinkedList", "<", "String", ">", "(", ")", ";",...
Turn a comma separated list into a List. Throws exception for invalid list. @param val String comma separated list @param emptyOk Empty elements are OK @return List of elements, never null @throws Throwable for invalid list
[ "Turn", "a", "comma", "separated", "list", "into", "a", "List", ".", "Throws", "exception", "for", "invalid", "list", "." ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-misc/src/main/java/org/bedework/util/misc/Util.java#L696-L721
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java
StyleUtils.setFeatureStyle
public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) { """ Set the feature row style (icon or style) into the marker options @param markerOptions marker options @param featureStyleExten...
java
public static boolean setFeatureStyle(MarkerOptions markerOptions, FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density, IconCache iconCache) { FeatureStyle featureStyle = featureStyleExtension.getFeatureStyle(featureRow); return setFeatureStyle(markerOptions, featureStyle...
[ "public", "static", "boolean", "setFeatureStyle", "(", "MarkerOptions", "markerOptions", ",", "FeatureStyleExtension", "featureStyleExtension", ",", "FeatureRow", "featureRow", ",", "float", "density", ",", "IconCache", "iconCache", ")", "{", "FeatureStyle", "featureStyle...
Set the feature row style (icon or style) into the marker options @param markerOptions marker options @param featureStyleExtension feature style extension @param featureRow feature row @param density display density: {@link android.util.DisplayMetrics#density} @param iconCache ...
[ "Set", "the", "feature", "row", "style", "(", "icon", "or", "style", ")", "into", "the", "marker", "options" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L142-L147
wisdom-framework/wisdom
extensions/wisdom-filters/src/main/java/org/wisdom/framework/filters/BalancerFilter.java
BalancerFilter.updateHeaders
@Override public void updateHeaders(RequestContext context, Multimap<String, String> headers) { """ Callback that can be overridden to customize the header ot the request. This method implements the reverse routing. It updates URLs contained in the headers. @param context the request context @param header...
java
@Override public void updateHeaders(RequestContext context, Multimap<String, String> headers) { if (!proxyPassReverse) { return; } for (Map.Entry<String, String> h : new LinkedHashSet<>(headers.entries())) { if (REVERSE_PROXY_HEADERS.contains(h.getKey())) { ...
[ "@", "Override", "public", "void", "updateHeaders", "(", "RequestContext", "context", ",", "Multimap", "<", "String", ",", "String", ">", "headers", ")", "{", "if", "(", "!", "proxyPassReverse", ")", "{", "return", ";", "}", "for", "(", "Map", ".", "Entr...
Callback that can be overridden to customize the header ot the request. This method implements the reverse routing. It updates URLs contained in the headers. @param context the request context @param headers the current set of headers, that need to be modified
[ "Callback", "that", "can", "be", "overridden", "to", "customize", "the", "header", "ot", "the", "request", ".", "This", "method", "implements", "the", "reverse", "routing", ".", "It", "updates", "URLs", "contained", "in", "the", "headers", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-filters/src/main/java/org/wisdom/framework/filters/BalancerFilter.java#L202-L225
looly/hutool
hutool-core/src/main/java/cn/hutool/core/math/Combination.java
Combination.select
private void select(int dataIndex, String[] resultList, int resultIndex, List<String[]> result) { """ 组合选择 @param dataList 待选列表 @param dataIndex 待选开始索引 @param resultList 前面(resultIndex-1)个的组合结果 @param resultIndex 选择索引,从0开始 """ int resultLen = resultList.length; int resultCount = resultIndex + 1; ...
java
private void select(int dataIndex, String[] resultList, int resultIndex, List<String[]> result) { int resultLen = resultList.length; int resultCount = resultIndex + 1; if (resultCount > resultLen) { // 全部选择完时,输出组合结果 result.add(Arrays.copyOf(resultList, resultList.length)); return; } // 递归选择下一个 ...
[ "private", "void", "select", "(", "int", "dataIndex", ",", "String", "[", "]", "resultList", ",", "int", "resultIndex", ",", "List", "<", "String", "[", "]", ">", "result", ")", "{", "int", "resultLen", "=", "resultList", ".", "length", ";", "int", "re...
组合选择 @param dataList 待选列表 @param dataIndex 待选开始索引 @param resultList 前面(resultIndex-1)个的组合结果 @param resultIndex 选择索引,从0开始
[ "组合选择" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/math/Combination.java#L94-L107
treelogic-swe/aws-mock
example/java/simple/DescribeInstancesExample.java
DescribeInstancesExample.describeAllInstances
public static List<Instance> describeAllInstances() { """ Describe all mock instances within aws-mock. @return a list of all instances """ // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonE...
java
public static List<Instance> describeAllInstances() { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); // the mock endpoint for ec...
[ "public", "static", "List", "<", "Instance", ">", "describeAllInstances", "(", ")", "{", "// pass any credentials as aws-mock does not authenticate them at all", "AWSCredentials", "credentials", "=", "new", "BasicAWSCredentials", "(", "\"foo\"", ",", "\"bar\"", ")", ";", ...
Describe all mock instances within aws-mock. @return a list of all instances
[ "Describe", "all", "mock", "instances", "within", "aws", "-", "mock", "." ]
train
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/example/java/simple/DescribeInstancesExample.java#L34-L60
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMClient.java
AVIMClient.getInstance
public static AVIMClient getInstance(String clientId, String tag) { """ get AVIMClient instance by clientId and tag. @param clientId @param tag @return """ AVIMClient client = getInstance(clientId); client.tag = tag; return client; }
java
public static AVIMClient getInstance(String clientId, String tag) { AVIMClient client = getInstance(clientId); client.tag = tag; return client; }
[ "public", "static", "AVIMClient", "getInstance", "(", "String", "clientId", ",", "String", "tag", ")", "{", "AVIMClient", "client", "=", "getInstance", "(", "clientId", ")", ";", "client", ".", "tag", "=", "tag", ";", "return", "client", ";", "}" ]
get AVIMClient instance by clientId and tag. @param clientId @param tag @return
[ "get", "AVIMClient", "instance", "by", "clientId", "and", "tag", "." ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMClient.java#L155-L159
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/util/StringUtil.java
StringUtil.binaryToHex
public static String binaryToHex(byte[] data, int offset, int length) { """ Convert a string of binary bytes to the equivalent hexadecimal string. The resulting String will have two characters for every byte in the input. """ assert offset < data.length && offset >= 0 : offset + ", " + data.length; ...
java
public static String binaryToHex(byte[] data, int offset, int length) { assert offset < data.length && offset >= 0 : offset + ", " + data.length; int end = offset + length; assert end <= data.length && end >= 0 : offset + ", " + length + ", " + data.length; char[] chars = new char[l...
[ "public", "static", "String", "binaryToHex", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "length", ")", "{", "assert", "offset", "<", "data", ".", "length", "&&", "offset", ">=", "0", ":", "offset", "+", "\", \"", "+", "data", "....
Convert a string of binary bytes to the equivalent hexadecimal string. The resulting String will have two characters for every byte in the input.
[ "Convert", "a", "string", "of", "binary", "bytes", "to", "the", "equivalent", "hexadecimal", "string", ".", "The", "resulting", "String", "will", "have", "two", "characters", "for", "every", "byte", "in", "the", "input", "." ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/util/StringUtil.java#L99-L114
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PathFromAncestor.java
PathFromAncestor.getDirectParentName
public CaseInsensitiveString getDirectParentName() { """ cache parent name if required (like ancestor). currently used only for UI. """ String stringPath = path(); if (stringPath == null) { return null; } int index = stringPath.lastIndexOf(DELIMITER); return ...
java
public CaseInsensitiveString getDirectParentName() { String stringPath = path(); if (stringPath == null) { return null; } int index = stringPath.lastIndexOf(DELIMITER); return index == -1 ? path : new CaseInsensitiveString(stringPath.substring(index + 1, stringPath.le...
[ "public", "CaseInsensitiveString", "getDirectParentName", "(", ")", "{", "String", "stringPath", "=", "path", "(", ")", ";", "if", "(", "stringPath", "==", "null", ")", "{", "return", "null", ";", "}", "int", "index", "=", "stringPath", ".", "lastIndexOf", ...
cache parent name if required (like ancestor). currently used only for UI.
[ "cache", "parent", "name", "if", "required", "(", "like", "ancestor", ")", ".", "currently", "used", "only", "for", "UI", "." ]
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/config/config-api/src/main/java/com/thoughtworks/go/config/PathFromAncestor.java#L75-L82
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java
CommerceWarehousePersistenceImpl.removeByG_A_P
@Override public void removeByG_A_P(long groupId, boolean active, boolean primary) { """ Removes all the commerce warehouses where groupId = &#63; and active = &#63; and primary = &#63; from the database. @param groupId the group ID @param active the active @param primary the primary """ for (CommerceW...
java
@Override public void removeByG_A_P(long groupId, boolean active, boolean primary) { for (CommerceWarehouse commerceWarehouse : findByG_A_P(groupId, active, primary, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWarehouse); } }
[ "@", "Override", "public", "void", "removeByG_A_P", "(", "long", "groupId", ",", "boolean", "active", ",", "boolean", "primary", ")", "{", "for", "(", "CommerceWarehouse", "commerceWarehouse", ":", "findByG_A_P", "(", "groupId", ",", "active", ",", "primary", ...
Removes all the commerce warehouses where groupId = &#63; and active = &#63; and primary = &#63; from the database. @param groupId the group ID @param active the active @param primary the primary
[ "Removes", "all", "the", "commerce", "warehouses", "where", "groupId", "=", "&#63", ";", "and", "active", "=", "&#63", ";", "and", "primary", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java#L3358-L3364
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java
DebugUtil.printDebug
public static void printDebug(final Collection pCollection, final String pMethodName, final PrintStream pPrintStream) { """ Invokes a given method of every element in a {@code java.util.Collection} and prints the results to a {@code java.io.PrintStream}. The method to be invoked must have no formal parameters. <...
java
public static void printDebug(final Collection pCollection, final String pMethodName, final PrintStream pPrintStream) { if (pPrintStream == null) { System.err.println(PRINTSTREAM_IS_NULL_ERROR_MESSAGE); return; } if (pCollection == null) { pPrintStream.println(COLLECTION_IS_NULL_ER...
[ "public", "static", "void", "printDebug", "(", "final", "Collection", "pCollection", ",", "final", "String", "pMethodName", ",", "final", "PrintStream", "pPrintStream", ")", "{", "if", "(", "pPrintStream", "==", "null", ")", "{", "System", ".", "err", ".", "...
Invokes a given method of every element in a {@code java.util.Collection} and prints the results to a {@code java.io.PrintStream}. The method to be invoked must have no formal parameters. <p> If an exception is throwed during the method invocation, the element's {@code toString()} method is called. For bulk data types,...
[ "Invokes", "a", "given", "method", "of", "every", "element", "in", "a", "{" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L486-L502
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPageIdsNotContainingTemplateFragments
public List<Integer> getPageIdsNotContainingTemplateFragments(List<String> templateFragments) throws WikiApiException { """ Returns a list containing the ids of all pages that contain a template the name of which starts with any of the given Strings. @param templateFragments the beginning of the templates tha...
java
public List<Integer> getPageIdsNotContainingTemplateFragments(List<String> templateFragments) throws WikiApiException{ return getFragmentFilteredPageIds(templateFragments,false); }
[ "public", "List", "<", "Integer", ">", "getPageIdsNotContainingTemplateFragments", "(", "List", "<", "String", ">", "templateFragments", ")", "throws", "WikiApiException", "{", "return", "getFragmentFilteredPageIds", "(", "templateFragments", ",", "false", ")", ";", "...
Returns a list containing the ids of all pages that contain a template the name of which starts with any of the given Strings. @param templateFragments the beginning of the templates that have to be matched @return An list with the ids of the pages that do not contain templates beginning with any String in templateFra...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "pages", "that", "contain", "a", "template", "the", "name", "of", "which", "starts", "with", "any", "of", "the", "given", "Strings", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L721-L723
kite-sdk/kite
kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java
DefaultSchemaManager.refreshManagedSchemaCache
@Override public void refreshManagedSchemaCache(String tableName, String entityName) { """ Update the managedSchemaMap for the entry defined by tableName and entityName. @param tableName The table name of the managed schema @param entityName The entity name of the managed schema """ ManagedSchema ...
java
@Override public void refreshManagedSchemaCache(String tableName, String entityName) { ManagedSchema managedSchema = managedSchemaDao.getManagedSchema(tableName, entityName); if (managedSchema != null) { getManagedSchemaMap().put( getManagedSchemaMapKey(managedSchema.getTable(), ...
[ "@", "Override", "public", "void", "refreshManagedSchemaCache", "(", "String", "tableName", ",", "String", "entityName", ")", "{", "ManagedSchema", "managedSchema", "=", "managedSchemaDao", ".", "getManagedSchema", "(", "tableName", ",", "entityName", ")", ";", "if"...
Update the managedSchemaMap for the entry defined by tableName and entityName. @param tableName The table name of the managed schema @param entityName The entity name of the managed schema
[ "Update", "the", "managedSchemaMap", "for", "the", "entry", "defined", "by", "tableName", "and", "entityName", "." ]
train
https://github.com/kite-sdk/kite/blob/72bfb4b1a881af85808cd7f14bc3e15160a1e811/kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/manager/DefaultSchemaManager.java#L344-L353
aws/aws-sdk-java
aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/CreateAppRequest.java
CreateAppRequest.withEnvironmentVariables
public CreateAppRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) { """ <p> Environment variables map for an Amplify App. </p> @param environmentVariables Environment variables map for an Amplify App. @return Returns a reference to this object so that method calls can be c...
java
public CreateAppRequest withEnvironmentVariables(java.util.Map<String, String> environmentVariables) { setEnvironmentVariables(environmentVariables); return this; }
[ "public", "CreateAppRequest", "withEnvironmentVariables", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "environmentVariables", ")", "{", "setEnvironmentVariables", "(", "environmentVariables", ")", ";", "return", "this", ";", "}" ]
<p> Environment variables map for an Amplify App. </p> @param environmentVariables Environment variables map for an Amplify App. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Environment", "variables", "map", "for", "an", "Amplify", "App", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/CreateAppRequest.java#L411-L414
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java
CoreRemoteMongoCollectionImpl.updateOne
public RemoteUpdateResult updateOne( final Bson filter, final Bson update, final RemoteUpdateOptions updateOptions ) { """ Update a single document in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @pa...
java
public RemoteUpdateResult updateOne( final Bson filter, final Bson update, final RemoteUpdateOptions updateOptions ) { return executeUpdate(filter, update, updateOptions, false); }
[ "public", "RemoteUpdateResult", "updateOne", "(", "final", "Bson", "filter", ",", "final", "Bson", "update", ",", "final", "RemoteUpdateOptions", "updateOptions", ")", "{", "return", "executeUpdate", "(", "filter", ",", "update", ",", "updateOptions", ",", "false"...
Update a single document in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @param update a document describing the update, which may not be null. The update to apply must include only update operators. @param updateOptions...
[ "Update", "a", "single", "document", "in", "the", "collection", "according", "to", "the", "specified", "arguments", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java#L409-L415
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForSubscriptionLevelPolicyAssignmentAsync
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForSubscriptionLevelPolicyAssignmentAsync(PolicyStatesResource policyStatesResource, String subscriptionId, String policyAssignmentName, QueryOptions queryOptions) { """ Queries policy states for the subscription level policy assignment. @param po...
java
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForSubscriptionLevelPolicyAssignmentAsync(PolicyStatesResource policyStatesResource, String subscriptionId, String policyAssignmentName, QueryOptions queryOptions) { return listQueryResultsForSubscriptionLevelPolicyAssignmentWithServiceResponseAsy...
[ "public", "Observable", "<", "PolicyStatesQueryResultsInner", ">", "listQueryResultsForSubscriptionLevelPolicyAssignmentAsync", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "subscriptionId", ",", "String", "policyAssignmentName", ",", "QueryOptions", "queryOp...
Queries policy states for the subscription level policy assignment. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest' @p...
[ "Queries", "policy", "states", "for", "the", "subscription", "level", "policy", "assignment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L2596-L2603
arangodb/spring-data
src/main/java/com/arangodb/springframework/repository/query/ArangoResultConverter.java
ArangoResultConverter.buildGeoResult
private GeoResult<?> buildGeoResult(final ArangoCursor<?> cursor) { """ Build a GeoResult from the given ArangoCursor @param cursor query result from driver @return GeoResult object """ GeoResult<?> geoResult = null; while (cursor.hasNext() && geoResult == null) { final Object object = cursor.next(...
java
private GeoResult<?> buildGeoResult(final ArangoCursor<?> cursor) { GeoResult<?> geoResult = null; while (cursor.hasNext() && geoResult == null) { final Object object = cursor.next(); if (!(object instanceof VPackSlice)) { continue; } final VPackSlice slice = (VPackSlice) object; final VPackSlic...
[ "private", "GeoResult", "<", "?", ">", "buildGeoResult", "(", "final", "ArangoCursor", "<", "?", ">", "cursor", ")", "{", "GeoResult", "<", "?", ">", "geoResult", "=", "null", ";", "while", "(", "cursor", ".", "hasNext", "(", ")", "&&", "geoResult", "=...
Build a GeoResult from the given ArangoCursor @param cursor query result from driver @return GeoResult object
[ "Build", "a", "GeoResult", "from", "the", "given", "ArangoCursor" ]
train
https://github.com/arangodb/spring-data/blob/ff8ae53986b353964b9b90bd8199996d5aabf0c1/src/main/java/com/arangodb/springframework/repository/query/ArangoResultConverter.java#L147-L167
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/DashboardResources.java
DashboardResources.getSharedDashboards
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/shared") @Description("Returns all shared dashboards.") public List<DashboardDto> getSharedDashboards(@Context HttpServletRequest req, @QueryParam("ownername") String ownerName, @QueryParam("limit") Integer limit, ...
java
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/shared") @Description("Returns all shared dashboards.") public List<DashboardDto> getSharedDashboards(@Context HttpServletRequest req, @QueryParam("ownername") String ownerName, @QueryParam("limit") Integer limit, ...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Path", "(", "\"/shared\"", ")", "@", "Description", "(", "\"Returns all shared dashboards.\"", ")", "public", "List", "<", "DashboardDto", ">", "getSharedDashboards", "(", "@", "C...
Returns all shared dashboards with filtering. @param req The HTTP request. @param ownerName The owner of shared dashboards to filter on. It is optional. @param limit The maximum number of results to return. It is optional. @param version The version of the dashboard to return. I...
[ "Returns", "all", "shared", "dashboards", "with", "filtering", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/DashboardResources.java#L195-L212
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/ResourceUtils.java
ResourceUtils.findInstanceResourcesDirectory
public static File findInstanceResourcesDirectory( File applicationFilesDirectory, Component component ) { """ Finds the resource directory for an instance. <p> The resource directory may be the one of another component. This is the case when a component extends another component. </p> <p> An extending compo...
java
public static File findInstanceResourcesDirectory( File applicationFilesDirectory, Component component ) { File root = new File( applicationFilesDirectory, Constants.PROJECT_DIR_GRAPH ); File result = new File( "No recipe directory." ); Set<Component> alreadyChecked = new HashSet<> (); for( Component c = compo...
[ "public", "static", "File", "findInstanceResourcesDirectory", "(", "File", "applicationFilesDirectory", ",", "Component", "component", ")", "{", "File", "root", "=", "new", "File", "(", "applicationFilesDirectory", ",", "Constants", ".", "PROJECT_DIR_GRAPH", ")", ";",...
Finds the resource directory for an instance. <p> The resource directory may be the one of another component. This is the case when a component extends another component. </p> <p> An extending component can override the resource directory. </p> @param applicationFilesDirectory the application's directory @param compon...
[ "Finds", "the", "resource", "directory", "for", "an", "instance", ".", "<p", ">", "The", "resource", "directory", "may", "be", "the", "one", "of", "another", "component", ".", "This", "is", "the", "case", "when", "a", "component", "extends", "another", "co...
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/ResourceUtils.java#L135-L151
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfig.java
ClientConfig.addNearCacheConfig
@Deprecated public ClientConfig addNearCacheConfig(String name, NearCacheConfig nearCacheConfig) { """ please use {@link ClientConfig#addNearCacheConfig(NearCacheConfig)} @param name name of the IMap / ICache that Near Cache config will be applied to @param nearCacheConfig nearCacheConfig @retu...
java
@Deprecated public ClientConfig addNearCacheConfig(String name, NearCacheConfig nearCacheConfig) { nearCacheConfig.setName(name); return addNearCacheConfig(nearCacheConfig); }
[ "@", "Deprecated", "public", "ClientConfig", "addNearCacheConfig", "(", "String", "name", ",", "NearCacheConfig", "nearCacheConfig", ")", "{", "nearCacheConfig", ".", "setName", "(", "name", ")", ";", "return", "addNearCacheConfig", "(", "nearCacheConfig", ")", ";",...
please use {@link ClientConfig#addNearCacheConfig(NearCacheConfig)} @param name name of the IMap / ICache that Near Cache config will be applied to @param nearCacheConfig nearCacheConfig @return configured {@link com.hazelcast.client.config.ClientConfig} for chaining
[ "please", "use", "{", "@link", "ClientConfig#addNearCacheConfig", "(", "NearCacheConfig", ")", "}" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfig.java#L324-L328
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/AbstractMethod.java
AbstractMethod.getTypeReference
protected static TypeReference getTypeReference(Class aClass) throws MovieDbException { """ Helper function to get a pre-generated TypeReference for a class @param aClass @return @throws MovieDbException """ if (TYPE_REFS.containsKey(aClass)) { return TYPE_REFS.get(aClass); } e...
java
protected static TypeReference getTypeReference(Class aClass) throws MovieDbException { if (TYPE_REFS.containsKey(aClass)) { return TYPE_REFS.get(aClass); } else { throw new MovieDbException(ApiExceptionType.UNKNOWN_CAUSE, "Class type reference for '" + aClass.getSimpleName() + "...
[ "protected", "static", "TypeReference", "getTypeReference", "(", "Class", "aClass", ")", "throws", "MovieDbException", "{", "if", "(", "TYPE_REFS", ".", "containsKey", "(", "aClass", ")", ")", "{", "return", "TYPE_REFS", ".", "get", "(", "aClass", ")", ";", ...
Helper function to get a pre-generated TypeReference for a class @param aClass @return @throws MovieDbException
[ "Helper", "function", "to", "get", "a", "pre", "-", "generated", "TypeReference", "for", "a", "class" ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/AbstractMethod.java#L127-L133
dwdyer/watchmaker
examples/src/java/main/org/uncommons/watchmaker/examples/sudoku/SudokuApplet.java
SudokuApplet.createTask
private SwingBackgroundTask<Sudoku> createTask(final String[] puzzle, final int populationSize, final int eliteCount) { """ Helper method to create a background task for running the interactive evolutionary algor...
java
private SwingBackgroundTask<Sudoku> createTask(final String[] puzzle, final int populationSize, final int eliteCount) { return new SwingBackgroundTask<Sudoku>() { @Override p...
[ "private", "SwingBackgroundTask", "<", "Sudoku", ">", "createTask", "(", "final", "String", "[", "]", "puzzle", ",", "final", "int", "populationSize", ",", "final", "int", "eliteCount", ")", "{", "return", "new", "SwingBackgroundTask", "<", "Sudoku", ">", "(",...
Helper method to create a background task for running the interactive evolutionary algorithm. @return A Swing task that will execute on a background thread and update the GUI when it is done.
[ "Helper", "method", "to", "create", "a", "background", "task", "for", "running", "the", "interactive", "evolutionary", "algorithm", "." ]
train
https://github.com/dwdyer/watchmaker/blob/33d942350e6bf7d9a17b9262a4f898158530247e/examples/src/java/main/org/uncommons/watchmaker/examples/sudoku/SudokuApplet.java#L206-L251
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.absRange
public static Range absRange(Range range) { """ Returns the range of the absolute values within the range. <p> If the range is all positive, it returns the same range. @param range a range @return the range of the absolute values """ if (range.getMinimum().doubleValue() >= 0 && range.getMaximum()...
java
public static Range absRange(Range range) { if (range.getMinimum().doubleValue() >= 0 && range.getMaximum().doubleValue() >= 0) { return range; } else if (range.getMinimum().doubleValue() < 0 && range.getMaximum().doubleValue() < 0) { return range(- range.getMaximum().doubleValue...
[ "public", "static", "Range", "absRange", "(", "Range", "range", ")", "{", "if", "(", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", ">=", "0", "&&", "range", ".", "getMaximum", "(", ")", ".", "doubleValue", "(", ")", ">=", "0", ...
Returns the range of the absolute values within the range. <p> If the range is all positive, it returns the same range. @param range a range @return the range of the absolute values
[ "Returns", "the", "range", "of", "the", "absolute", "values", "within", "the", "range", ".", "<p", ">", "If", "the", "range", "is", "all", "positive", "it", "returns", "the", "same", "range", "." ]
train
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L22-L30
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/Expressions.java
Expressions.isEqual
public static IsEqual isEqual(NumberExpression left, Object constant) { """ Creates an IsEqual expression from the given expression and constant. @param left The left expression. @param constant The constant to compare to (must be a Number). @throws IllegalArgumentException If constant is not a Number. @ret...
java
public static IsEqual isEqual(NumberExpression left, Object constant) { if (!(constant instanceof Number)) throw new IllegalArgumentException("constant is not a Number"); return new IsEqual(left, constant((Number)constant)); }
[ "public", "static", "IsEqual", "isEqual", "(", "NumberExpression", "left", ",", "Object", "constant", ")", "{", "if", "(", "!", "(", "constant", "instanceof", "Number", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"constant is not a Number\"", ")",...
Creates an IsEqual expression from the given expression and constant. @param left The left expression. @param constant The constant to compare to (must be a Number). @throws IllegalArgumentException If constant is not a Number. @return A new IsEqual binary expression.
[ "Creates", "an", "IsEqual", "expression", "from", "the", "given", "expression", "and", "constant", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/Expressions.java#L160-L166
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java
MapDotApi.dotGetKeysIn
public static Set<String> dotGetKeysIn(final Map map, final String pathString) { """ Get set of string keys by path. @param map subject @param pathString nodes to walk in map @return value """ return dotGetMap(map, pathString) .map(m -> m .keySet() ...
java
public static Set<String> dotGetKeysIn(final Map map, final String pathString) { return dotGetMap(map, pathString) .map(m -> m .keySet() .stream() .map(Object::toString) .collect(Collectors.toSet()) ...
[ "public", "static", "Set", "<", "String", ">", "dotGetKeysIn", "(", "final", "Map", "map", ",", "final", "String", "pathString", ")", "{", "return", "dotGetMap", "(", "map", ",", "pathString", ")", ".", "map", "(", "m", "->", "m", ".", "keySet", "(", ...
Get set of string keys by path. @param map subject @param pathString nodes to walk in map @return value
[ "Get", "set", "of", "string", "keys", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L280-L288
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java
AnalysisCache.analyzeMethod
@SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { """ Analyze a method. @param classContext ClassContext storing method analysis objects for method's class @param a...
java
@SuppressWarnings("unchecked") private <E> E analyzeMethod(ClassContext classContext, Class<E> analysisClass, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { IMethodAnalysisEngine<E> engine = (IMethodAnalysisEngine<E>) methodAnalysisEngineMap.get(analysisClass); if (...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "E", ">", "E", "analyzeMethod", "(", "ClassContext", "classContext", ",", "Class", "<", "E", ">", "analysisClass", ",", "MethodDescriptor", "methodDescriptor", ")", "throws", "CheckedAnalysisExcepti...
Analyze a method. @param classContext ClassContext storing method analysis objects for method's class @param analysisClass class the method analysis object should belong to @param methodDescriptor method descriptor identifying the method to analyze @return the computed analysis object for the method @throws CheckedAna...
[ "Analyze", "a", "method", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/impl/AnalysisCache.java#L359-L373
Jasig/uPortal
uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java
UpdatePreferencesServlet.addFolder
@RequestMapping(method = RequestMethod.POST, params = "action=addFolder") public ModelAndView addFolder( HttpServletRequest request, HttpServletResponse response, @RequestParam("targetId") String targetId, @RequestParam(value = "siblingId", required = false) String si...
java
@RequestMapping(method = RequestMethod.POST, params = "action=addFolder") public ModelAndView addFolder( HttpServletRequest request, HttpServletResponse response, @RequestParam("targetId") String targetId, @RequestParam(value = "siblingId", required = false) String si...
[ "@", "RequestMapping", "(", "method", "=", "RequestMethod", ".", "POST", ",", "params", "=", "\"action=addFolder\"", ")", "public", "ModelAndView", "addFolder", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "@", "RequestParam", "...
Add a new folder to the layout. @param request @param response @param targetId - id of the folder node to add the new folder to. By default, the folder will be inserted after other existing items in the node unless a siblingId is provided. @param siblingId - if set, insert new folder prior to the node with this id, ot...
[ "Add", "a", "new", "folder", "to", "the", "layout", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/UpdatePreferencesServlet.java#L993-L1040
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/views/overlay/Polygon.java
Polygon.setDefaultInfoWindowLocation
protected void setDefaultInfoWindowLocation() { """ Internal method used to ensure that the infowindow will have a default position in all cases, so that the user can call showInfoWindow even if no tap occured before. Currently, set the position on the center of the polygon bounding box. """ int s = mOutli...
java
protected void setDefaultInfoWindowLocation() { int s = mOutline.getPoints().size(); if (s == 0){ mInfoWindowLocation = new GeoPoint(0.0, 0.0); return; } //TODO: as soon as the polygon bounding box will be a class member, don't compute it again here. mInfoWindowLocation = mOutline.getCenter(null); }
[ "protected", "void", "setDefaultInfoWindowLocation", "(", ")", "{", "int", "s", "=", "mOutline", ".", "getPoints", "(", ")", ".", "size", "(", ")", ";", "if", "(", "s", "==", "0", ")", "{", "mInfoWindowLocation", "=", "new", "GeoPoint", "(", "0.0", ","...
Internal method used to ensure that the infowindow will have a default position in all cases, so that the user can call showInfoWindow even if no tap occured before. Currently, set the position on the center of the polygon bounding box.
[ "Internal", "method", "used", "to", "ensure", "that", "the", "infowindow", "will", "have", "a", "default", "position", "in", "all", "cases", "so", "that", "the", "user", "can", "call", "showInfoWindow", "even", "if", "no", "tap", "occured", "before", ".", ...
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/views/overlay/Polygon.java#L335-L343
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
TaskExecutor.onStop
@Override public CompletableFuture<Void> onStop() { """ Called to shut down the TaskManager. The method closes all TaskManager services. """ log.info("Stopping TaskExecutor {}.", getAddress()); Throwable throwable = null; if (resourceManagerConnection != null) { resourceManagerConnection.close(); ...
java
@Override public CompletableFuture<Void> onStop() { log.info("Stopping TaskExecutor {}.", getAddress()); Throwable throwable = null; if (resourceManagerConnection != null) { resourceManagerConnection.close(); } for (JobManagerConnection jobManagerConnection : jobManagerConnections.values()) { try { ...
[ "@", "Override", "public", "CompletableFuture", "<", "Void", ">", "onStop", "(", ")", "{", "log", ".", "info", "(", "\"Stopping TaskExecutor {}.\"", ",", "getAddress", "(", ")", ")", ";", "Throwable", "throwable", "=", "null", ";", "if", "(", "resourceManage...
Called to shut down the TaskManager. The method closes all TaskManager services.
[ "Called", "to", "shut", "down", "the", "TaskManager", ".", "The", "method", "closes", "all", "TaskManager", "services", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java#L328-L362
meltmedia/cadmium
servlets/src/main/java/com/meltmedia/cadmium/servlets/BasicFileServlet.java
BasicFileServlet.locateFileToServe
public boolean locateFileToServe( FileRequestContext context ) throws IOException { """ Locates the file to serve. Returns true if locating the file caused the request to be handled. @param context @return @throws IOException """ context.file = new File( contentDir, context.path); // if the pa...
java
public boolean locateFileToServe( FileRequestContext context ) throws IOException { context.file = new File( contentDir, context.path); // if the path is not on the file system, send a 404. if( !context.file.exists() ) { context.response.sendError(HttpServletResponse.SC_NOT_FOUND); return t...
[ "public", "boolean", "locateFileToServe", "(", "FileRequestContext", "context", ")", "throws", "IOException", "{", "context", ".", "file", "=", "new", "File", "(", "contentDir", ",", "context", ".", "path", ")", ";", "// if the path is not on the file system, send a 4...
Locates the file to serve. Returns true if locating the file caused the request to be handled. @param context @return @throws IOException
[ "Locates", "the", "file", "to", "serve", ".", "Returns", "true", "if", "locating", "the", "file", "caused", "the", "request", "to", "be", "handled", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/servlets/src/main/java/com/meltmedia/cadmium/servlets/BasicFileServlet.java#L287-L311
redkale/redkale
src/org/redkale/util/ResourceFactory.java
ResourceFactory.findResourceFactory
public ResourceFactory findResourceFactory(String name, Type clazz) { """ 查找指定资源名和资源类型的资源对象所在的ResourceFactory, 没有则返回null @param name 资源名 @param clazz 资源类型 @return ResourceFactory """ Map<String, ResourceEntry> map = this.store.get(clazz); if (map != null && map.containsKey(name)) retu...
java
public ResourceFactory findResourceFactory(String name, Type clazz) { Map<String, ResourceEntry> map = this.store.get(clazz); if (map != null && map.containsKey(name)) return this; if (parent != null) return parent.findResourceFactory(name, clazz); return null; }
[ "public", "ResourceFactory", "findResourceFactory", "(", "String", "name", ",", "Type", "clazz", ")", "{", "Map", "<", "String", ",", "ResourceEntry", ">", "map", "=", "this", ".", "store", ".", "get", "(", "clazz", ")", ";", "if", "(", "map", "!=", "n...
查找指定资源名和资源类型的资源对象所在的ResourceFactory, 没有则返回null @param name 资源名 @param clazz 资源类型 @return ResourceFactory
[ "查找指定资源名和资源类型的资源对象所在的ResourceFactory,", "没有则返回null" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/util/ResourceFactory.java#L445-L450
lucee/Lucee
core/src/main/java/lucee/commons/date/JREDateTimeUtil.java
JREDateTimeUtil.getThreadCalendar
public static Calendar getThreadCalendar(Locale l, TimeZone tz) { """ important:this function returns always the same instance for a specific thread, so make sure only use one thread calendar instance at time. @return calendar instance """ if (tz == null) tz = ThreadLocalPageContext.getTimeZone(); Calend...
java
public static Calendar getThreadCalendar(Locale l, TimeZone tz) { if (tz == null) tz = ThreadLocalPageContext.getTimeZone(); Calendar c = localeCalendar.get(tz, l); c.setTimeZone(tz); return c; }
[ "public", "static", "Calendar", "getThreadCalendar", "(", "Locale", "l", ",", "TimeZone", "tz", ")", "{", "if", "(", "tz", "==", "null", ")", "tz", "=", "ThreadLocalPageContext", ".", "getTimeZone", "(", ")", ";", "Calendar", "c", "=", "localeCalendar", "....
important:this function returns always the same instance for a specific thread, so make sure only use one thread calendar instance at time. @return calendar instance
[ "important", ":", "this", "function", "returns", "always", "the", "same", "instance", "for", "a", "specific", "thread", "so", "make", "sure", "only", "use", "one", "thread", "calendar", "instance", "at", "time", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/date/JREDateTimeUtil.java#L289-L294
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.listAsync
public ServiceFuture<List<CloudJob>> listAsync(final JobListOptions jobListOptions, final ListOperationCallback<CloudJob> serviceCallback) { """ Lists all of the jobs in the specified account. @param jobListOptions Additional parameters for the operation @param serviceCallback the async ServiceCallback to hand...
java
public ServiceFuture<List<CloudJob>> listAsync(final JobListOptions jobListOptions, final ListOperationCallback<CloudJob> serviceCallback) { return AzureServiceFuture.fromHeaderPageResponse( listSinglePageAsync(jobListOptions), new Func1<String, Observable<ServiceResponseWithHeaders<Page...
[ "public", "ServiceFuture", "<", "List", "<", "CloudJob", ">", ">", "listAsync", "(", "final", "JobListOptions", "jobListOptions", ",", "final", "ListOperationCallback", "<", "CloudJob", ">", "serviceCallback", ")", "{", "return", "AzureServiceFuture", ".", "fromHead...
Lists all of the jobs in the specified account. @param jobListOptions Additional parameters for the operation @param serviceCallback the async ServiceCallback to handle successful and failed responses. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceFuture} object
[ "Lists", "all", "of", "the", "jobs", "in", "the", "specified", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L2366-L2383
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageEditor.java
CmsContainerpageEditor.enableToolbarButtons
public void enableToolbarButtons(boolean hasChanges, String noEditReason) { """ Enables the toolbar buttons.<p> @param hasChanges if the page has changes @param noEditReason the no edit reason """ for (Widget button : m_toolbar.getAll()) { // enable all buttons that are not equal save ...
java
public void enableToolbarButtons(boolean hasChanges, String noEditReason) { for (Widget button : m_toolbar.getAll()) { // enable all buttons that are not equal save or reset or the page has changes if (button instanceof I_CmsToolbarButton) { ((I_CmsToolbarButton)button)....
[ "public", "void", "enableToolbarButtons", "(", "boolean", "hasChanges", ",", "String", "noEditReason", ")", "{", "for", "(", "Widget", "button", ":", "m_toolbar", ".", "getAll", "(", ")", ")", "{", "// enable all buttons that are not equal save or reset or the page has ...
Enables the toolbar buttons.<p> @param hasChanges if the page has changes @param noEditReason the no edit reason
[ "Enables", "the", "toolbar", "buttons", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageEditor.java#L197-L211
oasp/oasp4j
modules/security/src/main/java/io/oasp/module/security/common/base/accesscontrol/PrincipalGroupProviderGroupImpl.java
PrincipalGroupProviderGroupImpl.collectGroups
protected void collectGroups(Group group, Set<String> groupSet) { """ Called from {@link #getAccessControlIds(Group)} to recursively collect the groups. @param group is the {@link Group} to traverse. @param groupSet is the {@link Set} where to add the principal names. """ Enumeration<? extends Princip...
java
protected void collectGroups(Group group, Set<String> groupSet) { Enumeration<? extends Principal> members = group.members(); while (members.hasMoreElements()) { Principal member = members.nextElement(); String name = member.getName(); boolean added = groupSet.add(name); if (added && (m...
[ "protected", "void", "collectGroups", "(", "Group", "group", ",", "Set", "<", "String", ">", "groupSet", ")", "{", "Enumeration", "<", "?", "extends", "Principal", ">", "members", "=", "group", ".", "members", "(", ")", ";", "while", "(", "members", ".",...
Called from {@link #getAccessControlIds(Group)} to recursively collect the groups. @param group is the {@link Group} to traverse. @param groupSet is the {@link Set} where to add the principal names.
[ "Called", "from", "{", "@link", "#getAccessControlIds", "(", "Group", ")", "}", "to", "recursively", "collect", "the", "groups", "." ]
train
https://github.com/oasp/oasp4j/blob/03f90132699fad95e52ec8efa54aa391f8d3c7e4/modules/security/src/main/java/io/oasp/module/security/common/base/accesscontrol/PrincipalGroupProviderGroupImpl.java#L42-L53
davidmoten/rxjava-jdbc
src/main/java/com/github/davidmoten/rx/jdbc/Util.java
Util.createFreeOnCloseInputStream
private static InputStream createFreeOnCloseInputStream(final Blob blob, final InputStream is) { """ Automatically frees the blob (<code>blob.free()</code>) once the blob {@link InputStream} is closed. @param blob @param is @return """ return new InputStream() { @Override ...
java
private static InputStream createFreeOnCloseInputStream(final Blob blob, final InputStream is) { return new InputStream() { @Override public int read() throws IOException { return is.read(); } @Override public void close() throws IOEx...
[ "private", "static", "InputStream", "createFreeOnCloseInputStream", "(", "final", "Blob", "blob", ",", "final", "InputStream", "is", ")", "{", "return", "new", "InputStream", "(", ")", "{", "@", "Override", "public", "int", "read", "(", ")", "throws", "IOExcep...
Automatically frees the blob (<code>blob.free()</code>) once the blob {@link InputStream} is closed. @param blob @param is @return
[ "Automatically", "frees", "the", "blob", "(", "<code", ">", "blob", ".", "free", "()", "<", "/", "code", ">", ")", "once", "the", "blob", "{", "@link", "InputStream", "}", "is", "closed", "." ]
train
https://github.com/davidmoten/rxjava-jdbc/blob/81e157d7071a825086bde81107b8694684cdff14/src/main/java/com/github/davidmoten/rx/jdbc/Util.java#L692-L713
openbase/jul
visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGIcon.java
SVGIcon.setForegroundIconColorAnimated
public void setForegroundIconColorAnimated(final Color color, final int cycleCount) { """ Allows to set a new color to the foregroundIcon icon and setAnimation its change (by a FadeTransition). @param color the color for the foregroundIcon icon to be set @param cycleCount the number of times the animation...
java
public void setForegroundIconColorAnimated(final Color color, final int cycleCount) { assert color != null; stopForegroundIconColorFadeAnimation(); foregroundFadeIcon.setFill(color); foregroundColorFadeAnimation = Animations.createFadeTransition(foregroundFadeIcon, JFXConstants.TRANSPARE...
[ "public", "void", "setForegroundIconColorAnimated", "(", "final", "Color", "color", ",", "final", "int", "cycleCount", ")", "{", "assert", "color", "!=", "null", ";", "stopForegroundIconColorFadeAnimation", "(", ")", ";", "foregroundFadeIcon", ".", "setFill", "(", ...
Allows to set a new color to the foregroundIcon icon and setAnimation its change (by a FadeTransition). @param color the color for the foregroundIcon icon to be set @param cycleCount the number of times the animation should be played (use Animation.INDEFINITE for endless)
[ "Allows", "to", "set", "a", "new", "color", "to", "the", "foregroundIcon", "icon", "and", "setAnimation", "its", "change", "(", "by", "a", "FadeTransition", ")", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGIcon.java#L316-L326
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java
Aggregations.doubleAvg
public static <Key, Value> Aggregation<Key, Double, Double> doubleAvg() { """ Returns an aggregation to calculate the double average of all supplied values.<br/> This aggregation is similar to: <pre>SELECT AVG(value) FROM x</pre> @param <Key> the input key type @param <Value> the supplied value type @retur...
java
public static <Key, Value> Aggregation<Key, Double, Double> doubleAvg() { return new AggregationAdapter(new DoubleAvgAggregation<Key, Value>()); }
[ "public", "static", "<", "Key", ",", "Value", ">", "Aggregation", "<", "Key", ",", "Double", ",", "Double", ">", "doubleAvg", "(", ")", "{", "return", "new", "AggregationAdapter", "(", "new", "DoubleAvgAggregation", "<", "Key", ",", "Value", ">", "(", ")...
Returns an aggregation to calculate the double average of all supplied values.<br/> This aggregation is similar to: <pre>SELECT AVG(value) FROM x</pre> @param <Key> the input key type @param <Value> the supplied value type @return the average over all supplied values
[ "Returns", "an", "aggregation", "to", "calculate", "the", "double", "average", "of", "all", "supplied", "values", ".", "<br", "/", ">", "This", "aggregation", "is", "similar", "to", ":", "<pre", ">", "SELECT", "AVG", "(", "value", ")", "FROM", "x<", "/",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java#L198-L200