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
resilience4j/resilience4j
resilience4j-metrics/src/main/java/io/github/resilience4j/metrics/RateLimiterMetrics.java
RateLimiterMetrics.ofRateLimiterRegistry
public static RateLimiterMetrics ofRateLimiterRegistry(String prefix, RateLimiterRegistry rateLimiterRegistry) { """ Creates a new instance {@link RateLimiterMetrics} with specified metrics names prefix and a {@link RateLimiterRegistry} as a source. @param prefix the prefix of metrics names @para...
java
public static RateLimiterMetrics ofRateLimiterRegistry(String prefix, RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterMetrics(prefix, rateLimiterRegistry.getAllRateLimiters()); }
[ "public", "static", "RateLimiterMetrics", "ofRateLimiterRegistry", "(", "String", "prefix", ",", "RateLimiterRegistry", "rateLimiterRegistry", ")", "{", "return", "new", "RateLimiterMetrics", "(", "prefix", ",", "rateLimiterRegistry", ".", "getAllRateLimiters", "(", ")", ...
Creates a new instance {@link RateLimiterMetrics} with specified metrics names prefix and a {@link RateLimiterRegistry} as a source. @param prefix the prefix of metrics names @param rateLimiterRegistry the registry of rate limiters
[ "Creates", "a", "new", "instance", "{", "@link", "RateLimiterMetrics", "}", "with", "specified", "metrics", "names", "prefix", "and", "a", "{", "@link", "RateLimiterRegistry", "}", "as", "a", "source", "." ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-metrics/src/main/java/io/github/resilience4j/metrics/RateLimiterMetrics.java#L72-L74
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.getColumnSlice
public Iterable<DColumn> getColumnSlice(String storeName, String rowKey, String startCol, String endCol) { """ Get columns for the row with the given key in the given store. Columns range is defined by an interval [startCol, endCol]. Columns are returned as an Iterator of {@link DColumn}s. Empty iterator is retu...
java
public Iterable<DColumn> getColumnSlice(String storeName, String rowKey, String startCol, String endCol) { DRow row = new DRow(m_tenant, storeName, rowKey); return row.getColumns(startCol, endCol, 1024); }
[ "public", "Iterable", "<", "DColumn", ">", "getColumnSlice", "(", "String", "storeName", ",", "String", "rowKey", ",", "String", "startCol", ",", "String", "endCol", ")", "{", "DRow", "row", "=", "new", "DRow", "(", "m_tenant", ",", "storeName", ",", "rowK...
Get columns for the row with the given key in the given store. Columns range is defined by an interval [startCol, endCol]. Columns are returned as an Iterator of {@link DColumn}s. Empty iterator is returned if no row is found with the given key or no columns in the given interval found. @param storeName Name of store ...
[ "Get", "columns", "for", "the", "row", "with", "the", "given", "key", "in", "the", "given", "store", ".", "Columns", "range", "is", "defined", "by", "an", "interval", "[", "startCol", "endCol", "]", ".", "Columns", "are", "returned", "as", "an", "Iterato...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L258-L261
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.put
public JsonObject put(String name, boolean value) throws JsonException { """ Maps {@code name} to {@code value}, clobbering any existing name/value mapping with the same name. @return this object. """ return put(name, new JsonBoolean(value)); }
java
public JsonObject put(String name, boolean value) throws JsonException { return put(name, new JsonBoolean(value)); }
[ "public", "JsonObject", "put", "(", "String", "name", ",", "boolean", "value", ")", "throws", "JsonException", "{", "return", "put", "(", "name", ",", "new", "JsonBoolean", "(", "value", ")", ")", ";", "}" ]
Maps {@code name} to {@code value}, clobbering any existing name/value mapping with the same name. @return this object.
[ "Maps", "{", "@code", "name", "}", "to", "{", "@code", "value", "}", "clobbering", "any", "existing", "name", "/", "value", "mapping", "with", "the", "same", "name", "." ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L143-L145
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy_binding.java
vpnclientlessaccesspolicy_binding.get
public static vpnclientlessaccesspolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name . """ vpnclientlessaccesspolicy_binding obj = new vpnclientlessaccesspolicy_binding(); obj.set_name(name); vpnclien...
java
public static vpnclientlessaccesspolicy_binding get(nitro_service service, String name) throws Exception{ vpnclientlessaccesspolicy_binding obj = new vpnclientlessaccesspolicy_binding(); obj.set_name(name); vpnclientlessaccesspolicy_binding response = (vpnclientlessaccesspolicy_binding) obj.get_resource(service);...
[ "public", "static", "vpnclientlessaccesspolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "vpnclientlessaccesspolicy_binding", "obj", "=", "new", "vpnclientlessaccesspolicy_binding", "(", ")", ";", "obj", "....
Use this API to fetch vpnclientlessaccesspolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "vpnclientlessaccesspolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/vpn/vpnclientlessaccesspolicy_binding.java#L114-L119
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/TokenizerBase.java
TokenizerBase.debugLattice
public void debugLattice(OutputStream outputStream, String text) throws IOException { """ Writes the Viterbi lattice for the provided text to an output stream <p> The output is written in <a href="https://en.wikipedia.org/wiki/DOT_(graph_description_language)">DOT</a> format. <p> This method is not thread safe...
java
public void debugLattice(OutputStream outputStream, String text) throws IOException { ViterbiLattice lattice = viterbiBuilder.build(text); outputStream.write(viterbiFormatter.format(lattice).getBytes(StandardCharsets.UTF_8)); outputStream.flush(); }
[ "public", "void", "debugLattice", "(", "OutputStream", "outputStream", ",", "String", "text", ")", "throws", "IOException", "{", "ViterbiLattice", "lattice", "=", "viterbiBuilder", ".", "build", "(", "text", ")", ";", "outputStream", ".", "write", "(", "viterbiF...
Writes the Viterbi lattice for the provided text to an output stream <p> The output is written in <a href="https://en.wikipedia.org/wiki/DOT_(graph_description_language)">DOT</a> format. <p> This method is not thread safe @param outputStream output stream to write to @param text text to create lattice for @throws IO...
[ "Writes", "the", "Viterbi", "lattice", "for", "the", "provided", "text", "to", "an", "output", "stream", "<p", ">", "The", "output", "is", "written", "in", "<a", "href", "=", "https", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/TokenizerBase.java#L162-L167
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java
Collections.binarySearch
public static <T> int binarySearch(List<? extends Comparable<? super T>> list, T key) { """ Searches the specified list for the specified object using the binary search algorithm. The list must be sorted into ascending order according to the {@linkplain Comparable natural ordering} of its elements (as by t...
java
public static <T> int binarySearch(List<? extends Comparable<? super T>> list, T key) { if (list instanceof RandomAccess || list.size()<BINARYSEARCH_THRESHOLD) return Collections.indexedBinarySearch(list, key); else return Collections.iteratorBinarySearch(list, key); }
[ "public", "static", "<", "T", ">", "int", "binarySearch", "(", "List", "<", "?", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "list", ",", "T", "key", ")", "{", "if", "(", "list", "instanceof", "RandomAccess", "||", "list", ".", "size",...
Searches the specified list for the specified object using the binary search algorithm. The list must be sorted into ascending order according to the {@linkplain Comparable natural ordering} of its elements (as by the {@link #sort(List)} method) prior to making this call. If it is not sorted, the results are undefine...
[ "Searches", "the", "specified", "list", "for", "the", "specified", "object", "using", "the", "binary", "search", "algorithm", ".", "The", "list", "must", "be", "sorted", "into", "ascending", "order", "according", "to", "the", "{", "@linkplain", "Comparable", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L242-L248
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5DeleteFile.java
FineUploader5DeleteFile.addCustomHeader
@Nonnull public FineUploader5DeleteFile addCustomHeader (@Nonnull @Nonempty final String sKey, @Nonnull final String sValue) { """ Any additional headers to attach to all delete file requests. @param sKey Custom header name @param sValue Custom header value @return this """ ValueEnforcer.notEmpty ...
java
@Nonnull public FineUploader5DeleteFile addCustomHeader (@Nonnull @Nonempty final String sKey, @Nonnull final String sValue) { ValueEnforcer.notEmpty (sKey, "Key"); ValueEnforcer.notNull (sValue, "Value"); m_aDeleteFileCustomHeaders.put (sKey, sValue); return this; }
[ "@", "Nonnull", "public", "FineUploader5DeleteFile", "addCustomHeader", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sKey", ",", "@", "Nonnull", "final", "String", "sValue", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sKey", ",", "\"Key\"", ...
Any additional headers to attach to all delete file requests. @param sKey Custom header name @param sValue Custom header value @return this
[ "Any", "additional", "headers", "to", "attach", "to", "all", "delete", "file", "requests", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5DeleteFile.java#L98-L106
landawn/AbacusUtil
src/com/landawn/abacus/util/AnyDelete.java
AnyDelete.addColumn
public AnyDelete addColumn(String family, String qualifier) { """ Delete the latest version of the specified column. This is an expensive call in that on the server-side, it first does a get to find the latest versions timestamp. Then it adds a delete using the fetched cells timestamp. @param family @param...
java
public AnyDelete addColumn(String family, String qualifier) { delete.addColumn(toFamilyQualifierBytes(family), toFamilyQualifierBytes(qualifier)); return this; }
[ "public", "AnyDelete", "addColumn", "(", "String", "family", ",", "String", "qualifier", ")", "{", "delete", ".", "addColumn", "(", "toFamilyQualifierBytes", "(", "family", ")", ",", "toFamilyQualifierBytes", "(", "qualifier", ")", ")", ";", "return", "this", ...
Delete the latest version of the specified column. This is an expensive call in that on the server-side, it first does a get to find the latest versions timestamp. Then it adds a delete using the fetched cells timestamp. @param family @param qualifier @return
[ "Delete", "the", "latest", "version", "of", "the", "specified", "column", ".", "This", "is", "an", "expensive", "call", "in", "that", "on", "the", "server", "-", "side", "it", "first", "does", "a", "get", "to", "find", "the", "latest", "versions", "times...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/AnyDelete.java#L140-L144
ManuelPeinado/MultiChoiceAdapter
samples/actionbarsherlock/src/com/tjeannin/provigen/ProviGenProvider.java
ProviGenProvider.onUpgradeDatabase
public void onUpgradeDatabase(SQLiteDatabase database, int oldVersion, int newVersion) { """ Called when the database needs to be upgraded. </br></br> Call {@code super.onUpgradeDatabase(database, oldVersion, newVersion)} to: <ul> <li>Automatically add columns if some are missing.</li> <li>Automatically create...
java
public void onUpgradeDatabase(SQLiteDatabase database, int oldVersion, int newVersion) { for (ContractHolder contract : contracts) { if (!openHelper.hasTableInDatabase(database, contract)) { openHelper.createTable(database, contract); } else { openHelper.addMissingColumnsInTable(database, contract)...
[ "public", "void", "onUpgradeDatabase", "(", "SQLiteDatabase", "database", ",", "int", "oldVersion", ",", "int", "newVersion", ")", "{", "for", "(", "ContractHolder", "contract", ":", "contracts", ")", "{", "if", "(", "!", "openHelper", ".", "hasTableInDatabase",...
Called when the database needs to be upgraded. </br></br> Call {@code super.onUpgradeDatabase(database, oldVersion, newVersion)} to: <ul> <li>Automatically add columns if some are missing.</li> <li>Automatically create tables and needed columns for new added {@link Contract}s.</li> </ul> Anything else related to databa...
[ "Called", "when", "the", "database", "needs", "to", "be", "upgraded", ".", "<", "/", "br", ">", "<", "/", "br", ">", "Call", "{" ]
train
https://github.com/ManuelPeinado/MultiChoiceAdapter/blob/c733879f93b67ecf920f80bf7971af38d7212c9b/samples/actionbarsherlock/src/com/tjeannin/provigen/ProviGenProvider.java#L132-L140
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/AbstractCreator.java
AbstractCreator.getKeyDeserializerFromType
protected final JDeserializerType getKeyDeserializerFromType( JType type ) throws UnsupportedTypeException, UnableToCompleteException { """ Build the {@link JDeserializerType} that instantiate a {@link KeyDeserializer} for the given type. @param type type @return the {@link JDeserializerType}. @throws com.git...
java
protected final JDeserializerType getKeyDeserializerFromType( JType type ) throws UnsupportedTypeException, UnableToCompleteException { return getKeyDeserializerFromType( type, false, false ); }
[ "protected", "final", "JDeserializerType", "getKeyDeserializerFromType", "(", "JType", "type", ")", "throws", "UnsupportedTypeException", ",", "UnableToCompleteException", "{", "return", "getKeyDeserializerFromType", "(", "type", ",", "false", ",", "false", ")", ";", "}...
Build the {@link JDeserializerType} that instantiate a {@link KeyDeserializer} for the given type. @param type type @return the {@link JDeserializerType}. @throws com.github.nmorel.gwtjackson.rebind.exception.UnsupportedTypeException if any.
[ "Build", "the", "{", "@link", "JDeserializerType", "}", "that", "instantiate", "a", "{", "@link", "KeyDeserializer", "}", "for", "the", "given", "type", "." ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/AbstractCreator.java#L694-L696
foundation-runtime/logging
logging-api/src/main/java/com/cisco/oss/foundation/logging/transactions/TransactionLogger.java
TransactionLogger.writePropertiesToLog
protected void writePropertiesToLog(Logger logger, Level level) { """ Write 'properties' map to given log in given level - with pipe separator between each entry Write exception stack trace to 'logger' in 'error' level, if not empty @param logger @param level - of logging """ writeToLog(logger, level, g...
java
protected void writePropertiesToLog(Logger logger, Level level) { writeToLog(logger, level, getMapAsString(this.properties, separator), null); if (this.exception != null) { writeToLog(this.logger, Level.ERROR, "Error:", this.exception); } }
[ "protected", "void", "writePropertiesToLog", "(", "Logger", "logger", ",", "Level", "level", ")", "{", "writeToLog", "(", "logger", ",", "level", ",", "getMapAsString", "(", "this", ".", "properties", ",", "separator", ")", ",", "null", ")", ";", "if", "("...
Write 'properties' map to given log in given level - with pipe separator between each entry Write exception stack trace to 'logger' in 'error' level, if not empty @param logger @param level - of logging
[ "Write", "properties", "map", "to", "given", "log", "in", "given", "level", "-", "with", "pipe", "separator", "between", "each", "entry", "Write", "exception", "stack", "trace", "to", "logger", "in", "error", "level", "if", "not", "empty" ]
train
https://github.com/foundation-runtime/logging/blob/cd0a07b3c5b458ecf90ab92a1e0c72a067f5cbd6/logging-api/src/main/java/com/cisco/oss/foundation/logging/transactions/TransactionLogger.java#L363-L369
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/DateUtils.java
DateUtils.handleException
private static <E extends RuntimeException> E handleException(E ex) { """ Returns the original runtime exception iff the joda-time being used at runtime behaves as expected. @throws IllegalStateException if the joda-time being used at runtime doens't appear to be of the right version. """ if (Joda...
java
private static <E extends RuntimeException> E handleException(E ex) { if (JodaTime.hasExpectedBehavior()) return ex; throw new IllegalStateException("Joda-time 2.2 or later version is required, but found version: " + JodaTime.getVersion(), ex); }
[ "private", "static", "<", "E", "extends", "RuntimeException", ">", "E", "handleException", "(", "E", "ex", ")", "{", "if", "(", "JodaTime", ".", "hasExpectedBehavior", "(", ")", ")", "return", "ex", ";", "throw", "new", "IllegalStateException", "(", "\"Joda-...
Returns the original runtime exception iff the joda-time being used at runtime behaves as expected. @throws IllegalStateException if the joda-time being used at runtime doens't appear to be of the right version.
[ "Returns", "the", "original", "runtime", "exception", "iff", "the", "joda", "-", "time", "being", "used", "at", "runtime", "behaves", "as", "expected", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/DateUtils.java#L146-L150
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java
OffsetDateTime.now
public static OffsetDateTime now(Clock clock) { """ Obtains the current date-time from the specified clock. <p> This will query the specified clock to obtain the current date-time. The offset will be calculated from the time-zone in the clock. <p> Using this method allows the use of an alternate clock for tes...
java
public static OffsetDateTime now(Clock clock) { Objects.requireNonNull(clock, "clock"); final Instant now = clock.instant(); // called once return ofInstant(now, clock.getZone().getRules().getOffset(now)); }
[ "public", "static", "OffsetDateTime", "now", "(", "Clock", "clock", ")", "{", "Objects", ".", "requireNonNull", "(", "clock", ",", "\"clock\"", ")", ";", "final", "Instant", "now", "=", "clock", ".", "instant", "(", ")", ";", "// called once", "return", "o...
Obtains the current date-time from the specified clock. <p> This will query the specified clock to obtain the current date-time. The offset will be calculated from the time-zone in the clock. <p> Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using {@link Clock...
[ "Obtains", "the", "current", "date", "-", "time", "from", "the", "specified", "clock", ".", "<p", ">", "This", "will", "query", "the", "specified", "clock", "to", "obtain", "the", "current", "date", "-", "time", ".", "The", "offset", "will", "be", "calcu...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java#L238-L242
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
AbstractYarnClusterDescriptor.getYarnFilesDir
private Path getYarnFilesDir(final ApplicationId appId) throws IOException { """ Returns the Path where the YARN application files should be uploaded to. @param appId YARN application id """ final FileSystem fileSystem = FileSystem.get(yarnConfiguration); final Path homeDir = fileSystem.getHomeDirectory...
java
private Path getYarnFilesDir(final ApplicationId appId) throws IOException { final FileSystem fileSystem = FileSystem.get(yarnConfiguration); final Path homeDir = fileSystem.getHomeDirectory(); return new Path(homeDir, ".flink/" + appId + '/'); }
[ "private", "Path", "getYarnFilesDir", "(", "final", "ApplicationId", "appId", ")", "throws", "IOException", "{", "final", "FileSystem", "fileSystem", "=", "FileSystem", ".", "get", "(", "yarnConfiguration", ")", ";", "final", "Path", "homeDir", "=", "fileSystem", ...
Returns the Path where the YARN application files should be uploaded to. @param appId YARN application id
[ "Returns", "the", "Path", "where", "the", "YARN", "application", "files", "should", "be", "uploaded", "to", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java#L1059-L1063
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java
MailService.findMessages
public List<MailMessage> findMessages(final MailAccount mailAccount, final Predicate<MailMessage> condition, final long timeoutSeconds, final long sleepMillis) { """ <p> Tries to find messages for the specified mail account applying the specified {@code condition} until it times out using the specified {@code...
java
public List<MailMessage> findMessages(final MailAccount mailAccount, final Predicate<MailMessage> condition, final long timeoutSeconds, final long sleepMillis) { return findMessages(mailAccount, condition, timeoutSeconds, sleepMillis, true, -1); }
[ "public", "List", "<", "MailMessage", ">", "findMessages", "(", "final", "MailAccount", "mailAccount", ",", "final", "Predicate", "<", "MailMessage", ">", "condition", ",", "final", "long", "timeoutSeconds", ",", "final", "long", "sleepMillis", ")", "{", "return...
<p> Tries to find messages for the specified mail account applying the specified {@code condition} until it times out using the specified {@code timeout} and and {@code sleepMillis}. </p> <p> <b>Note:</b><br /> This method uses the specified mail account independently without reservation. If, however, the specified mai...
[ "<p", ">", "Tries", "to", "find", "messages", "for", "the", "specified", "mail", "account", "applying", "the", "specified", "{", "@code", "condition", "}", "until", "it", "times", "out", "using", "the", "specified", "{", "@code", "timeout", "}", "and", "an...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java#L446-L449
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnonymousIndividualImpl_CustomFieldSerializer.java
OWLAnonymousIndividualImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLAnonymousIndividualImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.googl...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLAnonymousIndividualImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLAnonymousIndividualImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnonymousIndividualImpl_CustomFieldSerializer.java#L83-L86
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/subordinate/SubordinateControlMandatoryExample.java
SubordinateControlMandatoryExample.build
private static WComponent build() { """ Creates the component to be added to the validation container. This is doen in a static method because the component is passed into the superclass constructor. @return the component to be added to the validation container. """ WContainer root = new WContainer(); ...
java
private static WComponent build() { WContainer root = new WContainer(); WSubordinateControl control = new WSubordinateControl(); root.add(control); WFieldLayout layout = new WFieldLayout(); layout.setLabelWidth(25); layout.setMargin(new com.github.bordertech.wcomponents.Margin(0, 0, 12, 0)); WCheckBox c...
[ "private", "static", "WComponent", "build", "(", ")", "{", "WContainer", "root", "=", "new", "WContainer", "(", ")", ";", "WSubordinateControl", "control", "=", "new", "WSubordinateControl", "(", ")", ";", "root", ".", "add", "(", "control", ")", ";", "WFi...
Creates the component to be added to the validation container. This is doen in a static method because the component is passed into the superclass constructor. @return the component to be added to the validation container.
[ "Creates", "the", "component", "to", "be", "added", "to", "the", "validation", "container", ".", "This", "is", "doen", "in", "a", "static", "method", "because", "the", "component", "is", "passed", "into", "the", "superclass", "constructor", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/subordinate/SubordinateControlMandatoryExample.java#L37-L71
alkacon/opencms-core
src/org/opencms/main/CmsEventManager.java
CmsEventManager.addCmsEventListener
public void addCmsEventListener(I_CmsEventListener listener, int[] eventTypes) { """ Add an OpenCms event listener.<p> @param listener the listener to add @param eventTypes the events to listen for """ synchronized (m_eventListeners) { if (eventTypes == null) { // no ev...
java
public void addCmsEventListener(I_CmsEventListener listener, int[] eventTypes) { synchronized (m_eventListeners) { if (eventTypes == null) { // no event types given - register the listener for all event types eventTypes = new int[] {I_CmsEventListener.LISTENERS_FOR_A...
[ "public", "void", "addCmsEventListener", "(", "I_CmsEventListener", "listener", ",", "int", "[", "]", "eventTypes", ")", "{", "synchronized", "(", "m_eventListeners", ")", "{", "if", "(", "eventTypes", "==", "null", ")", "{", "// no event types given - register the ...
Add an OpenCms event listener.<p> @param listener the listener to add @param eventTypes the events to listen for
[ "Add", "an", "OpenCms", "event", "listener", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsEventManager.java#L87-L108
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_history_GET
public ArrayList<Date> zone_zoneName_history_GET(String zoneName, Date creationDate_from, Date creationDate_to) throws IOException { """ Zone restore points REST: GET /domain/zone/{zoneName}/history @param creationDate_to [required] Filter the value of creationDate property (<=) @param creationDate_from [requ...
java
public ArrayList<Date> zone_zoneName_history_GET(String zoneName, Date creationDate_from, Date creationDate_to) throws IOException { String qPath = "/domain/zone/{zoneName}/history"; StringBuilder sb = path(qPath, zoneName); query(sb, "creationDate.from", creationDate_from); query(sb, "creationDate.to", creatio...
[ "public", "ArrayList", "<", "Date", ">", "zone_zoneName_history_GET", "(", "String", "zoneName", ",", "Date", "creationDate_from", ",", "Date", "creationDate_to", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/history\"", ";", "S...
Zone restore points REST: GET /domain/zone/{zoneName}/history @param creationDate_to [required] Filter the value of creationDate property (<=) @param creationDate_from [required] Filter the value of creationDate property (>=) @param zoneName [required] The internal name of your zone API beta
[ "Zone", "restore", "points" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L585-L592
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nsacl6_stats.java
nsacl6_stats.get
public static nsacl6_stats get(nitro_service service, String acl6name) throws Exception { """ Use this API to fetch statistics of nsacl6_stats resource of given name . """ nsacl6_stats obj = new nsacl6_stats(); obj.set_acl6name(acl6name); nsacl6_stats response = (nsacl6_stats) obj.stat_resource(service);...
java
public static nsacl6_stats get(nitro_service service, String acl6name) throws Exception{ nsacl6_stats obj = new nsacl6_stats(); obj.set_acl6name(acl6name); nsacl6_stats response = (nsacl6_stats) obj.stat_resource(service); return response; }
[ "public", "static", "nsacl6_stats", "get", "(", "nitro_service", "service", ",", "String", "acl6name", ")", "throws", "Exception", "{", "nsacl6_stats", "obj", "=", "new", "nsacl6_stats", "(", ")", ";", "obj", ".", "set_acl6name", "(", "acl6name", ")", ";", "...
Use this API to fetch statistics of nsacl6_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "nsacl6_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nsacl6_stats.java#L299-L304
protostuff/protostuff
protostuff-json/src/main/java/io/protostuff/JsonIOUtil.java
JsonIOUtil.writeTo
public static <T> void writeTo(JsonGenerator generator, T message, Schema<T> schema, boolean numeric) throws IOException { """ Serializes the {@code message} into a JsonGenerator using the given {@code schema}. """ generator.writeStartObject(); final JsonOutput output = new Jso...
java
public static <T> void writeTo(JsonGenerator generator, T message, Schema<T> schema, boolean numeric) throws IOException { generator.writeStartObject(); final JsonOutput output = new JsonOutput(generator, numeric, schema); schema.writeTo(output, message); if (outp...
[ "public", "static", "<", "T", ">", "void", "writeTo", "(", "JsonGenerator", "generator", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ",", "boolean", "numeric", ")", "throws", "IOException", "{", "generator", ".", "writeStartObject", "(", "...
Serializes the {@code message} into a JsonGenerator using the given {@code schema}.
[ "Serializes", "the", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-json/src/main/java/io/protostuff/JsonIOUtil.java#L454-L465
fuinorg/utils4j
src/main/java/org/fuin/utils4j/PropertiesUtils.java
PropertiesUtils.loadProperties
public static Properties loadProperties(final String baseUrl, final String filename) { """ Load a file from an directory. Wraps a possible <code>MalformedURLException</code> exception into a <code>RuntimeException</code>. @param baseUrl Directory URL as <code>String</code> - Cannot be <code>null</code>. @para...
java
public static Properties loadProperties(final String baseUrl, final String filename) { checkNotNull("baseUrl", baseUrl); checkNotNull("filename", filename); try { final URL url = new URL(baseUrl); return loadProperties(url, filename); } catch (final MalformedURLE...
[ "public", "static", "Properties", "loadProperties", "(", "final", "String", "baseUrl", ",", "final", "String", "filename", ")", "{", "checkNotNull", "(", "\"baseUrl\"", ",", "baseUrl", ")", ";", "checkNotNull", "(", "\"filename\"", ",", "filename", ")", ";", "...
Load a file from an directory. Wraps a possible <code>MalformedURLException</code> exception into a <code>RuntimeException</code>. @param baseUrl Directory URL as <code>String</code> - Cannot be <code>null</code>. @param filename Filename without path - Cannot be <code>null</code>. @return Properties.
[ "Load", "a", "file", "from", "an", "directory", ".", "Wraps", "a", "possible", "<code", ">", "MalformedURLException<", "/", "code", ">", "exception", "into", "a", "<code", ">", "RuntimeException<", "/", "code", ">", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/PropertiesUtils.java#L180-L191
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java
IndexedJvmTypeAccess.getAccessibleType
protected EObject getAccessibleType(IEObjectDescription description, String fragment, ResourceSet resourceSet) throws UnknownNestedTypeException { """ Read and resolve the EObject from the given description and navigate to its children according to the given fragment. @since 2.8 """ EObject typeProxy = des...
java
protected EObject getAccessibleType(IEObjectDescription description, String fragment, ResourceSet resourceSet) throws UnknownNestedTypeException { EObject typeProxy = description.getEObjectOrProxy(); if (typeProxy.eIsProxy()) { typeProxy = EcoreUtil.resolve(typeProxy, resourceSet); } if (!typeProxy.eIsProxy(...
[ "protected", "EObject", "getAccessibleType", "(", "IEObjectDescription", "description", ",", "String", "fragment", ",", "ResourceSet", "resourceSet", ")", "throws", "UnknownNestedTypeException", "{", "EObject", "typeProxy", "=", "description", ".", "getEObjectOrProxy", "(...
Read and resolve the EObject from the given description and navigate to its children according to the given fragment. @since 2.8
[ "Read", "and", "resolve", "the", "EObject", "from", "the", "given", "description", "and", "navigate", "to", "its", "children", "according", "to", "the", "given", "fragment", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java#L139-L153
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/AbstractMapBasedMultimap.java
AbstractMapBasedMultimap.wrapCollection
Collection<V> wrapCollection(@Nullable K key, Collection<V> collection) { """ Generates a decorated collection that remains consistent with the values in the multimap for the provided key. Changes to the multimap may alter the returned collection, and vice versa. """ // We don't deal with NavigableSet he...
java
Collection<V> wrapCollection(@Nullable K key, Collection<V> collection) { // We don't deal with NavigableSet here yet for GWT reasons -- instead, // non-GWT TreeMultimap explicitly overrides this and uses NavigableSet. if (collection instanceof SortedSet) { return new WrappedSortedSet(key, (SortedSet<...
[ "Collection", "<", "V", ">", "wrapCollection", "(", "@", "Nullable", "K", "key", ",", "Collection", "<", "V", ">", "collection", ")", "{", "// We don't deal with NavigableSet here yet for GWT reasons -- instead,", "// non-GWT TreeMultimap explicitly overrides this and uses Navi...
Generates a decorated collection that remains consistent with the values in the multimap for the provided key. Changes to the multimap may alter the returned collection, and vice versa.
[ "Generates", "a", "decorated", "collection", "that", "remains", "consistent", "with", "the", "values", "in", "the", "multimap", "for", "the", "provided", "key", ".", "Changes", "to", "the", "multimap", "may", "alter", "the", "returned", "collection", "and", "v...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/AbstractMapBasedMultimap.java#L315-L327
baratine/baratine
framework/src/main/java/com/caucho/v5/config/types/Period.java
Period.periodEnd
private static long periodEnd(long now, long period, QDate cal) { """ Calculates the next period end. The calculation is in local time. @param now the current time in GMT ms since the epoch @return the time of the next period in GMT ms since the epoch """ if (period < 0) return Long.MAX_VALUE;...
java
private static long periodEnd(long now, long period, QDate cal) { if (period < 0) return Long.MAX_VALUE; else if (period == 0) return now; if (period < 30 * DAY) { cal.setGMTTime(now); long localTime = cal.getLocalTime(); localTime = localTime + (period - (localTime + 4 * ...
[ "private", "static", "long", "periodEnd", "(", "long", "now", ",", "long", "period", ",", "QDate", "cal", ")", "{", "if", "(", "period", "<", "0", ")", "return", "Long", ".", "MAX_VALUE", ";", "else", "if", "(", "period", "==", "0", ")", "return", ...
Calculates the next period end. The calculation is in local time. @param now the current time in GMT ms since the epoch @return the time of the next period in GMT ms since the epoch
[ "Calculates", "the", "next", "period", "end", ".", "The", "calculation", "is", "in", "local", "time", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/config/types/Period.java#L235-L292
MenoData/Time4J
base/src/main/java/net/time4j/range/MomentInterval.java
MomentInterval.until
public static MomentInterval until(Moment end) { """ /*[deutsch] <p>Erzeugt ein unbegrenztes offenes Intervall bis zum angegebenen Endzeitpunkt. </p> @param end moment of upper boundary (exclusive) @return new moment interval @since 2.0 """ Boundary<Moment> past = Boundary.infinitePast...
java
public static MomentInterval until(Moment end) { Boundary<Moment> past = Boundary.infinitePast(); return new MomentInterval(past, Boundary.of(OPEN, end)); }
[ "public", "static", "MomentInterval", "until", "(", "Moment", "end", ")", "{", "Boundary", "<", "Moment", ">", "past", "=", "Boundary", ".", "infinitePast", "(", ")", ";", "return", "new", "MomentInterval", "(", "past", ",", "Boundary", ".", "of", "(", "...
/*[deutsch] <p>Erzeugt ein unbegrenztes offenes Intervall bis zum angegebenen Endzeitpunkt. </p> @param end moment of upper boundary (exclusive) @return new moment interval @since 2.0
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "ein", "unbegrenztes", "offenes", "Intervall", "bis", "zum", "angegebenen", "Endzeitpunkt", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/MomentInterval.java#L310-L315
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/html/metadata/HCHead.java
HCHead.addCSSAt
@Nonnull public final HCHead addCSSAt (@Nonnegative final int nIndex, @Nonnull final IHCNode aCSS) { """ Add a CSS node at the specified index. @param nIndex The index to add. Should be &ge; 0. @param aCSS The CSS node to be added. May not be <code>null</code>. @return this for chaining """ ValueE...
java
@Nonnull public final HCHead addCSSAt (@Nonnegative final int nIndex, @Nonnull final IHCNode aCSS) { ValueEnforcer.notNull (aCSS, "CSS"); if (!HCCSSNodeDetector.isCSSNode (aCSS)) throw new IllegalArgumentException (aCSS + " is not a valid CSS node!"); m_aCSS.add (nIndex, aCSS); return this; ...
[ "@", "Nonnull", "public", "final", "HCHead", "addCSSAt", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "final", "IHCNode", "aCSS", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aCSS", ",", "\"CSS\"", ")", ";", "if", "(", "!",...
Add a CSS node at the specified index. @param nIndex The index to add. Should be &ge; 0. @param aCSS The CSS node to be added. May not be <code>null</code>. @return this for chaining
[ "Add", "a", "CSS", "node", "at", "the", "specified", "index", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/html/metadata/HCHead.java#L200-L208
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionImagesInner.java
VirtualMachineExtensionImagesInner.listTypesAsync
public Observable<List<VirtualMachineExtensionImageInner>> listTypesAsync(String location, String publisherName) { """ Gets a list of virtual machine extension image types. @param location The name of a supported Azure region. @param publisherName the String value @throws IllegalArgumentException thrown if pa...
java
public Observable<List<VirtualMachineExtensionImageInner>> listTypesAsync(String location, String publisherName) { return listTypesWithServiceResponseAsync(location, publisherName).map(new Func1<ServiceResponse<List<VirtualMachineExtensionImageInner>>, List<VirtualMachineExtensionImageInner>>() { @O...
[ "public", "Observable", "<", "List", "<", "VirtualMachineExtensionImageInner", ">", ">", "listTypesAsync", "(", "String", "location", ",", "String", "publisherName", ")", "{", "return", "listTypesWithServiceResponseAsync", "(", "location", ",", "publisherName", ")", "...
Gets a list of virtual machine extension image types. @param location The name of a supported Azure region. @param publisherName the String value @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;VirtualMachineExtensionImageInner&gt; object
[ "Gets", "a", "list", "of", "virtual", "machine", "extension", "image", "types", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionImagesInner.java#L204-L211
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/CopyDataHandler.java
CopyDataHandler.moveSourceToDest
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode) { """ Do the physical move operation. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay). """ if (m_objValue instanceo...
java
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode) { if (m_objValue instanceof String) return m_fldDest.setString((String)m_objValue, bDisplayOption, iMoveMode); else return m_fldDest.setData(m_objValue, bDisplayOption, iMoveMode); }
[ "public", "int", "moveSourceToDest", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "if", "(", "m_objValue", "instanceof", "String", ")", "return", "m_fldDest", ".", "setString", "(", "(", "String", ")", "m_objValue", ",", "bDisplayOption",...
Do the physical move operation. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay).
[ "Do", "the", "physical", "move", "operation", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/CopyDataHandler.java#L70-L76
Azure/azure-sdk-for-java
postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/VirtualNetworkRulesInner.java
VirtualNetworkRulesInner.beginCreateOrUpdate
public VirtualNetworkRuleInner beginCreateOrUpdate(String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { """ Creates or updates an existing virtual network rule. @param resourceGroupName The name of the resource group that contains the resource. You ca...
java
public VirtualNetworkRuleInner beginCreateOrUpdate(String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters).toBlocking().single().body();...
[ "public", "VirtualNetworkRuleInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "virtualNetworkRuleName", ",", "VirtualNetworkRuleInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", ...
Creates or updates an existing virtual network rule. @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 virtualNetworkRuleName The name of the virtual network r...
[ "Creates", "or", "updates", "an", "existing", "virtual", "network", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/VirtualNetworkRulesInner.java#L283-L285
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/JobApi.java
JobApi.downloadArtifactsFile
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, File directory) throws GitLabApiException { """ Download the job artifacts file for the specified job ID. The artifacts file will be saved in the specified directory with the following name pattern: job-{jobid}-artifacts.zip. If the file a...
java
public File downloadArtifactsFile(Object projectIdOrPath, Integer jobId, File directory) throws GitLabApiException { Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts"); ...
[ "public", "File", "downloadArtifactsFile", "(", "Object", "projectIdOrPath", ",", "Integer", "jobId", ",", "File", "directory", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "getWithAccepts", "(", "Response", ".", "Status", ".", "OK", ",",...
Download the job artifacts file for the specified job ID. The artifacts file will be saved in the specified directory with the following name pattern: job-{jobid}-artifacts.zip. If the file already exists in the directory it will be overwritten. <pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id/artifacts</c...
[ "Download", "the", "job", "artifacts", "file", "for", "the", "specified", "job", "ID", ".", "The", "artifacts", "file", "will", "be", "saved", "in", "the", "specified", "directory", "with", "the", "following", "name", "pattern", ":", "job", "-", "{", "jobi...
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L267-L286
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java
ServerUpdater.removeRoleFromUser
public ServerUpdater removeRoleFromUser(User user, Role role) { """ Queues a role to be removed from the user. @param user The server member the role should be removed from. @param role The role which should be removed from the user. @return The current instance in order to chain call methods. """ ...
java
public ServerUpdater removeRoleFromUser(User user, Role role) { delegate.removeRoleFromUser(user, role); return this; }
[ "public", "ServerUpdater", "removeRoleFromUser", "(", "User", "user", ",", "Role", "role", ")", "{", "delegate", ".", "removeRoleFromUser", "(", "user", ",", "role", ")", ";", "return", "this", ";", "}" ]
Queues a role to be removed from the user. @param user The server member the role should be removed from. @param role The role which should be removed from the user. @return The current instance in order to chain call methods.
[ "Queues", "a", "role", "to", "be", "removed", "from", "the", "user", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java#L491-L494
tvesalainen/util
util/src/main/java/org/vesalainen/math/CircleFitter.java
CircleFitter.limitDistance
public static void limitDistance(DenseMatrix64F p0, DenseMatrix64F pr, double min, double max) { """ Changes pr so that distance from p0 is in range min - max. Slope of (p0,pr) remains the same. @param p0 @param pr @param min @param max """ double x0 = p0.data[0]; double y0 = p0.data[1];...
java
public static void limitDistance(DenseMatrix64F p0, DenseMatrix64F pr, double min, double max) { double x0 = p0.data[0]; double y0 = p0.data[1]; double xr = pr.data[0]; double yr = pr.data[1]; double dx = xr-x0; double dy = yr-y0; double r = Math.sqrt(...
[ "public", "static", "void", "limitDistance", "(", "DenseMatrix64F", "p0", ",", "DenseMatrix64F", "pr", ",", "double", "min", ",", "double", "max", ")", "{", "double", "x0", "=", "p0", ".", "data", "[", "0", "]", ";", "double", "y0", "=", "p0", ".", "...
Changes pr so that distance from p0 is in range min - max. Slope of (p0,pr) remains the same. @param p0 @param pr @param min @param max
[ "Changes", "pr", "so", "that", "distance", "from", "p0", "is", "in", "range", "min", "-", "max", ".", "Slope", "of", "(", "p0", "pr", ")", "remains", "the", "same", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/CircleFitter.java#L147-L186
aoindustries/semanticcms-core-taglib
src/main/java/com/semanticcms/core/taglib/ElementTag.java
ElementTag.evaluateAttributes
protected void evaluateAttributes(E element, ELContext elContext) throws JspTagException, IOException { """ Resolves all attributes, setting into the created element as appropriate, This is only called for captureLevel >= META. Attributes are resolved before the element is added to any parent node. Typically, d...
java
protected void evaluateAttributes(E element, ELContext elContext) throws JspTagException, IOException { String idStr = nullIfEmpty(resolveValue(id, String.class, elContext)); if(idStr != null) element.setId(idStr); }
[ "protected", "void", "evaluateAttributes", "(", "E", "element", ",", "ELContext", "elContext", ")", "throws", "JspTagException", ",", "IOException", "{", "String", "idStr", "=", "nullIfEmpty", "(", "resolveValue", "(", "id", ",", "String", ".", "class", ",", "...
Resolves all attributes, setting into the created element as appropriate, This is only called for captureLevel >= META. Attributes are resolved before the element is added to any parent node. Typically, deferred expressions will be evaluated here. Overriding methods must call this implementation.
[ "Resolves", "all", "attributes", "setting", "into", "the", "created", "element", "as", "appropriate", "This", "is", "only", "called", "for", "captureLevel", ">", "=", "META", ".", "Attributes", "are", "resolved", "before", "the", "element", "is", "added", "to"...
train
https://github.com/aoindustries/semanticcms-core-taglib/blob/2e6c5dd3b1299c6cc6a87a335302460c5c69c539/src/main/java/com/semanticcms/core/taglib/ElementTag.java#L179-L182
foundation-runtime/service-directory
1.1/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java
DirectoryServiceClient.updateInstanceUri
public void updateInstanceUri(String serviceName, String instanceId, String uri, boolean isOwned) { """ Update the ServiceInstance attribute "uri". @param serviceName the service name. @param instanceId the instance id. @param uri the ServiceInstance URI. @param isOwned whether the DirectoryAPI owns this...
java
public void updateInstanceUri(String serviceName, String instanceId, String uri, boolean isOwned){ String serviceUri = toInstanceUri(serviceName, instanceId) + "/uri" ; String body = null; try { body = "uri=" + URLEncoder.encode(uri, "UTF-8") + "&isOwned=" + isOwned; } catch ...
[ "public", "void", "updateInstanceUri", "(", "String", "serviceName", ",", "String", "instanceId", ",", "String", "uri", ",", "boolean", "isOwned", ")", "{", "String", "serviceUri", "=", "toInstanceUri", "(", "serviceName", ",", "instanceId", ")", "+", "\"/uri\""...
Update the ServiceInstance attribute "uri". @param serviceName the service name. @param instanceId the instance id. @param uri the ServiceInstance URI. @param isOwned whether the DirectoryAPI owns this ServiceProvider.
[ "Update", "the", "ServiceInstance", "attribute", "uri", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/1.1/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L196-L214
samskivert/samskivert
src/main/java/com/samskivert/swing/util/ButtonUtil.java
ButtonUtil.bindToProperty
public static void bindToProperty ( String property, PrefsConfig config, AbstractButton button, boolean defval) { """ Binds the supplied button to the named boolean property in the supplied config repository. When the button is pressed, it will update the config property and when the config property is c...
java
public static void bindToProperty ( String property, PrefsConfig config, AbstractButton button, boolean defval) { // create a config binding which will take care of everything new ButtonConfigBinding(property, config, button, defval); }
[ "public", "static", "void", "bindToProperty", "(", "String", "property", ",", "PrefsConfig", "config", ",", "AbstractButton", "button", ",", "boolean", "defval", ")", "{", "// create a config binding which will take care of everything", "new", "ButtonConfigBinding", "(", ...
Binds the supplied button to the named boolean property in the supplied config repository. When the button is pressed, it will update the config property and when the config property is changed (by the button or by other means) it will update the selected state of the button. When the button is made non-visible, it wil...
[ "Binds", "the", "supplied", "button", "to", "the", "named", "boolean", "property", "in", "the", "supplied", "config", "repository", ".", "When", "the", "button", "is", "pressed", "it", "will", "update", "the", "config", "property", "and", "when", "the", "con...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/ButtonUtil.java#L55-L60
alibaba/jstorm
example/sequence-split-merge/src/main/java/org/apache/storm/starter/trident/TridentMinMaxOfDevicesTopology.java
TridentMinMaxOfDevicesTopology.buildDevicesTopology
public static StormTopology buildDevicesTopology() { """ Creates a topology with device-id and count (which are whole numbers) as tuple fields in a stream and it finally generates result stream based on min amd max with device-id and count values. """ String deviceID = "device-id"; String cou...
java
public static StormTopology buildDevicesTopology() { String deviceID = "device-id"; String count = "count"; Fields allFields = new Fields(deviceID, count); RandomNumberGeneratorSpout spout = new RandomNumberGeneratorSpout(allFields, 10, 1000); TridentTopology to...
[ "public", "static", "StormTopology", "buildDevicesTopology", "(", ")", "{", "String", "deviceID", "=", "\"device-id\"", ";", "String", "count", "=", "\"count\"", ";", "Fields", "allFields", "=", "new", "Fields", "(", "deviceID", ",", "count", ")", ";", "Random...
Creates a topology with device-id and count (which are whole numbers) as tuple fields in a stream and it finally generates result stream based on min amd max with device-id and count values.
[ "Creates", "a", "topology", "with", "device", "-", "id", "and", "count", "(", "which", "are", "whole", "numbers", ")", "as", "tuple", "fields", "in", "a", "stream", "and", "it", "finally", "generates", "result", "stream", "based", "on", "min", "amd", "ma...
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/example/sequence-split-merge/src/main/java/org/apache/storm/starter/trident/TridentMinMaxOfDevicesTopology.java#L55-L70
spockframework/spock
spock-core/src/main/java/org/spockframework/gentyref/GenericTypeReflector.java
GenericTypeReflector.buildUpperBoundClassAndInterfaces
private static void buildUpperBoundClassAndInterfaces(Type type, Set<Class<?>> result) { """ Helper method for getUpperBoundClassAndInterfaces, adding the result to the given set. """ if (type instanceof ParameterizedType || type instanceof Class<?>) { result.add(erase(type)); return; } for (Type ...
java
private static void buildUpperBoundClassAndInterfaces(Type type, Set<Class<?>> result) { if (type instanceof ParameterizedType || type instanceof Class<?>) { result.add(erase(type)); return; } for (Type superType: getExactDirectSuperTypes(type)) { buildUpperBoundClassAndInterfaces(superType, result); ...
[ "private", "static", "void", "buildUpperBoundClassAndInterfaces", "(", "Type", "type", ",", "Set", "<", "Class", "<", "?", ">", ">", "result", ")", "{", "if", "(", "type", "instanceof", "ParameterizedType", "||", "type", "instanceof", "Class", "<", "?", ">",...
Helper method for getUpperBoundClassAndInterfaces, adding the result to the given set.
[ "Helper", "method", "for", "getUpperBoundClassAndInterfaces", "adding", "the", "result", "to", "the", "given", "set", "." ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/gentyref/GenericTypeReflector.java#L431-L440
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.writeHistoryProject
public void writeHistoryProject(CmsRequestContext context, int publishTag, long publishDate) throws CmsException { """ Creates a historical entry of the current project.<p> @param context the current request context @param publishTag the correlative publish tag @param publishDate the date of publishing @th...
java
public void writeHistoryProject(CmsRequestContext context, int publishTag, long publishDate) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { m_driverManager.writeHistoryProject(dbc, publishTag, publishDate); } catch (Exception e) { ...
[ "public", "void", "writeHistoryProject", "(", "CmsRequestContext", "context", ",", "int", "publishTag", ",", "long", "publishDate", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", ...
Creates a historical entry of the current project.<p> @param context the current request context @param publishTag the correlative publish tag @param publishDate the date of publishing @throws CmsException if operation was not successful
[ "Creates", "a", "historical", "entry", "of", "the", "current", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6688-L6707
rythmengine/rythmengine
src/main/java/org/rythmengine/toString/ToStringStyle.java
ToStringStyle.appendDetail
protected void appendDetail(StringBuilder buffer, String fieldName, Object value) { """ <p>Append to the <code>toString</code> an <code>Object</code> value, printing the full detail of the <code>Object</code>.</p> @param buffer the <code>StringBuilder</code> to populate @param fieldName the field name, typ...
java
protected void appendDetail(StringBuilder buffer, String fieldName, Object value) { buffer.append(value); }
[ "protected", "void", "appendDetail", "(", "StringBuilder", "buffer", ",", "String", "fieldName", ",", "Object", "value", ")", "{", "buffer", ".", "append", "(", "value", ")", ";", "}" ]
<p>Append to the <code>toString</code> an <code>Object</code> value, printing the full detail of the <code>Object</code>.</p> @param buffer the <code>StringBuilder</code> to populate @param fieldName the field name, typically not used as already appended @param value the value to add to the <code>toString</code...
[ "<p", ">", "Append", "to", "the", "<code", ">", "toString<", "/", "code", ">", "an", "<code", ">", "Object<", "/", "code", ">", "value", "printing", "the", "full", "detail", "of", "the", "<code", ">", "Object<", "/", "code", ">", ".", "<", "/", "p"...
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/toString/ToStringStyle.java#L591-L593
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java
AbsSetting.getLong
public Long getLong(String key, String group, Long defaultValue) { """ 获取long类型属性值 @param key 属性名 @param group 分组名 @param defaultValue 默认值 @return 属性值 """ return Convert.toLong(getByGroup(key, group), defaultValue); }
java
public Long getLong(String key, String group, Long defaultValue) { return Convert.toLong(getByGroup(key, group), defaultValue); }
[ "public", "Long", "getLong", "(", "String", "key", ",", "String", "group", ",", "Long", "defaultValue", ")", "{", "return", "Convert", ".", "toLong", "(", "getByGroup", "(", "key", ",", "group", ")", ",", "defaultValue", ")", ";", "}" ]
获取long类型属性值 @param key 属性名 @param group 分组名 @param defaultValue 默认值 @return 属性值
[ "获取long类型属性值" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/AbsSetting.java#L212-L214
googleapis/google-cloud-java
google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java
NotificationChannelServiceClient.deleteNotificationChannel
public final void deleteNotificationChannel(NotificationChannelName name, boolean force) { """ Deletes a notification channel. <p>Sample code: <pre><code> try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { NotificationChannelName name = Not...
java
public final void deleteNotificationChannel(NotificationChannelName name, boolean force) { DeleteNotificationChannelRequest request = DeleteNotificationChannelRequest.newBuilder() .setName(name == null ? null : name.toString()) .setForce(force) .build(); deleteNotifi...
[ "public", "final", "void", "deleteNotificationChannel", "(", "NotificationChannelName", "name", ",", "boolean", "force", ")", "{", "DeleteNotificationChannelRequest", "request", "=", "DeleteNotificationChannelRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "...
Deletes a notification channel. <p>Sample code: <pre><code> try (NotificationChannelServiceClient notificationChannelServiceClient = NotificationChannelServiceClient.create()) { NotificationChannelName name = NotificationChannelName.of("[PROJECT]", "[NOTIFICATION_CHANNEL]"); boolean force = false; notificationChannel...
[ "Deletes", "a", "notification", "channel", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/NotificationChannelServiceClient.java#L904-L912
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/StrictMath.java
StrictMath.copySign
public static double copySign(double magnitude, double sign) { """ Returns the first floating-point argument with the sign of the second floating-point argument. For this method, a NaN {@code sign} argument is always treated as if it were positive. @param magnitude the parameter providing the magnitude of ...
java
public static double copySign(double magnitude, double sign) { return Math.copySign(magnitude, (Double.isNaN(sign)?1.0d:sign)); }
[ "public", "static", "double", "copySign", "(", "double", "magnitude", ",", "double", "sign", ")", "{", "return", "Math", ".", "copySign", "(", "magnitude", ",", "(", "Double", ".", "isNaN", "(", "sign", ")", "?", "1.0d", ":", "sign", ")", ")", ";", "...
Returns the first floating-point argument with the sign of the second floating-point argument. For this method, a NaN {@code sign} argument is always treated as if it were positive. @param magnitude the parameter providing the magnitude of the result @param sign the parameter providing the sign of the result @retu...
[ "Returns", "the", "first", "floating", "-", "point", "argument", "with", "the", "sign", "of", "the", "second", "floating", "-", "point", "argument", ".", "For", "this", "method", "a", "NaN", "{", "@code", "sign", "}", "argument", "is", "always", "treated",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/StrictMath.java#L1387-L1389
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/ConfigValidation.java
ConfigValidation.listFv
public static NestableFieldValidator listFv(Class cls, boolean nullAllowed) { """ Returns a new NestableFieldValidator for a List of the given Class. @param cls the Class of elements composing the list @param nullAllowed whether or not a value of null is valid @return a NestableFieldValidator for a li...
java
public static NestableFieldValidator listFv(Class cls, boolean nullAllowed) { return listFv(fv(cls, false), nullAllowed); }
[ "public", "static", "NestableFieldValidator", "listFv", "(", "Class", "cls", ",", "boolean", "nullAllowed", ")", "{", "return", "listFv", "(", "fv", "(", "cls", ",", "false", ")", ",", "nullAllowed", ")", ";", "}" ]
Returns a new NestableFieldValidator for a List of the given Class. @param cls the Class of elements composing the list @param nullAllowed whether or not a value of null is valid @return a NestableFieldValidator for a list of the given class
[ "Returns", "a", "new", "NestableFieldValidator", "for", "a", "List", "of", "the", "given", "Class", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/ConfigValidation.java#L89-L91
Alluxio/alluxio
core/common/src/main/java/alluxio/underfs/UnderFileSystemConfiguration.java
UnderFileSystemConfiguration.createMountSpecificConf
public UnderFileSystemConfiguration createMountSpecificConf(Map<String, String> mountConf) { """ Creates a new instance from the current configuration and adds in new properties. @param mountConf the mount specific configuration map @return the updated configuration object """ UnderFileSystemConfiguratio...
java
public UnderFileSystemConfiguration createMountSpecificConf(Map<String, String> mountConf) { UnderFileSystemConfiguration ufsConf = new UnderFileSystemConfiguration(mProperties.copy()); ufsConf.mProperties.merge(mountConf, Source.MOUNT_OPTION); ufsConf.mReadOnly = mReadOnly; ufsConf.mShared = mShared; ...
[ "public", "UnderFileSystemConfiguration", "createMountSpecificConf", "(", "Map", "<", "String", ",", "String", ">", "mountConf", ")", "{", "UnderFileSystemConfiguration", "ufsConf", "=", "new", "UnderFileSystemConfiguration", "(", "mProperties", ".", "copy", "(", ")", ...
Creates a new instance from the current configuration and adds in new properties. @param mountConf the mount specific configuration map @return the updated configuration object
[ "Creates", "a", "new", "instance", "from", "the", "current", "configuration", "and", "adds", "in", "new", "properties", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/underfs/UnderFileSystemConfiguration.java#L121-L127
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.executePatchRequest
protected <T> Optional<T> executePatchRequest(URI uri, Object obj, Map<String, Object> headers, List<String> queryParams, GenericType<T> returnType) { """ Execute a PATCH request with a return object. @param <T> The type parameter used for the return object @param uri The URI to call @param obj The obj...
java
protected <T> Optional<T> executePatchRequest(URI uri, Object obj, Map<String, Object> headers, List<String> queryParams, GenericType<T> returnType) { WebTarget target = this.client.target(uri); target = applyQueryParams(target, queryParams); Invocation.Builder invocation = target.r...
[ "protected", "<", "T", ">", "Optional", "<", "T", ">", "executePatchRequest", "(", "URI", "uri", ",", "Object", "obj", ",", "Map", "<", "String", ",", "Object", ">", "headers", ",", "List", "<", "String", ">", "queryParams", ",", "GenericType", "<", "T...
Execute a PATCH request with a return object. @param <T> The type parameter used for the return object @param uri The URI to call @param obj The object to use for the PATCH @param headers A set of headers to add to the request @param queryParams A set of query parameters to add to the request @param returnType The type...
[ "Execute", "a", "PATCH", "request", "with", "a", "return", "object", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L512-L525
citrusframework/citrus
modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java
ZooServer.getZooKeeperServer
public ZooKeeperServer getZooKeeperServer() { """ Gets the value of the zooKeeperServer property. @return the zooKeeperServer """ if (zooKeeperServer == null) { String dataDirectory = System.getProperty("java.io.tmpdir"); File dir = new File(dataDirectory, "zookeeper").getAbs...
java
public ZooKeeperServer getZooKeeperServer() { if (zooKeeperServer == null) { String dataDirectory = System.getProperty("java.io.tmpdir"); File dir = new File(dataDirectory, "zookeeper").getAbsoluteFile(); try { zooKeeperServer = new ZooKeeperServer(dir, dir, 2...
[ "public", "ZooKeeperServer", "getZooKeeperServer", "(", ")", "{", "if", "(", "zooKeeperServer", "==", "null", ")", "{", "String", "dataDirectory", "=", "System", ".", "getProperty", "(", "\"java.io.tmpdir\"", ")", ";", "File", "dir", "=", "new", "File", "(", ...
Gets the value of the zooKeeperServer property. @return the zooKeeperServer
[ "Gets", "the", "value", "of", "the", "zooKeeperServer", "property", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/server/ZooServer.java#L85-L97
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java
TargetTable.toggleTagAssignment
public TargetTagAssignmentResult toggleTagAssignment(final Collection<Long> targetIds, final String targTagName) { """ Toggles {@link TargetTag} assignment to given target ids by means that if some (or all) of the targets in the list have the {@link Tag} not yet assigned, they will be. If all of theme have the t...
java
public TargetTagAssignmentResult toggleTagAssignment(final Collection<Long> targetIds, final String targTagName) { final List<String> controllerIds = targetManagement.get(targetIds).stream().map(Target::getControllerId) .collect(Collectors.toList()); if (controllerIds.isEmpty()) { ...
[ "public", "TargetTagAssignmentResult", "toggleTagAssignment", "(", "final", "Collection", "<", "Long", ">", "targetIds", ",", "final", "String", "targTagName", ")", "{", "final", "List", "<", "String", ">", "controllerIds", "=", "targetManagement", ".", "get", "("...
Toggles {@link TargetTag} assignment to given target ids by means that if some (or all) of the targets in the list have the {@link Tag} not yet assigned, they will be. If all of theme have the tag already assigned they will be removed instead. Additionally a success popup is shown. @param targetIds to toggle for @para...
[ "Toggles", "{", "@link", "TargetTag", "}", "assignment", "to", "given", "target", "ids", "by", "means", "that", "if", "some", "(", "or", "all", ")", "of", "the", "targets", "in", "the", "list", "have", "the", "{", "@link", "Tag", "}", "not", "yet", "...
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/management/targettable/TargetTable.java#L549-L570
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java
OmemoManager.getDevicesOf
public Set<OmemoDevice> getDevicesOf(BareJid contact) { """ Return a set of all OMEMO capable devices of a contact. Note, that this method does not explicitly refresh the device list of the contact, so it might be outdated. @see #requestDeviceListUpdateFor(BareJid) @param contact contact we want to get a set of...
java
public Set<OmemoDevice> getDevicesOf(BareJid contact) { OmemoCachedDeviceList list = getOmemoService().getOmemoStoreBackend().loadCachedDeviceList(getOwnDevice(), contact); HashSet<OmemoDevice> devices = new HashSet<>(); for (int deviceId : list.getActiveDevices()) { devices.add(new...
[ "public", "Set", "<", "OmemoDevice", ">", "getDevicesOf", "(", "BareJid", "contact", ")", "{", "OmemoCachedDeviceList", "list", "=", "getOmemoService", "(", ")", ".", "getOmemoStoreBackend", "(", ")", ".", "loadCachedDeviceList", "(", "getOwnDevice", "(", ")", "...
Return a set of all OMEMO capable devices of a contact. Note, that this method does not explicitly refresh the device list of the contact, so it might be outdated. @see #requestDeviceListUpdateFor(BareJid) @param contact contact we want to get a set of device of. @return set of known devices of that contact.
[ "Return", "a", "set", "of", "all", "OMEMO", "capable", "devices", "of", "a", "contact", ".", "Note", "that", "this", "method", "does", "not", "explicitly", "refresh", "the", "device", "list", "of", "the", "contact", "so", "it", "might", "be", "outdated", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoManager.java#L282-L291
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java
TreeInfo.setSymbol
public static void setSymbol(JCTree tree, Symbol sym) { """ If this tree is an identifier or a field, set its symbol, otherwise skip. """ tree = skipParens(tree); switch (tree.getTag()) { case IDENT: ((JCIdent) tree).sym = sym; break; case SELECT: ((JCFie...
java
public static void setSymbol(JCTree tree, Symbol sym) { tree = skipParens(tree); switch (tree.getTag()) { case IDENT: ((JCIdent) tree).sym = sym; break; case SELECT: ((JCFieldAccess) tree).sym = sym; break; default: } }
[ "public", "static", "void", "setSymbol", "(", "JCTree", "tree", ",", "Symbol", "sym", ")", "{", "tree", "=", "skipParens", "(", "tree", ")", ";", "switch", "(", "tree", ".", "getTag", "(", ")", ")", "{", "case", "IDENT", ":", "(", "(", "JCIdent", "...
If this tree is an identifier or a field, set its symbol, otherwise skip.
[ "If", "this", "tree", "is", "an", "identifier", "or", "a", "field", "set", "its", "symbol", "otherwise", "skip", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java#L859-L868
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java
BoxApiFile.getDownloadRequest
public BoxRequestsFile.DownloadFile getDownloadRequest(OutputStream outputStream, String fileId) { """ Gets a request that downloads the given file to the provided outputStream. Developer is responsible for closing the outputStream provided. @param outputStream outputStream to write file contents to. @param fi...
java
public BoxRequestsFile.DownloadFile getDownloadRequest(OutputStream outputStream, String fileId) { BoxRequestsFile.DownloadFile request = new BoxRequestsFile.DownloadFile(fileId, outputStream, getFileDownloadUrl(fileId),mSession); return request; }
[ "public", "BoxRequestsFile", ".", "DownloadFile", "getDownloadRequest", "(", "OutputStream", "outputStream", ",", "String", "fileId", ")", "{", "BoxRequestsFile", ".", "DownloadFile", "request", "=", "new", "BoxRequestsFile", ".", "DownloadFile", "(", "fileId", ",", ...
Gets a request that downloads the given file to the provided outputStream. Developer is responsible for closing the outputStream provided. @param outputStream outputStream to write file contents to. @param fileId the file id to download. @return request to download a file to an output stream
[ "Gets", "a", "request", "that", "downloads", "the", "given", "file", "to", "the", "provided", "outputStream", ".", "Developer", "is", "responsible", "for", "closing", "the", "outputStream", "provided", "." ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiFile.java#L398-L401
maxirosson/jdroid-android
jdroid-android-google-maps/src/main/java/com/jdroid/android/google/maps/MapUtils.java
MapUtils.vectorToBitmap
public static BitmapDescriptor vectorToBitmap(@DrawableRes int drawableRes, @ColorRes int colorRes) { """ Convert a {@link Drawable} to a {@link BitmapDescriptor}, for use as a marker icon. """ Drawable vectorDrawable = VectorDrawableCompat.create(AbstractApplication.get().getResources(), drawableRes, null);...
java
public static BitmapDescriptor vectorToBitmap(@DrawableRes int drawableRes, @ColorRes int colorRes) { Drawable vectorDrawable = VectorDrawableCompat.create(AbstractApplication.get().getResources(), drawableRes, null); Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsi...
[ "public", "static", "BitmapDescriptor", "vectorToBitmap", "(", "@", "DrawableRes", "int", "drawableRes", ",", "@", "ColorRes", "int", "colorRes", ")", "{", "Drawable", "vectorDrawable", "=", "VectorDrawableCompat", ".", "create", "(", "AbstractApplication", ".", "ge...
Convert a {@link Drawable} to a {@link BitmapDescriptor}, for use as a marker icon.
[ "Convert", "a", "{" ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-google-maps/src/main/java/com/jdroid/android/google/maps/MapUtils.java#L31-L39
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_automatedBackup_restore_POST
public OvhTask serviceName_automatedBackup_restore_POST(String serviceName, Boolean changePassword, Date restorePoint, OvhRestoreTypeEnum type) throws IOException { """ Creates a VPS.Task that will restore the given restorePoint REST: POST /vps/{serviceName}/automatedBackup/restore @param changePassword [requi...
java
public OvhTask serviceName_automatedBackup_restore_POST(String serviceName, Boolean changePassword, Date restorePoint, OvhRestoreTypeEnum type) throws IOException { String qPath = "/vps/{serviceName}/automatedBackup/restore"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<Stri...
[ "public", "OvhTask", "serviceName_automatedBackup_restore_POST", "(", "String", "serviceName", ",", "Boolean", "changePassword", ",", "Date", "restorePoint", ",", "OvhRestoreTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/vps/{serviceName...
Creates a VPS.Task that will restore the given restorePoint REST: POST /vps/{serviceName}/automatedBackup/restore @param changePassword [required] [default=0] Only with restore full on VPS Cloud 2014 @param type [required] [default=file] file: Attach/export restored disk to your current VPS - full: Replace your curren...
[ "Creates", "a", "VPS", ".", "Task", "that", "will", "restore", "the", "given", "restorePoint" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L122-L131
calimero-project/calimero-core
src/tuwien/auto/calimero/mgmt/PropertyClient.java
PropertyClient.scanProperties
public void scanProperties(final boolean allProperties, final Consumer<Description> consumer) throws KNXException, InterruptedException { """ Does a property description scan of the properties in all interface objects. @param allProperties <code>true</code> to scan all property descriptions in the interface ...
java
public void scanProperties(final boolean allProperties, final Consumer<Description> consumer) throws KNXException, InterruptedException { for (int index = 0; scan(index, allProperties, consumer) > 0; ++index); }
[ "public", "void", "scanProperties", "(", "final", "boolean", "allProperties", ",", "final", "Consumer", "<", "Description", ">", "consumer", ")", "throws", "KNXException", ",", "InterruptedException", "{", "for", "(", "int", "index", "=", "0", ";", "scan", "("...
Does a property description scan of the properties in all interface objects. @param allProperties <code>true</code> to scan all property descriptions in the interface objects, <code>false</code> to only scan the object type descriptions, i.e., {@link PropertyAccess.PID#OBJECT_TYPE} @param consumer invoked on every pro...
[ "Does", "a", "property", "description", "scan", "of", "the", "properties", "in", "all", "interface", "objects", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/mgmt/PropertyClient.java#L619-L623
centic9/commons-dost
src/main/java/org/dstadler/commons/net/UrlUtils.java
UrlUtils.retrieveData
public static String retrieveData(String sUrl, int timeout) throws IOException { """ Download data from an URL. @param sUrl The full URL used to download the content. @param timeout The timeout in milliseconds that is used for both connection timeout and read timeout. @return The resulting data, e.g. a HTM...
java
public static String retrieveData(String sUrl, int timeout) throws IOException { return retrieveData(sUrl, null, timeout); }
[ "public", "static", "String", "retrieveData", "(", "String", "sUrl", ",", "int", "timeout", ")", "throws", "IOException", "{", "return", "retrieveData", "(", "sUrl", ",", "null", ",", "timeout", ")", ";", "}" ]
Download data from an URL. @param sUrl The full URL used to download the content. @param timeout The timeout in milliseconds that is used for both connection timeout and read timeout. @return The resulting data, e.g. a HTML string. @throws IOException If accessing the resource fails.
[ "Download", "data", "from", "an", "URL", "." ]
train
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L48-L50
alibaba/otter
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java
ObjectProfiler.sizeof
public static long sizeof(final Object obj) { """ Estimates the full size of the object graph rooted at 'obj'. Duplicate data instances are correctly accounted for. The implementation is not recursive. @param obj input object instance to be measured @return 'obj' size [0 if 'obj' is null'] """ if ...
java
public static long sizeof(final Object obj) { if (null == obj || isSharedFlyweight(obj)) { return 0; } final IdentityHashMap visited = new IdentityHashMap(80000); try { return computeSizeof(obj, visited, CLASS_METADATA_CACHE); } catch (RuntimeException r...
[ "public", "static", "long", "sizeof", "(", "final", "Object", "obj", ")", "{", "if", "(", "null", "==", "obj", "||", "isSharedFlyweight", "(", "obj", ")", ")", "{", "return", "0", ";", "}", "final", "IdentityHashMap", "visited", "=", "new", "IdentityHash...
Estimates the full size of the object graph rooted at 'obj'. Duplicate data instances are correctly accounted for. The implementation is not recursive. @param obj input object instance to be measured @return 'obj' size [0 if 'obj' is null']
[ "Estimates", "the", "full", "size", "of", "the", "object", "graph", "rooted", "at", "obj", ".", "Duplicate", "data", "instances", "are", "correctly", "accounted", "for", ".", "The", "implementation", "is", "not", "recursive", "." ]
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java#L85-L105
cryptomator/cryptofs
src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProvider.java
CryptoFileSystemProvider.containsVault
public static boolean containsVault(Path pathToVault, String masterkeyFilename) { """ Checks if the folder represented by the given path exists and contains a valid vault structure. @param pathToVault A directory path @param masterkeyFilename Name of the masterkey file @return <code>true</code> if the directo...
java
public static boolean containsVault(Path pathToVault, String masterkeyFilename) { Path masterKeyPath = pathToVault.resolve(masterkeyFilename); Path dataDirPath = pathToVault.resolve(Constants.DATA_DIR_NAME); return Files.isReadable(masterKeyPath) && Files.isDirectory(dataDirPath); }
[ "public", "static", "boolean", "containsVault", "(", "Path", "pathToVault", ",", "String", "masterkeyFilename", ")", "{", "Path", "masterKeyPath", "=", "pathToVault", ".", "resolve", "(", "masterkeyFilename", ")", ";", "Path", "dataDirPath", "=", "pathToVault", "....
Checks if the folder represented by the given path exists and contains a valid vault structure. @param pathToVault A directory path @param masterkeyFilename Name of the masterkey file @return <code>true</code> if the directory seems to contain a vault. @since 1.1.0
[ "Checks", "if", "the", "folder", "represented", "by", "the", "given", "path", "exists", "and", "contains", "a", "valid", "vault", "structure", "." ]
train
https://github.com/cryptomator/cryptofs/blob/67fc1a4950dd1c150cd2e2c75bcabbeb7c9ac82e/src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProvider.java#L183-L187
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/converters/UserConverter.java
UserConverter.getType
@Trivial private static Type getType(Converter<?> converter) { """ Reflectively work out the Type of a Converter @param converter @return """ Type type = null; Type[] itypes = converter.getClass().getGenericInterfaces(); for (Type itype : itypes) { ParameterizedType...
java
@Trivial private static Type getType(Converter<?> converter) { Type type = null; Type[] itypes = converter.getClass().getGenericInterfaces(); for (Type itype : itypes) { ParameterizedType ptype = (ParameterizedType) itype; if (ptype.getRawType() == Converter.class) {...
[ "@", "Trivial", "private", "static", "Type", "getType", "(", "Converter", "<", "?", ">", "converter", ")", "{", "Type", "type", "=", "null", ";", "Type", "[", "]", "itypes", "=", "converter", ".", "getClass", "(", ")", ".", "getGenericInterfaces", "(", ...
Reflectively work out the Type of a Converter @param converter @return
[ "Reflectively", "work", "out", "the", "Type", "of", "a", "Converter" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/converters/UserConverter.java#L103-L125
wmdietl/jsr308-langtools
src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java
SimpleTypeVisitor7.visitUnion
@Override public R visitUnion(UnionType t, P p) { """ This implementation visits a {@code UnionType} by calling {@code defaultAction}. @param t {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(t, p); }
java
@Override public R visitUnion(UnionType t, P p) { return defaultAction(t, p); }
[ "@", "Override", "public", "R", "visitUnion", "(", "UnionType", "t", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "t", ",", "p", ")", ";", "}" ]
This implementation visits a {@code UnionType} by calling {@code defaultAction}. @param t {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "This", "implementation", "visits", "a", "{", "@code", "UnionType", "}", "by", "calling", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java#L111-L114
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cli/CliClient.java
CliClient.subColumnNameAsBytes
private ByteBuffer subColumnNameAsBytes(String superColumn, CfDef columnFamilyDef) { """ Converts column name into ByteBuffer according to comparator type @param superColumn - sub-column name from parser @param columnFamilyDef - column family from parser @return ByteBuffer bytes - into which column name was con...
java
private ByteBuffer subColumnNameAsBytes(String superColumn, CfDef columnFamilyDef) { String comparatorClass = columnFamilyDef.subcomparator_type; if (comparatorClass == null) { sessionState.out.println(String.format("Notice: defaulting to BytesType subcomparator for '%s'", colum...
[ "private", "ByteBuffer", "subColumnNameAsBytes", "(", "String", "superColumn", ",", "CfDef", "columnFamilyDef", ")", "{", "String", "comparatorClass", "=", "columnFamilyDef", ".", "subcomparator_type", ";", "if", "(", "comparatorClass", "==", "null", ")", "{", "sess...
Converts column name into ByteBuffer according to comparator type @param superColumn - sub-column name from parser @param columnFamilyDef - column family from parser @return ByteBuffer bytes - into which column name was converted according to comparator type
[ "Converts", "column", "name", "into", "ByteBuffer", "according", "to", "comparator", "type" ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cli/CliClient.java#L2629-L2640
Azure/azure-sdk-for-java
redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java
RedisInner.getByResourceGroupAsync
public Observable<RedisResourceInner> getByResourceGroupAsync(String resourceGroupName, String name) { """ Gets a Redis cache (resource description). @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @throws IllegalArgumentException thrown if parameters fail the...
java
public Observable<RedisResourceInner> getByResourceGroupAsync(String resourceGroupName, String name) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<RedisResourceInner>, RedisResourceInner>() { @Override public RedisResourceInner...
[ "public", "Observable", "<", "RedisResourceInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "map", "(", ...
Gets a Redis cache (resource description). @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RedisResourceInner object
[ "Gets", "a", "Redis", "cache", "(", "resource", "description", ")", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java#L779-L786
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readOwner
public CmsUser readOwner(CmsDbContext dbc, CmsProject project) throws CmsException { """ Reads the owner of a project.<p> @param dbc the current database context @param project the project to get the owner from @return the owner of a resource @throws CmsException if something goes wrong """ re...
java
public CmsUser readOwner(CmsDbContext dbc, CmsProject project) throws CmsException { return readUser(dbc, project.getOwnerId()); }
[ "public", "CmsUser", "readOwner", "(", "CmsDbContext", "dbc", ",", "CmsProject", "project", ")", "throws", "CmsException", "{", "return", "readUser", "(", "dbc", ",", "project", ".", "getOwnerId", "(", ")", ")", ";", "}" ]
Reads the owner of a project.<p> @param dbc the current database context @param project the project to get the owner from @return the owner of a resource @throws CmsException if something goes wrong
[ "Reads", "the", "owner", "of", "a", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7117-L7120
fullcontact/hadoop-sstable
sstable-core/src/main/java/com/fullcontact/cassandra/io/util/RandomAccessReader.java
RandomAccessReader.reBuffer
protected void reBuffer() { """ Read data from file starting from current currentOffset to populate buffer. """ resetBuffer(); try { if (bufferOffset >= fs.getFileStatus(inputPath).getLen()) // TODO: is this equivalent? return; input.seek(bufferOffset);...
java
protected void reBuffer() { resetBuffer(); try { if (bufferOffset >= fs.getFileStatus(inputPath).getLen()) // TODO: is this equivalent? return; input.seek(bufferOffset); int read = 0; while (read < buffer.length) { int n...
[ "protected", "void", "reBuffer", "(", ")", "{", "resetBuffer", "(", ")", ";", "try", "{", "if", "(", "bufferOffset", ">=", "fs", ".", "getFileStatus", "(", "inputPath", ")", ".", "getLen", "(", ")", ")", "// TODO: is this equivalent?", "return", ";", "inpu...
Read data from file starting from current currentOffset to populate buffer.
[ "Read", "data", "from", "file", "starting", "from", "current", "currentOffset", "to", "populate", "buffer", "." ]
train
https://github.com/fullcontact/hadoop-sstable/blob/1189c2cb3a2cbbe03b75fda1cf02698e6283dfb2/sstable-core/src/main/java/com/fullcontact/cassandra/io/util/RandomAccessReader.java#L138-L161
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Entity.java
Entity.getRelation
<T extends Entity> T getRelation(Class<T> valuesClass, String name) { """ Get a relation by name for this entity. @param valuesClass Class type of T. @param name Name of the relation attribute. @return The related asset. """ return getRelation(valuesClass, name, true); }
java
<T extends Entity> T getRelation(Class<T> valuesClass, String name) { return getRelation(valuesClass, name, true); }
[ "<", "T", "extends", "Entity", ">", "T", "getRelation", "(", "Class", "<", "T", ">", "valuesClass", ",", "String", "name", ")", "{", "return", "getRelation", "(", "valuesClass", ",", "name", ",", "true", ")", ";", "}" ]
Get a relation by name for this entity. @param valuesClass Class type of T. @param name Name of the relation attribute. @return The related asset.
[ "Get", "a", "relation", "by", "name", "for", "this", "entity", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Entity.java#L206-L208
wiibaker/robotframework-rest-java
src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java
JsonPathLibrary.jsonShouldBeEqual
@RobotKeyword public boolean jsonShouldBeEqual(String from, String to) throws Exception { """ Checks if the given JSON contents are equal. See `Json Should Be Equal` for more details `from` and `to` can be either URI or the actual JSON content. You can add optional method (ie GET, POST, PUT), data or co...
java
@RobotKeyword public boolean jsonShouldBeEqual(String from, String to) throws Exception { return jsonShouldBeEqual(from, to, false); }
[ "@", "RobotKeyword", "public", "boolean", "jsonShouldBeEqual", "(", "String", "from", ",", "String", "to", ")", "throws", "Exception", "{", "return", "jsonShouldBeEqual", "(", "from", ",", "to", ",", "false", ")", ";", "}" ]
Checks if the given JSON contents are equal. See `Json Should Be Equal` for more details `from` and `to` can be either URI or the actual JSON content. You can add optional method (ie GET, POST, PUT), data or content type as parameters. Method defaults to GET. Example: | Json Should Be Equal | http://example.com/test...
[ "Checks", "if", "the", "given", "JSON", "contents", "are", "equal", ".", "See", "Json", "Should", "Be", "Equal", "for", "more", "details" ]
train
https://github.com/wiibaker/robotframework-rest-java/blob/e30a7e494c143b644ee4282137a5a38e75d9d97b/src/main/java/org/wuokko/robot/restlib/JsonPathLibrary.java#L145-L148
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java
PathNormalizer.determineRelativePath
private static String determineRelativePath(String filename, String separator) { """ Determines the relative path of a filename. For each separator within the filename (except the leading if present), append the "../" string to the return value. @param filename The filename to parse. @param separator The s...
java
private static String determineRelativePath(String filename, String separator) { if (filename.length() == 0) { return ""; } /* * Count the slashes in the relative filename, but exclude the leading * slash. If the path has no slashes, then the filename is relative to * the current directory. */ i...
[ "private", "static", "String", "determineRelativePath", "(", "String", "filename", ",", "String", "separator", ")", "{", "if", "(", "filename", ".", "length", "(", ")", "==", "0", ")", "{", "return", "\"\"", ";", "}", "/*\n\t\t * Count the slashes in the relativ...
Determines the relative path of a filename. For each separator within the filename (except the leading if present), append the "../" string to the return value. @param filename The filename to parse. @param separator The separator used within the filename. @return The relative path of the filename. This value is not t...
[ "Determines", "the", "relative", "path", "of", "a", "filename", ".", "For", "each", "separator", "within", "the", "filename", "(", "except", "the", "leading", "if", "present", ")", "append", "the", "..", "/", "string", "to", "the", "return", "value", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java#L866-L896
NLPchina/elasticsearch-sql
src/main/java/org/nlpcn/es4sql/query/maker/AggMaker.java
AggMaker.makeCountAgg
private ValuesSourceAggregationBuilder makeCountAgg(MethodField field) { """ Create count aggregation. @param field The count function @return AggregationBuilder use to count result """ // Cardinality is approximate DISTINCT. if ("DISTINCT".equals(field.getOption())) { if (fie...
java
private ValuesSourceAggregationBuilder makeCountAgg(MethodField field) { // Cardinality is approximate DISTINCT. if ("DISTINCT".equals(field.getOption())) { if (field.getParams().size() == 1) { return AggregationBuilders.cardinality(field.getAlias()).field(field.getParams()...
[ "private", "ValuesSourceAggregationBuilder", "makeCountAgg", "(", "MethodField", "field", ")", "{", "// Cardinality is approximate DISTINCT.", "if", "(", "\"DISTINCT\"", ".", "equals", "(", "field", ".", "getOption", "(", ")", ")", ")", "{", "if", "(", "field", "....
Create count aggregation. @param field The count function @return AggregationBuilder use to count result
[ "Create", "count", "aggregation", "." ]
train
https://github.com/NLPchina/elasticsearch-sql/blob/eaab70b4bf1729978911b83eb96e816ebcfe6e7f/src/main/java/org/nlpcn/es4sql/query/maker/AggMaker.java#L686-L727
line/armeria
core/src/main/java/com/linecorp/armeria/client/encoding/HttpDecodingClient.java
HttpDecodingClient.newDecorator
public static Function<Client<HttpRequest, HttpResponse>, HttpDecodingClient> newDecorator( Iterable<? extends StreamDecoderFactory> decoderFactories) { """ Creates a new {@link HttpDecodingClient} decorator with the specified {@link StreamDecoderFactory}s. """ return client -> new HttpDeco...
java
public static Function<Client<HttpRequest, HttpResponse>, HttpDecodingClient> newDecorator( Iterable<? extends StreamDecoderFactory> decoderFactories) { return client -> new HttpDecodingClient(client, decoderFactories); }
[ "public", "static", "Function", "<", "Client", "<", "HttpRequest", ",", "HttpResponse", ">", ",", "HttpDecodingClient", ">", "newDecorator", "(", "Iterable", "<", "?", "extends", "StreamDecoderFactory", ">", "decoderFactories", ")", "{", "return", "client", "->", ...
Creates a new {@link HttpDecodingClient} decorator with the specified {@link StreamDecoderFactory}s.
[ "Creates", "a", "new", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/client/encoding/HttpDecodingClient.java#L60-L63
canoo/dolphin-platform
platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/legacy/ServerModelStore.java
ServerModelStore.deleteCommand
@Deprecated public static void deleteCommand(final List<Command> response, final String pmId) { """ Convenience method to let Dolphin delete a presentation model on the client side """ if (response == null || Assert.isBlank(pmId)) { return; } response.add(new DeletePrese...
java
@Deprecated public static void deleteCommand(final List<Command> response, final String pmId) { if (response == null || Assert.isBlank(pmId)) { return; } response.add(new DeletePresentationModelCommand(pmId)); }
[ "@", "Deprecated", "public", "static", "void", "deleteCommand", "(", "final", "List", "<", "Command", ">", "response", ",", "final", "String", "pmId", ")", "{", "if", "(", "response", "==", "null", "||", "Assert", ".", "isBlank", "(", "pmId", ")", ")", ...
Convenience method to let Dolphin delete a presentation model on the client side
[ "Convenience", "method", "to", "let", "Dolphin", "delete", "a", "presentation", "model", "on", "the", "client", "side" ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-server/src/main/java/com/canoo/dp/impl/server/legacy/ServerModelStore.java#L144-L150
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/DefaultPriorityProvider.java
DefaultPriorityProvider.getProcessDefinedPriority
protected Long getProcessDefinedPriority(ProcessDefinitionImpl processDefinition, String propertyKey, ExecutionEntity execution, String errorMsgHead) { """ Returns the priority which is defined in the given process definition. The priority value is identified with the given propertyKey. Returns null if the proce...
java
protected Long getProcessDefinedPriority(ProcessDefinitionImpl processDefinition, String propertyKey, ExecutionEntity execution, String errorMsgHead) { if (processDefinition != null) { ParameterValueProvider priorityProvider = (ParameterValueProvider) processDefinition.getProperty(propertyKey); if (prio...
[ "protected", "Long", "getProcessDefinedPriority", "(", "ProcessDefinitionImpl", "processDefinition", ",", "String", "propertyKey", ",", "ExecutionEntity", "execution", ",", "String", "errorMsgHead", ")", "{", "if", "(", "processDefinition", "!=", "null", ")", "{", "Pa...
Returns the priority which is defined in the given process definition. The priority value is identified with the given propertyKey. Returns null if the process definition is null or no priority was defined. @param processDefinition the process definition that should contains the priority @param propertyKey the key whi...
[ "Returns", "the", "priority", "which", "is", "defined", "in", "the", "given", "process", "definition", ".", "The", "priority", "value", "is", "identified", "with", "the", "given", "propertyKey", ".", "Returns", "null", "if", "the", "process", "definition", "is...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/DefaultPriorityProvider.java#L154-L162
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/mapred/CoronaTaskLauncher.java
CoronaTaskLauncher.killTasks
public void killTasks( String trackerName, InetAddress addr, List<KillTaskAction> killActions) { """ Enqueue kill tasks actions. @param trackerName The name of the tracker to send the kill actions to. @param addr The address of the tracker to send the kill actions to. @param killActions The kill actions t...
java
public void killTasks( String trackerName, InetAddress addr, List<KillTaskAction> killActions) { for (KillTaskAction killAction : killActions) { String description = "KillTaskAction " + killAction.getTaskID(); LOG.info("Queueing " + description + " to worker " + trackerName + "(" + addr.ho...
[ "public", "void", "killTasks", "(", "String", "trackerName", ",", "InetAddress", "addr", ",", "List", "<", "KillTaskAction", ">", "killActions", ")", "{", "for", "(", "KillTaskAction", "killAction", ":", "killActions", ")", "{", "String", "description", "=", "...
Enqueue kill tasks actions. @param trackerName The name of the tracker to send the kill actions to. @param addr The address of the tracker to send the kill actions to. @param killActions The kill actions to send.
[ "Enqueue", "kill", "tasks", "actions", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/mapred/CoronaTaskLauncher.java#L112-L121
killbill/killbill
util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java
InternalCallContextFactory.createInternalCallContext
public InternalCallContext createInternalCallContext(@Nullable final Long tenantRecordId, @Nullable final Long accountRecordId, final String userName, final CallOrigin callOrigin, final UserType userType, @Nullable final UUID userToken) { """ Create an inter...
java
public InternalCallContext createInternalCallContext(@Nullable final Long tenantRecordId, @Nullable final Long accountRecordId, final String userName, final CallOrigin callOrigin, final UserType userType, @Nullable final UUID userToken) { return createInt...
[ "public", "InternalCallContext", "createInternalCallContext", "(", "@", "Nullable", "final", "Long", "tenantRecordId", ",", "@", "Nullable", "final", "Long", "accountRecordId", ",", "final", "String", "userName", ",", "final", "CallOrigin", "callOrigin", ",", "final",...
Create an internal call callcontext <p/> This is used by notification queue and persistent bus - accountRecordId is expected to be non null @param tenantRecordId tenant record id - if null, the default tenant record id value will be used @param accountRecordId account record id (can be null in specific use-cases, e.g...
[ "Create", "an", "internal", "call", "callcontext", "<p", "/", ">", "This", "is", "used", "by", "notification", "queue", "and", "persistent", "bus", "-", "accountRecordId", "is", "expected", "to", "be", "non", "null" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/util/src/main/java/org/killbill/billing/util/callcontext/InternalCallContextFactory.java#L235-L238
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/Util.java
Util.isValidSnapshot
public static boolean isValidSnapshot(File f) throws IOException { """ Verifies that the file is a valid snapshot. Snapshot may be invalid if it's incomplete as in a situation when the server dies while in the process of storing a snapshot. Any file that is not a snapshot is also an invalid snapshot. @param ...
java
public static boolean isValidSnapshot(File f) throws IOException { if (f==null || Util.getZxidFromName(f.getName(), "snapshot") == -1) return false; // Check for a valid snapshot RandomAccessFile raf = new RandomAccessFile(f, "r"); // including the header and the last / byte...
[ "public", "static", "boolean", "isValidSnapshot", "(", "File", "f", ")", "throws", "IOException", "{", "if", "(", "f", "==", "null", "||", "Util", ".", "getZxidFromName", "(", "f", ".", "getName", "(", ")", ",", "\"snapshot\"", ")", "==", "-", "1", ")"...
Verifies that the file is a valid snapshot. Snapshot may be invalid if it's incomplete as in a situation when the server dies while in the process of storing a snapshot. Any file that is not a snapshot is also an invalid snapshot. @param f file to verify @return true if the snapshot is valid @throws IOException
[ "Verifies", "that", "the", "file", "is", "a", "valid", "snapshot", ".", "Snapshot", "may", "be", "invalid", "if", "it", "s", "incomplete", "as", "in", "a", "situation", "when", "the", "server", "dies", "while", "in", "the", "process", "of", "storing", "a...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/Util.java#L161-L199
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/thread_pool/ThreadPoolManager.java
ThreadPoolManager.scheduleAtFixedRate
public static ScheduledFuture scheduleAtFixedRate(Runnable runnable, long periodInMilli) { """ 轻量级的定时任务执行器。 任务之间不会并行执行,任何时刻都至多只会有一个任务在执行。 如果下一个任务执行时间已经到了,但是前一个还没有执行完毕,那么下个任务等待直到前一个执行完,然后再马上开始. @param runnable 执行的任务 @param periodInMilli 任务启动固定间隔,单位毫秒 """ /** 我们默认设定一个runnable生命周期与一个msgId一一对应 */...
java
public static ScheduledFuture scheduleAtFixedRate(Runnable runnable, long periodInMilli) { /** 我们默认设定一个runnable生命周期与一个msgId一一对应 */ Runnable proxied = wrapRunnable(runnable, null); return newSingleThreadScheduler().scheduleAtFixedRate(proxied, 0, periodInMilli, TimeUnit.MILLISECONDS); }
[ "public", "static", "ScheduledFuture", "scheduleAtFixedRate", "(", "Runnable", "runnable", ",", "long", "periodInMilli", ")", "{", "/** 我们默认设定一个runnable生命周期与一个msgId一一对应 */", "Runnable", "proxied", "=", "wrapRunnable", "(", "runnable", ",", "null", ")", ";", "return", ...
轻量级的定时任务执行器。 任务之间不会并行执行,任何时刻都至多只会有一个任务在执行。 如果下一个任务执行时间已经到了,但是前一个还没有执行完毕,那么下个任务等待直到前一个执行完,然后再马上开始. @param runnable 执行的任务 @param periodInMilli 任务启动固定间隔,单位毫秒
[ "轻量级的定时任务执行器。", "任务之间不会并行执行,任何时刻都至多只会有一个任务在执行。", "如果下一个任务执行时间已经到了,但是前一个还没有执行完毕,那么下个任务等待直到前一个执行完,然后再马上开始", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/thread_pool/ThreadPoolManager.java#L253-L257
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java
IndexElasticsearchUpdater.removeIndexInElasticsearch
@Deprecated private static void removeIndexInElasticsearch(Client client, String index) throws Exception { """ Remove a new index in Elasticsearch @param client Elasticsearch client @param index Index name @throws Exception if the elasticsearch API call is failing """ logger.trace("removeIndex([{}])", in...
java
@Deprecated private static void removeIndexInElasticsearch(Client client, String index) throws Exception { logger.trace("removeIndex([{}])", index); assert client != null; assert index != null; AcknowledgedResponse response = client.admin().indices().prepareDelete(index).get(); if (!response.isAcknow...
[ "@", "Deprecated", "private", "static", "void", "removeIndexInElasticsearch", "(", "Client", "client", ",", "String", "index", ")", "throws", "Exception", "{", "logger", ".", "trace", "(", "\"removeIndex([{}])\"", ",", "index", ")", ";", "assert", "client", "!="...
Remove a new index in Elasticsearch @param client Elasticsearch client @param index Index name @throws Exception if the elasticsearch API call is failing
[ "Remove", "a", "new", "index", "in", "Elasticsearch" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java#L96-L110
alkacon/opencms-core
src/org/opencms/workplace/editors/CmsDefaultPageEditor.java
CmsDefaultPageEditor.actionPreview
public void actionPreview() throws IOException, JspException { """ Performs the preview page action in a new browser window.<p> @throws IOException if redirect fails @throws JspException if inclusion of error page fails """ try { // save content of the editor to the temporary file ...
java
public void actionPreview() throws IOException, JspException { try { // save content of the editor to the temporary file performSaveContent(getParamElementname(), getElementLocale()); } catch (CmsException e) { // show error page showErrorPage(this, e); ...
[ "public", "void", "actionPreview", "(", ")", "throws", "IOException", ",", "JspException", "{", "try", "{", "// save content of the editor to the temporary file", "performSaveContent", "(", "getParamElementname", "(", ")", ",", "getElementLocale", "(", ")", ")", ";", ...
Performs the preview page action in a new browser window.<p> @throws IOException if redirect fails @throws JspException if inclusion of error page fails
[ "Performs", "the", "preview", "page", "action", "in", "a", "new", "browser", "window", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/CmsDefaultPageEditor.java#L273-L286
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/thumbnail/ThumbnailRenderer.java
ThumbnailRenderer.encodeBegin
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:thumbnail. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the...
java
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } Thumbnail thumbnail = (Thumbnail) component; ResponseWriter rw = context.getResponseWriter(); String clientId = thumbnail.getClientId(); Tooltip.gener...
[ "@", "Override", "public", "void", "encodeBegin", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "Thumbnail", "thumbn...
This methods generates the HTML code of the current b:thumbnail. <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 th...
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "thumbnail", ".", "<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/thumbnail/ThumbnailRenderer.java#L45-L72
netty/netty
common/src/main/java/io/netty/util/internal/PromiseNotificationUtil.java
PromiseNotificationUtil.trySuccess
public static <V> void trySuccess(Promise<? super V> p, V result, InternalLogger logger) { """ Try to mark the {@link Promise} as success and log if {@code logger} is not {@code null} in case this fails. """ if (!p.trySuccess(result) && logger != null) { Throwable err = p.cause(); ...
java
public static <V> void trySuccess(Promise<? super V> p, V result, InternalLogger logger) { if (!p.trySuccess(result) && logger != null) { Throwable err = p.cause(); if (err == null) { logger.warn("Failed to mark a promise as success because it has succeeded already: {}", ...
[ "public", "static", "<", "V", ">", "void", "trySuccess", "(", "Promise", "<", "?", "super", "V", ">", "p", ",", "V", "result", ",", "InternalLogger", "logger", ")", "{", "if", "(", "!", "p", ".", "trySuccess", "(", "result", ")", "&&", "logger", "!...
Try to mark the {@link Promise} as success and log if {@code logger} is not {@code null} in case this fails.
[ "Try", "to", "mark", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/PromiseNotificationUtil.java#L47-L58
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/tokenizer/core/SegKit.java
SegKit.appendSynonyms
public final static void appendSynonyms(LinkedList<IWord> wordPool, IWord wd) { """ quick interface to do the synonyms append word You got check if the specified has any synonyms first @param wordPool @param wd """ List<IWord> synList = wd.getSyn().getList(); synchronized (synList) { ...
java
public final static void appendSynonyms(LinkedList<IWord> wordPool, IWord wd) { List<IWord> synList = wd.getSyn().getList(); synchronized (synList) { for ( int j = 0; j < synList.size(); j++ ) { IWord curWord = synList.get(j); if ( curWord.getValue() ...
[ "public", "final", "static", "void", "appendSynonyms", "(", "LinkedList", "<", "IWord", ">", "wordPool", ",", "IWord", "wd", ")", "{", "List", "<", "IWord", ">", "synList", "=", "wd", ".", "getSyn", "(", ")", ".", "getList", "(", ")", ";", "synchronize...
quick interface to do the synonyms append word You got check if the specified has any synonyms first @param wordPool @param wd
[ "quick", "interface", "to", "do", "the", "synonyms", "append", "word", "You", "got", "check", "if", "the", "specified", "has", "any", "synonyms", "first" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/tokenizer/core/SegKit.java#L20-L36
apache/incubator-druid
processing/src/main/java/org/apache/druid/segment/serde/ComplexMetricSerde.java
ComplexMetricSerde.fromBytes
public Object fromBytes(byte[] data, int start, int numBytes) { """ Converts byte[] to intermediate representation of the aggregate. @param data array @param start offset in the byte array where to start reading @param numBytes number of bytes to read in given array @return intermediate representati...
java
public Object fromBytes(byte[] data, int start, int numBytes) { ByteBuffer bb = ByteBuffer.wrap(data); if (start > 0) { bb.position(start); } return getObjectStrategy().fromByteBuffer(bb, numBytes); }
[ "public", "Object", "fromBytes", "(", "byte", "[", "]", "data", ",", "int", "start", ",", "int", "numBytes", ")", "{", "ByteBuffer", "bb", "=", "ByteBuffer", ".", "wrap", "(", "data", ")", ";", "if", "(", "start", ">", "0", ")", "{", "bb", ".", "...
Converts byte[] to intermediate representation of the aggregate. @param data array @param start offset in the byte array where to start reading @param numBytes number of bytes to read in given array @return intermediate representation of the aggregate
[ "Converts", "byte", "[]", "to", "intermediate", "representation", "of", "the", "aggregate", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/segment/serde/ComplexMetricSerde.java#L104-L111
stripe/stripe-java
src/main/java/com/stripe/model/Order.java
Order.returnOrder
public OrderReturn returnOrder(Map<String, Object> params) throws StripeException { """ Return all or part of an order. The order must have a status of <code>paid</code> or <code> fulfilled</code> before it can be returned. Once all items have been returned, the order will become <code>canceled</code> or <code>r...
java
public OrderReturn returnOrder(Map<String, Object> params) throws StripeException { return returnOrder(params, (RequestOptions) null); }
[ "public", "OrderReturn", "returnOrder", "(", "Map", "<", "String", ",", "Object", ">", "params", ")", "throws", "StripeException", "{", "return", "returnOrder", "(", "params", ",", "(", "RequestOptions", ")", "null", ")", ";", "}" ]
Return all or part of an order. The order must have a status of <code>paid</code> or <code> fulfilled</code> before it can be returned. Once all items have been returned, the order will become <code>canceled</code> or <code>returned</code> depending on which status the order started in.
[ "Return", "all", "or", "part", "of", "an", "order", ".", "The", "order", "must", "have", "a", "status", "of", "<code", ">", "paid<", "/", "code", ">", "or", "<code", ">", "fulfilled<", "/", "code", ">", "before", "it", "can", "be", "returned", ".", ...
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/model/Order.java#L394-L396
Appendium/objectlabkit
datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ExcelDateUtil.java
ExcelDateUtil.getJavaCalendar
public static Calendar getJavaCalendar(final double excelDate, final boolean use1904windowing) { """ Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. @param excelDate The Excel date. @param use1904windowing true if date uses 1904 windowing, or false if using 1900...
java
public static Calendar getJavaCalendar(final double excelDate, final boolean use1904windowing) { if (isValidExcelDate(excelDate)) { int startYear = EXCEL_BASE_YEAR; int dayAdjust = -1; // Excel thinks 2/29/1900 is a valid date, which // it isn't final int who...
[ "public", "static", "Calendar", "getJavaCalendar", "(", "final", "double", "excelDate", ",", "final", "boolean", "use1904windowing", ")", "{", "if", "(", "isValidExcelDate", "(", "excelDate", ")", ")", "{", "int", "startYear", "=", "EXCEL_BASE_YEAR", ";", "int",...
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. @param excelDate The Excel date. @param use1904windowing true if date uses 1904 windowing, or false if using 1900 date windowing. @return Java representation of the date without any time. @see java.util.TimeZone
[ "Given", "an", "Excel", "date", "with", "either", "1900", "or", "1904", "date", "windowing", "converts", "it", "to", "a", "java", ".", "util", ".", "Date", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ExcelDateUtil.java#L72-L97
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java
TmdbEpisodes.getEpisodeChanges
public ResultList<ChangeKeyItem> getEpisodeChanges(int episodeID, String startDate, String endDate) throws MovieDbException { """ Look up a TV episode's changes by episode ID @param episodeID @param startDate @param endDate @return @throws MovieDbException """ return getMediaChanges(episodeID, s...
java
public ResultList<ChangeKeyItem> getEpisodeChanges(int episodeID, String startDate, String endDate) throws MovieDbException { return getMediaChanges(episodeID, startDate, endDate); }
[ "public", "ResultList", "<", "ChangeKeyItem", ">", "getEpisodeChanges", "(", "int", "episodeID", ",", "String", "startDate", ",", "String", "endDate", ")", "throws", "MovieDbException", "{", "return", "getMediaChanges", "(", "episodeID", ",", "startDate", ",", "en...
Look up a TV episode's changes by episode ID @param episodeID @param startDate @param endDate @return @throws MovieDbException
[ "Look", "up", "a", "TV", "episode", "s", "changes", "by", "episode", "ID" ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java#L105-L107
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/AccountsApi.java
AccountsApi.updateSharedAccess
public AccountSharedAccess updateSharedAccess(String accountId, AccountSharedAccess accountSharedAccess, AccountsApi.UpdateSharedAccessOptions options) throws ApiException { """ Reserved: Sets the shared access information for users. Reserved: Sets the shared access information for one or more users. @param acco...
java
public AccountSharedAccess updateSharedAccess(String accountId, AccountSharedAccess accountSharedAccess, AccountsApi.UpdateSharedAccessOptions options) throws ApiException { Object localVarPostBody = accountSharedAccess; // verify the required parameter 'accountId' is set if (accountId == null) { ...
[ "public", "AccountSharedAccess", "updateSharedAccess", "(", "String", "accountId", ",", "AccountSharedAccess", "accountSharedAccess", ",", "AccountsApi", ".", "UpdateSharedAccessOptions", "options", ")", "throws", "ApiException", "{", "Object", "localVarPostBody", "=", "acc...
Reserved: Sets the shared access information for users. Reserved: Sets the shared access information for one or more users. @param accountId The external account number (int) or account ID Guid. (required) @param accountSharedAccess (optional) @param options for modifying the method behavior. @return AccountSharedAcce...
[ "Reserved", ":", "Sets", "the", "shared", "access", "information", "for", "users", ".", "Reserved", ":", "Sets", "the", "shared", "access", "information", "for", "one", "or", "more", "users", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/AccountsApi.java#L3056-L3093
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/types/parser/FloatParser.java
FloatParser.parseField
public static final float parseField(byte[] bytes, int startPos, int length, char delimiter) { """ Static utility to parse a field of type float from a byte sequence that represents text characters (such as when read from a file stream). @param bytes The bytes containing the text data that should be parsed. @...
java
public static final float parseField(byte[] bytes, int startPos, int length, char delimiter) { if (length <= 0) { throw new NumberFormatException("Invalid input: Empty string"); } int i = 0; final byte delByte = (byte) delimiter; while (i < length && bytes[i] != delByte) { i++; } String str = ...
[ "public", "static", "final", "float", "parseField", "(", "byte", "[", "]", "bytes", ",", "int", "startPos", ",", "int", "length", ",", "char", "delimiter", ")", "{", "if", "(", "length", "<=", "0", ")", "{", "throw", "new", "NumberFormatException", "(", ...
Static utility to parse a field of type float from a byte sequence that represents text characters (such as when read from a file stream). @param bytes The bytes containing the text data that should be parsed. @param startPos The offset to start the parsing. @param length The length of the byte sequence (counting from...
[ "Static", "utility", "to", "parse", "a", "field", "of", "type", "float", "from", "a", "byte", "sequence", "that", "represents", "text", "characters", "(", "such", "as", "when", "read", "from", "a", "file", "stream", ")", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/types/parser/FloatParser.java#L83-L96
gliga/ekstazi
org.ekstazi.core/src/main/java/org/ekstazi/Config.java
Config.getURIString
private static String getURIString(Properties props, String key, String def) { """ This method is used to load path to .ekstazi when the path is given as URI string. We need to use URI to make sure that we support paths (given to javaagent) even if they contain spaces. """ try { URI uri ...
java
private static String getURIString(Properties props, String key, String def) { try { URI uri = new URI(props.getProperty(key, def)); return new File(uri).getAbsolutePath(); } catch (Exception ex) { return getString(props, key, def); } }
[ "private", "static", "String", "getURIString", "(", "Properties", "props", ",", "String", "key", ",", "String", "def", ")", "{", "try", "{", "URI", "uri", "=", "new", "URI", "(", "props", ".", "getProperty", "(", "key", ",", "def", ")", ")", ";", "re...
This method is used to load path to .ekstazi when the path is given as URI string. We need to use URI to make sure that we support paths (given to javaagent) even if they contain spaces.
[ "This", "method", "is", "used", "to", "load", "path", "to", ".", "ekstazi", "when", "the", "path", "is", "given", "as", "URI", "string", ".", "We", "need", "to", "use", "URI", "to", "make", "sure", "that", "we", "support", "paths", "(", "given", "to"...
train
https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/Config.java#L419-L426
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java
MousePlugin.mouseUp
protected boolean mouseUp(Element element, GqEvent event) { """ Method called when mouse is released.. You should not override this method. Instead, override {@link #mouseStop(Element, GqEvent)} method. """ unbindOtherEvents(); if (started) { started = false; preventClickEvent = event....
java
protected boolean mouseUp(Element element, GqEvent event) { unbindOtherEvents(); if (started) { started = false; preventClickEvent = event.getCurrentEventTarget() == startEvent.getCurrentEventTarget(); mouseStop(element, event); } return true; }
[ "protected", "boolean", "mouseUp", "(", "Element", "element", ",", "GqEvent", "event", ")", "{", "unbindOtherEvents", "(", ")", ";", "if", "(", "started", ")", "{", "started", "=", "false", ";", "preventClickEvent", "=", "event", ".", "getCurrentEventTarget", ...
Method called when mouse is released.. You should not override this method. Instead, override {@link #mouseStop(Element, GqEvent)} method.
[ "Method", "called", "when", "mouse", "is", "released", ".." ]
train
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/MousePlugin.java#L204-L214
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java
NonBlockingReader.getNbReader
public static BufferedReader getNbReader(String logID, int tries, int timeout, HasPrompt emptyPrint) { """ Returns a new BufferedReader that uses tries and timeout for readline() for a UTF-8 StdIn. @param logID a string for logging in case StdIn cannot be opened with UTF-8 encoding @param tries number of tries f...
java
public static BufferedReader getNbReader(String logID, int tries, int timeout, HasPrompt emptyPrint){ return NonBlockingReader.getNbReader(MessageConsole.getStdIn(logID), tries, timeout, emptyPrint); }
[ "public", "static", "BufferedReader", "getNbReader", "(", "String", "logID", ",", "int", "tries", ",", "int", "timeout", ",", "HasPrompt", "emptyPrint", ")", "{", "return", "NonBlockingReader", ".", "getNbReader", "(", "MessageConsole", ".", "getStdIn", "(", "lo...
Returns a new BufferedReader that uses tries and timeout for readline() for a UTF-8 StdIn. @param logID a string for logging in case StdIn cannot be opened with UTF-8 encoding @param tries number of tries for read calls, use one as default @param timeout milliseconds for read timeout @param emptyPrint a printout to rea...
[ "Returns", "a", "new", "BufferedReader", "that", "uses", "tries", "and", "timeout", "for", "readline", "()", "for", "a", "UTF", "-", "8", "StdIn", "." ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/console/NonBlockingReader.java#L89-L91
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.countByG_Tw
@Override public int countByG_Tw(long groupId, String twoLettersISOCode) { """ Returns the number of commerce countries where groupId = &#63; and twoLettersISOCode = &#63;. @param groupId the group ID @param twoLettersISOCode the two letters iso code @return the number of matching commerce countries """ ...
java
@Override public int countByG_Tw(long groupId, String twoLettersISOCode) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_TW; Object[] finderArgs = new Object[] { groupId, twoLettersISOCode }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query...
[ "@", "Override", "public", "int", "countByG_Tw", "(", "long", "groupId", ",", "String", "twoLettersISOCode", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_COUNT_BY_G_TW", ";", "Object", "[", "]", "finderArgs", "=", "new", "Object", "[", "]", "{", "gr...
Returns the number of commerce countries where groupId = &#63; and twoLettersISOCode = &#63;. @param groupId the group ID @param twoLettersISOCode the two letters iso code @return the number of matching commerce countries
[ "Returns", "the", "number", "of", "commerce", "countries", "where", "groupId", "=", "&#63", ";", "and", "twoLettersISOCode", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L2171-L2232
meltmedia/cadmium
servlets/src/main/java/com/meltmedia/cadmium/servlets/FileServlet.java
FileServlet.findFile
public File findFile( String path ) throws IOException { """ Returns the file object for the given path, including welcome file lookup. If the file cannot be found, a FileNotFoundException is returned. @param path the path to look up. @return the file object for that path. @throws FileNotFoundException if t...
java
public File findFile( String path ) throws IOException { File base = new File(getBasePath()); File pathFile = new File(base, "."+path); if( !pathFile.exists()) throw new FileNotFoundException("No file or directory at "+pathFile.getCanonicalPath()); if( pathFile.isFile()) return pathFile; pathFile = new F...
[ "public", "File", "findFile", "(", "String", "path", ")", "throws", "IOException", "{", "File", "base", "=", "new", "File", "(", "getBasePath", "(", ")", ")", ";", "File", "pathFile", "=", "new", "File", "(", "base", ",", "\".\"", "+", "path", ")", "...
Returns the file object for the given path, including welcome file lookup. If the file cannot be found, a FileNotFoundException is returned. @param path the path to look up. @return the file object for that path. @throws FileNotFoundException if the file could not be found. @throws IOException if any other problem pr...
[ "Returns", "the", "file", "object", "for", "the", "given", "path", "including", "welcome", "file", "lookup", ".", "If", "the", "file", "cannot", "be", "found", "a", "FileNotFoundException", "is", "returned", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/servlets/src/main/java/com/meltmedia/cadmium/servlets/FileServlet.java#L106-L114
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.appendPadding
public StrBuilder appendPadding(final int length, final char padChar) { """ Appends the pad character to the builder the specified number of times. @param length the length to append, negative means no append @param padChar the character to append @return this, to enable chaining """ if (length ...
java
public StrBuilder appendPadding(final int length, final char padChar) { if (length >= 0) { ensureCapacity(size + length); for (int i = 0; i < length; i++) { buffer[size++] = padChar; } } return this; }
[ "public", "StrBuilder", "appendPadding", "(", "final", "int", "length", ",", "final", "char", "padChar", ")", "{", "if", "(", "length", ">=", "0", ")", "{", "ensureCapacity", "(", "size", "+", "length", ")", ";", "for", "(", "int", "i", "=", "0", ";"...
Appends the pad character to the builder the specified number of times. @param length the length to append, negative means no append @param padChar the character to append @return this, to enable chaining
[ "Appends", "the", "pad", "character", "to", "the", "builder", "the", "specified", "number", "of", "times", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L1480-L1488
spotify/helios
helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java
ZooKeeperMasterModel.rollingUpdateUndeploy
private RollingUpdateOp rollingUpdateUndeploy(final ZooKeeperClient client, final RollingUpdateOpFactory opFactory, final DeploymentGroup deploymentGroup, final String host) { ...
java
private RollingUpdateOp rollingUpdateUndeploy(final ZooKeeperClient client, final RollingUpdateOpFactory opFactory, final DeploymentGroup deploymentGroup, final String host) { ...
[ "private", "RollingUpdateOp", "rollingUpdateUndeploy", "(", "final", "ZooKeeperClient", "client", ",", "final", "RollingUpdateOpFactory", "opFactory", ",", "final", "DeploymentGroup", "deploymentGroup", ",", "final", "String", "host", ")", "{", "return", "rollingUpdateUnd...
rollingUpdateUndeploy is used to undeploy jobs during a rolling update. It enables the 'skipRedundantUndeploys' flag, which enables the redundantDeployment() check.
[ "rollingUpdateUndeploy", "is", "used", "to", "undeploy", "jobs", "during", "a", "rolling", "update", ".", "It", "enables", "the", "skipRedundantUndeploys", "flag", "which", "enables", "the", "redundantDeployment", "()", "check", "." ]
train
https://github.com/spotify/helios/blob/c9000bc1d6908651570be8b057d4981bba4df5b4/helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java#L1077-L1082
phax/ph-oton
ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java
AbstractJSBlock._if
@Nonnull public JSConditional _if (@Nonnull final IJSExpression aTest, @Nullable final IHasJSCode aThen) { """ Create an If statement and add it to this block @param aTest {@link IJSExpression} to be tested to determine branching @param aThen "then" block content. May be <code>null</code>. @return Newly g...
java
@Nonnull public JSConditional _if (@Nonnull final IJSExpression aTest, @Nullable final IHasJSCode aThen) { return addStatement (new JSConditional (aTest, aThen)); }
[ "@", "Nonnull", "public", "JSConditional", "_if", "(", "@", "Nonnull", "final", "IJSExpression", "aTest", ",", "@", "Nullable", "final", "IHasJSCode", "aThen", ")", "{", "return", "addStatement", "(", "new", "JSConditional", "(", "aTest", ",", "aThen", ")", ...
Create an If statement and add it to this block @param aTest {@link IJSExpression} to be tested to determine branching @param aThen "then" block content. May be <code>null</code>. @return Newly generated conditional statement
[ "Create", "an", "If", "statement", "and", "add", "it", "to", "this", "block" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java#L999-L1003
f2prateek/rx-preferences
rx-preferences/src/main/java/com/f2prateek/rx/preferences2/RxSharedPreferences.java
RxSharedPreferences.getBoolean
@CheckResult @NonNull public Preference<Boolean> getBoolean(@NonNull String key) { """ Create a boolean preference for {@code key}. Default is {@code false}. """ return getBoolean(key, DEFAULT_BOOLEAN); }
java
@CheckResult @NonNull public Preference<Boolean> getBoolean(@NonNull String key) { return getBoolean(key, DEFAULT_BOOLEAN); }
[ "@", "CheckResult", "@", "NonNull", "public", "Preference", "<", "Boolean", ">", "getBoolean", "(", "@", "NonNull", "String", "key", ")", "{", "return", "getBoolean", "(", "key", ",", "DEFAULT_BOOLEAN", ")", ";", "}" ]
Create a boolean preference for {@code key}. Default is {@code false}.
[ "Create", "a", "boolean", "preference", "for", "{" ]
train
https://github.com/f2prateek/rx-preferences/blob/e338b4e6cee9c0c7b850be86ab41ed7b39a3637e/rx-preferences/src/main/java/com/f2prateek/rx/preferences2/RxSharedPreferences.java#L62-L65
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.setObjectAcl
public void setObjectAcl(String bucketName, String key, String versionId, AccessControlList acl, RequestMetricCollector requestMetricCollector) throws SdkClientException, AmazonServiceException { """ Same as {@link #setObjectAcl(String, String, String, AccessControlList)} but allows specif...
java
public void setObjectAcl(String bucketName, String key, String versionId, AccessControlList acl, RequestMetricCollector requestMetricCollector) throws SdkClientException, AmazonServiceException { setObjectAcl(new SetObjectAclRequest(bucketName, key, versionId, acl) .<SetO...
[ "public", "void", "setObjectAcl", "(", "String", "bucketName", ",", "String", "key", ",", "String", "versionId", ",", "AccessControlList", "acl", ",", "RequestMetricCollector", "requestMetricCollector", ")", "throws", "SdkClientException", ",", "AmazonServiceException", ...
Same as {@link #setObjectAcl(String, String, String, AccessControlList)} but allows specifying a request metric collector.
[ "Same", "as", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L1147-L1152
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_instanceId_PUT
public void project_serviceName_instance_instanceId_PUT(String serviceName, String instanceId, String instanceName) throws IOException { """ Alter an instance REST: PUT /cloud/project/{serviceName}/instance/{instanceId} @param instanceId [required] Instance id @param instanceName [required] Instance new name ...
java
public void project_serviceName_instance_instanceId_PUT(String serviceName, String instanceId, String instanceName) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}"; StringBuilder sb = path(qPath, serviceName, instanceId); HashMap<String, Object>o = new HashMap<String, Obje...
[ "public", "void", "project_serviceName_instance_instanceId_PUT", "(", "String", "serviceName", ",", "String", "instanceId", ",", "String", "instanceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/{instanceId}\"", ";",...
Alter an instance REST: PUT /cloud/project/{serviceName}/instance/{instanceId} @param instanceId [required] Instance id @param instanceName [required] Instance new name @param serviceName [required] Service name
[ "Alter", "an", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1863-L1869
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/LombokPropertyDescriptor.java
LombokPropertyDescriptor.hasLombokPublicAccessor
private boolean hasLombokPublicAccessor(MetadataGenerationEnvironment env, boolean getter) { """ Determine if the current {@link #getField() field} defines a public accessor using lombok annotations. @param env the {@link MetadataGenerationEnvironment} @param getter {@code true} to look for the read accessor...
java
private boolean hasLombokPublicAccessor(MetadataGenerationEnvironment env, boolean getter) { String annotation = (getter ? LOMBOK_GETTER_ANNOTATION : LOMBOK_SETTER_ANNOTATION); AnnotationMirror lombokMethodAnnotationOnField = env.getAnnotation(getField(), annotation); if (lombokMethodAnnotationOnField ...
[ "private", "boolean", "hasLombokPublicAccessor", "(", "MetadataGenerationEnvironment", "env", ",", "boolean", "getter", ")", "{", "String", "annotation", "=", "(", "getter", "?", "LOMBOK_GETTER_ANNOTATION", ":", "LOMBOK_SETTER_ANNOTATION", ")", ";", "AnnotationMirror", ...
Determine if the current {@link #getField() field} defines a public accessor using lombok annotations. @param env the {@link MetadataGenerationEnvironment} @param getter {@code true} to look for the read accessor, {@code false} for the write accessor @return {@code true} if this field has a public accessor of the speci...
[ "Determine", "if", "the", "current", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/LombokPropertyDescriptor.java#L96-L111
UrielCh/ovh-java-sdk
ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java
ApiOvhConnectivity.eligibility_search_lines_POST
public OvhAsyncTaskArray<OvhLine> eligibility_search_lines_POST(String ownerName, String streetCode, String streetNumber) throws IOException { """ Search for active and inactive lines at an address. It will search for active lines only if the owner name is specified REST: POST /connectivity/eligibility/search/l...
java
public OvhAsyncTaskArray<OvhLine> eligibility_search_lines_POST(String ownerName, String streetCode, String streetNumber) throws IOException { String qPath = "/connectivity/eligibility/search/lines"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "ownerName"...
[ "public", "OvhAsyncTaskArray", "<", "OvhLine", ">", "eligibility_search_lines_POST", "(", "String", "ownerName", ",", "String", "streetCode", ",", "String", "streetNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/connectivity/eligibility/search/line...
Search for active and inactive lines at an address. It will search for active lines only if the owner name is specified REST: POST /connectivity/eligibility/search/lines @param ownerName [required] Owner name, at least the first three chars @param streetNumber [required] Street number, that can be found using /connect...
[ "Search", "for", "active", "and", "inactive", "lines", "at", "an", "address", ".", "It", "will", "search", "for", "active", "lines", "only", "if", "the", "owner", "name", "is", "specified" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java#L54-L63
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/jmx/JMX.java
JMX.registerMemoryNotifications
public void registerMemoryNotifications(NotificationListener notificationListener, Object handback) { """ Allows a listener to be registered within the MemoryMXBean as a notification listener usage threshold exceeded notification - for notifying that the memory usage of a memory pool is increased and has reached...
java
public void registerMemoryNotifications(NotificationListener notificationListener, Object handback) { NotificationEmitter emitter = (NotificationEmitter) this.getMemory(); emitter.addNotificationListener(notificationListener, null, handback); }
[ "public", "void", "registerMemoryNotifications", "(", "NotificationListener", "notificationListener", ",", "Object", "handback", ")", "{", "NotificationEmitter", "emitter", "=", "(", "NotificationEmitter", ")", "this", ".", "getMemory", "(", ")", ";", "emitter", ".", ...
Allows a listener to be registered within the MemoryMXBean as a notification listener usage threshold exceeded notification - for notifying that the memory usage of a memory pool is increased and has reached or exceeded its usage threshold value. collection usage threshold exceeded notification - for notifying that th...
[ "Allows", "a", "listener", "to", "be", "registered", "within", "the", "MemoryMXBean", "as", "a", "notification", "listener", "usage", "threshold", "exceeded", "notification", "-", "for", "notifying", "that", "the", "memory", "usage", "of", "a", "memory", "pool",...
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/jmx/JMX.java#L530-L535
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getRecipeInfo
public void getRecipeInfo(int[] ids, Callback<List<Recipe>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on Recipes API go <a href="https://wiki.guildwars2.com/wiki/API:2/recipes">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callbac...
java
public void getRecipeInfo(int[] ids, Callback<List<Recipe>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getRecipeInfo(processIds(ids)).enqueue(callback); }
[ "public", "void", "getRecipeInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "Recipe", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", ...
For more info on Recipes API go <a href="https://wiki.guildwars2.com/wiki/API:2/recipes">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of recipe id @param callback callback that is g...
[ "For", "more", "info", "on", "Recipes", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "recipes", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2306-L2309