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
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.invoke
public MethodHandle invoke(MethodHandles.Lookup lookup, Method method) throws IllegalAccessException { """ Apply the chain of transforms and bind them to a static method specified using the end signature plus the given class and method. The method will be retrieved using the given Lookup and must match the end s...
java
public MethodHandle invoke(MethodHandles.Lookup lookup, Method method) throws IllegalAccessException { return invoke(lookup.unreflect(method)); }
[ "public", "MethodHandle", "invoke", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "Method", "method", ")", "throws", "IllegalAccessException", "{", "return", "invoke", "(", "lookup", ".", "unreflect", "(", "method", ")", ")", ";", "}" ]
Apply the chain of transforms and bind them to a static method specified using the end signature plus the given class and method. The method will be retrieved using the given Lookup and must match the end signature exactly. If the final handle's type does not exactly match the initial type for this Binder, an addition...
[ "Apply", "the", "chain", "of", "transforms", "and", "bind", "them", "to", "a", "static", "method", "specified", "using", "the", "end", "signature", "plus", "the", "given", "class", "and", "method", ".", "The", "method", "will", "be", "retrieved", "using", ...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1166-L1168
hamcrest/hamcrest-junit
src/main/java/org/hamcrest/junit/MatcherAssume.java
MatcherAssume.assumeThat
public static <T> void assumeThat(T actual, Matcher<? super T> matcher) { """ Call to assume that <code>actual</code> satisfies the condition specified by <code>matcher</code>. If not, the test halts and is ignored. Example: <pre>: assumeThat(1, equalTo(1)); // passes foo(); // will execute assumeThat(0, equ...
java
public static <T> void assumeThat(T actual, Matcher<? super T> matcher) { assumeThat("", actual, matcher); }
[ "public", "static", "<", "T", ">", "void", "assumeThat", "(", "T", "actual", ",", "Matcher", "<", "?", "super", "T", ">", "matcher", ")", "{", "assumeThat", "(", "\"\"", ",", "actual", ",", "matcher", ")", ";", "}" ]
Call to assume that <code>actual</code> satisfies the condition specified by <code>matcher</code>. If not, the test halts and is ignored. Example: <pre>: assumeThat(1, equalTo(1)); // passes foo(); // will execute assumeThat(0, equalTo(1)); // assumption failure! test halts int x = 1 / 0; // will never execute </pre> ...
[ "Call", "to", "assume", "that", "<code", ">", "actual<", "/", "code", ">", "satisfies", "the", "condition", "specified", "by", "<code", ">", "matcher<", "/", "code", ">", ".", "If", "not", "the", "test", "halts", "and", "is", "ignored", ".", "Example", ...
train
https://github.com/hamcrest/hamcrest-junit/blob/5e02d55230b560f255433bcc490afaeda9e1a043/src/main/java/org/hamcrest/junit/MatcherAssume.java#L50-L52
skjolber/3d-bin-container-packing
src/main/java/com/github/skjolberg/packing/Container.java
Container.getFreeLevelSpace
public Dimension getFreeLevelSpace() { """ Get the free level space, i.e. container height with height of levels subtracted. @return free height and box dimension """ int remainder = height - getStackHeight(); if(remainder < 0) { throw new IllegalArgumentException("Remaining free space is negative a...
java
public Dimension getFreeLevelSpace() { int remainder = height - getStackHeight(); if(remainder < 0) { throw new IllegalArgumentException("Remaining free space is negative at " + remainder + " for " + this); } return new Dimension(width, depth, remainder); }
[ "public", "Dimension", "getFreeLevelSpace", "(", ")", "{", "int", "remainder", "=", "height", "-", "getStackHeight", "(", ")", ";", "if", "(", "remainder", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Remaining free space is negative at ...
Get the free level space, i.e. container height with height of levels subtracted. @return free height and box dimension
[ "Get", "the", "free", "level", "space", "i", ".", "e", ".", "container", "height", "with", "height", "of", "levels", "subtracted", "." ]
train
https://github.com/skjolber/3d-bin-container-packing/blob/9609bc7515322b2de2cad0dfb3d2f72607e71aae/src/main/java/com/github/skjolberg/packing/Container.java#L148-L154
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java
Channels.writeFullyImpl
private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) throws IOException { """ Write all remaining bytes in buffer to the given channel. If the channel is selectable then it must be configured blocking. """ while (bb.remaining() > 0) { int n = ch.write(bb); ...
java
private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) throws IOException { while (bb.remaining() > 0) { int n = ch.write(bb); if (n <= 0) throw new RuntimeException("no bytes written"); } }
[ "private", "static", "void", "writeFullyImpl", "(", "WritableByteChannel", "ch", ",", "ByteBuffer", "bb", ")", "throws", "IOException", "{", "while", "(", "bb", ".", "remaining", "(", ")", ">", "0", ")", "{", "int", "n", "=", "ch", ".", "write", "(", "...
Write all remaining bytes in buffer to the given channel. If the channel is selectable then it must be configured blocking.
[ "Write", "all", "remaining", "bytes", "in", "buffer", "to", "the", "given", "channel", ".", "If", "the", "channel", "is", "selectable", "then", "it", "must", "be", "configured", "blocking", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/Channels.java#L75-L83
infinispan/infinispan
server/hotrod/src/main/java/org/infinispan/server/hotrod/LifecycleCallbacks.java
LifecycleCallbacks.registerServerTransactionTable
private void registerServerTransactionTable(ComponentRegistry componentRegistry, String cacheName) { """ Registers the {@link PerCacheTxTable} to a transactional cache. """ //skip for global tx table and non-transactional cache if (GLOBAL_TX_TABLE_CACHE_NAME.equals(cacheName) || !compon...
java
private void registerServerTransactionTable(ComponentRegistry componentRegistry, String cacheName) { //skip for global tx table and non-transactional cache if (GLOBAL_TX_TABLE_CACHE_NAME.equals(cacheName) || !componentRegistry.getComponent(Configuration.class).transaction().transactionMode().isT...
[ "private", "void", "registerServerTransactionTable", "(", "ComponentRegistry", "componentRegistry", ",", "String", "cacheName", ")", "{", "//skip for global tx table and non-transactional cache", "if", "(", "GLOBAL_TX_TABLE_CACHE_NAME", ".", "equals", "(", "cacheName", ")", "...
Registers the {@link PerCacheTxTable} to a transactional cache.
[ "Registers", "the", "{" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/LifecycleCallbacks.java#L103-L117
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java
AsteriskChannelImpl.idChanged
void idChanged(Date date, String id) { """ Changes the id of this channel. @param date date of the name change. @param id the new unique id of this channel. """ final String oldId = this.id; if (oldId != null && oldId.equals(id)) { return; } this.id = i...
java
void idChanged(Date date, String id) { final String oldId = this.id; if (oldId != null && oldId.equals(id)) { return; } this.id = id; firePropertyChange(PROPERTY_ID, oldId, id); }
[ "void", "idChanged", "(", "Date", "date", ",", "String", "id", ")", "{", "final", "String", "oldId", "=", "this", ".", "id", ";", "if", "(", "oldId", "!=", "null", "&&", "oldId", ".", "equals", "(", "id", ")", ")", "{", "return", ";", "}", "this"...
Changes the id of this channel. @param date date of the name change. @param id the new unique id of this channel.
[ "Changes", "the", "id", "of", "this", "channel", "." ]
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/AsteriskChannelImpl.java#L205-L216
landawn/AbacusUtil
src/com/landawn/abacus/util/AnyDelete.java
AnyDelete.addColumns
public AnyDelete addColumns(String family, String qualifier) { """ Delete all versions of the specified column. @param family @param qualifier @return """ delete.addColumns(toFamilyQualifierBytes(family), toFamilyQualifierBytes(qualifier)); return this; }
java
public AnyDelete addColumns(String family, String qualifier) { delete.addColumns(toFamilyQualifierBytes(family), toFamilyQualifierBytes(qualifier)); return this; }
[ "public", "AnyDelete", "addColumns", "(", "String", "family", ",", "String", "qualifier", ")", "{", "delete", ".", "addColumns", "(", "toFamilyQualifierBytes", "(", "family", ")", ",", "toFamilyQualifierBytes", "(", "qualifier", ")", ")", ";", "return", "this", ...
Delete all versions of the specified column. @param family @param qualifier @return
[ "Delete", "all", "versions", "of", "the", "specified", "column", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/AnyDelete.java#L167-L171
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyParentRangeRemoved
public void notifyParentRangeRemoved(int parentPositionStart, int itemCount) { """ Notify any registered observers that the {@code itemCount} parents previously located at {@code parentPositionStart} have been removed from the data set. The parents previously located at and after {@code parentPositionStart + ite...
java
public void notifyParentRangeRemoved(int parentPositionStart, int itemCount) { int sizeChanged = 0; int flatParentPositionStart = getFlatParentPosition(parentPositionStart); for (int i = 0; i < itemCount; i++) { sizeChanged += removeParentWrapper(flatParentPositionStart); } ...
[ "public", "void", "notifyParentRangeRemoved", "(", "int", "parentPositionStart", ",", "int", "itemCount", ")", "{", "int", "sizeChanged", "=", "0", ";", "int", "flatParentPositionStart", "=", "getFlatParentPosition", "(", "parentPositionStart", ")", ";", "for", "(",...
Notify any registered observers that the {@code itemCount} parents previously located at {@code parentPositionStart} have been removed from the data set. The parents previously located at and after {@code parentPositionStart + itemCount} may now be found at {@code oldPosition - itemCount}. <p> This is a structural chan...
[ "Notify", "any", "registered", "observers", "that", "the", "{", "@code", "itemCount", "}", "parents", "previously", "located", "at", "{", "@code", "parentPositionStart", "}", "have", "been", "removed", "from", "the", "data", "set", ".", "The", "parents", "prev...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L954-L962
grpc/grpc-java
context/src/main/java/io/grpc/Context.java
Context.withValues
public <V1, V2> Context withValues(Key<V1> k1, V1 v1, Key<V2> k2, V2 v2) { """ Create a new context with the given key value set. The new context will cascade cancellation from its parent. """ PersistentHashArrayMappedTrie<Key<?>, Object> newKeyValueEntries = keyValueEntries.put(k1, v1).put(k2, v2...
java
public <V1, V2> Context withValues(Key<V1> k1, V1 v1, Key<V2> k2, V2 v2) { PersistentHashArrayMappedTrie<Key<?>, Object> newKeyValueEntries = keyValueEntries.put(k1, v1).put(k2, v2); return new Context(this, newKeyValueEntries); }
[ "public", "<", "V1", ",", "V2", ">", "Context", "withValues", "(", "Key", "<", "V1", ">", "k1", ",", "V1", "v1", ",", "Key", "<", "V2", ">", "k2", ",", "V2", "v2", ")", "{", "PersistentHashArrayMappedTrie", "<", "Key", "<", "?", ">", ",", "Object...
Create a new context with the given key value set. The new context will cascade cancellation from its parent.
[ "Create", "a", "new", "context", "with", "the", "given", "key", "value", "set", ".", "The", "new", "context", "will", "cascade", "cancellation", "from", "its", "parent", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/context/src/main/java/io/grpc/Context.java#L329-L333
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/AbstractResources.java
AbstractResources.createHttpRequest
protected HttpRequest createHttpRequest(URI uri, HttpMethod method) { """ Create an HttpRequest. <p> Exceptions: Any exception shall be propagated since it's a private method. @param uri the URI @param method the HttpMethod @return the http request @throws UnsupportedEncodingException the unsupported en...
java
protected HttpRequest createHttpRequest(URI uri, HttpMethod method) { HttpRequest request = new HttpRequest(); request.setUri(uri); request.setMethod(method); // Set authorization header request.setHeaders(createHeaders()); return request; }
[ "protected", "HttpRequest", "createHttpRequest", "(", "URI", "uri", ",", "HttpMethod", "method", ")", "{", "HttpRequest", "request", "=", "new", "HttpRequest", "(", ")", ";", "request", ".", "setUri", "(", "uri", ")", ";", "request", ".", "setMethod", "(", ...
Create an HttpRequest. <p> Exceptions: Any exception shall be propagated since it's a private method. @param uri the URI @param method the HttpMethod @return the http request @throws UnsupportedEncodingException the unsupported encoding exception
[ "Create", "an", "HttpRequest", ".", "<p", ">", "Exceptions", ":", "Any", "exception", "shall", "be", "propagated", "since", "it", "s", "a", "private", "method", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/AbstractResources.java#L766-L775
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.checkForRequiredParameters
public <T extends Object> Map<String, Object> checkForRequiredParameters(String endpoint, @Sensitive Map<String, T> responseValues, String... requiredParams) { """ Checks that the provided map contains all of the required parameters. @param endpoint @param responseValues May contain token secrets, so has been...
java
public <T extends Object> Map<String, Object> checkForRequiredParameters(String endpoint, @Sensitive Map<String, T> responseValues, String... requiredParams) { if (responseValues == null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "The provided response values map is null, so all requ...
[ "public", "<", "T", "extends", "Object", ">", "Map", "<", "String", ",", "Object", ">", "checkForRequiredParameters", "(", "String", "endpoint", ",", "@", "Sensitive", "Map", "<", "String", ",", "T", ">", "responseValues", ",", "String", "...", "requiredPara...
Checks that the provided map contains all of the required parameters. @param endpoint @param responseValues May contain token secrets, so has been annotated as @Sensitive. @param requiredParams @return {@code null} if the map contains all of the specified required parameters. If any parameters are missing, a Map with ...
[ "Checks", "that", "the", "provided", "map", "contains", "all", "of", "the", "required", "parameters", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L579-L595
CloudSlang/cs-actions
cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java
SendMail.validateRow
protected boolean validateRow(String row, String columnDelimiter, int rowNumber) throws Exception { """ This method validates a row contained in the 'headers' input of the operation. @param row The value of the row to be validated. @param columnDelimiter The delimiter that separates the header name from the head...
java
protected boolean validateRow(String row, String columnDelimiter, int rowNumber) throws Exception { if (row.contains(columnDelimiter)) { if (row.equals(columnDelimiter)) { throw new Exception(format(ROW_WITH_EMPTY_HEADERS_INPUT, rowNumber + 1)); } else { S...
[ "protected", "boolean", "validateRow", "(", "String", "row", ",", "String", "columnDelimiter", ",", "int", "rowNumber", ")", "throws", "Exception", "{", "if", "(", "row", ".", "contains", "(", "columnDelimiter", ")", ")", "{", "if", "(", "row", ".", "equal...
This method validates a row contained in the 'headers' input of the operation. @param row The value of the row to be validated. @param columnDelimiter The delimiter that separates the header name from the header value. @param rowNumber The row number inside the 'headers' input. @return This method returns true if the r...
[ "This", "method", "validates", "a", "row", "contained", "in", "the", "headers", "input", "of", "the", "operation", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java#L505-L524
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.getService
public synchronized Service getService(String type, String algorithm) { """ Get the service describing this Provider's implementation of the specified type of this algorithm or alias. If no such implementation exists, this method returns null. If there are two matching services, one added to this provider using...
java
public synchronized Service getService(String type, String algorithm) { checkInitialized(); // avoid allocating a new key object if possible ServiceKey key = previousKey; if (key.matches(type, algorithm) == false) { key = new ServiceKey(type, algorithm, false); pr...
[ "public", "synchronized", "Service", "getService", "(", "String", "type", ",", "String", "algorithm", ")", "{", "checkInitialized", "(", ")", ";", "// avoid allocating a new key object if possible", "ServiceKey", "key", "=", "previousKey", ";", "if", "(", "key", "."...
Get the service describing this Provider's implementation of the specified type of this algorithm or alias. If no such implementation exists, this method returns null. If there are two matching services, one added to this provider using {@link #putService putService()} and one added via {@link #put put()}, the service ...
[ "Get", "the", "service", "describing", "this", "Provider", "s", "implementation", "of", "the", "specified", "type", "of", "this", "algorithm", "or", "alias", ".", "If", "no", "such", "implementation", "exists", "this", "method", "returns", "null", ".", "If", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L707-L723
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.writeUtf16Bom
private static void writeUtf16Bom(OutputStream stream, boolean bigEndian) throws IOException { """ Write a Byte Order Mark at the beginning of the file @param stream the FileOutputStream to write the BOM to @param bigEndian true if UTF 16 Big Endian or false if Low Endian @throws IOException if an IOExcept...
java
private static void writeUtf16Bom(OutputStream stream, boolean bigEndian) throws IOException { if (bigEndian) { stream.write(-2); stream.write(-1); } else { stream.write(-1); stream.write(-2); } }
[ "private", "static", "void", "writeUtf16Bom", "(", "OutputStream", "stream", ",", "boolean", "bigEndian", ")", "throws", "IOException", "{", "if", "(", "bigEndian", ")", "{", "stream", ".", "write", "(", "-", "2", ")", ";", "stream", ".", "write", "(", "...
Write a Byte Order Mark at the beginning of the file @param stream the FileOutputStream to write the BOM to @param bigEndian true if UTF 16 Big Endian or false if Low Endian @throws IOException if an IOException occurs. @since 1.0
[ "Write", "a", "Byte", "Order", "Mark", "at", "the", "beginning", "of", "the", "file" ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1825-L1833
kiegroup/jbpmmigration
src/main/java/org/jbpm/migration/Validator.java
Validator.validateDefinition
static boolean validateDefinition(final Document def, final ProcessLanguage language) { """ Validate a given jPDL process definition against the applicable definition language's schema. @param def The process definition, in {@link Document} format. @param language The process definition language for which th...
java
static boolean validateDefinition(final Document def, final ProcessLanguage language) { return XmlUtils.validate(new DOMSource(def), language.getSchemaSources()); }
[ "static", "boolean", "validateDefinition", "(", "final", "Document", "def", ",", "final", "ProcessLanguage", "language", ")", "{", "return", "XmlUtils", ".", "validate", "(", "new", "DOMSource", "(", "def", ")", ",", "language", ".", "getSchemaSources", "(", "...
Validate a given jPDL process definition against the applicable definition language's schema. @param def The process definition, in {@link Document} format. @param language The process definition language for which the given definition is to be validated. @return Whether the validation was successful.
[ "Validate", "a", "given", "jPDL", "process", "definition", "against", "the", "applicable", "definition", "language", "s", "schema", "." ]
train
https://github.com/kiegroup/jbpmmigration/blob/5e133e2824aa38f316a2eb061123313a7276aba0/src/main/java/org/jbpm/migration/Validator.java#L86-L88
awslabs/amazon-sqs-java-extended-client-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClient.java
AmazonSQSExtendedClient.sendMessage
public SendMessageResult sendMessage(String queueUrl, String messageBody) { """ <p> Delivers a message to the specified queue and uploads the message payload to Amazon S3 if necessary. </p> <p> <b>IMPORTANT:</b> The following list shows the characters (in Unicode) allowed in your message, according to the W3...
java
public SendMessageResult sendMessage(String queueUrl, String messageBody) { SendMessageRequest sendMessageRequest = new SendMessageRequest(queueUrl, messageBody); return sendMessage(sendMessageRequest); }
[ "public", "SendMessageResult", "sendMessage", "(", "String", "queueUrl", ",", "String", "messageBody", ")", "{", "SendMessageRequest", "sendMessageRequest", "=", "new", "SendMessageRequest", "(", "queueUrl", ",", "messageBody", ")", ";", "return", "sendMessage", "(", ...
<p> Delivers a message to the specified queue and uploads the message payload to Amazon S3 if necessary. </p> <p> <b>IMPORTANT:</b> The following list shows the characters (in Unicode) allowed in your message, according to the W3C XML specification. For more information, go to http://www.w3.org/TR/REC-xml/#charsets If ...
[ "<p", ">", "Delivers", "a", "message", "to", "the", "specified", "queue", "and", "uploads", "the", "message", "payload", "to", "Amazon", "S3", "if", "necessary", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "IMPORTANT", ":", "<", "/", "b", ">", "...
train
https://github.com/awslabs/amazon-sqs-java-extended-client-lib/blob/df0c6251b99e682d6179938fe784590e662b84ea/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClient.java#L228-L231
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newMappingException
public static MappingException newMappingException(String message, Object... args) { """ Constructs and initializes a new {@link MappingException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link MappingException exce...
java
public static MappingException newMappingException(String message, Object... args) { return newMappingException(null, message, args); }
[ "public", "static", "MappingException", "newMappingException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newMappingException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link MappingException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link MappingException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@link ...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "MappingException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L183-L185
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/beans/Application.java
Application.unbindFromApplication
public boolean unbindFromApplication( String externalExportPrefix, String applicationName ) { """ Unbinds an external export prefix from an application name. <p> No error is thrown if the bound did not exist. </p> @param externalExportPrefix an external export prefix (not null) @param applicationName an app...
java
public boolean unbindFromApplication( String externalExportPrefix, String applicationName ) { boolean result = false; Set<String> bounds = this.applicationBindings.get( externalExportPrefix ); if( bounds != null ) { result = bounds.remove( applicationName ); if( bounds.isEmpty()) this.applicationBindin...
[ "public", "boolean", "unbindFromApplication", "(", "String", "externalExportPrefix", ",", "String", "applicationName", ")", "{", "boolean", "result", "=", "false", ";", "Set", "<", "String", ">", "bounds", "=", "this", ".", "applicationBindings", ".", "get", "("...
Unbinds an external export prefix from an application name. <p> No error is thrown if the bound did not exist. </p> @param externalExportPrefix an external export prefix (not null) @param applicationName an application name (not null) @return true if bindings were modified, false if no binding existed
[ "Unbinds", "an", "external", "export", "prefix", "from", "an", "application", "name", ".", "<p", ">", "No", "error", "is", "thrown", "if", "the", "bound", "did", "not", "exist", ".", "<", "/", "p", ">" ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/beans/Application.java#L172-L183
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/StringUtils.java
StringUtils.csvSplit
public static String[] csvSplit(String s) { """ Parse a CSV string using {@link #csvSplit(List, String, int, int)} @param s The string to parse @return An array of parsed values. """ if (s == null) return null; return csvSplit(s, 0, s.length()); }
java
public static String[] csvSplit(String s) { if (s == null) return null; return csvSplit(s, 0, s.length()); }
[ "public", "static", "String", "[", "]", "csvSplit", "(", "String", "s", ")", "{", "if", "(", "s", "==", "null", ")", "return", "null", ";", "return", "csvSplit", "(", "s", ",", "0", ",", "s", ".", "length", "(", ")", ")", ";", "}" ]
Parse a CSV string using {@link #csvSplit(List, String, int, int)} @param s The string to parse @return An array of parsed values.
[ "Parse", "a", "CSV", "string", "using", "{", "@link", "#csvSplit", "(", "List", "String", "int", "int", ")", "}" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/StringUtils.java#L850-L854
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/ExperimentsInner.java
ExperimentsInner.beginCreateAsync
public Observable<ExperimentInner> beginCreateAsync(String resourceGroupName, String workspaceName, String experimentName) { """ Creates an Experiment. @param resourceGroupName Name of the resource group to which the resource belongs. @param workspaceName The name of the workspace. Workspace names can only con...
java
public Observable<ExperimentInner> beginCreateAsync(String resourceGroupName, String workspaceName, String experimentName) { return beginCreateWithServiceResponseAsync(resourceGroupName, workspaceName, experimentName).map(new Func1<ServiceResponse<ExperimentInner>, ExperimentInner>() { @Override ...
[ "public", "Observable", "<", "ExperimentInner", ">", "beginCreateAsync", "(", "String", "resourceGroupName", ",", "String", "workspaceName", ",", "String", "experimentName", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "workspa...
Creates an Experiment. @param resourceGroupName Name of the resource group to which the resource belongs. @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The name must be from 1 through 64 characters long....
[ "Creates", "an", "Experiment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/ExperimentsInner.java#L459-L466
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/X11InputDeviceRegistry.java
X11InputDeviceRegistry.processXEvent
private void processXEvent(X.XEvent event, RunnableProcessor runnableProcessor) { """ Dispatch the X Event to the appropriate processor. All processors run via invokeLater @param event @param runnableProcessor """ switch (X.XEvent.getType(event.p)) { case ...
java
private void processXEvent(X.XEvent event, RunnableProcessor runnableProcessor) { switch (X.XEvent.getType(event.p)) { case X.ButtonPress: { X.XButtonEvent buttonEvent = new X.XButtonEvent(event); int button = X.XButtonEvent.getButton(bu...
[ "private", "void", "processXEvent", "(", "X", ".", "XEvent", "event", ",", "RunnableProcessor", "runnableProcessor", ")", "{", "switch", "(", "X", ".", "XEvent", ".", "getType", "(", "event", ".", "p", ")", ")", "{", "case", "X", ".", "ButtonPress", ":",...
Dispatch the X Event to the appropriate processor. All processors run via invokeLater @param event @param runnableProcessor
[ "Dispatch", "the", "X", "Event", "to", "the", "appropriate", "processor", ".", "All", "processors", "run", "via", "invokeLater" ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/X11InputDeviceRegistry.java#L98-L122
apache/incubator-heron
heron/schedulers/src/java/org/apache/heron/scheduler/nomad/NomadScheduler.java
NomadScheduler.getFetchCommand
static String getFetchCommand(Config localConfig, Config clusterConfig, Config runtime) { """ Get the command that will be used to retrieve the topology JAR """ return String.format("%s -u %s -f . -m local -p %s -d %s", Context.downloaderBinary(clusterConfig), Runtime.topologyPackageUri(run...
java
static String getFetchCommand(Config localConfig, Config clusterConfig, Config runtime) { return String.format("%s -u %s -f . -m local -p %s -d %s", Context.downloaderBinary(clusterConfig), Runtime.topologyPackageUri(runtime).toString(), Context.heronConf(localConfig), Context.heronHome(clus...
[ "static", "String", "getFetchCommand", "(", "Config", "localConfig", ",", "Config", "clusterConfig", ",", "Config", "runtime", ")", "{", "return", "String", ".", "format", "(", "\"%s -u %s -f . -m local -p %s -d %s\"", ",", "Context", ".", "downloaderBinary", "(", "...
Get the command that will be used to retrieve the topology JAR
[ "Get", "the", "command", "that", "will", "be", "used", "to", "retrieve", "the", "topology", "JAR" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/schedulers/src/java/org/apache/heron/scheduler/nomad/NomadScheduler.java#L554-L559
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamClass.java
ObjectStreamClass.inSamePackage
private boolean inSamePackage(Class<?> c1, Class<?> c2) { """ Checks if two classes belong to the same package. @param c1 one of the classes to test. @param c2 the other class to test. @return {@code true} if the two classes belong to the same package, {@code false} otherwise. """ String nameC1...
java
private boolean inSamePackage(Class<?> c1, Class<?> c2) { String nameC1 = c1.getName(); String nameC2 = c2.getName(); int indexDotC1 = nameC1.lastIndexOf('.'); int indexDotC2 = nameC2.lastIndexOf('.'); if (indexDotC1 != indexDotC2) { return false; // cannot be in the ...
[ "private", "boolean", "inSamePackage", "(", "Class", "<", "?", ">", "c1", ",", "Class", "<", "?", ">", "c2", ")", "{", "String", "nameC1", "=", "c1", ".", "getName", "(", ")", ";", "String", "nameC2", "=", "c2", ".", "getName", "(", ")", ";", "in...
Checks if two classes belong to the same package. @param c1 one of the classes to test. @param c2 the other class to test. @return {@code true} if the two classes belong to the same package, {@code false} otherwise.
[ "Checks", "if", "two", "classes", "belong", "to", "the", "same", "package", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamClass.java#L750-L762
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRActivity.java
LRActivity.addMeasureToVerb
public boolean addMeasureToVerb(Map<String, Object> properties) { """ Add an arbitrary map of key-value pairs as a measure to the verb @param properties @return True if added, false if not (due to missing required fields or lack of "verb") """ String[] pathKeys = {"verb"}; return addChild(...
java
public boolean addMeasureToVerb(Map<String, Object> properties) { String[] pathKeys = {"verb"}; return addChild("measure", properties, pathKeys); }
[ "public", "boolean", "addMeasureToVerb", "(", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "String", "[", "]", "pathKeys", "=", "{", "\"verb\"", "}", ";", "return", "addChild", "(", "\"measure\"", ",", "properties", ",", "pathKeys", ")...
Add an arbitrary map of key-value pairs as a measure to the verb @param properties @return True if added, false if not (due to missing required fields or lack of "verb")
[ "Add", "an", "arbitrary", "map", "of", "key", "-", "value", "pairs", "as", "a", "measure", "to", "the", "verb" ]
train
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRActivity.java#L165-L169
perwendel/spark
src/main/java/spark/Routable.java
Routable.createRouteImpl
private RouteImpl createRouteImpl(String path, String acceptType, Route route) { """ Create route implementation or use default response transformer @param path the path @param acceptType the accept type @param route the route @return ResponseTransformerRouteImpl or RouteImpl """ if (d...
java
private RouteImpl createRouteImpl(String path, String acceptType, Route route) { if (defaultResponseTransformer != null) { return ResponseTransformerRouteImpl.create(path, acceptType, route, defaultResponseTransformer); } return RouteImpl.create(path, acceptType, route); }
[ "private", "RouteImpl", "createRouteImpl", "(", "String", "path", ",", "String", "acceptType", ",", "Route", "route", ")", "{", "if", "(", "defaultResponseTransformer", "!=", "null", ")", "{", "return", "ResponseTransformerRouteImpl", ".", "create", "(", "path", ...
Create route implementation or use default response transformer @param path the path @param acceptType the accept type @param route the route @return ResponseTransformerRouteImpl or RouteImpl
[ "Create", "route", "implementation", "or", "use", "default", "response", "transformer" ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/Routable.java#L806-L811
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java
MapDotApi.dotGetNullableMap
public static <A, B> Map<A, B> dotGetNullableMap(final Map map, final String pathString) { """ Get map value by path. @param <A> map key type @param <B> map value type @param map subject @param pathString nodes to walk in map @return value """ return dotGetNullable(map, Map.class, pathString); ...
java
public static <A, B> Map<A, B> dotGetNullableMap(final Map map, final String pathString) { return dotGetNullable(map, Map.class, pathString); }
[ "public", "static", "<", "A", ",", "B", ">", "Map", "<", "A", ",", "B", ">", "dotGetNullableMap", "(", "final", "Map", "map", ",", "final", "String", "pathString", ")", "{", "return", "dotGetNullable", "(", "map", ",", "Map", ".", "class", ",", "path...
Get map value by path. @param <A> map key type @param <B> map value type @param map subject @param pathString nodes to walk in map @return value
[ "Get", "map", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L180-L182
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.deleteCouponRedemption
public void deleteCouponRedemption(final String accountCode, final String redemptionUuid) { """ Deletes a specific redemption. @param accountCode recurly account id @param redemptionUuid recurly coupon redemption uuid """ doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTI...
java
public void deleteCouponRedemption(final String accountCode, final String redemptionUuid) { doDELETE(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Redemption.REDEMPTIONS_RESOURCE + "/" + redemptionUuid); }
[ "public", "void", "deleteCouponRedemption", "(", "final", "String", "accountCode", ",", "final", "String", "redemptionUuid", ")", "{", "doDELETE", "(", "Accounts", ".", "ACCOUNTS_RESOURCE", "+", "\"/\"", "+", "accountCode", "+", "Redemption", ".", "REDEMPTIONS_RESOU...
Deletes a specific redemption. @param accountCode recurly account id @param redemptionUuid recurly coupon redemption uuid
[ "Deletes", "a", "specific", "redemption", "." ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1721-L1723
ontop/ontop
mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/transformer/impl/MappingDataTypeCompletion.java
MappingDataTypeCompletion.getDataType
private RDFDatatype getDataType(Map<String, List<IndexedPosition>> termOccurenceIndex, Variable variable) throws UnknownDatatypeException { """ returns COL_TYPE for one of the datatype ids @param termOccurenceIndex @param variable @return """ List<IndexedPosition> list = termOccurenceIndex.get(v...
java
private RDFDatatype getDataType(Map<String, List<IndexedPosition>> termOccurenceIndex, Variable variable) throws UnknownDatatypeException { List<IndexedPosition> list = termOccurenceIndex.get(variable.getName()); if (list == null) throw new UnboundTargetVariableException(variable); ...
[ "private", "RDFDatatype", "getDataType", "(", "Map", "<", "String", ",", "List", "<", "IndexedPosition", ">", ">", "termOccurenceIndex", ",", "Variable", "variable", ")", "throws", "UnknownDatatypeException", "{", "List", "<", "IndexedPosition", ">", "list", "=", ...
returns COL_TYPE for one of the datatype ids @param termOccurenceIndex @param variable @return
[ "returns", "COL_TYPE", "for", "one", "of", "the", "datatype", "ids" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/transformer/impl/MappingDataTypeCompletion.java#L209-L248
aws/aws-sdk-java
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/RegisterThingRequest.java
RegisterThingRequest.withParameters
public RegisterThingRequest withParameters(java.util.Map<String, String> parameters) { """ <p> The parameters for provisioning a thing. See <a href="https://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html">Programmatic Provisioning</a> for more information. </p> @param parameter...
java
public RegisterThingRequest withParameters(java.util.Map<String, String> parameters) { setParameters(parameters); return this; }
[ "public", "RegisterThingRequest", "withParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "setParameters", "(", "parameters", ")", ";", "return", "this", ";", "}" ]
<p> The parameters for provisioning a thing. See <a href="https://docs.aws.amazon.com/iot/latest/developerguide/programmatic-provisioning.html">Programmatic Provisioning</a> for more information. </p> @param parameters The parameters for provisioning a thing. See <a href="https://docs.aws.amazon.com/iot/latest/develop...
[ "<p", ">", "The", "parameters", "for", "provisioning", "a", "thing", ".", "See", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "iot", "/", "latest", "/", "developerguide", "/", "programmatic", "-", "provisio...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/RegisterThingRequest.java#L139-L142
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/kebab/KebabRenderer.java
KebabRenderer.encodeEnd
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:kebab. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML ...
java
@Override public void encodeEnd(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } Kebab kebab = (Kebab) component; ResponseWriter rw = context.getResponseWriter(); rw.endElement("ul"); rw.endElement("div"); }
[ "@", "Override", "public", "void", "encodeEnd", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "Kebab", "kebab", "=...
This methods generates the HTML code of the current b:kebab. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component the co...
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "kebab", ".", "<code", ">", "encodeBegin<", "/", "code", ">", "generates", "the", "start", "of", "the", "component", ".", "After", "the", "the", "JSF", "framework", ...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/kebab/KebabRenderer.java#L120-L130
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassQuery.java
OverpassQuery.boundingBox
public OverpassQuery boundingBox(double southernLat, double westernLon, double northernLat, double easternLon) { """ Defines a global bounding box that is then implicitly added to all queries (unless they specify a different explicit bounding box) @param southernLat the southern latitude @param westernLon the...
java
public OverpassQuery boundingBox(double southernLat, double westernLon, double northernLat, double easternLon) { builder.append(String.format(Locale.US, "[bbox:%s,%s,%s,%s]", southernLat, westernLon, northernLat, easternLon )); ret...
[ "public", "OverpassQuery", "boundingBox", "(", "double", "southernLat", ",", "double", "westernLon", ",", "double", "northernLat", ",", "double", "easternLon", ")", "{", "builder", ".", "append", "(", "String", ".", "format", "(", "Locale", ".", "US", ",", "...
Defines a global bounding box that is then implicitly added to all queries (unless they specify a different explicit bounding box) @param southernLat the southern latitude @param westernLon the western longitude @param northernLat the northern latitude @param easternLon the eastern longitude @return the current Ove...
[ "Defines", "a", "global", "bounding", "box", "that", "is", "then", "implicitly", "added", "to", "all", "queries", "(", "unless", "they", "specify", "a", "different", "explicit", "bounding", "box", ")" ]
train
https://github.com/zsoltk/overpasser/blob/0464d3844e75c5f9393d2458d3a3aedf3e40f30d/library/src/main/java/hu/supercluster/overpasser/library/query/OverpassQuery.java#L68-L77
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE
public void serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE(String serviceName, Long monitoringId, Long alertId) throws IOException { """ Remove this Email alert monitoring REST: DELETE /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId} @param serviceNa...
java
public void serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE(String serviceName, Long monitoringId, Long alertId) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}"; StringBuilder sb = path(qPath, serviceName, monitoringI...
[ "public", "void", "serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE", "(", "String", "serviceName", ",", "Long", "monitoringId", ",", "Long", "alertId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/serviceMon...
Remove this Email alert monitoring REST: DELETE /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId} @param serviceName [required] The internal name of your dedicated server @param monitoringId [required] This monitoring id @param alertId [required] This monitoring id
[ "Remove", "this", "Email", "alert", "monitoring" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L2222-L2226
apache/incubator-gobblin
gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/retention/HivePartitionVersionRetentionReaper.java
HivePartitionVersionRetentionReaper.clean
@Override public void clean() throws IOException { """ If simulate is set to true, will simply return. If a version is pointing to a non-existing location, then drop the partition and close the jdbc connection. If a version is pointing to the same location as of the dataset, then drop the partition and c...
java
@Override public void clean() throws IOException { Path versionLocation = ((HivePartitionRetentionVersion) this.datasetVersion).getLocation(); Path datasetLocation = ((CleanableHivePartitionDataset) this.cleanableDataset).getLocation(); String completeName = ((HivePartitionRetentionVersion) this.dat...
[ "@", "Override", "public", "void", "clean", "(", ")", "throws", "IOException", "{", "Path", "versionLocation", "=", "(", "(", "HivePartitionRetentionVersion", ")", "this", ".", "datasetVersion", ")", ".", "getLocation", "(", ")", ";", "Path", "datasetLocation", ...
If simulate is set to true, will simply return. If a version is pointing to a non-existing location, then drop the partition and close the jdbc connection. If a version is pointing to the same location as of the dataset, then drop the partition and close the jdbc connection. If a version is staging, it's data will be d...
[ "If", "simulate", "is", "set", "to", "true", "will", "simply", "return", ".", "If", "a", "version", "is", "pointing", "to", "a", "non", "-", "existing", "location", "then", "drop", "the", "partition", "and", "close", "the", "jdbc", "connection", ".", "If...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/retention/HivePartitionVersionRetentionReaper.java#L83-L122
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/Options.java
Options.setOption
public int setOption(String[] flags, int i) { """ Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the option is ...
java
public int setOption(String[] flags, int i) { int j = setOptionFlag(flags, i); if (j == i) { j = tlpParams.setOptionFlag(flags, i); } if (j == i) { throw new IllegalArgumentException("Unknown option: " + flags[i]); } return j; }
[ "public", "int", "setOption", "(", "String", "[", "]", "flags", ",", "int", "i", ")", "{", "int", "j", "=", "setOptionFlag", "(", "flags", ",", "i", ")", ";", "if", "(", "j", "==", "i", ")", "{", "j", "=", "tlpParams", ".", "setOptionFlag", "(", ...
Set an option based on a String array in the style of commandline flags. The option may be either one known by the Options object, or one recognized by the TreebankLangParserParams which has already been set up inside the Options object, and then the option is set in the language-particular TreebankLangParserParams. No...
[ "Set", "an", "option", "based", "on", "a", "String", "array", "in", "the", "style", "of", "commandline", "flags", ".", "The", "option", "may", "be", "either", "one", "known", "by", "the", "Options", "object", "or", "one", "recognized", "by", "the", "Tree...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/Options.java#L167-L176
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setStorageAccount
public StorageBundle setStorageAccount(String vaultBaseUrl, String storageAccountName, String resourceId, String activeKeyName, boolean autoRegenerateKey) { """ Creates or updates a new storage account. This operation requires the storage/set permission. @param vaultBaseUrl The vault name, for example https://m...
java
public StorageBundle setStorageAccount(String vaultBaseUrl, String storageAccountName, String resourceId, String activeKeyName, boolean autoRegenerateKey) { return setStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName, resourceId, activeKeyName, autoRegenerateKey).toBlocking().single().body...
[ "public", "StorageBundle", "setStorageAccount", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "String", "resourceId", ",", "String", "activeKeyName", ",", "boolean", "autoRegenerateKey", ")", "{", "return", "setStorageAccountWithServiceResponseAsy...
Creates or updates a new storage account. This operation requires the storage/set permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param resourceId Storage account resource id. @param activeKeyName Current active st...
[ "Creates", "or", "updates", "a", "new", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "set", "permission", "." ]
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#L9868-L9870
jbossas/jboss-invocation
src/main/java/org/jboss/invocation/proxy/ProxyFactory.java
ProxyFactory.setInvocationHandler
public void setInvocationHandler(Object proxy, InvocationHandler handler) { """ Sets the invocation handler for a proxy created from this factory. @param proxy the proxy to modify @param handler the handler to use """ Field field = getInvocationHandlerField(); try { field.set(pr...
java
public void setInvocationHandler(Object proxy, InvocationHandler handler) { Field field = getInvocationHandlerField(); try { field.set(proxy, handler); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { ...
[ "public", "void", "setInvocationHandler", "(", "Object", "proxy", ",", "InvocationHandler", "handler", ")", "{", "Field", "field", "=", "getInvocationHandlerField", "(", ")", ";", "try", "{", "field", ".", "set", "(", "proxy", ",", "handler", ")", ";", "}", ...
Sets the invocation handler for a proxy created from this factory. @param proxy the proxy to modify @param handler the handler to use
[ "Sets", "the", "invocation", "handler", "for", "a", "proxy", "created", "from", "this", "factory", "." ]
train
https://github.com/jbossas/jboss-invocation/blob/f72586a554264cbc78fcdad9fdd3e84b833249c9/src/main/java/org/jboss/invocation/proxy/ProxyFactory.java#L358-L367
pvanassen/ns-api
src/main/java/nl/pvanassen/ns/HttpConnection.java
HttpConnection.getContent
InputStream getContent(String url) throws IOException, NsApiException { """ Handling the webservice call @param url URL to call @return Input stream as a result, or an exception @throws IOException In case of an IO error @throws NsApiException In case of any other error """ Request request = new...
java
InputStream getContent(String url) throws IOException, NsApiException { Request request = new Request.Builder().url(url).get().build(); try { Response response = client.newCall(request).execute(); if (response.body() == null) { log.error("Error while calling ...
[ "InputStream", "getContent", "(", "String", "url", ")", "throws", "IOException", ",", "NsApiException", "{", "Request", "request", "=", "new", "Request", ".", "Builder", "(", ")", ".", "url", "(", "url", ")", ".", "get", "(", ")", ".", "build", "(", ")...
Handling the webservice call @param url URL to call @return Input stream as a result, or an exception @throws IOException In case of an IO error @throws NsApiException In case of any other error
[ "Handling", "the", "webservice", "call" ]
train
https://github.com/pvanassen/ns-api/blob/e90e01028a0eb24006e4fddd4c85e7a25c4fe0ae/src/main/java/nl/pvanassen/ns/HttpConnection.java#L49-L63
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/utils/TimeUtil.java
TimeUtil.parseDate
public static Date parseDate(TimeType timeType, String date) { """ 将date Str 转换为 Date 类型 <p>Function: parseDate</p> <p>Description: </p> @param timeType @param date @return @author acexy@thankjava.com @date 2015年6月18日 上午9:59:42 @version 1.0 """ SimpleDateFormat sdf = getDateFormat(timeType); ...
java
public static Date parseDate(TimeType timeType, String date) { SimpleDateFormat sdf = getDateFormat(timeType); try { return sdf.parse(date); } catch (ParseException e) { e.printStackTrace(); } return null; }
[ "public", "static", "Date", "parseDate", "(", "TimeType", "timeType", ",", "String", "date", ")", "{", "SimpleDateFormat", "sdf", "=", "getDateFormat", "(", "timeType", ")", ";", "try", "{", "return", "sdf", ".", "parse", "(", "date", ")", ";", "}", "cat...
将date Str 转换为 Date 类型 <p>Function: parseDate</p> <p>Description: </p> @param timeType @param date @return @author acexy@thankjava.com @date 2015年6月18日 上午9:59:42 @version 1.0
[ "将date", "Str", "转换为", "Date", "类型", "<p", ">", "Function", ":", "parseDate<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/utils/TimeUtil.java#L41-L49
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java
ConcurrentLinkedHashMap.computeIfAbsent
@Override public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { """ If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless {@code null}. The entire method invocation is perf...
java
@Override public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) { return compute(key, mappingFunction, true); }
[ "@", "Override", "public", "V", "computeIfAbsent", "(", "K", "key", ",", "Function", "<", "?", "super", "K", ",", "?", "extends", "V", ">", "mappingFunction", ")", "{", "return", "compute", "(", "key", ",", "mappingFunction", ",", "true", ")", ";", "}"...
If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless {@code null}. The entire method invocation is performed atomically, so the function is applied at most once per key. Some attempted update operations on this m...
[ "If", "the", "specified", "key", "is", "not", "already", "associated", "with", "a", "value", "attempts", "to", "compute", "its", "value", "using", "the", "given", "mapping", "function", "and", "enters", "it", "into", "this", "map", "unless", "{", "@code", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/clhm/ConcurrentLinkedHashMap.java#L708-L711
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupsInner.java
NetworkSecurityGroupsInner.getByResourceGroupAsync
public Observable<NetworkSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String networkSecurityGroupName, String expand) { """ Gets the specified network security group. @param resourceGroupName The name of the resource group. @param networkSecurityGroupName The name of the network securi...
java
public Observable<NetworkSecurityGroupInner> getByResourceGroupAsync(String resourceGroupName, String networkSecurityGroupName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, expand).map(new Func1<ServiceResponse<NetworkSecurityGroupInner>, Networ...
[ "public", "Observable", "<", "NetworkSecurityGroupInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "networkSecurityGroupName", ",", "String", "expand", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGr...
Gets the specified network security group. @param resourceGroupName The name of the resource group. @param networkSecurityGroupName The name of the network security group. @param expand Expands referenced resources. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the...
[ "Gets", "the", "specified", "network", "security", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupsInner.java#L383-L390
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/convert/NumberConverter.java
NumberConverter.getNumberFormat
private NumberFormat getNumberFormat(Locale locale) { """ <p>Return a <code>NumberFormat</code> instance to use for formatting and parsing in this {@link Converter}.</p> @param locale The <code>Locale</code> used to select formatting and parsing conventions @throws ConverterException if no instance can be cr...
java
private NumberFormat getNumberFormat(Locale locale) { if (pattern == null && type == null) { throw new IllegalArgumentException("Either pattern or type must" + " be specified."); } // PENDING(craigmcc) - Implement pooling if needed for performance? // If p...
[ "private", "NumberFormat", "getNumberFormat", "(", "Locale", "locale", ")", "{", "if", "(", "pattern", "==", "null", "&&", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Either pattern or type must\"", "+", "\" be specified.\"", ...
<p>Return a <code>NumberFormat</code> instance to use for formatting and parsing in this {@link Converter}.</p> @param locale The <code>Locale</code> used to select formatting and parsing conventions @throws ConverterException if no instance can be created
[ "<p", ">", "Return", "a", "<code", ">", "NumberFormat<", "/", "code", ">", "instance", "to", "use", "for", "formatting", "and", "parsing", "in", "this", "{", "@link", "Converter", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/convert/NumberConverter.java#L879-L908
indeedeng/util
io/src/main/java/com/indeed/util/io/Files.java
Files.writeObjectIfChangedOrDie
public static boolean writeObjectIfChangedOrDie(@Nonnull final Object obj, @Nonnull final String file) throws IOException { """ Writes an object to a file only if it is different from the current contents of the file, or if the file does not exist. Note that you must have enough heap to contain the entire conte...
java
public static boolean writeObjectIfChangedOrDie(@Nonnull final Object obj, @Nonnull final String file) throws IOException { return writeObjectIfChangedOrDie(obj, file, LOGGER); }
[ "public", "static", "boolean", "writeObjectIfChangedOrDie", "(", "@", "Nonnull", "final", "Object", "obj", ",", "@", "Nonnull", "final", "String", "file", ")", "throws", "IOException", "{", "return", "writeObjectIfChangedOrDie", "(", "obj", ",", "file", ",", "LO...
Writes an object to a file only if it is different from the current contents of the file, or if the file does not exist. Note that you must have enough heap to contain the entire contents of the object graph. @param obj object to write to a file @param file path to save the object to @return true if the file was actu...
[ "Writes", "an", "object", "to", "a", "file", "only", "if", "it", "is", "different", "from", "the", "current", "contents", "of", "the", "file", "or", "if", "the", "file", "does", "not", "exist", ".", "Note", "that", "you", "must", "have", "enough", "hea...
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/io/src/main/java/com/indeed/util/io/Files.java#L252-L254
amzn/ion-java
src/com/amazon/ion/impl/LocalSymbolTableImports.java
LocalSymbolTableImports.prepBaseSids
private static int prepBaseSids(int[] baseSids, SymbolTable[] imports) { """ Collects the necessary maxId info. from the passed-in {@code imports} and populates the {@code baseSids} array. @return the sum of all imports' maxIds @throws IllegalArgumentException if any symtab beyond the first is a local or s...
java
private static int prepBaseSids(int[] baseSids, SymbolTable[] imports) { SymbolTable firstImport = imports[0]; assert firstImport.isSystemTable() : "first symtab must be a system symtab"; baseSids[0] = 0; int total = firstImport.getMaxId(); for (int i = 1; i < ...
[ "private", "static", "int", "prepBaseSids", "(", "int", "[", "]", "baseSids", ",", "SymbolTable", "[", "]", "imports", ")", "{", "SymbolTable", "firstImport", "=", "imports", "[", "0", "]", ";", "assert", "firstImport", ".", "isSystemTable", "(", ")", ":",...
Collects the necessary maxId info. from the passed-in {@code imports} and populates the {@code baseSids} array. @return the sum of all imports' maxIds @throws IllegalArgumentException if any symtab beyond the first is a local or system symtab
[ "Collects", "the", "necessary", "maxId", "info", ".", "from", "the", "passed", "-", "in", "{", "@code", "imports", "}", "and", "populates", "the", "{", "@code", "baseSids", "}", "array", "." ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/LocalSymbolTableImports.java#L140-L165
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/Parser.java
Parser.parseLong
public static long parseLong(String s, int beginIndex, int endIndex) { """ Faster version of {@link Long#parseLong(String)} when parsing a substring is required @param s string to parse @param beginIndex begin index @param endIndex end index @return long value """ // Fallback to default implementatio...
java
public static long parseLong(String s, int beginIndex, int endIndex) { // Fallback to default implementation in case the string is long if (endIndex - beginIndex > 16) { return Long.parseLong(s.substring(beginIndex, endIndex)); } long res = digitAt(s, beginIndex); for (beginIndex++; beginIndex...
[ "public", "static", "long", "parseLong", "(", "String", "s", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "{", "// Fallback to default implementation in case the string is long", "if", "(", "endIndex", "-", "beginIndex", ">", "16", ")", "{", "return", "L...
Faster version of {@link Long#parseLong(String)} when parsing a substring is required @param s string to parse @param beginIndex begin index @param endIndex end index @return long value
[ "Faster", "version", "of", "{", "@link", "Long#parseLong", "(", "String", ")", "}", "when", "parsing", "a", "substring", "is", "required" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/Parser.java#L704-L714
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/InvertedGenerationalDistancePlus.java
InvertedGenerationalDistancePlus.invertedGenerationalDistancePlus
public double invertedGenerationalDistancePlus(Front front, Front referenceFront) { """ Returns the inverted generational distance plus value for a given front @param front The front @param referenceFront The reference pareto front """ double sum = 0.0; for (int i = 0 ; i < referenceFront.getNumbe...
java
public double invertedGenerationalDistancePlus(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0 ; i < referenceFront.getNumberOfPoints(); i++) { sum += FrontUtils.distanceToClosestPoint(referenceFront.getPoint(i), front, new DominanceDistance()); } // STEP 4. Divid...
[ "public", "double", "invertedGenerationalDistancePlus", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "referenceFront", ".", "getNumberOfPoints", "(", ")", ...
Returns the inverted generational distance plus value for a given front @param front The front @param referenceFront The reference pareto front
[ "Returns", "the", "inverted", "generational", "distance", "plus", "value", "for", "a", "given", "front" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/InvertedGenerationalDistancePlus.java#L67-L77
looly/hutool
hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java
ImgUtil.scale
public static Image scale(Image srcImage, int width, int height, Color fixedColor) { """ 缩放图像(按高度和宽度缩放)<br> 缩放后默认为jpeg格式 @param srcImage 源图像 @param width 缩放后的宽度 @param height 缩放后的高度 @param fixedColor 比例不对时补充的颜色,不补充为<code>null</code> @return {@link Image} """ return Img.from(srcImage).scale(width, he...
java
public static Image scale(Image srcImage, int width, int height, Color fixedColor) { return Img.from(srcImage).scale(width, height, fixedColor).getImg(); }
[ "public", "static", "Image", "scale", "(", "Image", "srcImage", ",", "int", "width", ",", "int", "height", ",", "Color", "fixedColor", ")", "{", "return", "Img", ".", "from", "(", "srcImage", ")", ".", "scale", "(", "width", ",", "height", ",", "fixedC...
缩放图像(按高度和宽度缩放)<br> 缩放后默认为jpeg格式 @param srcImage 源图像 @param width 缩放后的宽度 @param height 缩放后的高度 @param fixedColor 比例不对时补充的颜色,不补充为<code>null</code> @return {@link Image}
[ "缩放图像(按高度和宽度缩放)<br", ">", "缩放后默认为jpeg格式" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/img/ImgUtil.java#L243-L245
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/ImportHelpers.java
ImportHelpers.updateImports
public static void updateImports( Instance instance, Map<String,Collection<Import>> variablePrefixToImports ) { """ Updates the imports of an instance with new values. @param instance the instance whose imports must be updated @param variablePrefixToImports the new imports (can be null) """ instance.getImp...
java
public static void updateImports( Instance instance, Map<String,Collection<Import>> variablePrefixToImports ) { instance.getImports().clear(); if( variablePrefixToImports != null ) instance.getImports().putAll( variablePrefixToImports ); }
[ "public", "static", "void", "updateImports", "(", "Instance", "instance", ",", "Map", "<", "String", ",", "Collection", "<", "Import", ">", ">", "variablePrefixToImports", ")", "{", "instance", ".", "getImports", "(", ")", ".", "clear", "(", ")", ";", "if"...
Updates the imports of an instance with new values. @param instance the instance whose imports must be updated @param variablePrefixToImports the new imports (can be null)
[ "Updates", "the", "imports", "of", "an", "instance", "with", "new", "values", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/ImportHelpers.java#L162-L166
OpenLiberty/open-liberty
dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/utils/CommonExpectations.java
CommonExpectations.successfullyReachedFormLoginPage
public static Expectations successfullyReachedFormLoginPage(String testAction) { """ Sets expectations that will check: <ol> <li>200 status code in the response for the specified test action <li>Response title is equivalent to expected login page title </ol> """ Expectations expectations = successf...
java
public static Expectations successfullyReachedFormLoginPage(String testAction) { Expectations expectations = successfullyReachedLoginPage(testAction); expectations.addExpectation(new ResponseFullExpectation(testAction, Constants.STRING_CONTAINS, Constants.FORM_LOGIN_HEADING, "Page returned during test s...
[ "public", "static", "Expectations", "successfullyReachedFormLoginPage", "(", "String", "testAction", ")", "{", "Expectations", "expectations", "=", "successfullyReachedLoginPage", "(", "testAction", ")", ";", "expectations", ".", "addExpectation", "(", "new", "ResponseFul...
Sets expectations that will check: <ol> <li>200 status code in the response for the specified test action <li>Response title is equivalent to expected login page title </ol>
[ "Sets", "expectations", "that", "will", "check", ":", "<ol", ">", "<li", ">", "200", "status", "code", "in", "the", "response", "for", "the", "specified", "test", "action", "<li", ">", "Response", "title", "is", "equivalent", "to", "expected", "login", "pa...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/utils/CommonExpectations.java#L79-L83
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/config/handler/compose/ComposeUtils.java
ComposeUtils.resolveAbsolutely
static File resolveAbsolutely(String pathToResolve, MavenProject project) { """ Resolves the supplied resource (a path or directory on the filesystem) relative the Maven {@link MavenProject#getBasedir() base directory}. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. The retur...
java
static File resolveAbsolutely(String pathToResolve, MavenProject project) { // avoid an NPE if the Maven project is not needed by DockerPathUtil return DockerPathUtil.resolveAbsolutely(pathToResolve, (project == null) ? null : project.getBasedir().getAbsolutePath()); }
[ "static", "File", "resolveAbsolutely", "(", "String", "pathToResolve", ",", "MavenProject", "project", ")", "{", "// avoid an NPE if the Maven project is not needed by DockerPathUtil", "return", "DockerPathUtil", ".", "resolveAbsolutely", "(", "pathToResolve", ",", "(", "proj...
Resolves the supplied resource (a path or directory on the filesystem) relative the Maven {@link MavenProject#getBasedir() base directory}. The returned {@code File} is guaranteed to be {@link File#isAbsolute() absolute}. The returned file is <em>not</em> guaranteed to exist. <p> If {@code pathToResolve} is {@link Fi...
[ "Resolves", "the", "supplied", "resource", "(", "a", "path", "or", "directory", "on", "the", "filesystem", ")", "relative", "the", "Maven", "{", "@link", "MavenProject#getBasedir", "()", "base", "directory", "}", ".", "The", "returned", "{", "@code", "File", ...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/config/handler/compose/ComposeUtils.java#L60-L64
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/CollectionUtil.java
CollectionUtil.getItemAtPositionOrNull
public static <T> T getItemAtPositionOrNull(Collection<T> collection, int position) { """ Returns the n-th item or {@code null} if collection is smaller. @param collection the given collection @param position position of the wanted item @return the item on position or {@code null} if the given collection is...
java
public static <T> T getItemAtPositionOrNull(Collection<T> collection, int position) { if (position >= collection.size()) { return null; } if (collection instanceof List) { return ((List<T>) collection).get(position); } Iterator<T> iterator = collection.ite...
[ "public", "static", "<", "T", ">", "T", "getItemAtPositionOrNull", "(", "Collection", "<", "T", ">", "collection", ",", "int", "position", ")", "{", "if", "(", "position", ">=", "collection", ".", "size", "(", ")", ")", "{", "return", "null", ";", "}",...
Returns the n-th item or {@code null} if collection is smaller. @param collection the given collection @param position position of the wanted item @return the item on position or {@code null} if the given collection is too small @throws NullPointerException if collection is {@code null}
[ "Returns", "the", "n", "-", "th", "item", "or", "{", "@code", "null", "}", "if", "collection", "is", "smaller", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/CollectionUtil.java#L88-L101
alibaba/Tangram-Android
tangram/src/main/java/com/tmall/wireless/tangram3/BaseTangramEngine.java
BaseTangramEngine.parseSingleComponent
public BaseCell parseSingleComponent(@Nullable Card parent, @Nullable O data, @Nullable Map<String, ComponentInfo> componentInfoMap) { """ Parse original data with type {@link O} into model data with type {@link BaseCell} @param parent the parent group to hold parsed object. @param data Original data. @retu...
java
public BaseCell parseSingleComponent(@Nullable Card parent, @Nullable O data, @Nullable Map<String, ComponentInfo> componentInfoMap) { return mDataParser.parseSingleComponent(data, parent, this, componentInfoMap); }
[ "public", "BaseCell", "parseSingleComponent", "(", "@", "Nullable", "Card", "parent", ",", "@", "Nullable", "O", "data", ",", "@", "Nullable", "Map", "<", "String", ",", "ComponentInfo", ">", "componentInfoMap", ")", "{", "return", "mDataParser", ".", "parseSi...
Parse original data with type {@link O} into model data with type {@link BaseCell} @param parent the parent group to hold parsed object. @param data Original data. @return Parsed data. @since 3.0.0
[ "Parse", "original", "data", "with", "type", "{", "@link", "O", "}", "into", "model", "data", "with", "type", "{", "@link", "BaseCell", "}" ]
train
https://github.com/alibaba/Tangram-Android/blob/caa57f54e009c8dacd34a2322d5761956ebed321/tangram/src/main/java/com/tmall/wireless/tangram3/BaseTangramEngine.java#L488-L490
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java
WebhookMessageBuilder.addFile
public WebhookMessageBuilder addFile(String name, File file) { """ Adds the provided file to the resulting message. @param name The name to use for this file @param file The file to add @throws IllegalArgumentException If the provided file is null, does not exist, or is not readable @throws IllegalSta...
java
public WebhookMessageBuilder addFile(String name, File file) { Checks.notNull(file, "File"); Checks.notBlank(name, "Name"); Checks.check(file.exists() && file.canRead(), "File must exist and be readable"); if (fileIndex >= MAX_FILES) throw new IllegalStateException("Canno...
[ "public", "WebhookMessageBuilder", "addFile", "(", "String", "name", ",", "File", "file", ")", "{", "Checks", ".", "notNull", "(", "file", ",", "\"File\"", ")", ";", "Checks", ".", "notBlank", "(", "name", ",", "\"Name\"", ")", ";", "Checks", ".", "check...
Adds the provided file to the resulting message. @param name The name to use for this file @param file The file to add @throws IllegalArgumentException If the provided file is null, does not exist, or is not readable @throws IllegalStateException If the file limit has already been reached @return The current Webho...
[ "Adds", "the", "provided", "file", "to", "the", "resulting", "message", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java#L306-L324
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/JLanguageTool.java
JLanguageTool.getAnalyzedSentence
public AnalyzedSentence getAnalyzedSentence(String sentence) throws IOException { """ Tokenizes the given {@code sentence} into words and analyzes it, and then disambiguates POS tags. @param sentence sentence to be analyzed """ SimpleInputSentence cacheKey = new SimpleInputSentence(sentence, language); ...
java
public AnalyzedSentence getAnalyzedSentence(String sentence) throws IOException { SimpleInputSentence cacheKey = new SimpleInputSentence(sentence, language); AnalyzedSentence cachedSentence = cache != null ? cache.getIfPresent(cacheKey) : null; if (cachedSentence != null) { return cachedSentence; ...
[ "public", "AnalyzedSentence", "getAnalyzedSentence", "(", "String", "sentence", ")", "throws", "IOException", "{", "SimpleInputSentence", "cacheKey", "=", "new", "SimpleInputSentence", "(", "sentence", ",", "language", ")", ";", "AnalyzedSentence", "cachedSentence", "="...
Tokenizes the given {@code sentence} into words and analyzes it, and then disambiguates POS tags. @param sentence sentence to be analyzed
[ "Tokenizes", "the", "given", "{" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/JLanguageTool.java#L947-L964
liferay/com-liferay-commerce
commerce-discount-api/src/main/java/com/liferay/commerce/discount/service/persistence/CommerceDiscountUtil.java
CommerceDiscountUtil.findByUUID_G
public static CommerceDiscount findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.discount.exception.NoSuchDiscountException { """ Returns the commerce discount where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscountException} if it could not be found. @param uuid the uuid @...
java
public static CommerceDiscount findByUUID_G(String uuid, long groupId) throws com.liferay.commerce.discount.exception.NoSuchDiscountException { return getPersistence().findByUUID_G(uuid, groupId); }
[ "public", "static", "CommerceDiscount", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "discount", ".", "exception", ".", "NoSuchDiscountException", "{", "return", "getPersistence", "(", ...
Returns the commerce discount where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchDiscountException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching commerce discount @throws NoSuchDiscountException if a matching commerce discount could not be found
[ "Returns", "the", "commerce", "discount", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchDiscountException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-api/src/main/java/com/liferay/commerce/discount/service/persistence/CommerceDiscountUtil.java#L280-L283
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java
AsmInvokeDistributeFactory.buildByteCode
public byte[] buildByteCode(Class<?> parentClass, String className) { """ 构建byte code @param parentClass 父类 @param className 生成的class名 @return 生成的class的byte code数据 """ ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); cw.visit(version, // Java version ACC_PUBLIC, // p...
java
public byte[] buildByteCode(Class<?> parentClass, String className) { ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); cw.visit(version, // Java version ACC_PUBLIC, // public class convert(className), // package and name null, // signature (null means not...
[ "public", "byte", "[", "]", "buildByteCode", "(", "Class", "<", "?", ">", "parentClass", ",", "String", "className", ")", "{", "ClassWriter", "cw", "=", "new", "ClassWriter", "(", "ClassWriter", ".", "COMPUTE_MAXS", ")", ";", "cw", ".", "visit", "(", "ve...
构建byte code @param parentClass 父类 @param className 生成的class名 @return 生成的class的byte code数据
[ "构建byte", "code" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java#L127-L152
alkacon/opencms-core
src/org/opencms/util/CmsStringUtil.java
CmsStringUtil.getIntValueRounded
public static int getIntValueRounded(String value, int defaultValue, String key) { """ Returns the closest Integer (int) value for the given String value.<p> All parse errors are caught and the given default value is returned in this case.<p> @param value the value to parse as int, can also represent a float...
java
public static int getIntValueRounded(String value, int defaultValue, String key) { int result; try { result = Math.round(Float.parseFloat(value)); } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.ERR_UN...
[ "public", "static", "int", "getIntValueRounded", "(", "String", "value", ",", "int", "defaultValue", ",", "String", "key", ")", "{", "int", "result", ";", "try", "{", "result", "=", "Math", ".", "round", "(", "Float", ".", "parseFloat", "(", "value", ")"...
Returns the closest Integer (int) value for the given String value.<p> All parse errors are caught and the given default value is returned in this case.<p> @param value the value to parse as int, can also represent a float value @param defaultValue the default value in case of parsing errors @param key a key to be in...
[ "Returns", "the", "closest", "Integer", "(", "int", ")", "value", "for", "the", "given", "String", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsStringUtil.java#L830-L842
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/statistics/StatsUtils.java
StatsUtils.findTiers
public static String[] findTiers(Cache<?, ?> cache) { """ Find the list of tiers of a cache. We assume a lot of things here. <ul> <li>The "eviction" statistic is available on the tier</li> <li>That the tiers have only one tag attribute</li> <li>That this tag contains the tier name</li> <li>That the only desce...
java
public static String[] findTiers(Cache<?, ?> cache) { // Here I'm randomly taking the eviction observer because it exists on all tiers @SuppressWarnings("unchecked") Query statQuery = queryBuilder() .descendants() .filter(context(attributes(Matchers.allOf(hasAttribute("name", "eviction"), hasAtt...
[ "public", "static", "String", "[", "]", "findTiers", "(", "Cache", "<", "?", ",", "?", ">", "cache", ")", "{", "// Here I'm randomly taking the eviction observer because it exists on all tiers", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "Query", "statQuery", ...
Find the list of tiers of a cache. We assume a lot of things here. <ul> <li>The "eviction" statistic is available on the tier</li> <li>That the tiers have only one tag attribute</li> <li>That this tag contains the tier name</li> <li>That the only descendants having an "eviction" statistic are the tiers</li> </ul> @par...
[ "Find", "the", "list", "of", "tiers", "of", "a", "cache", ".", "We", "assume", "a", "lot", "of", "things", "here", ".", "<ul", ">", "<li", ">", "The", "eviction", "statistic", "is", "available", "on", "the", "tier<", "/", "li", ">", "<li", ">", "Th...
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/statistics/StatsUtils.java#L174-L201
networknt/light-rest-4j
openapi-validator/src/main/java/com/networknt/openapi/ResponseValidator.java
ResponseValidator.validateResponseContent
public Status validateResponseContent(Object responseContent, OpenApiOperation openApiOperation, String statusCode, String mediaTypeName) { """ validate a given response content object @param responseContent response content needs to be validated @param openApiOperation OpenApi Operation which is located by uri ...
java
public Status validateResponseContent(Object responseContent, OpenApiOperation openApiOperation, String statusCode, String mediaTypeName) { //try to convert json string to structured object if(responseContent instanceof String) { responseContent = convertStrToObjTree((String)responseContent)...
[ "public", "Status", "validateResponseContent", "(", "Object", "responseContent", ",", "OpenApiOperation", "openApiOperation", ",", "String", "statusCode", ",", "String", "mediaTypeName", ")", "{", "//try to convert json string to structured object", "if", "(", "responseConten...
validate a given response content object @param responseContent response content needs to be validated @param openApiOperation OpenApi Operation which is located by uri and httpMethod @param statusCode eg. 200, 400 @param mediaTypeName eg. "application/json" @return Status
[ "validate", "a", "given", "response", "content", "object" ]
train
https://github.com/networknt/light-rest-4j/blob/06b15128e6101351e617284a636ef5d632e6b1fe/openapi-validator/src/main/java/com/networknt/openapi/ResponseValidator.java#L116-L138
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/SmartTable.java
SmartTable.setText
public void setText (int row, int column, Object text, int colSpan, String... styles) { """ Sets the text in the specified cell, with the specified style and column span. @param text an object whose string value will be displayed. """ setText(row, column, String.valueOf(text)); if (colSpan >...
java
public void setText (int row, int column, Object text, int colSpan, String... styles) { setText(row, column, String.valueOf(text)); if (colSpan > 0) { getFlexCellFormatter().setColSpan(row, column, colSpan); } setStyleNames(row, column, styles); }
[ "public", "void", "setText", "(", "int", "row", ",", "int", "column", ",", "Object", "text", ",", "int", "colSpan", ",", "String", "...", "styles", ")", "{", "setText", "(", "row", ",", "column", ",", "String", ".", "valueOf", "(", "text", ")", ")", ...
Sets the text in the specified cell, with the specified style and column span. @param text an object whose string value will be displayed.
[ "Sets", "the", "text", "in", "the", "specified", "cell", "with", "the", "specified", "style", "and", "column", "span", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/SmartTable.java#L270-L277
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/SubStringOperation.java
SubStringOperation.getFromParameter
private Integer getFromParameter(Map<String, String> parameters) throws TransformationOperationException { """ Get the 'from' parameter from the parameters. If the parameter is not set 0 is taken instead. """ return getSubStringParameter(parameters, fromParam, 0); }
java
private Integer getFromParameter(Map<String, String> parameters) throws TransformationOperationException { return getSubStringParameter(parameters, fromParam, 0); }
[ "private", "Integer", "getFromParameter", "(", "Map", "<", "String", ",", "String", ">", "parameters", ")", "throws", "TransformationOperationException", "{", "return", "getSubStringParameter", "(", "parameters", ",", "fromParam", ",", "0", ")", ";", "}" ]
Get the 'from' parameter from the parameters. If the parameter is not set 0 is taken instead.
[ "Get", "the", "from", "parameter", "from", "the", "parameters", ".", "If", "the", "parameter", "is", "not", "set", "0", "is", "taken", "instead", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/SubStringOperation.java#L97-L99
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.createOrEditJiraService
public boolean createOrEditJiraService(Integer projectId, GitlabJiraProperties jiraPropties) throws IOException { """ Set JIRA service for a project. https://docs.gitlab.com/ce/api/services.html#create-edit-jira-service @param projectId The ID of the project containing the variable. @param jiraPropties @r...
java
public boolean createOrEditJiraService(Integer projectId, GitlabJiraProperties jiraPropties) throws IOException { Query query = new Query() .appendIf("url", jiraPropties.getUrl()) .appendIf("project_key", jiraPropties.getProjectKey()); if (!jiraPropties.getUsername().is...
[ "public", "boolean", "createOrEditJiraService", "(", "Integer", "projectId", ",", "GitlabJiraProperties", "jiraPropties", ")", "throws", "IOException", "{", "Query", "query", "=", "new", "Query", "(", ")", ".", "appendIf", "(", "\"url\"", ",", "jiraPropties", ".",...
Set JIRA service for a project. https://docs.gitlab.com/ce/api/services.html#create-edit-jira-service @param projectId The ID of the project containing the variable. @param jiraPropties @return @throws IOException on gitlab api call error
[ "Set", "JIRA", "service", "for", "a", "project", ".", "https", ":", "//", "docs", ".", "gitlab", ".", "com", "/", "ce", "/", "api", "/", "services", ".", "html#create", "-", "edit", "-", "jira", "-", "service" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3840-L3862
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerAnyStreamable.java
OStringSerializerAnyStreamable.toStream
public StringBuilder toStream(final StringBuilder iOutput, Object iValue) { """ Serialize the class name size + class name + object content @param iValue """ if (iValue != null) { if (!(iValue instanceof OSerializableStream)) throw new OSerializationException("Cannot serialize the objec...
java
public StringBuilder toStream(final StringBuilder iOutput, Object iValue) { if (iValue != null) { if (!(iValue instanceof OSerializableStream)) throw new OSerializationException("Cannot serialize the object since it's not implements the OSerializableStream interface"); OSerializableStream ...
[ "public", "StringBuilder", "toStream", "(", "final", "StringBuilder", "iOutput", ",", "Object", "iValue", ")", "{", "if", "(", "iValue", "!=", "null", ")", "{", "if", "(", "!", "(", "iValue", "instanceof", "OSerializableStream", ")", ")", "throw", "new", "...
Serialize the class name size + class name + object content @param iValue
[ "Serialize", "the", "class", "name", "size", "+", "class", "name", "+", "object", "content" ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerAnyStreamable.java#L63-L74
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.createRegexEntityModel
public UUID createRegexEntityModel(UUID appId, String versionId, RegexModelCreateObject regexEntityExtractorCreateObj) { """ Adds a regex entity model to the application version. @param appId The application ID. @param versionId The version ID. @param regexEntityExtractorCreateObj A model object containing th...
java
public UUID createRegexEntityModel(UUID appId, String versionId, RegexModelCreateObject regexEntityExtractorCreateObj) { return createRegexEntityModelWithServiceResponseAsync(appId, versionId, regexEntityExtractorCreateObj).toBlocking().single().body(); }
[ "public", "UUID", "createRegexEntityModel", "(", "UUID", "appId", ",", "String", "versionId", ",", "RegexModelCreateObject", "regexEntityExtractorCreateObj", ")", "{", "return", "createRegexEntityModelWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "regexEnt...
Adds a regex entity model to the application version. @param appId The application ID. @param versionId The version ID. @param regexEntityExtractorCreateObj A model object containing the name and regex pattern for the new regex entity extractor. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Adds", "a", "regex", "entity", "model", "to", "the", "application", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L7297-L7299
liyiorg/weixin-popular
src/main/java/weixin/popular/api/QrcodeAPI.java
QrcodeAPI.wxaappCreatewxaqrcode
public static BufferedImage wxaappCreatewxaqrcode(String access_token,Wxaqrcode wxaqrcode) { """ 获取小程序页面二维码 <br> 小程序码使用 使用 WxaAPI.getwxacode 或 WxaAPI.getwxacodeunlimit @since 2.8.8 @param access_token access_token @param wxaqrcode wxaqrcode @return BufferedImage """ String json = JsonUtil.toJSONString(w...
java
public static BufferedImage wxaappCreatewxaqrcode(String access_token,Wxaqrcode wxaqrcode){ String json = JsonUtil.toJSONString(wxaqrcode); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/cgi-bin/wxaapp/createwxaqrcode") .addParameter(PARAM_A...
[ "public", "static", "BufferedImage", "wxaappCreatewxaqrcode", "(", "String", "access_token", ",", "Wxaqrcode", "wxaqrcode", ")", "{", "String", "json", "=", "JsonUtil", ".", "toJSONString", "(", "wxaqrcode", ")", ";", "HttpUriRequest", "httpUriRequest", "=", "Reques...
获取小程序页面二维码 <br> 小程序码使用 使用 WxaAPI.getwxacode 或 WxaAPI.getwxacodeunlimit @since 2.8.8 @param access_token access_token @param wxaqrcode wxaqrcode @return BufferedImage
[ "获取小程序页面二维码", "<br", ">", "小程序码使用", "使用", "WxaAPI", ".", "getwxacode", "或", "WxaAPI", ".", "getwxacodeunlimit" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/QrcodeAPI.java#L117-L127
GerdHolz/TOVAL
src/de/invation/code/toval/validate/Validate.java
Validate.isFalse
public static void isFalse(Boolean expression, String constraint) { """ Checks if the given boolean expression evaluates to <code>false</code>. @param expression The expression to evaluate. @param constraint Textual description of the expression to include in the exception in case the validation fails. @throws ...
java
public static void isFalse(Boolean expression, String constraint) { if(!validation) return; notNull(expression); notNull(constraint); if(!expression) throw new ParameterException(ErrorCode.CONSTRAINT, "Parameter must not fulfill constraint \""+constraint+"\""); }
[ "public", "static", "void", "isFalse", "(", "Boolean", "expression", ",", "String", "constraint", ")", "{", "if", "(", "!", "validation", ")", "return", ";", "notNull", "(", "expression", ")", ";", "notNull", "(", "constraint", ")", ";", "if", "(", "!", ...
Checks if the given boolean expression evaluates to <code>false</code>. @param expression The expression to evaluate. @param constraint Textual description of the expression to include in the exception in case the validation fails. @throws ParameterException if the given expression does not evaluate to <code>false</cod...
[ "Checks", "if", "the", "given", "boolean", "expression", "evaluates", "to", "<code", ">", "false<", "/", "code", ">", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/validate/Validate.java#L179-L185
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/multilayer/SparkDl4jMultiLayer.java
SparkDl4jMultiLayer.evaluateRegression
public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data, int minibatchSize) { """ Evaluate the network (regression performance) in a distributed manner on the provided data @param data Data to evaluate @param minibatchSize Minibatch size to use when doing performing evaluation @retu...
java
public <T extends RegressionEvaluation> T evaluateRegression(JavaRDD<DataSet> data, int minibatchSize) { long nOut = ((FeedForwardLayer) network.getOutputLayer().conf().getLayer()).getNOut(); return (T)doEvaluation(data, new org.deeplearning4j.eval.RegressionEvaluation(nOut), minibatchSize); }
[ "public", "<", "T", "extends", "RegressionEvaluation", ">", "T", "evaluateRegression", "(", "JavaRDD", "<", "DataSet", ">", "data", ",", "int", "minibatchSize", ")", "{", "long", "nOut", "=", "(", "(", "FeedForwardLayer", ")", "network", ".", "getOutputLayer",...
Evaluate the network (regression performance) in a distributed manner on the provided data @param data Data to evaluate @param minibatchSize Minibatch size to use when doing performing evaluation @return {@link RegressionEvaluation} instance with regression performance
[ "Evaluate", "the", "network", "(", "regression", "performance", ")", "in", "a", "distributed", "manner", "on", "the", "provided", "data" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/multilayer/SparkDl4jMultiLayer.java#L581-L584
rey5137/material
material/src/main/java/com/rey/material/widget/EditText.java
EditText.setShadowLayer
public void setShadowLayer (float radius, float dx, float dy, int color) { """ Gives the text a shadow of the specified blur radius and color, the specified distance from its drawn position. <p> The text shadow produced does not interact with the properties on view that are responsible for real time shadows, ...
java
public void setShadowLayer (float radius, float dx, float dy, int color){ mInputView.setShadowLayer(radius, dx, dy, color); }
[ "public", "void", "setShadowLayer", "(", "float", "radius", ",", "float", "dx", ",", "float", "dy", ",", "int", "color", ")", "{", "mInputView", ".", "setShadowLayer", "(", "radius", ",", "dx", ",", "dy", ",", "color", ")", ";", "}" ]
Gives the text a shadow of the specified blur radius and color, the specified distance from its drawn position. <p> The text shadow produced does not interact with the properties on view that are responsible for real time shadows, {@link View#getElevation() elevation} and {@link View#getTranslationZ() translationZ}. @...
[ "Gives", "the", "text", "a", "shadow", "of", "the", "specified", "blur", "radius", "and", "color", "the", "specified", "distance", "from", "its", "drawn", "position", ".", "<p", ">", "The", "text", "shadow", "produced", "does", "not", "interact", "with", "...
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/EditText.java#L3393-L3395
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-maven/src/main/java/org/xwiki/extension/maven/internal/MavenUtils.java
MavenUtils.toExtensionId
public static ExtensionId toExtensionId(String groupId, String artifactId, String classifier, Version version) { """ Create a extension identifier from Maven artifact identifier elements. @param groupId the group id @param artifactId the artifact id @param classifier the classifier @param version the version...
java
public static ExtensionId toExtensionId(String groupId, String artifactId, String classifier, Version version) { String extensionId = toExtensionId(groupId, artifactId, classifier); return new ExtensionId(extensionId, version); }
[ "public", "static", "ExtensionId", "toExtensionId", "(", "String", "groupId", ",", "String", "artifactId", ",", "String", "classifier", ",", "Version", "version", ")", "{", "String", "extensionId", "=", "toExtensionId", "(", "groupId", ",", "artifactId", ",", "c...
Create a extension identifier from Maven artifact identifier elements. @param groupId the group id @param artifactId the artifact id @param classifier the classifier @param version the version @return the extension identifier @since 10.9 @since 10.8.1
[ "Create", "a", "extension", "identifier", "from", "Maven", "artifact", "identifier", "elements", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-maven/src/main/java/org/xwiki/extension/maven/internal/MavenUtils.java#L138-L143
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java
LocalPDBDirectory.getDir
protected File getDir(String pdbId, boolean obsolete) { """ Gets the directory in which the file for a given MMCIF file would live, creating it if necessary. The obsolete parameter is necessary to avoid additional server queries. @param pdbId @param obsolete Whether the pdbId is obsolete or not @return File...
java
protected File getDir(String pdbId, boolean obsolete) { File dir = null; if (obsolete) { // obsolete is always split String middle = pdbId.substring(1,3).toLowerCase(); dir = new File(obsoleteDirPath, middle); } else { String middle = pdbId.substring(1,3).toLowerCase(); dir = new File(splitDirPat...
[ "protected", "File", "getDir", "(", "String", "pdbId", ",", "boolean", "obsolete", ")", "{", "File", "dir", "=", "null", ";", "if", "(", "obsolete", ")", "{", "// obsolete is always split", "String", "middle", "=", "pdbId", ".", "substring", "(", "1", ",",...
Gets the directory in which the file for a given MMCIF file would live, creating it if necessary. The obsolete parameter is necessary to avoid additional server queries. @param pdbId @param obsolete Whether the pdbId is obsolete or not @return File pointing to the directory,
[ "Gets", "the", "directory", "in", "which", "the", "file", "for", "a", "given", "MMCIF", "file", "would", "live", "creating", "it", "if", "necessary", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/LocalPDBDirectory.java#L612-L632
find-sec-bugs/find-sec-bugs
findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/injection/AbstractInjectionDetector.java
AbstractInjectionDetector.getPriorityFromTaintFrame
protected int getPriorityFromTaintFrame(TaintFrame fact, int offset) throws DataflowAnalysisException { """ The default implementation of <code>getPriorityFromTaintFrame()</code> can be overridden if the detector must base its priority on multiple parameters or special conditions like constant values....
java
protected int getPriorityFromTaintFrame(TaintFrame fact, int offset) throws DataflowAnalysisException { Taint parameterTaint = fact.getStackValue(offset); return getPriority(parameterTaint); }
[ "protected", "int", "getPriorityFromTaintFrame", "(", "TaintFrame", "fact", ",", "int", "offset", ")", "throws", "DataflowAnalysisException", "{", "Taint", "parameterTaint", "=", "fact", ".", "getStackValue", "(", "offset", ")", ";", "return", "getPriority", "(", ...
The default implementation of <code>getPriorityFromTaintFrame()</code> can be overridden if the detector must base its priority on multiple parameters or special conditions like constant values. By default, this method will call the <code>getPriority()</code> method with the parameter taint at the specified offset. @...
[ "The", "default", "implementation", "of", "<code", ">", "getPriorityFromTaintFrame", "()", "<", "/", "code", ">", "can", "be", "overridden", "if", "the", "detector", "must", "base", "its", "priority", "on", "multiple", "parameters", "or", "special", "conditions"...
train
https://github.com/find-sec-bugs/find-sec-bugs/blob/362da013cef4925e6a1506dd3511fe5bdcc5fba3/findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/injection/AbstractInjectionDetector.java#L121-L125
fcrepo3/fcrepo
fcrepo-common/src/main/java/org/fcrepo/utilities/xml/DOM.java
DOM.selectInteger
public static Integer selectInteger(Node node, String xpath, Integer defaultValue) { """ Extract an integer value from {@code node} or return {@code defaultValue} if it is not found. @param node the node with the wanted attribute. @param xpath the XPath to extract. @param defaultValue the defa...
java
public static Integer selectInteger(Node node, String xpath, Integer defaultValue) { return selector.selectInteger(node, xpath, defaultValue); }
[ "public", "static", "Integer", "selectInteger", "(", "Node", "node", ",", "String", "xpath", ",", "Integer", "defaultValue", ")", "{", "return", "selector", ".", "selectInteger", "(", "node", ",", "xpath", ",", "defaultValue", ")", ";", "}" ]
Extract an integer value from {@code node} or return {@code defaultValue} if it is not found. @param node the node with the wanted attribute. @param xpath the XPath to extract. @param defaultValue the default value. @return the value of the path, if existing, else defaultValue
[ "Extract", "an", "integer", "value", "from", "{", "@code", "node", "}", "or", "return", "{", "@code", "defaultValue", "}", "if", "it", "is", "not", "found", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/utilities/xml/DOM.java#L218-L220
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newUnsupportedOperationException
public static UnsupportedOperationException newUnsupportedOperationException(String message, Object... args) { """ Constructs and initializes a new {@link UnsupportedOperationException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} desc...
java
public static UnsupportedOperationException newUnsupportedOperationException(String message, Object... args) { return newUnsupportedOperationException(null, message, args); }
[ "public", "static", "UnsupportedOperationException", "newUnsupportedOperationException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newUnsupportedOperationException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link UnsupportedOperationException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link UnsupportedOperationException exception}. @param args {@link Object[] arguments} used to replace format p...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "UnsupportedOperationException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L253-L255
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.setSubscribedResourceAsDeleted
public void setSubscribedResourceAsDeleted(CmsRequestContext context, String poolName, CmsResource resource) throws CmsException { """ Marks a subscribed resource as deleted.<p> @param context the request context @param poolName the name of the database pool to use @param resource the subscribed resource ...
java
public void setSubscribedResourceAsDeleted(CmsRequestContext context, String poolName, CmsResource resource) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.setSubscribedResourceAsDeleted(dbc, poolName, resource); } catch ...
[ "public", "void", "setSubscribedResourceAsDeleted", "(", "CmsRequestContext", "context", ",", "String", "poolName", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context",...
Marks a subscribed resource as deleted.<p> @param context the request context @param poolName the name of the database pool to use @param resource the subscribed resource to mark as deleted @throws CmsException if something goes wrong
[ "Marks", "a", "subscribed", "resource", "as", "deleted", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6104-L6122
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java
JTSGeometryExpressions.asJTSGeometry
public static <T extends Geometry> JTSGeometryExpression<T> asJTSGeometry( Expression<T> expr) { """ Create a new JTSGeometryExpression @param expr Expression of type Geometry @return new JTSGeometryExpression """ Expression<T> underlyingMixin = ExpressionUtils.extract(expr); re...
java
public static <T extends Geometry> JTSGeometryExpression<T> asJTSGeometry( Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); return new JTSGeometryExpression<T>(underlyingMixin) { private static final long serialVersionUID = -671404400557042000...
[ "public", "static", "<", "T", "extends", "Geometry", ">", "JTSGeometryExpression", "<", "T", ">", "asJTSGeometry", "(", "Expression", "<", "T", ">", "expr", ")", "{", "Expression", "<", "T", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", "("...
Create a new JTSGeometryExpression @param expr Expression of type Geometry @return new JTSGeometryExpression
[ "Create", "a", "new", "JTSGeometryExpression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/jts/JTSGeometryExpressions.java#L268-L281
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/Assert.java
Assert.isInstanceOf
public static void isInstanceOf(Object obj, Class<?> type, RuntimeException cause) { """ Asserts that the given {@link Object} is an instance of the specified {@link Class type}. The assertion holds if and only if the {@link Object} is not {@literal null} and is an instance of the specified {@link Class type}....
java
public static void isInstanceOf(Object obj, Class<?> type, RuntimeException cause) { if (isNotInstanceOf(obj, type)) { throw cause; } }
[ "public", "static", "void", "isInstanceOf", "(", "Object", "obj", ",", "Class", "<", "?", ">", "type", ",", "RuntimeException", "cause", ")", "{", "if", "(", "isNotInstanceOf", "(", "obj", ",", "type", ")", ")", "{", "throw", "cause", ";", "}", "}" ]
Asserts that the given {@link Object} is an instance of the specified {@link Class type}. The assertion holds if and only if the {@link Object} is not {@literal null} and is an instance of the specified {@link Class type}. This assertion functions exactly the same as the Java {@literal instanceof} operator. @param o...
[ "Asserts", "that", "the", "given", "{", "@link", "Object", "}", "is", "an", "instance", "of", "the", "specified", "{", "@link", "Class", "type", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L757-L761
ThreeTen/threetenbp
src/main/java/org/threeten/bp/Duration.java
Duration.plus
public Duration plus(long amountToAdd, TemporalUnit unit) { """ Returns a copy of this duration with the specified duration added. <p> The duration amount is measured in terms of the specified unit. Only a subset of units are accepted by this method. The unit must either have an {@link TemporalUnit#isDurationE...
java
public Duration plus(long amountToAdd, TemporalUnit unit) { Jdk8Methods.requireNonNull(unit, "unit"); if (unit == DAYS) { return plus(Jdk8Methods.safeMultiply(amountToAdd, SECONDS_PER_DAY), 0); } if (unit.isDurationEstimated()) { throw new DateTimeException("Unit ...
[ "public", "Duration", "plus", "(", "long", "amountToAdd", ",", "TemporalUnit", "unit", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "unit", ",", "\"unit\"", ")", ";", "if", "(", "unit", "==", "DAYS", ")", "{", "return", "plus", "(", "Jdk8Methods", ...
Returns a copy of this duration with the specified duration added. <p> The duration amount is measured in terms of the specified unit. Only a subset of units are accepted by this method. The unit must either have an {@link TemporalUnit#isDurationEstimated() exact duration} or be {@link ChronoUnit#DAYS} which is treated...
[ "Returns", "a", "copy", "of", "this", "duration", "with", "the", "specified", "duration", "added", ".", "<p", ">", "The", "duration", "amount", "is", "measured", "in", "terms", "of", "the", "specified", "unit", ".", "Only", "a", "subset", "of", "units", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/Duration.java#L635-L657
twitter/cloudhopper-commons
ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java
SslContextFactory.loadKeyStore
protected KeyStore loadKeyStore() throws Exception { """ Override this method to provide alternate way to load a keystore. @return the key store instance @throws Exception """ return getKeyStore(keyStoreInputStream, sslConfig.getKeyStorePath(), sslConfig.getKeyStoreType(), sslConfig.getKeySto...
java
protected KeyStore loadKeyStore() throws Exception { return getKeyStore(keyStoreInputStream, sslConfig.getKeyStorePath(), sslConfig.getKeyStoreType(), sslConfig.getKeyStoreProvider(), sslConfig.getKeyStorePassword()); }
[ "protected", "KeyStore", "loadKeyStore", "(", ")", "throws", "Exception", "{", "return", "getKeyStore", "(", "keyStoreInputStream", ",", "sslConfig", ".", "getKeyStorePath", "(", ")", ",", "sslConfig", ".", "getKeyStoreType", "(", ")", ",", "sslConfig", ".", "ge...
Override this method to provide alternate way to load a keystore. @return the key store instance @throws Exception
[ "Override", "this", "method", "to", "provide", "alternate", "way", "to", "load", "a", "keystore", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java#L183-L187
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/StringFunctions.java
StringFunctions.rtrim
public static Expression rtrim(Expression expression, String characters) { """ Returned expression results in the string with all trailing chars removed (any char in the characters string). """ return x("RTRIM(" + expression.toString() + ", \"" + characters + "\")"); }
java
public static Expression rtrim(Expression expression, String characters) { return x("RTRIM(" + expression.toString() + ", \"" + characters + "\")"); }
[ "public", "static", "Expression", "rtrim", "(", "Expression", "expression", ",", "String", "characters", ")", "{", "return", "x", "(", "\"RTRIM(\"", "+", "expression", ".", "toString", "(", ")", "+", "\", \\\"\"", "+", "characters", "+", "\"\\\")\"", ")", ";...
Returned expression results in the string with all trailing chars removed (any char in the characters string).
[ "Returned", "expression", "results", "in", "the", "string", "with", "all", "trailing", "chars", "removed", "(", "any", "char", "in", "the", "characters", "string", ")", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/StringFunctions.java#L217-L219
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/scientific/ColorImg.java
ColorImg.interpolateBilinear
private static double interpolateBilinear(final double c00, final double c01, final double c10, final double c11, final double mx, final double my) { """ /* bilinear interpolation between values c00 c01 c10 c11 at position mx my (in [0,1]) """ return (c00*(1.0-mx)+c10*(mx))*(1.0-my) + (c01*(1.0-mx)+c11*(mx))...
java
private static double interpolateBilinear(final double c00, final double c01, final double c10, final double c11, final double mx, final double my){ return (c00*(1.0-mx)+c10*(mx))*(1.0-my) + (c01*(1.0-mx)+c11*(mx))*(my); }
[ "private", "static", "double", "interpolateBilinear", "(", "final", "double", "c00", ",", "final", "double", "c01", ",", "final", "double", "c10", ",", "final", "double", "c11", ",", "final", "double", "mx", ",", "final", "double", "my", ")", "{", "return"...
/* bilinear interpolation between values c00 c01 c10 c11 at position mx my (in [0,1])
[ "/", "*", "bilinear", "interpolation", "between", "values", "c00", "c01", "c10", "c11", "at", "position", "mx", "my", "(", "in", "[", "0", "1", "]", ")" ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/scientific/ColorImg.java#L821-L823
vert-x3/vertx-jca
rar/src/main/java/io/vertx/resourceadapter/impl/VertxManagedConnectionFactory.java
VertxManagedConnectionFactory.createManagedConnection
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException { """ Creates a new physical connection to the underlying EIS resource manager. @param subject Caller's security information @param cxRequestInfo Additional resource adapter s...
java
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException { VertxPlatformFactory.instance().getOrCreateVertx(getVertxPlatformConfig(), this); return new VertxManagedConnection(this, this.vertx); }
[ "public", "ManagedConnection", "createManagedConnection", "(", "Subject", "subject", ",", "ConnectionRequestInfo", "cxRequestInfo", ")", "throws", "ResourceException", "{", "VertxPlatformFactory", ".", "instance", "(", ")", ".", "getOrCreateVertx", "(", "getVertxPlatformCon...
Creates a new physical connection to the underlying EIS resource manager. @param subject Caller's security information @param cxRequestInfo Additional resource adapter specific connection request information @throws ResourceException generic exception @return ManagedConnection instance
[ "Creates", "a", "new", "physical", "connection", "to", "the", "underlying", "EIS", "resource", "manager", "." ]
train
https://github.com/vert-x3/vertx-jca/blob/605a5558a14941f5afa6e16e58337593f6ae0e8d/rar/src/main/java/io/vertx/resourceadapter/impl/VertxManagedConnectionFactory.java#L90-L94
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java
UnrelatedCollectionContents.mergeItem
private void mergeItem(final Set<String> supers, final Set<SourceLineAnnotation> sla, final OpcodeStack.Item addItm) throws ClassNotFoundException { """ intersects the set of possible superclass that this collection might have seen before with this one. If we find that there is no commonality between superclasses...
java
private void mergeItem(final Set<String> supers, final Set<SourceLineAnnotation> sla, final OpcodeStack.Item addItm) throws ClassNotFoundException { if (supers.isEmpty()) { return; } Set<String> s = new HashSet<>(); addNewItem(s, addItm); if (s.isEmpty()) { ...
[ "private", "void", "mergeItem", "(", "final", "Set", "<", "String", ">", "supers", ",", "final", "Set", "<", "SourceLineAnnotation", ">", "sla", ",", "final", "OpcodeStack", ".", "Item", "addItm", ")", "throws", "ClassNotFoundException", "{", "if", "(", "sup...
intersects the set of possible superclass that this collection might have seen before with this one. If we find that there is no commonality between superclasses, report it as a bug. @param supers the collection of possible superclass/interfaces that has been seen for this collection thus far @param sla the location o...
[ "intersects", "the", "set", "of", "possible", "superclass", "that", "this", "collection", "might", "have", "seen", "before", "with", "this", "one", ".", "If", "we", "find", "that", "there", "is", "no", "commonality", "between", "superclasses", "report", "it", ...
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/UnrelatedCollectionContents.java#L245-L273
grpc/grpc-java
examples/example-gauth/src/main/java/io/grpc/examples/googleAuth/GoogleAuthClient.java
GoogleAuthClient.main
public static void main(String[] args) throws Exception { """ The app requires 2 arguments as described in @see <a href="../../../../../../GOOGLE_AUTH_EXAMPLE.md">Google Auth Example README</a> arg0 = location of the JSON file for the service account you created in the GCP console arg1 = project name in the f...
java
public static void main(String[] args) throws Exception { if (args.length < 2) { logger.severe("Usage: please pass 2 arguments:\n" + "arg0 = location of the JSON file for the service account you created in the GCP console\n" + "arg1 = project name in the form \"projects...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "if", "(", "args", ".", "length", "<", "2", ")", "{", "logger", ".", "severe", "(", "\"Usage: please pass 2 arguments:\\n\"", "+", "\"arg0 = location of the J...
The app requires 2 arguments as described in @see <a href="../../../../../../GOOGLE_AUTH_EXAMPLE.md">Google Auth Example README</a> arg0 = location of the JSON file for the service account you created in the GCP console arg1 = project name in the form "projects/balmy-cirrus-225307" where "balmy-cirrus-225307" is the p...
[ "The", "app", "requires", "2", "arguments", "as", "described", "in", "@see", "<a", "href", "=", "..", "/", "..", "/", "..", "/", "..", "/", "..", "/", "..", "/", "GOOGLE_AUTH_EXAMPLE", ".", "md", ">", "Google", "Auth", "Example", "README<", "/", "a",...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/examples/example-gauth/src/main/java/io/grpc/examples/googleAuth/GoogleAuthClient.java#L111-L133
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.installationTemplate_templateName_partitionScheme_schemeName_partition_POST
public void installationTemplate_templateName_partitionScheme_schemeName_partition_POST(String templateName, String schemeName, OvhTemplateOsFileSystemEnum filesystem, String mountpoint, Long raid, Long size, Long step, OvhTemplatePartitionTypeEnum type, String volumeName) throws IOException { """ Add a partition ...
java
public void installationTemplate_templateName_partitionScheme_schemeName_partition_POST(String templateName, String schemeName, OvhTemplateOsFileSystemEnum filesystem, String mountpoint, Long raid, Long size, Long step, OvhTemplatePartitionTypeEnum type, String volumeName) throws IOException { String qPath = "/me/ins...
[ "public", "void", "installationTemplate_templateName_partitionScheme_schemeName_partition_POST", "(", "String", "templateName", ",", "String", "schemeName", ",", "OvhTemplateOsFileSystemEnum", "filesystem", ",", "String", "mountpoint", ",", "Long", "raid", ",", "Long", "size"...
Add a partition in this partitioning scheme REST: POST /me/installationTemplate/{templateName}/partitionScheme/{schemeName}/partition @param type [required] @param volumeName [required] The volume name needed for proxmox distribution @param raid [required] @param mountpoint [required] partition mount point @param size...
[ "Add", "a", "partition", "in", "this", "partitioning", "scheme" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L3649-L3661
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java
DatabaseBlobAuditingPoliciesInner.createOrUpdateAsync
public Observable<DatabaseBlobAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { """ Creates or updates a database's blob auditing policy. @param resourceGroupName The name of the resource group that contains t...
java
public Observable<DatabaseBlobAuditingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseBlobAuditingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceRespo...
[ "public", "Observable", "<", "DatabaseBlobAuditingPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "DatabaseBlobAuditingPolicyInner", "parameters", ")", "{", "return", "createOrUpd...
Creates or updates a database's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param parameter...
[ "Creates", "or", "updates", "a", "database", "s", "blob", "auditing", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseBlobAuditingPoliciesInner.java#L202-L209
facebookarchive/hadoop-20
src/contrib/capacity-scheduler/src/java/org/apache/hadoop/mapred/CapacitySchedulerConf.java
CapacitySchedulerConf.setMaxCapacity
public void setMaxCapacity(String queue,float maxCapacity) { """ Sets the maxCapacity of the given queue. @param queue name of the queue @param maxCapacity percent of the cluster for the queue. """ rmConf.setFloat( toFullPropertyName(queue, MAX_CAPACITY_PROPERTY), maxCapacity); }
java
public void setMaxCapacity(String queue,float maxCapacity) { rmConf.setFloat( toFullPropertyName(queue, MAX_CAPACITY_PROPERTY), maxCapacity); }
[ "public", "void", "setMaxCapacity", "(", "String", "queue", ",", "float", "maxCapacity", ")", "{", "rmConf", ".", "setFloat", "(", "toFullPropertyName", "(", "queue", ",", "MAX_CAPACITY_PROPERTY", ")", ",", "maxCapacity", ")", ";", "}" ]
Sets the maxCapacity of the given queue. @param queue name of the queue @param maxCapacity percent of the cluster for the queue.
[ "Sets", "the", "maxCapacity", "of", "the", "given", "queue", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/capacity-scheduler/src/java/org/apache/hadoop/mapred/CapacitySchedulerConf.java#L228-L231
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java
WordReplacer.replaceWord
public static String replaceWord(String input, String word, String replace) { """ Replace all occurrences of word by replace in the input. The replacement happens only if the word to replace is separated from others words, that is, it's not part of a word. The implementation is that the previous and next charact...
java
public static String replaceWord(String input, String word, String replace) { StringBuilder sb = new StringBuilder(input); replaceWord(sb, word, replace); return sb.toString(); }
[ "public", "static", "String", "replaceWord", "(", "String", "input", ",", "String", "word", ",", "String", "replace", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "input", ")", ";", "replaceWord", "(", "sb", ",", "word", ",", "replace...
Replace all occurrences of word by replace in the input. The replacement happens only if the word to replace is separated from others words, that is, it's not part of a word. The implementation is that the previous and next characters of the word must be a {@link Character#isLetterOrDigit(char)} char. @param input text...
[ "Replace", "all", "occurrences", "of", "word", "by", "replace", "in", "the", "input", ".", "The", "replacement", "happens", "only", "if", "the", "word", "to", "replace", "is", "separated", "from", "others", "words", "that", "is", "it", "s", "not", "part", ...
train
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java#L79-L83
jhy/jsoup
src/main/java/org/jsoup/select/Selector.java
Selector.filterOut
static Elements filterOut(Collection<Element> elements, Collection<Element> outs) { """ exclude set. package open so that Elements can implement .not() selector. """ Elements output = new Elements(); for (Element el : elements) { boolean found = false; for (Element out :...
java
static Elements filterOut(Collection<Element> elements, Collection<Element> outs) { Elements output = new Elements(); for (Element el : elements) { boolean found = false; for (Element out : outs) { if (el.equals(out)) { found = true; ...
[ "static", "Elements", "filterOut", "(", "Collection", "<", "Element", ">", "elements", ",", "Collection", "<", "Element", ">", "outs", ")", "{", "Elements", "output", "=", "new", "Elements", "(", ")", ";", "for", "(", "Element", "el", ":", "elements", ")...
exclude set. package open so that Elements can implement .not() selector.
[ "exclude", "set", ".", "package", "open", "so", "that", "Elements", "can", "implement", ".", "not", "()", "selector", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/select/Selector.java#L135-L149
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/io/MPIO.java
MPIO.sendToMe
public void sendToMe(SIBUuid8 targetME, int priority, AbstractMessage aMessage) { """ Send a ControlMessage to one specific ME @param aMessage The ControlMessage to be sent @param priority The priority at which to send the message @param targetME The ME to send the message to """ if (TraceComponent.is...
java
public void sendToMe(SIBUuid8 targetME, int priority, AbstractMessage aMessage) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "sendToMe", new Object[] { aMessage, Integer.valueOf(priority), targetME }); // find an appropriate MPConnection MPConnection firstCho...
[ "public", "void", "sendToMe", "(", "SIBUuid8", "targetME", ",", "int", "priority", ",", "AbstractMessage", "aMessage", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", "."...
Send a ControlMessage to one specific ME @param aMessage The ControlMessage to be sent @param priority The priority at which to send the message @param targetME The ME to send the message to
[ "Send", "a", "ControlMessage", "to", "one", "specific", "ME" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/io/MPIO.java#L502-L531
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/api/Table.java
Table.columnIndex
public int columnIndex(String columnName) { """ Returns the index of the column with the given name @throws IllegalArgumentException if the input string is not the name of any column in the table """ int columnIndex = -1; for (int i = 0; i < columnList.size(); i++) { if (columnLi...
java
public int columnIndex(String columnName) { int columnIndex = -1; for (int i = 0; i < columnList.size(); i++) { if (columnList.get(i).name().equalsIgnoreCase(columnName)) { columnIndex = i; break; } } if (columnIndex == -1) { ...
[ "public", "int", "columnIndex", "(", "String", "columnName", ")", "{", "int", "columnIndex", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "columnList", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "columnLis...
Returns the index of the column with the given name @throws IllegalArgumentException if the input string is not the name of any column in the table
[ "Returns", "the", "index", "of", "the", "column", "with", "the", "given", "name" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/api/Table.java#L341-L353
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java
JsApiMessageImpl.getOtherUserPropertyMap
final JsMsgMap getOtherUserPropertyMap() { """ Helper method used by the main Message Property methods to obtain the non-JMS-valid Property items in the form of a map. <p> The method has package level visibility as it is used by JsJmsMessageImpl, JsSdoMessageimpl and MQJsJmsMessageEncoderImpl. @return A JsM...
java
final JsMsgMap getOtherUserPropertyMap() { if (otherUserPropertyMap == null) { List<String> keys = (List<String>) getApi().getField(JsApiAccess.OTHERPROPERTY_NAME); List<Object> values = (List<Object>) getApi().getField(JsApiAccess.OTHERPROPERTY_VALUE); otherUserPropertyMap =...
[ "final", "JsMsgMap", "getOtherUserPropertyMap", "(", ")", "{", "if", "(", "otherUserPropertyMap", "==", "null", ")", "{", "List", "<", "String", ">", "keys", "=", "(", "List", "<", "String", ">", ")", "getApi", "(", ")", ".", "getField", "(", "JsApiAcces...
Helper method used by the main Message Property methods to obtain the non-JMS-valid Property items in the form of a map. <p> The method has package level visibility as it is used by JsJmsMessageImpl, JsSdoMessageimpl and MQJsJmsMessageEncoderImpl. @return A JsMsgMap containing the Message Property name-value pairs.
[ "Helper", "method", "used", "by", "the", "main", "Message", "Property", "methods", "to", "obtain", "the", "non", "-", "JMS", "-", "valid", "Property", "items", "in", "the", "form", "of", "a", "map", ".", "<p", ">", "The", "method", "has", "package", "l...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java#L854-L861
moparisthebest/beehive
beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/parser/ReflectionFragment.java
ReflectionFragment.getPreparedStatementText
protected String getPreparedStatementText(ControlBeanContext context, Method m, Object[] args) { """ Return text generated by this fragment for a PreparedStatement @param context A ControlBeanContext instance. @param m The annotated method. @param args The method's parameters @return Always returns ...
java
protected String getPreparedStatementText(ControlBeanContext context, Method m, Object[] args) { // this reflection fragment may resolve to a JdbcControl.ComplexSqlFragment // if so it changes the behavior a bit. Object val = getParameterValue(context, m, args); if (val instanceof JdbcCo...
[ "protected", "String", "getPreparedStatementText", "(", "ControlBeanContext", "context", ",", "Method", "m", ",", "Object", "[", "]", "args", ")", "{", "// this reflection fragment may resolve to a JdbcControl.ComplexSqlFragment", "// if so it changes the behavior a bit.", "Objec...
Return text generated by this fragment for a PreparedStatement @param context A ControlBeanContext instance. @param m The annotated method. @param args The method's parameters @return Always returns a PREPARED_STATEMENT_SUB_MARK
[ "Return", "text", "generated", "by", "this", "fragment", "for", "a", "PreparedStatement" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/parser/ReflectionFragment.java#L81-L90
apache/groovy
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
StaticTypeCheckingVisitor.pushInstanceOfTypeInfo
protected void pushInstanceOfTypeInfo(final Expression objectOfInstanceOf, final Expression typeExpression) { """ Stores information about types when [objectOfInstanceof instanceof typeExpression] is visited @param objectOfInstanceOf the expression which must be checked against instanceof @param typeExpression...
java
protected void pushInstanceOfTypeInfo(final Expression objectOfInstanceOf, final Expression typeExpression) { final Map<Object, List<ClassNode>> tempo = typeCheckingContext.temporaryIfBranchTypeInformation.peek(); Object key = extractTemporaryTypeInfoKey(objectOfInstanceOf); List<ClassNode> pote...
[ "protected", "void", "pushInstanceOfTypeInfo", "(", "final", "Expression", "objectOfInstanceOf", ",", "final", "Expression", "typeExpression", ")", "{", "final", "Map", "<", "Object", ",", "List", "<", "ClassNode", ">", ">", "tempo", "=", "typeCheckingContext", "....
Stores information about types when [objectOfInstanceof instanceof typeExpression] is visited @param objectOfInstanceOf the expression which must be checked against instanceof @param typeExpression the expression which represents the target type
[ "Stores", "information", "about", "types", "when", "[", "objectOfInstanceof", "instanceof", "typeExpression", "]", "is", "visited" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java#L1153-L1162
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java
LoggerOddities.visitCode
@Override public void visitCode(Code obj) { """ implements the visitor to reset the stack @param obj the context object of the currently parsed code block """ stack.resetForMethodEntry(this); Method m = getMethod(); if (Values.CONSTRUCTOR.equals(m.getName())) { for (...
java
@Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); Method m = getMethod(); if (Values.CONSTRUCTOR.equals(m.getName())) { for (String parmSig : SignatureUtils.getParameterSignatures(m.getSignature())) { if (SignatureUtils.classToSignature(...
[ "@", "Override", "public", "void", "visitCode", "(", "Code", "obj", ")", "{", "stack", ".", "resetForMethodEntry", "(", "this", ")", ";", "Method", "m", "=", "getMethod", "(", ")", ";", "if", "(", "Values", ".", "CONSTRUCTOR", ".", "equals", "(", "m", ...
implements the visitor to reset the stack @param obj the context object of the currently parsed code block
[ "implements", "the", "visitor", "to", "reset", "the", "stack" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/LoggerOddities.java#L154-L169
javers/javers
javers-core/src/main/java/org/javers/core/Changes.java
Changes.groupByCommit
public List<ChangesByCommit> groupByCommit() { """ Changes grouped by commits. <br/> When formatting a changelog, usually you need to group changes by commits and then by objects. <br/><br/> For example, this changelog: <pre> commit 2.0 changes on Employee/Frodo : - ValueChange{ 'salary' changed from ...
java
public List<ChangesByCommit> groupByCommit() { Map<CommitMetadata, List<Change>> changesByCommit = changes.stream().collect( groupingBy(c -> c.getCommitMetadata().orElseThrow( () -> new IllegalStateException("No CommitMetadata in this Change")), () -> new LinkedHashMap...
[ "public", "List", "<", "ChangesByCommit", ">", "groupByCommit", "(", ")", "{", "Map", "<", "CommitMetadata", ",", "List", "<", "Change", ">", ">", "changesByCommit", "=", "changes", ".", "stream", "(", ")", ".", "collect", "(", "groupingBy", "(", "c", "-...
Changes grouped by commits. <br/> When formatting a changelog, usually you need to group changes by commits and then by objects. <br/><br/> For example, this changelog: <pre> commit 2.0 changes on Employee/Frodo : - ValueChange{ 'salary' changed from '10000' to '11000' } - ListChange{ 'subordinates' collection change...
[ "Changes", "grouped", "by", "commits", ".", "<br", "/", ">" ]
train
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/Changes.java#L84-L95
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/CommonDatabaseMetaData.java
CommonDatabaseMetaData.getSuperTypes
public ResultSet getSuperTypes(final String catalog, final String schemaPattern, final String typeNamePattern) throws SQLException { """ Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database. Only the immediate super type/ sub type relationship is model...
java
public ResultSet getSuperTypes(final String catalog, final String schemaPattern, final String typeNamePattern) throws SQLException { log.info("getting empty result set, get super types"); return getEmptyResultSet(); }
[ "public", "ResultSet", "getSuperTypes", "(", "final", "String", "catalog", ",", "final", "String", "schemaPattern", ",", "final", "String", "typeNamePattern", ")", "throws", "SQLException", "{", "log", ".", "info", "(", "\"getting empty result set, get super types\"", ...
Retrieves a description of the user-defined type (UDT) hierarchies defined in a particular schema in this database. Only the immediate super type/ sub type relationship is modeled. <p/> Only supertype information for UDTs matching the catalog, schema, and type name is returned. The type name parameter may be a fully-qu...
[ "Retrieves", "a", "description", "of", "the", "user", "-", "defined", "type", "(", "UDT", ")", "hierarchies", "defined", "in", "a", "particular", "schema", "in", "this", "database", ".", "Only", "the", "immediate", "super", "type", "/", "sub", "type", "rel...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/CommonDatabaseMetaData.java#L2299-L2302
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java
PrivacyListManager.getPrivacyList
public PrivacyList getPrivacyList(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Answer the privacy list items under listName with the allowed and blocked permissions. @param listName the name of the list to get the allowed and blocked permissi...
java
public PrivacyList getPrivacyList(String listName) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { listName = StringUtils.requireNotNullNorEmpty(listName, "List name must not be null"); return new PrivacyList(false, false, listName, getPrivacyListItems(list...
[ "public", "PrivacyList", "getPrivacyList", "(", "String", "listName", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "listName", "=", "StringUtils", ".", "requireNotNullNorEmpty", "(", "list...
Answer the privacy list items under listName with the allowed and blocked permissions. @param listName the name of the list to get the allowed and blocked permissions. @return a privacy list under the list listName. @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws Interrupte...
[ "Answer", "the", "privacy", "list", "items", "under", "listName", "with", "the", "allowed", "and", "blocked", "permissions", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/privacy/PrivacyListManager.java#L401-L404
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/crdt/ReplicatedVectorClocks.java
ReplicatedVectorClocks.getReplicatedVectorClock
public Map<String, VectorClock> getReplicatedVectorClock(String serviceName, String memberUUID) { """ Returns the vector clocks for the given {@code serviceName} and {@code memberUUID}. The vector clock map contains mappings from CRDT name to the last successfully replicated CRDT vector clock. All CRDTs in this...
java
public Map<String, VectorClock> getReplicatedVectorClock(String serviceName, String memberUUID) { final ReplicatedVectorClockId id = new ReplicatedVectorClockId(serviceName, memberUUID); final Map<String, VectorClock> clocks = replicatedVectorClocks.get(id); return clocks != null ? clocks : Coll...
[ "public", "Map", "<", "String", ",", "VectorClock", ">", "getReplicatedVectorClock", "(", "String", "serviceName", ",", "String", "memberUUID", ")", "{", "final", "ReplicatedVectorClockId", "id", "=", "new", "ReplicatedVectorClockId", "(", "serviceName", ",", "membe...
Returns the vector clocks for the given {@code serviceName} and {@code memberUUID}. The vector clock map contains mappings from CRDT name to the last successfully replicated CRDT vector clock. All CRDTs in this map should be of the same type. If there are no vector clocks for the given parameters, this method returns a...
[ "Returns", "the", "vector", "clocks", "for", "the", "given", "{", "@code", "serviceName", "}", "and", "{", "@code", "memberUUID", "}", ".", "The", "vector", "clock", "map", "contains", "mappings", "from", "CRDT", "name", "to", "the", "last", "successfully", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/ReplicatedVectorClocks.java#L63-L67
mnlipp/jgrapes
org.jgrapes.http/src/org/jgrapes/http/HttpServer.java
HttpServer.onResponse
@Handler public void onResponse(Response event, WebAppMsgChannel appChannel) throws InterruptedException { """ Handles a response event from downstream by sending it through an {@link HttpResponseEncoder} that generates the data (encoded information) and sends it upstream with {@link Output} even...
java
@Handler public void onResponse(Response event, WebAppMsgChannel appChannel) throws InterruptedException { appChannel.handleResponse(event); }
[ "@", "Handler", "public", "void", "onResponse", "(", "Response", "event", ",", "WebAppMsgChannel", "appChannel", ")", "throws", "InterruptedException", "{", "appChannel", ".", "handleResponse", "(", "event", ")", ";", "}" ]
Handles a response event from downstream by sending it through an {@link HttpResponseEncoder} that generates the data (encoded information) and sends it upstream with {@link Output} events. Depending on whether the response has a body, subsequent {@link Output} events can follow. @param event the response event @throw...
[ "Handles", "a", "response", "event", "from", "downstream", "by", "sending", "it", "through", "an", "{", "@link", "HttpResponseEncoder", "}", "that", "generates", "the", "data", "(", "encoded", "information", ")", "and", "sends", "it", "upstream", "with", "{", ...
train
https://github.com/mnlipp/jgrapes/blob/8b5d874935d84c34a52d3e3d3745e869b5203fa0/org.jgrapes.http/src/org/jgrapes/http/HttpServer.java#L303-L307
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java
AjaxAddableTabbedPanel.newLink
protected WebMarkupContainer newLink(final String linkId, final int index) { """ Factory method for links used to switch between tabs. The created component is attached to the following markup. Label component with id: title will be added for you by the tabbed panel. <pre> &lt;a href=&quot;#&quot; wicket:i...
java
protected WebMarkupContainer newLink(final String linkId, final int index) { return new AjaxFallbackLink<Void>(linkId) { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override public void onClick(final AjaxRequestTarget targe...
[ "protected", "WebMarkupContainer", "newLink", "(", "final", "String", "linkId", ",", "final", "int", "index", ")", "{", "return", "new", "AjaxFallbackLink", "<", "Void", ">", "(", "linkId", ")", "{", "/** The Constant serialVersionUID. */", "private", "static", "f...
Factory method for links used to switch between tabs. The created component is attached to the following markup. Label component with id: title will be added for you by the tabbed panel. <pre> &lt;a href=&quot;#&quot; wicket:id=&quot;link&quot;&gt;&lt;span wicket:id=&quot;title&quot;&gt;[[tab title]]&lt;/span&gt;&lt;...
[ "Factory", "method", "for", "links", "used", "to", "switch", "between", "tabs", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/ajax/editable/tabs/AjaxAddableTabbedPanel.java#L463-L486
voldemort/voldemort
src/java/voldemort/store/bdb/BdbNativeBackup.java
BdbNativeBackup.cleanStaleFiles
private void cleanStaleFiles(File backupDir, AsyncOperationStatus status) { """ For recovery from the latest consistent snapshot, we should clean up the old files from the previous backup set, else we will fill the disk with useless log files @param backupDir """ String[] filesInEnv = env.getHome(...
java
private void cleanStaleFiles(File backupDir, AsyncOperationStatus status) { String[] filesInEnv = env.getHome().list(); String[] filesInBackupDir = backupDir.list(); if(filesInEnv != null && filesInBackupDir != null) { HashSet<String> envFileSet = new HashSet<String>(); f...
[ "private", "void", "cleanStaleFiles", "(", "File", "backupDir", ",", "AsyncOperationStatus", "status", ")", "{", "String", "[", "]", "filesInEnv", "=", "env", ".", "getHome", "(", ")", ".", "list", "(", ")", ";", "String", "[", "]", "filesInBackupDir", "="...
For recovery from the latest consistent snapshot, we should clean up the old files from the previous backup set, else we will fill the disk with useless log files @param backupDir
[ "For", "recovery", "from", "the", "latest", "consistent", "snapshot", "we", "should", "clean", "up", "the", "old", "files", "from", "the", "previous", "backup", "set", "else", "we", "will", "fill", "the", "disk", "with", "useless", "log", "files" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/bdb/BdbNativeBackup.java#L211-L227