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
morimekta/utils
io-util/src/main/java/net/morimekta/util/json/JsonTokenizer.java
JsonTokenizer.peek
@Nonnull public JsonToken peek(String message) throws IOException, JsonException { """ Return the next token or throw an exception. Though it does not consume that token. @param message Message to add to exception if there are no more JSON tokens on the stream. @return The next token. @throws JsonExcept...
java
@Nonnull public JsonToken peek(String message) throws IOException, JsonException { if (!hasNext()) { throw newParseException("Expected %s: Got end of file", message); } return unreadToken; }
[ "@", "Nonnull", "public", "JsonToken", "peek", "(", "String", "message", ")", "throws", "IOException", ",", "JsonException", "{", "if", "(", "!", "hasNext", "(", ")", ")", "{", "throw", "newParseException", "(", "\"Expected %s: Got end of file\"", ",", "message"...
Return the next token or throw an exception. Though it does not consume that token. @param message Message to add to exception if there are no more JSON tokens on the stream. @return The next token. @throws JsonException If the next token is illegally formatted. @throws IOException If unable to read from stream.
[ "Return", "the", "next", "token", "or", "throw", "an", "exception", ".", "Though", "it", "does", "not", "consume", "that", "token", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/json/JsonTokenizer.java#L286-L292
dbmdz/iiif-presentation-api
iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java
IIIFPresentationApiController.getCollection
@CrossOrigin(allowedHeaders = { """ Collections are used to list the manifests available for viewing, and to describe the structures, hierarchies or curated collections that the physical objects are part of. The collections may include both other collections and manifests, in order to form a hierarchy of objects...
java
@CrossOrigin(allowedHeaders = {"*"}, origins = {"*"}) @RequestMapping(value = {"collection/{name}"}, method = {RequestMethod.GET, RequestMethod.HEAD}, produces = "application/json") @ResponseBody public Collection getCollection(@PathVariable String name, HttpServletRequest request) throws NotFoundExcept...
[ "@", "CrossOrigin", "(", "allowedHeaders", "=", "{", "\"*\"", "}", ",", "origins", "=", "{", "\"*\"", "}", ")", "@", "RequestMapping", "(", "value", "=", "{", "\"collection/{name}\"", "}", ",", "method", "=", "{", "RequestMethod", ".", "GET", ",", "Reque...
Collections are used to list the manifests available for viewing, and to describe the structures, hierarchies or curated collections that the physical objects are part of. The collections may include both other collections and manifests, in order to form a hierarchy of objects with manifests at the leaf nodes of the tr...
[ "Collections", "are", "used", "to", "list", "the", "manifests", "available", "for", "viewing", "and", "to", "describe", "the", "structures", "hierarchies", "or", "curated", "collections", "that", "the", "physical", "objects", "are", "part", "of", ".", "The", "...
train
https://github.com/dbmdz/iiif-presentation-api/blob/8b551d3717eed2620bc9e50b4c23f945b73b9cea/iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java#L135-L155
box/box-java-sdk
src/main/java/com/box/sdk/BoxItem.java
BoxItem.applyWatermark
protected BoxWatermark applyWatermark(URLTemplate itemUrl, String imprint) { """ Used to apply or update the watermark for the item. @param itemUrl url template for the item. @param imprint the value must be "default", as custom watermarks is not yet supported. @return the watermark associated with the item. ...
java
protected BoxWatermark applyWatermark(URLTemplate itemUrl, String imprint) { URL watermarkUrl = itemUrl.build(this.getAPI().getBaseURL(), this.getID()); URL url = WATERMARK_URL_TEMPLATE.build(watermarkUrl.toString()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT"); ...
[ "protected", "BoxWatermark", "applyWatermark", "(", "URLTemplate", "itemUrl", ",", "String", "imprint", ")", "{", "URL", "watermarkUrl", "=", "itemUrl", ".", "build", "(", "this", ".", "getAPI", "(", ")", ".", "getBaseURL", "(", ")", ",", "this", ".", "get...
Used to apply or update the watermark for the item. @param itemUrl url template for the item. @param imprint the value must be "default", as custom watermarks is not yet supported. @return the watermark associated with the item.
[ "Used", "to", "apply", "or", "update", "the", "watermark", "for", "the", "item", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxItem.java#L105-L115
wisdom-framework/wisdom
core/application-configuration/src/main/java/org/wisdom/configuration/ConfigurationImpl.java
ConfigurationImpl.getDoubleOrDie
@Override public Double getDoubleOrDie(String key) { """ The "die" method forces this key to be set. Otherwise a runtime exception will be thrown. @param key the key used in the configuration file. @return the Double or a RuntimeException will be thrown. """ Double value = getDouble(key); ...
java
@Override public Double getDoubleOrDie(String key) { Double value = getDouble(key); if (value == null) { throw new IllegalArgumentException(String.format(ERROR_KEYNOTFOUND, key)); } else { return value; } }
[ "@", "Override", "public", "Double", "getDoubleOrDie", "(", "String", "key", ")", "{", "Double", "value", "=", "getDouble", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", ...
The "die" method forces this key to be set. Otherwise a runtime exception will be thrown. @param key the key used in the configuration file. @return the Double or a RuntimeException will be thrown.
[ "The", "die", "method", "forces", "this", "key", "to", "be", "set", ".", "Otherwise", "a", "runtime", "exception", "will", "be", "thrown", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/application-configuration/src/main/java/org/wisdom/configuration/ConfigurationImpl.java#L310-L318
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.logDebug
public void logDebug(Object[] message,Throwable throwable) { """ Logs the provided data at the debug level. @param message The message parts (may be null) @param throwable The error (may be null) """ this.log(LogLevel.DEBUG,message,throwable); }
java
public void logDebug(Object[] message,Throwable throwable) { this.log(LogLevel.DEBUG,message,throwable); }
[ "public", "void", "logDebug", "(", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "this", ".", "log", "(", "LogLevel", ".", "DEBUG", ",", "message", ",", "throwable", ")", ";", "}" ]
Logs the provided data at the debug level. @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "at", "the", "debug", "level", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L170-L173
opsmatters/newrelic-api
src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java
HttpContext.executePutRequest
protected void executePutRequest(URI uri, Object obj) { """ Execute a PUT request. @param uri The URI to call @param obj The object to use for the PUT """ executePutRequest(uri, obj, null, null); }
java
protected void executePutRequest(URI uri, Object obj) { executePutRequest(uri, obj, null, null); }
[ "protected", "void", "executePutRequest", "(", "URI", "uri", ",", "Object", "obj", ")", "{", "executePutRequest", "(", "uri", ",", "obj", ",", "null", ",", "null", ")", ";", "}" ]
Execute a PUT request. @param uri The URI to call @param obj The object to use for the PUT
[ "Execute", "a", "PUT", "request", "." ]
train
https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L360-L363
VoltDB/voltdb
src/frontend/org/voltdb/importer/ChannelDistributer.java
ChannelDistributer.asChannelSet
static NavigableSet<ChannelSpec> asChannelSet(byte[] data) throws JSONException, IllegalArgumentException { """ Reads the JSON document contained in the byte array data, and converts it to a {@link NavigableSet<ChannelSpec> set of channel specs} @param data zookeeper node data content @return a {@...
java
static NavigableSet<ChannelSpec> asChannelSet(byte[] data) throws JSONException, IllegalArgumentException { ImmutableSortedSet.Builder<ChannelSpec> sbld = ImmutableSortedSet.naturalOrder(); JSONArray ja = new JSONArray(new String(data, StandardCharsets.UTF_8)); for (int i=0; i< ja.le...
[ "static", "NavigableSet", "<", "ChannelSpec", ">", "asChannelSet", "(", "byte", "[", "]", "data", ")", "throws", "JSONException", ",", "IllegalArgumentException", "{", "ImmutableSortedSet", ".", "Builder", "<", "ChannelSpec", ">", "sbld", "=", "ImmutableSortedSet", ...
Reads the JSON document contained in the byte array data, and converts it to a {@link NavigableSet<ChannelSpec> set of channel specs} @param data zookeeper node data content @return a {@link NavigableSet<ChannelSpec> set of channel specs} @throws JSONException on JSON parse failures @throws IllegalArgumentException on...
[ "Reads", "the", "JSON", "document", "contained", "in", "the", "byte", "array", "data", "and", "converts", "it", "to", "a", "{", "@link", "NavigableSet<ChannelSpec", ">", "set", "of", "channel", "specs", "}" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/ChannelDistributer.java#L184-L192
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/util/EnumUtils.java
EnumUtils.writeEnum
public static void writeEnum(final DataOutput out, final Enum<?> enumVal) throws IOException { """ Writes a value of an enumeration to the given output stream. @param out the output stream to write to @param enumVal the value of a enumeration to be written to the output stream @throws IOException thrown if...
java
public static void writeEnum(final DataOutput out, final Enum<?> enumVal) throws IOException { if (enumVal == null) { out.writeBoolean(false); } else { out.writeBoolean(true); StringRecord.writeString(out, enumVal.name()); } }
[ "public", "static", "void", "writeEnum", "(", "final", "DataOutput", "out", ",", "final", "Enum", "<", "?", ">", "enumVal", ")", "throws", "IOException", "{", "if", "(", "enumVal", "==", "null", ")", "{", "out", ".", "writeBoolean", "(", "false", ")", ...
Writes a value of an enumeration to the given output stream. @param out the output stream to write to @param enumVal the value of a enumeration to be written to the output stream @throws IOException thrown if any error occurred while writing data to the stream
[ "Writes", "a", "value", "of", "an", "enumeration", "to", "the", "given", "output", "stream", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/util/EnumUtils.java#L66-L74
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateDateTimeSettings
private void populateDateTimeSettings(Record record, ProjectProperties properties) { """ Populates date time settings. @param record MPX record @param properties project properties """ properties.setDateOrder(record.getDateOrder(0)); properties.setTimeFormat(record.getTimeFormat(1)); Dat...
java
private void populateDateTimeSettings(Record record, ProjectProperties properties) { properties.setDateOrder(record.getDateOrder(0)); properties.setTimeFormat(record.getTimeFormat(1)); Date time = getTimeFromInteger(record.getInteger(2)); if (time != null) { properties.setDefa...
[ "private", "void", "populateDateTimeSettings", "(", "Record", "record", ",", "ProjectProperties", "properties", ")", "{", "properties", ".", "setDateOrder", "(", "record", ".", "getDateOrder", "(", "0", ")", ")", ";", "properties", ".", "setTimeFormat", "(", "re...
Populates date time settings. @param record MPX record @param properties project properties
[ "Populates", "date", "time", "settings", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L528-L555
mangstadt/biweekly
src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java
TimeUtils.daysBetween
public static int daysBetween(int year1, int month1, int day1, int year2, int month2, int day2) { """ Calculates the number of days between two dates. @param year1 the year of the first date @param month1 the month of the first date @param day1 the day of the first date @param year2 the year of the second date...
java
public static int daysBetween(int year1, int month1, int day1, int year2, int month2, int day2) { return fixedFromGregorian(year1, month1, day1) - fixedFromGregorian(year2, month2, day2); }
[ "public", "static", "int", "daysBetween", "(", "int", "year1", ",", "int", "month1", ",", "int", "day1", ",", "int", "year2", ",", "int", "month2", ",", "int", "day2", ")", "{", "return", "fixedFromGregorian", "(", "year1", ",", "month1", ",", "day1", ...
Calculates the number of days between two dates. @param year1 the year of the first date @param month1 the month of the first date @param day1 the day of the first date @param year2 the year of the second date @param month2 the month of the second date @param day2 the day of the second date @return the number of days
[ "Calculates", "the", "number", "of", "days", "between", "two", "dates", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/com/google/ical/util/TimeUtils.java#L183-L185
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java
IoUtil.toPushbackStream
public static PushbackInputStream toPushbackStream(InputStream in, int pushBackSize) { """ 转换为{@link PushbackInputStream}<br> 如果传入的输入流已经是{@link PushbackInputStream},强转返回,否则新建一个 @param in {@link InputStream} @param pushBackSize 推后的byte数 @return {@link PushbackInputStream} @since 3.1.0 """ return (in i...
java
public static PushbackInputStream toPushbackStream(InputStream in, int pushBackSize) { return (in instanceof PushbackInputStream) ? (PushbackInputStream) in : new PushbackInputStream(in, pushBackSize); }
[ "public", "static", "PushbackInputStream", "toPushbackStream", "(", "InputStream", "in", ",", "int", "pushBackSize", ")", "{", "return", "(", "in", "instanceof", "PushbackInputStream", ")", "?", "(", "PushbackInputStream", ")", "in", ":", "new", "PushbackInputStream...
转换为{@link PushbackInputStream}<br> 如果传入的输入流已经是{@link PushbackInputStream},强转返回,否则新建一个 @param in {@link InputStream} @param pushBackSize 推后的byte数 @return {@link PushbackInputStream} @since 3.1.0
[ "转换为", "{", "@link", "PushbackInputStream", "}", "<br", ">", "如果传入的输入流已经是", "{", "@link", "PushbackInputStream", "}", ",强转返回,否则新建一个" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/IoUtil.java#L845-L847
apache/flink
flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java
ExecutionEnvironment.createLocalEnvironmentWithWebUI
@PublicEvolving public static ExecutionEnvironment createLocalEnvironmentWithWebUI(Configuration conf) { """ Creates a {@link LocalEnvironment} for local program execution that also starts the web monitoring UI. <p>The local execution environment will run the program in a multi-threaded fashion in the same J...
java
@PublicEvolving public static ExecutionEnvironment createLocalEnvironmentWithWebUI(Configuration conf) { checkNotNull(conf, "conf"); conf.setBoolean(ConfigConstants.LOCAL_START_WEBSERVER, true); if (!conf.contains(RestOptions.PORT)) { // explicitly set this option so that it's not set to 0 later conf.set...
[ "@", "PublicEvolving", "public", "static", "ExecutionEnvironment", "createLocalEnvironmentWithWebUI", "(", "Configuration", "conf", ")", "{", "checkNotNull", "(", "conf", ",", "\"conf\"", ")", ";", "conf", ".", "setBoolean", "(", "ConfigConstants", ".", "LOCAL_START_W...
Creates a {@link LocalEnvironment} for local program execution that also starts the web monitoring UI. <p>The local execution environment will run the program in a multi-threaded fashion in the same JVM as the environment was created in. It will use the parallelism specified in the parameter. <p>If the configuration ...
[ "Creates", "a", "{", "@link", "LocalEnvironment", "}", "for", "local", "program", "execution", "that", "also", "starts", "the", "web", "monitoring", "UI", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java#L1128-L1140
jamesagnew/hapi-fhir
hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/AdditionalRequestHeadersInterceptor.java
AdditionalRequestHeadersInterceptor.addAllHeaderValues
public void addAllHeaderValues(String headerName, List<String> headerValues) { """ Adds the list of header values for the given header. Note that {@code headerName} and {@code headerValues} cannot be null. @param headerName the name of the header @param headerValues the list of values to add for the header @th...
java
public void addAllHeaderValues(String headerName, List<String> headerValues) { Objects.requireNonNull(headerName, "headerName cannot be null"); Objects.requireNonNull(headerValues, "headerValues cannot be null"); getHeaderValues(headerName).addAll(headerValues); }
[ "public", "void", "addAllHeaderValues", "(", "String", "headerName", ",", "List", "<", "String", ">", "headerValues", ")", "{", "Objects", ".", "requireNonNull", "(", "headerName", ",", "\"headerName cannot be null\"", ")", ";", "Objects", ".", "requireNonNull", "...
Adds the list of header values for the given header. Note that {@code headerName} and {@code headerValues} cannot be null. @param headerName the name of the header @param headerValues the list of values to add for the header @throws NullPointerException if either parameter is {@code null}
[ "Adds", "the", "list", "of", "header", "values", "for", "the", "given", "header", ".", "Note", "that", "{" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/interceptor/AdditionalRequestHeadersInterceptor.java#L72-L77
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java
SlotManager.handleFailedSlotRequest
private void handleFailedSlotRequest(SlotID slotId, AllocationID allocationId, Throwable cause) { """ Handles a failed slot request. The slot manager tries to find a new slot fulfilling the resource requirements for the failed slot request. @param slotId identifying the slot which was assigned to the slot requ...
java
private void handleFailedSlotRequest(SlotID slotId, AllocationID allocationId, Throwable cause) { PendingSlotRequest pendingSlotRequest = pendingSlotRequests.get(allocationId); LOG.debug("Slot request with allocation id {} failed for slot {}.", allocationId, slotId, cause); if (null != pendingSlotRequest) { ...
[ "private", "void", "handleFailedSlotRequest", "(", "SlotID", "slotId", ",", "AllocationID", "allocationId", ",", "Throwable", "cause", ")", "{", "PendingSlotRequest", "pendingSlotRequest", "=", "pendingSlotRequests", ".", "get", "(", "allocationId", ")", ";", "LOG", ...
Handles a failed slot request. The slot manager tries to find a new slot fulfilling the resource requirements for the failed slot request. @param slotId identifying the slot which was assigned to the slot request before @param allocationId identifying the failed slot request @param cause of the failure
[ "Handles", "a", "failed", "slot", "request", ".", "The", "slot", "manager", "tries", "to", "find", "a", "new", "slot", "fulfilling", "the", "resource", "requirements", "for", "the", "failed", "slot", "request", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java#L949-L970
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.setCollator
public void setCollator(RuleBasedCollator collator) { """ Sets the {@link RuleBasedCollator} to be used for language-specific searching. <p> The iterator's position will not be changed by this method. @param collator to use for this <tt>StringSearch</tt> @throws IllegalArgumentException thrown when collator is...
java
public void setCollator(RuleBasedCollator collator) { if (collator == null) { throw new IllegalArgumentException("Collator can not be null"); } collator_ = collator; ceMask_ = getMask(collator_.getStrength()); ULocale collLocale = collator.getLocale(ULocale.VALID_LOC...
[ "public", "void", "setCollator", "(", "RuleBasedCollator", "collator", ")", "{", "if", "(", "collator", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Collator can not be null\"", ")", ";", "}", "collator_", "=", "collator", ";", "ce...
Sets the {@link RuleBasedCollator} to be used for language-specific searching. <p> The iterator's position will not be changed by this method. @param collator to use for this <tt>StringSearch</tt> @throws IllegalArgumentException thrown when collator is null @see #getCollator
[ "Sets", "the", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L309-L327
BellaDati/belladati-sdk-java
src/main/java/com/belladati/sdk/impl/BellaDatiServiceImpl.java
BellaDatiServiceImpl.appendFilter
public URIBuilder appendFilter(URIBuilder builder, Collection<Filter<?>> filters) { """ Appends a filter parameter from the given filters to the URI builder. Won't do anything if the filter collection is empty. @param builder the builder to append to @param filters filters to append @return the same builder,...
java
public URIBuilder appendFilter(URIBuilder builder, Collection<Filter<?>> filters) { if (filters.size() > 0) { ObjectNode filterNode = new ObjectMapper().createObjectNode(); for (Filter<?> filter : filters) { filterNode.setAll(filter.toJson()); } ObjectNode drilldownNode = new ObjectMapper().createObje...
[ "public", "URIBuilder", "appendFilter", "(", "URIBuilder", "builder", ",", "Collection", "<", "Filter", "<", "?", ">", ">", "filters", ")", "{", "if", "(", "filters", ".", "size", "(", ")", ">", "0", ")", "{", "ObjectNode", "filterNode", "=", "new", "O...
Appends a filter parameter from the given filters to the URI builder. Won't do anything if the filter collection is empty. @param builder the builder to append to @param filters filters to append @return the same builder, for chaining
[ "Appends", "a", "filter", "parameter", "from", "the", "given", "filters", "to", "the", "URI", "builder", ".", "Won", "t", "do", "anything", "if", "the", "filter", "collection", "is", "empty", "." ]
train
https://github.com/BellaDati/belladati-sdk-java/blob/1a732a57ebc825ddf47ce405723cc958adb1a43f/src/main/java/com/belladati/sdk/impl/BellaDatiServiceImpl.java#L384-L395
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/TemporalExtendedParameterDefinition.java
TemporalExtendedParameterDefinition.getMatches
@Override boolean getMatches(Proposition proposition, Collection<String> propIds) throws KnowledgeSourceReadException { """ Returns whether a parameter has the same id and value, and consistent duration as specified by this extended parameter definition. @param parameter a <code>Parameter</code> @return <...
java
@Override boolean getMatches(Proposition proposition, Collection<String> propIds) throws KnowledgeSourceReadException { if (!super.getMatches(proposition, propIds)) { return false; } if (!(proposition instanceof TemporalParameter)) { return false; } T...
[ "@", "Override", "boolean", "getMatches", "(", "Proposition", "proposition", ",", "Collection", "<", "String", ">", "propIds", ")", "throws", "KnowledgeSourceReadException", "{", "if", "(", "!", "super", ".", "getMatches", "(", "proposition", ",", "propIds", ")"...
Returns whether a parameter has the same id and value, and consistent duration as specified by this extended parameter definition. @param parameter a <code>Parameter</code> @return <code>true</code> if <code>parameter</code> has the same id and value, and consistent duration as specified by this extended parameter def...
[ "Returns", "whether", "a", "parameter", "has", "the", "same", "id", "and", "value", "and", "consistent", "duration", "as", "specified", "by", "this", "extended", "parameter", "definition", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/TemporalExtendedParameterDefinition.java#L60-L78
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConstraintAdapter.java
ConstraintAdapter.getDirection
protected ConversionDirectionType getDirection(Conversion conv, Control cont) { """ Gets the direction of the Control chain the the Interaction. @param conv controlled conversion @param cont top control @return the direction of the conversion related to the catalysis """ return getDirection(conv, null, co...
java
protected ConversionDirectionType getDirection(Conversion conv, Control cont) { return getDirection(conv, null, cont); }
[ "protected", "ConversionDirectionType", "getDirection", "(", "Conversion", "conv", ",", "Control", "cont", ")", "{", "return", "getDirection", "(", "conv", ",", "null", ",", "cont", ")", ";", "}" ]
Gets the direction of the Control chain the the Interaction. @param conv controlled conversion @param cont top control @return the direction of the conversion related to the catalysis
[ "Gets", "the", "direction", "of", "the", "Control", "chain", "the", "the", "Interaction", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConstraintAdapter.java#L132-L135
javers/javers
javers-core/src/main/java/org/javers/common/reflection/ReflectionUtil.java
ReflectionUtil.newInstance
public static Object newInstance(Class clazz, ArgumentResolver resolver) { """ Creates new instance of public or package-private class. Calls first, not-private constructor """ Validate.argumentIsNotNull(clazz); for (Constructor constructor : clazz.getDeclaredConstructors()) { if (...
java
public static Object newInstance(Class clazz, ArgumentResolver resolver){ Validate.argumentIsNotNull(clazz); for (Constructor constructor : clazz.getDeclaredConstructors()) { if (isPrivate(constructor) || isProtected(constructor)) { continue; } Class ...
[ "public", "static", "Object", "newInstance", "(", "Class", "clazz", ",", "ArgumentResolver", "resolver", ")", "{", "Validate", ".", "argumentIsNotNull", "(", "clazz", ")", ";", "for", "(", "Constructor", "constructor", ":", "clazz", ".", "getDeclaredConstructors",...
Creates new instance of public or package-private class. Calls first, not-private constructor
[ "Creates", "new", "instance", "of", "public", "or", "package", "-", "private", "class", ".", "Calls", "first", "not", "-", "private", "constructor" ]
train
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/common/reflection/ReflectionUtil.java#L64-L90
pwittchen/ReactiveNetwork
library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/Preconditions.java
Preconditions.checkNotNullOrEmpty
public static void checkNotNullOrEmpty(String string, String message) { """ Validation method, which checks if a string is null or empty @param string to verify @param message to be thrown in exception """ if (string == null || string.isEmpty()) { throw new IllegalArgumentException(message); ...
java
public static void checkNotNullOrEmpty(String string, String message) { if (string == null || string.isEmpty()) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "checkNotNullOrEmpty", "(", "String", "string", ",", "String", "message", ")", "{", "if", "(", "string", "==", "null", "||", "string", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message",...
Validation method, which checks if a string is null or empty @param string to verify @param message to be thrown in exception
[ "Validation", "method", "which", "checks", "if", "a", "string", "is", "null", "or", "empty" ]
train
https://github.com/pwittchen/ReactiveNetwork/blob/cfeb3b79a1e44d106581af5e6709ff206e60c369/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/Preconditions.java#L39-L43
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
BDBRepositoryBuilder.setFileName
public void setFileName(String filename, String typeName) { """ Specify the file that a BDB database should reside in, except for log files and caches. The filename is relative to the environment home, unless data directories have been specified. For BDBRepositories that are log files only, this configuration i...
java
public void setFileName(String filename, String typeName) { mSingleFileName = null; if (mFileNames == null) { mFileNames = new HashMap<String, String>(); } mFileNames.put(typeName, filename); }
[ "public", "void", "setFileName", "(", "String", "filename", ",", "String", "typeName", ")", "{", "mSingleFileName", "=", "null", ";", "if", "(", "mFileNames", "==", "null", ")", "{", "mFileNames", "=", "new", "HashMap", "<", "String", ",", "String", ">", ...
Specify the file that a BDB database should reside in, except for log files and caches. The filename is relative to the environment home, unless data directories have been specified. For BDBRepositories that are log files only, this configuration is ignored. @param filename BDB database filename @param typeName type t...
[ "Specify", "the", "file", "that", "a", "BDB", "database", "should", "reside", "in", "except", "for", "log", "files", "and", "caches", ".", "The", "filename", "is", "relative", "to", "the", "environment", "home", "unless", "data", "directories", "have", "been...
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java#L412-L418
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/selector/Hud.java
Hud.createMenus
private void createMenus(Collection<ActionRef> parents, Collection<ActionRef> actions) { """ Create menus from actions. @param parents The parents menu. @param actions The actions to create as menu. """ for (final ActionRef action : actions) { final Featurable menu = createMe...
java
private void createMenus(Collection<ActionRef> parents, Collection<ActionRef> actions) { for (final ActionRef action : actions) { final Featurable menu = createMenu(action); if (!action.getRefs().isEmpty()) { generateSubMenu(actions, action,...
[ "private", "void", "createMenus", "(", "Collection", "<", "ActionRef", ">", "parents", ",", "Collection", "<", "ActionRef", ">", "actions", ")", "{", "for", "(", "final", "ActionRef", "action", ":", "actions", ")", "{", "final", "Featurable", "menu", "=", ...
Create menus from actions. @param parents The parents menu. @param actions The actions to create as menu.
[ "Create", "menus", "from", "actions", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/selector/Hud.java#L194-L213
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java
DevicesInner.createOrUpdateSecuritySettings
public void createOrUpdateSecuritySettings(String deviceName, String resourceGroupName, AsymmetricEncryptedSecret deviceAdminPassword) { """ Updates the security settings on a data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @param deviceAdminP...
java
public void createOrUpdateSecuritySettings(String deviceName, String resourceGroupName, AsymmetricEncryptedSecret deviceAdminPassword) { createOrUpdateSecuritySettingsWithServiceResponseAsync(deviceName, resourceGroupName, deviceAdminPassword).toBlocking().last().body(); }
[ "public", "void", "createOrUpdateSecuritySettings", "(", "String", "deviceName", ",", "String", "resourceGroupName", ",", "AsymmetricEncryptedSecret", "deviceAdminPassword", ")", "{", "createOrUpdateSecuritySettingsWithServiceResponseAsync", "(", "deviceName", ",", "resourceGroup...
Updates the security settings on a data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @param deviceAdminPassword Device administrator password as an encrypted string (encrypted using RSA PKCS #1) is used to sign into the local web UI of the device. The A...
[ "Updates", "the", "security", "settings", "on", "a", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L1837-L1839
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_runtime_id_PUT
public void serviceName_runtime_id_PUT(String serviceName, Long id, OvhRuntime body) throws IOException { """ Alter this object properties REST: PUT /hosting/web/{serviceName}/runtime/{id} @param body [required] New object properties @param serviceName [required] The internal name of your hosting @param id [...
java
public void serviceName_runtime_id_PUT(String serviceName, Long id, OvhRuntime body) throws IOException { String qPath = "/hosting/web/{serviceName}/runtime/{id}"; StringBuilder sb = path(qPath, serviceName, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_runtime_id_PUT", "(", "String", "serviceName", ",", "Long", "id", ",", "OvhRuntime", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/runtime/{id}\"", ";", "StringBuilder", "sb", "=", "path...
Alter this object properties REST: PUT /hosting/web/{serviceName}/runtime/{id} @param body [required] New object properties @param serviceName [required] The internal name of your hosting @param id [required] The runtime configuration ID
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L324-L328
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java
OverpassFilterQuery.tagNot
public OverpassFilterQuery tagNot(String name, String value) { """ Adds a <i>["name"!=value]</i> filter tag to the current query. @param name the filter name @param value the filter value @return the current query object """ builder.notEquals(name, value); return this; }
java
public OverpassFilterQuery tagNot(String name, String value) { builder.notEquals(name, value); return this; }
[ "public", "OverpassFilterQuery", "tagNot", "(", "String", "name", ",", "String", "value", ")", "{", "builder", ".", "notEquals", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a <i>["name"!=value]</i> filter tag to the current query. @param name the filter name @param value the filter value @return the current query object
[ "Adds", "a", "<i", ">", "[", "name", "!", "=", "value", "]", "<", "/", "i", ">", "filter", "tag", "to", "the", "current", "query", "." ]
train
https://github.com/zsoltk/overpasser/blob/0464d3844e75c5f9393d2458d3a3aedf3e40f30d/library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java#L177-L181
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java
CommerceNotificationQueueEntryPersistenceImpl.findByLtS
@Override public List<CommerceNotificationQueueEntry> findByLtS(Date sentDate, int start, int end) { """ Returns a range of all the commerce notification queue entries where sentDate &lt; &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> a...
java
@Override public List<CommerceNotificationQueueEntry> findByLtS(Date sentDate, int start, int end) { return findByLtS(sentDate, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationQueueEntry", ">", "findByLtS", "(", "Date", "sentDate", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByLtS", "(", "sentDate", ",", "start", ",", "end", ",", "null", ")", ";", ...
Returns a range of all the commerce notification queue entries where sentDate &lt; &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the fir...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "notification", "queue", "entries", "where", "sentDate", "&lt", ";", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java#L1703-L1707
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/RegressionPlan.java
RegressionPlan.createRegressionSuite
public RegressionSuite createRegressionSuite(String name, Map<String, Object> attributes) { """ Create a new Regression Suite with title assigned with this Regression Plan. @param name Title of the suite. @param attributes Additional attributes for initialization Regression Suite. @return Regression Sui...
java
public RegressionSuite createRegressionSuite(String name, Map<String, Object> attributes) { return getInstance().create().regressionSuite(name, this, attributes); }
[ "public", "RegressionSuite", "createRegressionSuite", "(", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "regressionSuite", "(", "name", ",", "this", ...
Create a new Regression Suite with title assigned with this Regression Plan. @param name Title of the suite. @param attributes Additional attributes for initialization Regression Suite. @return Regression Suite.
[ "Create", "a", "new", "Regression", "Suite", "with", "title", "assigned", "with", "this", "Regression", "Plan", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/RegressionPlan.java#L79-L81
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java
EditService.updateRepeatNumber
public void updateRepeatNumber(int newNum, int path_id, String client_uuid) throws Exception { """ Update the repeat number for a client path @param newNum new repeat number of the path @param path_id ID of the path @param client_uuid UUID of the client @throws Exception exception """ updateReque...
java
public void updateRepeatNumber(int newNum, int path_id, String client_uuid) throws Exception { updateRequestResponseTables("repeat_number", newNum, getProfileIdFromPathID(path_id), client_uuid, path_id); }
[ "public", "void", "updateRepeatNumber", "(", "int", "newNum", ",", "int", "path_id", ",", "String", "client_uuid", ")", "throws", "Exception", "{", "updateRequestResponseTables", "(", "\"repeat_number\"", ",", "newNum", ",", "getProfileIdFromPathID", "(", "path_id", ...
Update the repeat number for a client path @param newNum new repeat number of the path @param path_id ID of the path @param client_uuid UUID of the client @throws Exception exception
[ "Update", "the", "repeat", "number", "for", "a", "client", "path" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/EditService.java#L110-L112
Netflix/zeno
src/main/java/com/netflix/zeno/hash/HashFrameworkSerializer.java
HashFrameworkSerializer.serializeObject
@SuppressWarnings( { """ /* @Deprecated instead use serializeObject(HashGenericRecord rec, String fieldName, Object obj) """ "unchecked" }) @Override public void serializeObject(HashGenericRecord rec, String fieldName, String typeName, Object obj) { if (obj == null) { return; ...
java
@SuppressWarnings({ "unchecked" }) @Override public void serializeObject(HashGenericRecord rec, String fieldName, String typeName, Object obj) { if (obj == null) { return; } getSerializer(typeName).serialize(obj, rec); }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "@", "Override", "public", "void", "serializeObject", "(", "HashGenericRecord", "rec", ",", "String", "fieldName", ",", "String", "typeName", ",", "Object", "obj", ")", "{", "if", "(", "obj", "=="...
/* @Deprecated instead use serializeObject(HashGenericRecord rec, String fieldName, Object obj)
[ "/", "*", "@Deprecated", "instead", "use", "serializeObject", "(", "HashGenericRecord", "rec", "String", "fieldName", "Object", "obj", ")" ]
train
https://github.com/Netflix/zeno/blob/e571a3f1e304942724d454408fe6417fe18c20fd/src/main/java/com/netflix/zeno/hash/HashFrameworkSerializer.java#L56-L64
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.deepCopyObjectAtOffset
public final void deepCopyObjectAtOffset(Object source, Object copy, Class<?> fieldClass, long offset) { """ Copies the object of the specified type from the given field offset in the source object to the same location in the copy, visiting the object during the copy so that its fields are also copied @param sou...
java
public final void deepCopyObjectAtOffset(Object source, Object copy, Class<?> fieldClass, long offset) { deepCopyObjectAtOffset(source, copy, fieldClass, offset, new IdentityHashMap<Object, Object>(100)); }
[ "public", "final", "void", "deepCopyObjectAtOffset", "(", "Object", "source", ",", "Object", "copy", ",", "Class", "<", "?", ">", "fieldClass", ",", "long", "offset", ")", "{", "deepCopyObjectAtOffset", "(", "source", ",", "copy", ",", "fieldClass", ",", "of...
Copies the object of the specified type from the given field offset in the source object to the same location in the copy, visiting the object during the copy so that its fields are also copied @param source The object to copy from @param copy The target object @param fieldClass The declared type of object at the given...
[ "Copies", "the", "object", "of", "the", "specified", "type", "from", "the", "given", "field", "offset", "in", "the", "source", "object", "to", "the", "same", "location", "in", "the", "copy", "visiting", "the", "object", "during", "the", "copy", "so", "that...
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L392-L394
nohana/Amalgam
amalgam/src/main/java/com/amalgam/database/CursorUtils.java
CursorUtils.getShort
public static short getShort(Cursor cursor, String columnName) { """ Read the short data for the column. @see android.database.Cursor#getShort(int). @see android.database.Cursor#getColumnIndex(String). @param cursor the cursor. @param columnName the column name. @return the short value. """ if (cu...
java
public static short getShort(Cursor cursor, String columnName) { if (cursor == null) { return -1; } return cursor.getShort(cursor.getColumnIndex(columnName)); }
[ "public", "static", "short", "getShort", "(", "Cursor", "cursor", ",", "String", "columnName", ")", "{", "if", "(", "cursor", "==", "null", ")", "{", "return", "-", "1", ";", "}", "return", "cursor", ".", "getShort", "(", "cursor", ".", "getColumnIndex",...
Read the short data for the column. @see android.database.Cursor#getShort(int). @see android.database.Cursor#getColumnIndex(String). @param cursor the cursor. @param columnName the column name. @return the short value.
[ "Read", "the", "short", "data", "for", "the", "column", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/database/CursorUtils.java#L96-L102
tvesalainen/util
util/src/main/java/org/vesalainen/math/matrix/DoubleMatrix.java
DoubleMatrix.multiply
public static DoubleMatrix multiply(DoubleMatrix m1, DoubleMatrix m2) { """ Returns new DoubleMatrix which is m1 multiplied with m2. @param m1 @param m2 @return """ if (m1.cols != m2.rows) { throw new IllegalArgumentException("Matrices not comfortable"); } in...
java
public static DoubleMatrix multiply(DoubleMatrix m1, DoubleMatrix m2) { if (m1.cols != m2.rows) { throw new IllegalArgumentException("Matrices not comfortable"); } int m = m1.rows; int n = m1.cols; int p = m2.cols; ItemSupplier s1 = m1.sup...
[ "public", "static", "DoubleMatrix", "multiply", "(", "DoubleMatrix", "m1", ",", "DoubleMatrix", "m2", ")", "{", "if", "(", "m1", ".", "cols", "!=", "m2", ".", "rows", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Matrices not comfortable\"", ")...
Returns new DoubleMatrix which is m1 multiplied with m2. @param m1 @param m2 @return
[ "Returns", "new", "DoubleMatrix", "which", "is", "m1", "multiplied", "with", "m2", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/matrix/DoubleMatrix.java#L713-L739
cdk/cdk
tool/structgen/src/main/java/org/openscience/cdk/atomtype/StructGenMatcher.java
StructGenMatcher.findMatchingAtomType
@Override public IAtomType findMatchingAtomType(IAtomContainer atomContainer, IAtom atom) throws CDKException { """ Finds the AtomType matching the Atom's element symbol, formal charge and hybridization state. @param atomContainer AtomContainer @param atom the target atom @exception CDKExce...
java
@Override public IAtomType findMatchingAtomType(IAtomContainer atomContainer, IAtom atom) throws CDKException { if (factory == null) { try { factory = AtomTypeFactory.getInstance("org/openscience/cdk/config/data/structgen_atomtypes.xml", atom.getBuilder())...
[ "@", "Override", "public", "IAtomType", "findMatchingAtomType", "(", "IAtomContainer", "atomContainer", ",", "IAtom", "atom", ")", "throws", "CDKException", "{", "if", "(", "factory", "==", "null", ")", "{", "try", "{", "factory", "=", "AtomTypeFactory", ".", ...
Finds the AtomType matching the Atom's element symbol, formal charge and hybridization state. @param atomContainer AtomContainer @param atom the target atom @exception CDKException Exception thrown if something goes wrong @return the matching AtomType
[ "Finds", "the", "AtomType", "matching", "the", "Atom", "s", "element", "symbol", "formal", "charge", "and", "hybridization", "state", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/structgen/src/main/java/org/openscience/cdk/atomtype/StructGenMatcher.java#L74-L103
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/EJBWrapper.java
EJBWrapper.addDefaultEqualsMethod
private static void addDefaultEqualsMethod(ClassWriter cw, String implClassName) { """ Adds the default definition for the Object.equals method. @param cw ASM ClassWriter to add the method to. @param implClassName name of the wrapper class being generated. """ if (TraceComponent.isAnyTracingEnabled...
java
private static void addDefaultEqualsMethod(ClassWriter cw, String implClassName) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : equals (Ljava/lang/Object;)Z"); // -----------------------------------------------------------------...
[ "private", "static", "void", "addDefaultEqualsMethod", "(", "ClassWriter", "cw", ",", "String", "implClassName", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug", ...
Adds the default definition for the Object.equals method. @param cw ASM ClassWriter to add the method to. @param implClassName name of the wrapper class being generated.
[ "Adds", "the", "default", "definition", "for", "the", "Object", ".", "equals", "method", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/jitdeploy/EJBWrapper.java#L631-L664
Netflix/dyno
dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java
HostStatusTracker.verifyMutuallyExclusive
private void verifyMutuallyExclusive(Collection<Host> A, Collection<Host> B) { """ Helper method to check that there is no overlap b/w hosts up and down. @param A @param B """ Set<Host> left = new HashSet<Host>(A); Set<Host> right = new HashSet<Host>(B); boolean modified = left.removeAll(right); ...
java
private void verifyMutuallyExclusive(Collection<Host> A, Collection<Host> B) { Set<Host> left = new HashSet<Host>(A); Set<Host> right = new HashSet<Host>(B); boolean modified = left.removeAll(right); if (modified) { throw new RuntimeException("Host up and down sets are not mutually exclusive!"); } }
[ "private", "void", "verifyMutuallyExclusive", "(", "Collection", "<", "Host", ">", "A", ",", "Collection", "<", "Host", ">", "B", ")", "{", "Set", "<", "Host", ">", "left", "=", "new", "HashSet", "<", "Host", ">", "(", "A", ")", ";", "Set", "<", "H...
Helper method to check that there is no overlap b/w hosts up and down. @param A @param B
[ "Helper", "method", "to", "check", "that", "there", "is", "no", "overlap", "b", "/", "w", "hosts", "up", "and", "down", "." ]
train
https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java#L68-L77
arakelian/more-commons
src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java
XmlStreamReaderUtils.requiredDoubleAttribute
public static double requiredDoubleAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { """ Returns the value of an attribute as a double. If the attribute is empty, this method throws an exception. @param reader <code>XMLStreamReader</code> that contains att...
java
public static double requiredDoubleAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { return requiredDoubleAttribute(reader, null, localName); }
[ "public", "static", "double", "requiredDoubleAttribute", "(", "final", "XMLStreamReader", "reader", ",", "final", "String", "localName", ")", "throws", "XMLStreamException", "{", "return", "requiredDoubleAttribute", "(", "reader", ",", "null", ",", "localName", ")", ...
Returns the value of an attribute as a double. If the attribute is empty, this method throws an exception. @param reader <code>XMLStreamReader</code> that contains attribute values. @param localName local name of attribute (the namespace is ignored). @return value of attribute as double @throws XMLStreamException if a...
[ "Returns", "the", "value", "of", "an", "attribute", "as", "a", "double", ".", "If", "the", "attribute", "is", "empty", "this", "method", "throws", "an", "exception", "." ]
train
https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L1131-L1134
pedrovgs/Lynx
lynx/src/main/java/com/github/pedrovgs/lynx/LynxActivity.java
LynxActivity.getIntent
public static Intent getIntent(Context context, LynxConfig lynxConfig) { """ Generates an Intent to start LynxActivity with a LynxConfig configuration passed as parameter. @param context the application context @param lynxConfig the lynx configuration @return a new {@code Intent} to start {@link LynxActivity}...
java
public static Intent getIntent(Context context, LynxConfig lynxConfig) { if (lynxConfig == null) { lynxConfig = new LynxConfig(); } Intent intent = new Intent(context, LynxActivity.class); intent.putExtra(LYNX_CONFIG_EXTRA, lynxConfig); return intent; }
[ "public", "static", "Intent", "getIntent", "(", "Context", "context", ",", "LynxConfig", "lynxConfig", ")", "{", "if", "(", "lynxConfig", "==", "null", ")", "{", "lynxConfig", "=", "new", "LynxConfig", "(", ")", ";", "}", "Intent", "intent", "=", "new", ...
Generates an Intent to start LynxActivity with a LynxConfig configuration passed as parameter. @param context the application context @param lynxConfig the lynx configuration @return a new {@code Intent} to start {@link LynxActivity}
[ "Generates", "an", "Intent", "to", "start", "LynxActivity", "with", "a", "LynxConfig", "configuration", "passed", "as", "parameter", "." ]
train
https://github.com/pedrovgs/Lynx/blob/6097ab18b76c1ebdd0819c10e5d09ec19ea5bf4d/lynx/src/main/java/com/github/pedrovgs/lynx/LynxActivity.java#L54-L61
google/closure-compiler
src/com/google/javascript/jscomp/PreprocessorSymbolTable.java
PreprocessorSymbolTable.addStringNode
void addStringNode(Node n, AbstractCompiler compiler) { """ Adds a synthetic reference for a 'string' node representing a reference name. <p>This does some work to set the source info for the reference as well. """ String name = n.getString(); Node syntheticRef = NodeUtil.newQName( ...
java
void addStringNode(Node n, AbstractCompiler compiler) { String name = n.getString(); Node syntheticRef = NodeUtil.newQName( compiler, name, n /* real source offsets will be filled in below */, name); // Offsets to add to source. Named for documentation purposes. final int forQuote =...
[ "void", "addStringNode", "(", "Node", "n", ",", "AbstractCompiler", "compiler", ")", "{", "String", "name", "=", "n", ".", "getString", "(", ")", ";", "Node", "syntheticRef", "=", "NodeUtil", ".", "newQName", "(", "compiler", ",", "name", ",", "n", "/* r...
Adds a synthetic reference for a 'string' node representing a reference name. <p>This does some work to set the source info for the reference as well.
[ "Adds", "a", "synthetic", "reference", "for", "a", "string", "node", "representing", "a", "reference", "name", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PreprocessorSymbolTable.java#L165-L193
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/LcdsChampionTradeService.java
LcdsChampionTradeService.acceptTrade
public Object acceptTrade(String summonerInternalName, int championId) { """ Accept a trade @param summonerInternalName The summoner's internal name @param championId unknown - The id of the sent champion? @return unknown """ return client.sendRpcAndWait(SERVICE, "attemptTrade", summonerInternalName...
java
public Object acceptTrade(String summonerInternalName, int championId) { return client.sendRpcAndWait(SERVICE, "attemptTrade", summonerInternalName, championId, true); }
[ "public", "Object", "acceptTrade", "(", "String", "summonerInternalName", ",", "int", "championId", ")", "{", "return", "client", ".", "sendRpcAndWait", "(", "SERVICE", ",", "\"attemptTrade\"", ",", "summonerInternalName", ",", "championId", ",", "true", ")", ";",...
Accept a trade @param summonerInternalName The summoner's internal name @param championId unknown - The id of the sent champion? @return unknown
[ "Accept", "a", "trade" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/LcdsChampionTradeService.java#L63-L65
infinispan/infinispan
lucene/lucene-directory/src/main/java/org/infinispan/lucene/readlocks/DistributedSegmentReadLocker.java
DistributedSegmentReadLocker.deleteOrReleaseReadLock
@Override public void deleteOrReleaseReadLock(final String filename) { """ Deletes or releases a read-lock for the specified filename, so that if it was marked as deleted and no other {@link org.infinispan.lucene.impl.InfinispanIndexInput} instances are reading from it, then it will be effectively deleted. ...
java
@Override public void deleteOrReleaseReadLock(final String filename) { if (isMultiChunked(filename)) { int newValue = 0; FileReadLockKey readLockKey = new FileReadLockKey(indexName, filename, affinitySegmentId); boolean done = false; Object lockValue = locksCache.get(readLoc...
[ "@", "Override", "public", "void", "deleteOrReleaseReadLock", "(", "final", "String", "filename", ")", "{", "if", "(", "isMultiChunked", "(", "filename", ")", ")", "{", "int", "newValue", "=", "0", ";", "FileReadLockKey", "readLockKey", "=", "new", "FileReadLo...
Deletes or releases a read-lock for the specified filename, so that if it was marked as deleted and no other {@link org.infinispan.lucene.impl.InfinispanIndexInput} instances are reading from it, then it will be effectively deleted. @see #acquireReadLock(String) @see org.apache.lucene.store.Directory#deleteFile(String...
[ "Deletes", "or", "releases", "a", "read", "-", "lock", "for", "the", "specified", "filename", "so", "that", "if", "it", "was", "marked", "as", "deleted", "and", "no", "other", "{", "@link", "org", ".", "infinispan", ".", "lucene", ".", "impl", ".", "In...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/lucene-directory/src/main/java/org/infinispan/lucene/readlocks/DistributedSegmentReadLocker.java#L71-L100
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/ConfigRestClientUtil.java
ConfigRestClientUtil.sqlObject
public <T> T sqlObject(Class<T> beanType , String templateName,Map params) throws ElasticSearchException { """ 发送es restful sql请求/_xpack/sql,获取返回值,返回值类型由beanType决定 @param beanType @param templateName @param <T> @return @throws ElasticSearchException """ SQLRestResponse result = this.client.executeReq...
java
public <T> T sqlObject(Class<T> beanType , String templateName,Map params) throws ElasticSearchException { SQLRestResponse result = this.client.executeRequest("/_xpack/sql",ESTemplateHelper.evalTemplate(esUtil,templateName, params), new SQLRestResponseHandler()); return ResultUtil.buildSQLObject(result,beanTyp...
[ "public", "<", "T", ">", "T", "sqlObject", "(", "Class", "<", "T", ">", "beanType", ",", "String", "templateName", ",", "Map", "params", ")", "throws", "ElasticSearchException", "{", "SQLRestResponse", "result", "=", "this", ".", "client", ".", "executeReque...
发送es restful sql请求/_xpack/sql,获取返回值,返回值类型由beanType决定 @param beanType @param templateName @param <T> @return @throws ElasticSearchException
[ "发送es", "restful", "sql请求", "/", "_xpack", "/", "sql,获取返回值,返回值类型由beanType决定" ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/ConfigRestClientUtil.java#L498-L501
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletResponse.java
SRTServletResponse.setHeader
public void setHeader(String name, String s) { """ Adds a header field with the specified string value. If this is called more than once, the current value will replace the previous value. @param name The header field name. @param s The field's string value. """ if (com.ibm.ejs.ras.TraceComponent...
java
public void setHeader(String name, String s) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"setHeader", " name --> " + name + " value --> " + PasswordNullifier.nullifyParams(s), "["+this+"]"); } ...
[ "public", "void", "setHeader", "(", "String", "name", ",", "String", "s", ")", "{", "if", "(", "com", ".", "ibm", ".", "ejs", ".", "ras", ".", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger", ".", "isLoggable", "(", "Level", ".",...
Adds a header field with the specified string value. If this is called more than once, the current value will replace the previous value. @param name The header field name. @param s The field's string value.
[ "Adds", "a", "header", "field", "with", "the", "specified", "string", "value", ".", "If", "this", "is", "called", "more", "than", "once", "the", "current", "value", "will", "replace", "the", "previous", "value", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletResponse.java#L1714-L1722
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/HpelHelper.java
HpelHelper.getHeaderAsProperties
public static Properties getHeaderAsProperties() { """ Gets Header information as a Propeties instance. @return new Properties instance filled with necessary information. """ Properties result = new Properties(); if (customProps != null) { result.putAll(customProps); } ...
java
public static Properties getHeaderAsProperties() { Properties result = new Properties(); if (customProps != null) { result.putAll(customProps); } result.put(ServerInstanceLogRecordList.HEADER_PROCESSID, processId); result.put(ServerInstanceLogRecordList.HEADER_SERVE...
[ "public", "static", "Properties", "getHeaderAsProperties", "(", ")", "{", "Properties", "result", "=", "new", "Properties", "(", ")", ";", "if", "(", "customProps", "!=", "null", ")", "{", "result", ".", "putAll", "(", "customProps", ")", ";", "}", "result...
Gets Header information as a Propeties instance. @return new Properties instance filled with necessary information.
[ "Gets", "Header", "information", "as", "a", "Propeties", "instance", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/HpelHelper.java#L107-L165
threerings/narya
core/src/main/java/com/threerings/bureau/server/BureauRegistry.java
BureauRegistry.setLauncher
public void setLauncher (String bureauType, Launcher launcher, int timeout) { """ Registers a launcher for a given type. When an agent is started and no bureaus are running, the <code>bureauType</code> is used to determine the <code>Launcher</code> instance to call. If the launched bureau does not connect within...
java
public void setLauncher (String bureauType, Launcher launcher, int timeout) { if (_launchers.get(bureauType) != null) { log.warning("Launcher for type already exists", "type", bureauType); return; } _launchers.put(bureauType, new LauncherEntry(launcher, timeout)); ...
[ "public", "void", "setLauncher", "(", "String", "bureauType", ",", "Launcher", "launcher", ",", "int", "timeout", ")", "{", "if", "(", "_launchers", ".", "get", "(", "bureauType", ")", "!=", "null", ")", "{", "log", ".", "warning", "(", "\"Launcher for typ...
Registers a launcher for a given type. When an agent is started and no bureaus are running, the <code>bureauType</code> is used to determine the <code>Launcher</code> instance to call. If the launched bureau does not connect within the given number of milliseconds, it will be logged as an error and future attempts to l...
[ "Registers", "a", "launcher", "for", "a", "given", "type", ".", "When", "an", "agent", "is", "started", "and", "no", "bureaus", "are", "running", "the", "<code", ">", "bureauType<", "/", "code", ">", "is", "used", "to", "determine", "the", "<code", ">", ...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/bureau/server/BureauRegistry.java#L231-L239
SeaCloudsEU/SeaCloudsPlatform
planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/nfp/QualityAnalyzer.java
QualityAnalyzer.computeAvailability
public double computeAvailability(Solution bestSol, Topology topology, SuitableOptions cloudCharacteristics) { """ @param bestSol @param topology @param cloudCharacteristics @return The calculated availability of the system. This method will be recursive. The availablity of the system will be the product of...
java
public double computeAvailability(Solution bestSol, Topology topology, SuitableOptions cloudCharacteristics) { visited = new HashSet<String>(); TopologyElement initialElement = topology.getInitialElement(); visited.add(initialElement.getName()); String cloudUsedInitialElement = bestSol.getCl...
[ "public", "double", "computeAvailability", "(", "Solution", "bestSol", ",", "Topology", "topology", ",", "SuitableOptions", "cloudCharacteristics", ")", "{", "visited", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "TopologyElement", "initialElement", ...
@param bestSol @param topology @param cloudCharacteristics @return The calculated availability of the system. This method will be recursive. The availablity of the system will be the product of the availability of its first module and the modules it requests. It will not work if there are cycles in the topology
[ "@param", "bestSol", "@param", "topology", "@param", "cloudCharacteristics", "@return", "The", "calculated", "availability", "of", "the", "system", "." ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/nfp/QualityAnalyzer.java#L416-L451
spring-projects/spring-social
spring-social-core/src/main/java/org/springframework/social/oauth1/OAuth1Template.java
OAuth1Template.createOAuthToken
protected OAuthToken createOAuthToken(String tokenValue, String tokenSecret, MultiValueMap<String, String> response) { """ Creates an {@link OAuthToken} given the response from the request token or access token exchange with the provider. May be overridden to create a custom {@link OAuthToken}. @param tokenValue...
java
protected OAuthToken createOAuthToken(String tokenValue, String tokenSecret, MultiValueMap<String, String> response) { return new OAuthToken(tokenValue, tokenSecret); }
[ "protected", "OAuthToken", "createOAuthToken", "(", "String", "tokenValue", ",", "String", "tokenSecret", ",", "MultiValueMap", "<", "String", ",", "String", ">", "response", ")", "{", "return", "new", "OAuthToken", "(", "tokenValue", ",", "tokenSecret", ")", ";...
Creates an {@link OAuthToken} given the response from the request token or access token exchange with the provider. May be overridden to create a custom {@link OAuthToken}. @param tokenValue the token value received from the provider. @param tokenSecret the token secret received from the provider. @param response all p...
[ "Creates", "an", "{" ]
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-core/src/main/java/org/springframework/social/oauth1/OAuth1Template.java#L156-L158
wildfly/wildfly-core
elytron/src/main/java/org/wildfly/extension/elytron/ServiceUtil.java
ServiceUtil.addInjection
ServiceBuilder<?> addInjection(ServiceBuilder<?> sb, Injector<T> injector, String name) { """ Using the supplied {@link Injector} add a dependency on the {@link Service} identified by the supplied name. @param sb - the {@link ServiceBuilder} to use for the injection. @param injector - the {@link Injector} to i...
java
ServiceBuilder<?> addInjection(ServiceBuilder<?> sb, Injector<T> injector, String name) { return addInjection(sb, injector, serviceName(name)); }
[ "ServiceBuilder", "<", "?", ">", "addInjection", "(", "ServiceBuilder", "<", "?", ">", "sb", ",", "Injector", "<", "T", ">", "injector", ",", "String", "name", ")", "{", "return", "addInjection", "(", "sb", ",", "injector", ",", "serviceName", "(", "name...
Using the supplied {@link Injector} add a dependency on the {@link Service} identified by the supplied name. @param sb - the {@link ServiceBuilder} to use for the injection. @param injector - the {@link Injector} to inject into. @param name - the simple name of the service to inject. @return The {@link ServiceBuilder}...
[ "Using", "the", "supplied", "{", "@link", "Injector", "}", "add", "a", "dependency", "on", "the", "{", "@link", "Service", "}", "identified", "by", "the", "supplied", "name", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/elytron/src/main/java/org/wildfly/extension/elytron/ServiceUtil.java#L94-L96
Azure/autorest-clientruntime-for-java
client-runtime/src/main/java/com/microsoft/rest/interceptors/CustomHeadersInterceptor.java
CustomHeadersInterceptor.addHeaderMultimap
public CustomHeadersInterceptor addHeaderMultimap(Map<String, List<String>> headers) { """ Add all headers in a header multimap. @param headers a multimap of headers. @return the interceptor instance itself. """ this.headers.putAll(headers); return this; }
java
public CustomHeadersInterceptor addHeaderMultimap(Map<String, List<String>> headers) { this.headers.putAll(headers); return this; }
[ "public", "CustomHeadersInterceptor", "addHeaderMultimap", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", ")", "{", "this", ".", "headers", ".", "putAll", "(", "headers", ")", ";", "return", "this", ";", "}" ]
Add all headers in a header multimap. @param headers a multimap of headers. @return the interceptor instance itself.
[ "Add", "all", "headers", "in", "a", "header", "multimap", "." ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/client-runtime/src/main/java/com/microsoft/rest/interceptors/CustomHeadersInterceptor.java#L116-L119
Azure/azure-sdk-for-java
resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ProvidersInner.java
ProvidersInner.getAsync
public Observable<ProviderInner> getAsync(String resourceProviderNamespace, String expand) { """ Gets the specified resource provider. @param resourceProviderNamespace The namespace of the resource provider. @param expand The $expand query parameter. For example, to include property aliases in response, use $e...
java
public Observable<ProviderInner> getAsync(String resourceProviderNamespace, String expand) { return getWithServiceResponseAsync(resourceProviderNamespace, expand).map(new Func1<ServiceResponse<ProviderInner>, ProviderInner>() { @Override public ProviderInner call(ServiceResponse<Provider...
[ "public", "Observable", "<", "ProviderInner", ">", "getAsync", "(", "String", "resourceProviderNamespace", ",", "String", "expand", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceProviderNamespace", ",", "expand", ")", ".", "map", "(", "new", "Func...
Gets the specified resource provider. @param resourceProviderNamespace The namespace of the resource provider. @param expand The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. @throws IllegalArgumentException thrown if parameters fail the validation @r...
[ "Gets", "the", "specified", "resource", "provider", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ProvidersInner.java#L568-L575
pravega/pravega
bindings/src/main/java/io/pravega/storage/hdfs/HDFSStorage.java
HDFSStorage.getFilePath
private Path getFilePath(String segmentName, long epoch) { """ Gets the full HDFS Path to a file for the given Segment, startOffset and epoch. """ Preconditions.checkState(segmentName != null && segmentName.length() > 0, "segmentName must be non-null and non-empty"); Preconditions.checkState(ep...
java
private Path getFilePath(String segmentName, long epoch) { Preconditions.checkState(segmentName != null && segmentName.length() > 0, "segmentName must be non-null and non-empty"); Preconditions.checkState(epoch >= 0, "epoch must be non-negative " + epoch); return new Path(String.format(NAME_FORM...
[ "private", "Path", "getFilePath", "(", "String", "segmentName", ",", "long", "epoch", ")", "{", "Preconditions", ".", "checkState", "(", "segmentName", "!=", "null", "&&", "segmentName", ".", "length", "(", ")", ">", "0", ",", "\"segmentName must be non-null and...
Gets the full HDFS Path to a file for the given Segment, startOffset and epoch.
[ "Gets", "the", "full", "HDFS", "Path", "to", "a", "file", "for", "the", "given", "Segment", "startOffset", "and", "epoch", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/bindings/src/main/java/io/pravega/storage/hdfs/HDFSStorage.java#L540-L544
google/closure-compiler
src/com/google/javascript/jscomp/modules/ClosureRequireProcessor.java
ClosureRequireProcessor.getAllRequiresInDeclaration
private ImmutableList<Require> getAllRequiresInDeclaration() { """ Returns a new list of all required names in {@link #nameDeclaration} """ Node rhs = nameDeclaration.getFirstChild().isDestructuringLhs() ? nameDeclaration.getFirstChild().getSecondChild() : nameDeclaration.ge...
java
private ImmutableList<Require> getAllRequiresInDeclaration() { Node rhs = nameDeclaration.getFirstChild().isDestructuringLhs() ? nameDeclaration.getFirstChild().getSecondChild() : nameDeclaration.getFirstFirstChild(); String namespace = rhs.getSecondChild().getString(); if ...
[ "private", "ImmutableList", "<", "Require", ">", "getAllRequiresInDeclaration", "(", ")", "{", "Node", "rhs", "=", "nameDeclaration", ".", "getFirstChild", "(", ")", ".", "isDestructuringLhs", "(", ")", "?", "nameDeclaration", ".", "getFirstChild", "(", ")", "."...
Returns a new list of all required names in {@link #nameDeclaration}
[ "Returns", "a", "new", "list", "of", "all", "required", "names", "in", "{" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/modules/ClosureRequireProcessor.java#L112-L143
motown-io/motown
identification-authorization/app/src/main/java/io/motown/identificationauthorization/app/AuthorizationEventListener.java
AuthorizationEventListener.onEvent
@EventHandler protected void onEvent(AuthorizationRequestedEvent event, @MetaData(value = CorrelationToken.KEY, required = false) CorrelationToken correlationToken) { """ Listens for {@code AuthorizationRequestedEvent} and requests the {@code IdentificationAuthorizationService} to e...
java
@EventHandler protected void onEvent(AuthorizationRequestedEvent event, @MetaData(value = CorrelationToken.KEY, required = false) CorrelationToken correlationToken) { IdentifyingToken identifyingToken = event.getIdentifyingToken(); identifyingToken = identificationAuthoriz...
[ "@", "EventHandler", "protected", "void", "onEvent", "(", "AuthorizationRequestedEvent", "event", ",", "@", "MetaData", "(", "value", "=", "CorrelationToken", ".", "KEY", ",", "required", "=", "false", ")", "CorrelationToken", "correlationToken", ")", "{", "Identi...
Listens for {@code AuthorizationRequestedEvent} and requests the {@code IdentificationAuthorizationService} to execute the authorization. Sends a {@code GrantAuthorizationCommand} if identification is successful, {@code DenyAuthorizationCommand} if not. The passed correlation id will be added to the outgoing command if...
[ "Listens", "for", "{", "@code", "AuthorizationRequestedEvent", "}", "and", "requests", "the", "{", "@code", "IdentificationAuthorizationService", "}", "to", "execute", "the", "authorization", ".", "Sends", "a", "{", "@code", "GrantAuthorizationCommand", "}", "if", "...
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/identification-authorization/app/src/main/java/io/motown/identificationauthorization/app/AuthorizationEventListener.java#L54-L74
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXReader.java
MPXReader.populateResourceAssignmentWorkgroupFields
private void populateResourceAssignmentWorkgroupFields(Record record, ResourceAssignmentWorkgroupFields workgroup) throws MPXJException { """ Populate a resource assignment workgroup instance. @param record MPX record @param workgroup workgroup instance @throws MPXJException """ workgroup.setMessage...
java
private void populateResourceAssignmentWorkgroupFields(Record record, ResourceAssignmentWorkgroupFields workgroup) throws MPXJException { workgroup.setMessageUniqueID(record.getString(0)); workgroup.setConfirmed(NumberHelper.getInt(record.getInteger(1)) == 1); workgroup.setResponsePending(NumberHel...
[ "private", "void", "populateResourceAssignmentWorkgroupFields", "(", "Record", "record", ",", "ResourceAssignmentWorkgroupFields", "workgroup", ")", "throws", "MPXJException", "{", "workgroup", ".", "setMessageUniqueID", "(", "record", ".", "getString", "(", "0", ")", "...
Populate a resource assignment workgroup instance. @param record MPX record @param workgroup workgroup instance @throws MPXJException
[ "Populate", "a", "resource", "assignment", "workgroup", "instance", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXReader.java#L1458-L1466
kuali/ojb-1.0.4
src/ejb/org/apache/ojb/ejb/pb/PersonArticleManagerPBBean.java
PersonArticleManagerPBBean.storeUsingNestedPB
public void storeUsingNestedPB(List articles, List persons) { """ Stores article and persons using other beans. @ejb:interface-method """ PersistenceBroker broker = pbf.defaultPersistenceBroker(); try { // do something with broker Query q = new QueryByCri...
java
public void storeUsingNestedPB(List articles, List persons) { PersistenceBroker broker = pbf.defaultPersistenceBroker(); try { // do something with broker Query q = new QueryByCriteria(PersonVO.class); broker.getCollectionByQuery(q); //...
[ "public", "void", "storeUsingNestedPB", "(", "List", "articles", ",", "List", "persons", ")", "{", "PersistenceBroker", "broker", "=", "pbf", ".", "defaultPersistenceBroker", "(", ")", ";", "try", "{", "// do something with broker\r", "Query", "q", "=", "new", "...
Stores article and persons using other beans. @ejb:interface-method
[ "Stores", "article", "and", "persons", "using", "other", "beans", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/ejb/org/apache/ojb/ejb/pb/PersonArticleManagerPBBean.java#L105-L133
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.ipOrganisation_POST
public void ipOrganisation_POST(String abuse_mailbox, String address, String city, OvhCountryEnum country, String firstname, String lastname, String phone, OvhIpRegistryEnum registry, String state, String zip) throws IOException { """ Add an organisation REST: POST /me/ipOrganisation @param zip [required] @pa...
java
public void ipOrganisation_POST(String abuse_mailbox, String address, String city, OvhCountryEnum country, String firstname, String lastname, String phone, OvhIpRegistryEnum registry, String state, String zip) throws IOException { String qPath = "/me/ipOrganisation"; StringBuilder sb = path(qPath); HashMap<String...
[ "public", "void", "ipOrganisation_POST", "(", "String", "abuse_mailbox", ",", "String", "address", ",", "String", "city", ",", "OvhCountryEnum", "country", ",", "String", "firstname", ",", "String", "lastname", ",", "String", "phone", ",", "OvhIpRegistryEnum", "re...
Add an organisation REST: POST /me/ipOrganisation @param zip [required] @param state [required] @param country [required] @param city [required] @param registry [required] @param address [required] @param firstname [required] @param lastname [required] @param phone [required] @param abuse_mailbox [required]
[ "Add", "an", "organisation" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2255-L2270
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/RoadPolyline.java
RoadPolyline.getNearestPoint
@Pure <CT extends RoadConnection> CT getNearestPoint(Class<CT> connectionClass, double x, double y) { """ Replies the nearest start/end point to the specified point. @param <CT> is the type of the connection to reply @param connectionClass is the type of the connection to reply @param x x coordinate. @param...
java
@Pure <CT extends RoadConnection> CT getNearestPoint(Class<CT> connectionClass, double x, double y) { final int index = getNearestEndIndex(x, y); if (index == 0) { return getBeginPoint(connectionClass); } return getEndPoint(connectionClass); }
[ "@", "Pure", "<", "CT", "extends", "RoadConnection", ">", "CT", "getNearestPoint", "(", "Class", "<", "CT", ">", "connectionClass", ",", "double", "x", ",", "double", "y", ")", "{", "final", "int", "index", "=", "getNearestEndIndex", "(", "x", ",", "y", ...
Replies the nearest start/end point to the specified point. @param <CT> is the type of the connection to reply @param connectionClass is the type of the connection to reply @param x x coordinate. @param y y coordinate. @return the nearest point
[ "Replies", "the", "nearest", "start", "/", "end", "point", "to", "the", "specified", "point", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/RoadPolyline.java#L293-L300
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
OjbTagsHandler.forAllTables
public void forAllTables(String template, Properties attributes) throws XDocletException { """ Processes the template for all table definitions in the torque model. @param template The template @param attributes The attributes of the tag @exception XDocletException if an error occurs ...
java
public void forAllTables(String template, Properties attributes) throws XDocletException { for (Iterator it = _torqueModel.getTables(); it.hasNext(); ) { _curTableDef = (TableDef)it.next(); generate(template); } _curTableDef = null; }
[ "public", "void", "forAllTables", "(", "String", "template", ",", "Properties", "attributes", ")", "throws", "XDocletException", "{", "for", "(", "Iterator", "it", "=", "_torqueModel", ".", "getTables", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", "...
Processes the template for all table definitions in the torque model. @param template The template @param attributes The attributes of the tag @exception XDocletException if an error occurs @doc.tag type="block"
[ "Processes", "the", "template", "for", "all", "table", "definitions", "in", "the", "torque", "model", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L1326-L1334
kiegroup/jbpm
jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/impl/QueryCriteriaUtil.java
QueryCriteriaUtil.createPredicateFromSingleOrGroupCriteria
private <R,T> Predicate createPredicateFromSingleOrGroupCriteria(CriteriaQuery<R> query, CriteriaBuilder builder, Class<T> queryType, QueryCriteria criteria, QueryWhere queryWhere ) { """ Depending on whether or not the given {@link QueryCriteria} is a group criteria (which then contains a {@link List}<{@link Que...
java
private <R,T> Predicate createPredicateFromSingleOrGroupCriteria(CriteriaQuery<R> query, CriteriaBuilder builder, Class<T> queryType, QueryCriteria criteria, QueryWhere queryWhere ) { Predicate predicate; if( criteria.isGroupCriteria() ) { assert ! criteria.hasValues() : "Criteria has both s...
[ "private", "<", "R", ",", "T", ">", "Predicate", "createPredicateFromSingleOrGroupCriteria", "(", "CriteriaQuery", "<", "R", ">", "query", ",", "CriteriaBuilder", "builder", ",", "Class", "<", "T", ">", "queryType", ",", "QueryCriteria", "criteria", ",", "QueryW...
Depending on whether or not the given {@link QueryCriteria} is a group criteria (which then contains a {@link List}<{@link QueryCriteria}>) or a single {@link QueryCriteria}, the correct method to process the given {@link QueryCriteria} is called. @param query The {@link CriteriaQuery} that is being built @param crit...
[ "Depending", "on", "whether", "or", "not", "the", "given", "{", "@link", "QueryCriteria", "}", "is", "a", "group", "criteria", "(", "which", "then", "contains", "a", "{", "@link", "List", "}", "<", "{", "@link", "QueryCriteria", "}", ">", ")", "or", "a...
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-query-jpa/src/main/java/org/jbpm/query/jpa/impl/QueryCriteriaUtil.java#L369-L379
banq/jdonframework
src/main/java/com/jdon/controller/WebAppUtil.java
WebAppUtil.getComponentInstance
public static Object getComponentInstance(String name, HttpServletRequest request) { """ get a component that registered in container. the component is not different from the service. the component instance is single instance Any intercepter will be disable """ ServletContext sc = request.getSession().get...
java
public static Object getComponentInstance(String name, HttpServletRequest request) { ServletContext sc = request.getSession().getServletContext(); ContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc)); if (!containerWrapper.isStart()) { Debug.logError("JdonFramework not yet s...
[ "public", "static", "Object", "getComponentInstance", "(", "String", "name", ",", "HttpServletRequest", "request", ")", "{", "ServletContext", "sc", "=", "request", ".", "getSession", "(", ")", ".", "getServletContext", "(", ")", ";", "ContainerWrapper", "containe...
get a component that registered in container. the component is not different from the service. the component instance is single instance Any intercepter will be disable
[ "get", "a", "component", "that", "registered", "in", "container", ".", "the", "component", "is", "not", "different", "from", "the", "service", ".", "the", "component", "instance", "is", "single", "instance", "Any", "intercepter", "will", "be", "disable" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/controller/WebAppUtil.java#L136-L144
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java
AbstractMapView.fireEntryUpdated
@SuppressWarnings("unchecked") protected void fireEntryUpdated(K key, V value) { """ Fire the update event. @param key the updated key. @param value the new value. """ for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.entryUpdated(key...
java
@SuppressWarnings("unchecked") protected void fireEntryUpdated(K key, V value) { for (final DMapListener<? super K, ? super V> listener : this.listeners.getListeners(DMapListener.class)) { listener.entryUpdated(key, value); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "fireEntryUpdated", "(", "K", "key", ",", "V", "value", ")", "{", "for", "(", "final", "DMapListener", "<", "?", "super", "K", ",", "?", "super", "V", ">", "listener", ":", "this", ...
Fire the update event. @param key the updated key. @param value the new value.
[ "Fire", "the", "update", "event", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/util/AbstractMapView.java#L88-L93
stanfy/goro
goro/src/main/java/com/stanfy/enroscar/goro/GoroService.java
GoroService.foregroundTaskIntent
public static <T extends Callable<?> & Parcelable> Intent foregroundTaskIntent(final Context context, final T task, final int notificationId, ...
java
public static <T extends Callable<?> & Parcelable> Intent foregroundTaskIntent(final Context context, final T task, final int notificationId, ...
[ "public", "static", "<", "T", "extends", "Callable", "<", "?", ">", "&", "Parcelable", ">", "Intent", "foregroundTaskIntent", "(", "final", "Context", "context", ",", "final", "T", "task", ",", "final", "int", "notificationId", ",", "final", "Notification", ...
Create an intent that contains a task that should be scheduled on a defined queue. The Service will run in the foreground and display notification. Intent can be used as an argument for {@link android.content.Context#startService(android.content.Intent)} or {@link android.content.Context#startForegroundService(Intent)}...
[ "Create", "an", "intent", "that", "contains", "a", "task", "that", "should", "be", "scheduled", "on", "a", "defined", "queue", ".", "The", "Service", "will", "run", "in", "the", "foreground", "and", "display", "notification", ".", "Intent", "can", "be", "u...
train
https://github.com/stanfy/goro/blob/6618e63a926833d61f492ec611ee77668d756820/goro/src/main/java/com/stanfy/enroscar/goro/GoroService.java#L160-L165
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/ssh2/Ssh2Channel.java
Ssh2Channel.sendRequest
public boolean sendRequest(String requesttype, boolean wantreply, byte[] requestdata) throws SshException { """ Sends a channel request. Many channels have extensions that are specific to that particular channel type, an example of which is requesting a pseudo terminal from an interactive session. @param r...
java
public boolean sendRequest(String requesttype, boolean wantreply, byte[] requestdata) throws SshException { return sendRequest(requesttype, wantreply, requestdata, true); }
[ "public", "boolean", "sendRequest", "(", "String", "requesttype", ",", "boolean", "wantreply", ",", "byte", "[", "]", "requestdata", ")", "throws", "SshException", "{", "return", "sendRequest", "(", "requesttype", ",", "wantreply", ",", "requestdata", ",", "true...
Sends a channel request. Many channels have extensions that are specific to that particular channel type, an example of which is requesting a pseudo terminal from an interactive session. @param requesttype the name of the request, for example "pty-req" @param wantreply specifies whether the remote side should send a s...
[ "Sends", "a", "channel", "request", ".", "Many", "channels", "have", "extensions", "that", "are", "specific", "to", "that", "particular", "channel", "type", "an", "example", "of", "which", "is", "requesting", "a", "pseudo", "terminal", "from", "an", "interacti...
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/ssh2/Ssh2Channel.java#L745-L748
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/PippoSettings.java
PippoSettings.getRequiredString
public String getRequiredString(String name) { """ Returns the string value for the specified name. If the name does not exist an exception is thrown. @param name @return name value """ String value = getString(name, null); if (value != null) { return value.trim(); } ...
java
public String getRequiredString(String name) { String value = getString(name, null); if (value != null) { return value.trim(); } throw new PippoRuntimeException("Setting '{}' has not been configured!", name); }
[ "public", "String", "getRequiredString", "(", "String", "name", ")", "{", "String", "value", "=", "getString", "(", "name", ",", "null", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "value", ".", "trim", "(", ")", ";", "}", "throw"...
Returns the string value for the specified name. If the name does not exist an exception is thrown. @param name @return name value
[ "Returns", "the", "string", "value", "for", "the", "specified", "name", ".", "If", "the", "name", "does", "not", "exist", "an", "exception", "is", "thrown", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/PippoSettings.java#L603-L609
alkacon/opencms-core
src/org/opencms/site/CmsSiteManagerImpl.java
CmsSiteManagerImpl.getAvailableSites
public List<CmsSite> getAvailableSites(CmsObject cms, boolean workplaceMode, boolean showShared, String ouFqn) { """ Returns a list of all {@link CmsSite} instances that are compatible to the given organizational unit.<p> @param cms the current OpenCms user context @param workplaceMode if true, the root and cu...
java
public List<CmsSite> getAvailableSites(CmsObject cms, boolean workplaceMode, boolean showShared, String ouFqn) { return getAvailableSites(cms, workplaceMode, showShared, ouFqn, null); }
[ "public", "List", "<", "CmsSite", ">", "getAvailableSites", "(", "CmsObject", "cms", ",", "boolean", "workplaceMode", ",", "boolean", "showShared", ",", "String", "ouFqn", ")", "{", "return", "getAvailableSites", "(", "cms", ",", "workplaceMode", ",", "showShare...
Returns a list of all {@link CmsSite} instances that are compatible to the given organizational unit.<p> @param cms the current OpenCms user context @param workplaceMode if true, the root and current site is included for the admin user and the view permission is required to see the site root @param showShared if the s...
[ "Returns", "a", "list", "of", "all", "{", "@link", "CmsSite", "}", "instances", "that", "are", "compatible", "to", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/CmsSiteManagerImpl.java#L574-L577
kohsuke/args4j
args4j/src/org/kohsuke/args4j/CmdLineParser.java
CmdLineParser.printOption
protected void printOption(PrintWriter out, OptionHandler handler, int len, ResourceBundle rb, OptionHandlerFilter filter) { """ Prints usage information for a given option. <p> Subtypes may override this method and determine which options get printed (or other things), based on {@link OptionHandler} (perhaps...
java
protected void printOption(PrintWriter out, OptionHandler handler, int len, ResourceBundle rb, OptionHandlerFilter filter) { // Hiding options without usage information if (handler.option.usage() == null || handler.option.usage().length() == 0 || !filter.select(handler)) { return...
[ "protected", "void", "printOption", "(", "PrintWriter", "out", ",", "OptionHandler", "handler", ",", "int", "len", ",", "ResourceBundle", "rb", ",", "OptionHandlerFilter", "filter", ")", "{", "// Hiding options without usage information", "if", "(", "handler", ".", ...
Prints usage information for a given option. <p> Subtypes may override this method and determine which options get printed (or other things), based on {@link OptionHandler} (perhaps by using {@code handler.setter.asAnnotatedElement()}). @param out Writer to write into @param handler handler where to receive the...
[ "Prints", "usage", "information", "for", "a", "given", "option", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/CmdLineParser.java#L322-L354
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java
PublicIPAddressesInner.beginCreateOrUpdate
public PublicIPAddressInner beginCreateOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { """ Creates or updates a static or dynamic public IP address. @param resourceGroupName The name of the resource group. @param publicIpAddressName The name of the public IP ad...
java
public PublicIPAddressInner beginCreateOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).toBlocking().single().body(); }
[ "public", "PublicIPAddressInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "publicIpAddressName", ",", "PublicIPAddressInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "publi...
Creates or updates a static or dynamic public IP address. @param resourceGroupName The name of the resource group. @param publicIpAddressName The name of the public IP address. @param parameters Parameters supplied to the create or update public IP address operation. @throws IllegalArgumentException thrown if paramete...
[ "Creates", "or", "updates", "a", "static", "or", "dynamic", "public", "IP", "address", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPAddressesInner.java#L539-L541
Red5/red5-server-common
src/main/java/org/red5/server/so/ClientSharedObject.java
ClientSharedObject.notifyUpdate
protected void notifyUpdate(String key, Object value) { """ Notify listeners on update @param key Updated attribute key @param value Updated attribute value """ for (ISharedObjectListener listener : listeners) { listener.onSharedObjectUpdate(this, key, value); } }
java
protected void notifyUpdate(String key, Object value) { for (ISharedObjectListener listener : listeners) { listener.onSharedObjectUpdate(this, key, value); } }
[ "protected", "void", "notifyUpdate", "(", "String", "key", ",", "Object", "value", ")", "{", "for", "(", "ISharedObjectListener", "listener", ":", "listeners", ")", "{", "listener", ".", "onSharedObjectUpdate", "(", "this", ",", "key", ",", "value", ")", ";"...
Notify listeners on update @param key Updated attribute key @param value Updated attribute value
[ "Notify", "listeners", "on", "update" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/ClientSharedObject.java#L211-L215
infinispan/infinispan
core/src/main/java/org/infinispan/distribution/ch/impl/DefaultConsistentHashFactory.java
DefaultConsistentHashFactory.union
@Override public DefaultConsistentHash union(DefaultConsistentHash dch1, DefaultConsistentHash dch2) { """ Merges two consistent hash objects that have the same number of segments, numOwners and hash function. For each segment, the primary owner of the first CH has priority, the other primary owners become bac...
java
@Override public DefaultConsistentHash union(DefaultConsistentHash dch1, DefaultConsistentHash dch2) { return dch1.union(dch2); }
[ "@", "Override", "public", "DefaultConsistentHash", "union", "(", "DefaultConsistentHash", "dch1", ",", "DefaultConsistentHash", "dch2", ")", "{", "return", "dch1", ".", "union", "(", "dch2", ")", ";", "}" ]
Merges two consistent hash objects that have the same number of segments, numOwners and hash function. For each segment, the primary owner of the first CH has priority, the other primary owners become backups.
[ "Merges", "two", "consistent", "hash", "objects", "that", "have", "the", "same", "number", "of", "segments", "numOwners", "and", "hash", "function", ".", "For", "each", "segment", "the", "primary", "owner", "of", "the", "first", "CH", "has", "priority", "the...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/distribution/ch/impl/DefaultConsistentHashFactory.java#L121-L124
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.deletePublicKeyNode
public static boolean deletePublicKeyNode(PepManager pepManager, OpenPgpV4Fingerprint fingerprint) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { """ Delete the public key node of the key with fingerp...
java
public static boolean deletePublicKeyNode(PepManager pepManager, OpenPgpV4Fingerprint fingerprint) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = pepManager.getPepPubSubManager()...
[ "public", "static", "boolean", "deletePublicKeyNode", "(", "PepManager", "pepManager", ",", "OpenPgpV4Fingerprint", "fingerprint", ")", "throws", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NotConnectedException", ",", "InterruptedException", ",...
Delete the public key node of the key with fingerprint {@code fingerprint}. @param pepManager The PEP manager. @param fingerprint fingerprint of the key we want to delete @throws XMPPException.XMPPErrorException in case of an XMPP protocol error. @throws SmackException.NotConnectedException if we are not connected. @...
[ "Delete", "the", "public", "key", "node", "of", "the", "key", "with", "fingerprint", "{", "@code", "fingerprint", "}", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L249-L254
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.existsObject
@Override public <T> long existsObject(String name, T obj) throws CpoException { """ The CpoAdapter will check to see if this object exists in the datasource. <p/> <pre>Example: <code> <p/> class SomeObject so = new SomeObject(); long count = 0; class CpoAdapter cpo = null; <p/> try { cpo = new CpoAdap...
java
@Override public <T> long existsObject(String name, T obj) throws CpoException { return this.existsObject(name, obj, null); }
[ "@", "Override", "public", "<", "T", ">", "long", "existsObject", "(", "String", "name", ",", "T", "obj", ")", "throws", "CpoException", "{", "return", "this", ".", "existsObject", "(", "name", ",", "obj", ",", "null", ")", ";", "}" ]
The CpoAdapter will check to see if this object exists in the datasource. <p/> <pre>Example: <code> <p/> class SomeObject so = new SomeObject(); long count = 0; class CpoAdapter cpo = null; <p/> try { cpo = new CpoAdapter(new JdbcDataSourceInfo(driver, url, user, password,1,1,false)); } catch (CpoException ce) { // Han...
[ "The", "CpoAdapter", "will", "check", "to", "see", "if", "this", "object", "exists", "in", "the", "datasource", ".", "<p", "/", ">", "<pre", ">", "Example", ":", "<code", ">", "<p", "/", ">", "class", "SomeObject", "so", "=", "new", "SomeObject", "()",...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L902-L905
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/TemplatesApi.java
TemplatesApi.updateDocuments
public TemplateDocumentsResult updateDocuments(String accountId, String templateId, EnvelopeDefinition envelopeDefinition) throws ApiException { """ Adds documents to a template document. Adds one or more documents to an existing template document. @param accountId The external account number (int) or account ID...
java
public TemplateDocumentsResult updateDocuments(String accountId, String templateId, EnvelopeDefinition envelopeDefinition) throws ApiException { return updateDocuments(accountId, templateId, envelopeDefinition, null); }
[ "public", "TemplateDocumentsResult", "updateDocuments", "(", "String", "accountId", ",", "String", "templateId", ",", "EnvelopeDefinition", "envelopeDefinition", ")", "throws", "ApiException", "{", "return", "updateDocuments", "(", "accountId", ",", "templateId", ",", "...
Adds documents to a template document. Adds one or more documents to an existing template document. @param accountId The external account number (int) or account ID Guid. (required) @param templateId The ID of the template being accessed. (required) @param envelopeDefinition (optional) @return TemplateDocumentsResult
[ "Adds", "documents", "to", "a", "template", "document", ".", "Adds", "one", "or", "more", "documents", "to", "an", "existing", "template", "document", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/TemplatesApi.java#L3114-L3116
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readPropertyDefinition
public CmsPropertyDefinition readPropertyDefinition(CmsDbContext dbc, String name) throws CmsException { """ Reads a property definition.<p> If no property definition with the given name is found, <code>null</code> is returned.<p> @param dbc the current database context @param name the name of the property...
java
public CmsPropertyDefinition readPropertyDefinition(CmsDbContext dbc, String name) throws CmsException { return getVfsDriver(dbc).readPropertyDefinition(dbc, name, dbc.currentProject().getUuid()); }
[ "public", "CmsPropertyDefinition", "readPropertyDefinition", "(", "CmsDbContext", "dbc", ",", "String", "name", ")", "throws", "CmsException", "{", "return", "getVfsDriver", "(", "dbc", ")", ".", "readPropertyDefinition", "(", "dbc", ",", "name", ",", "dbc", ".", ...
Reads a property definition.<p> If no property definition with the given name is found, <code>null</code> is returned.<p> @param dbc the current database context @param name the name of the property definition to read @return the property definition that was read @throws CmsException a CmsDbEntryNotFoundException i...
[ "Reads", "a", "property", "definition", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7363-L7366
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.createRelation
private void createRelation(String resourceName, String targetPath, String relationType, boolean importCase) throws CmsException { """ Adds a new relation to the given resource.<p> @param resourceName the name of the source resource @param targetPath the path of the target resource @param relationType the...
java
private void createRelation(String resourceName, String targetPath, String relationType, boolean importCase) throws CmsException { CmsResource resource = readResource(resourceName, CmsResourceFilter.IGNORE_EXPIRATION); CmsResource target = readResource(targetPath, CmsResourceFilter.IGNORE_EXPIRATIO...
[ "private", "void", "createRelation", "(", "String", "resourceName", ",", "String", "targetPath", ",", "String", "relationType", ",", "boolean", "importCase", ")", "throws", "CmsException", "{", "CmsResource", "resource", "=", "readResource", "(", "resourceName", ","...
Adds a new relation to the given resource.<p> @param resourceName the name of the source resource @param targetPath the path of the target resource @param relationType the type of the relation @param importCase if importing relations @throws CmsException if something goes wrong
[ "Adds", "a", "new", "relation", "to", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L4239-L4245
google/error-prone
check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java
ASTHelpers.getAnnotation
@Nullable @Deprecated @SuppressWarnings("deprecation") public static <T extends Annotation> T getAnnotation(Symbol sym, Class<T> annotationClass) { """ Retrieves an annotation, considering annotation inheritance. @deprecated If {@code annotationClass} contains a member that is a {@code Class} or an array ...
java
@Nullable @Deprecated @SuppressWarnings("deprecation") public static <T extends Annotation> T getAnnotation(Symbol sym, Class<T> annotationClass) { return sym == null ? null : sym.getAnnotation(annotationClass); }
[ "@", "Nullable", "@", "Deprecated", "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "static", "<", "T", "extends", "Annotation", ">", "T", "getAnnotation", "(", "Symbol", "sym", ",", "Class", "<", "T", ">", "annotationClass", ")", "{", "retur...
Retrieves an annotation, considering annotation inheritance. @deprecated If {@code annotationClass} contains a member that is a {@code Class} or an array of them, attempting to access that member from the Error Prone checker code will result in a runtime exception. Instead, operate on {@code sym.getAnnotationMirrors()...
[ "Retrieves", "an", "annotation", "considering", "annotation", "inheritance", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java#L784-L789
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxRepresentation.java
BoxRepresentation.getRepresentationHintString
public static String getRepresentationHintString(String repType, String repSize) { """ Helper method to generate representation hint string @param repType the type of representation @param repSize the size of representation, used for image types. (please refer to dimension string @return string that can be used...
java
public static String getRepresentationHintString(String repType, String repSize) { StringBuffer sb = new StringBuffer(repType); if(TYPE_JPG.equals(repType) || TYPE_PNG.equals(repType)) { if(TextUtils.isEmpty(repSize)) { throw new InvalidParameterException("Size is not optiona...
[ "public", "static", "String", "getRepresentationHintString", "(", "String", "repType", ",", "String", "repSize", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "repType", ")", ";", "if", "(", "TYPE_JPG", ".", "equals", "(", "repType", ")", ...
Helper method to generate representation hint string @param repType the type of representation @param repSize the size of representation, used for image types. (please refer to dimension string @return string that can be used on server requests hinting the type of representation to return
[ "Helper", "method", "to", "generate", "representation", "hint", "string" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxRepresentation.java#L165-L174
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java
DateRangeParam.setRangeFromDatesInclusive
public void setRangeFromDatesInclusive(IPrimitiveType<Date> theLowerBound, IPrimitiveType<Date> theUpperBound) { """ Sets the range from a pair of dates, inclusive on both ends. Note that if theLowerBound is after theUpperBound, thie method will automatically reverse the order of the arguments in order to create...
java
public void setRangeFromDatesInclusive(IPrimitiveType<Date> theLowerBound, IPrimitiveType<Date> theUpperBound) { IPrimitiveType<Date> lowerBound = theLowerBound; IPrimitiveType<Date> upperBound = theUpperBound; if (lowerBound != null && lowerBound.getValue() != null && upperBound != null && upperBound.getValue() ...
[ "public", "void", "setRangeFromDatesInclusive", "(", "IPrimitiveType", "<", "Date", ">", "theLowerBound", ",", "IPrimitiveType", "<", "Date", ">", "theUpperBound", ")", "{", "IPrimitiveType", "<", "Date", ">", "lowerBound", "=", "theLowerBound", ";", "IPrimitiveType...
Sets the range from a pair of dates, inclusive on both ends. Note that if theLowerBound is after theUpperBound, thie method will automatically reverse the order of the arguments in order to create an inclusive range. @param theLowerBound A qualified date param representing the lower date bound (optionally may include ...
[ "Sets", "the", "range", "from", "a", "pair", "of", "dates", "inclusive", "on", "both", "ends", ".", "Note", "that", "if", "theLowerBound", "is", "after", "theUpperBound", "thie", "method", "will", "automatically", "reverse", "the", "order", "of", "the", "arg...
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L421-L434
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsPositionBean.java
CmsPositionBean.ensureSurrounds
public void ensureSurrounds(CmsPositionBean child, int padding) { """ Increases the dimensions to completely surround the child.<p> @param child the child position info @param padding the padding to apply """ // increase the size of the outer rectangle if ((getLeft() + padding) > child.get...
java
public void ensureSurrounds(CmsPositionBean child, int padding) { // increase the size of the outer rectangle if ((getLeft() + padding) > child.getLeft()) { int diff = getLeft() - child.getLeft(); // ensure padding diff += padding; setLeft(getLeft() - dif...
[ "public", "void", "ensureSurrounds", "(", "CmsPositionBean", "child", ",", "int", "padding", ")", "{", "// increase the size of the outer rectangle", "if", "(", "(", "getLeft", "(", ")", "+", "padding", ")", ">", "child", ".", "getLeft", "(", ")", ")", "{", ...
Increases the dimensions to completely surround the child.<p> @param child the child position info @param padding the padding to apply
[ "Increases", "the", "dimensions", "to", "completely", "surround", "the", "child", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsPositionBean.java#L410-L436
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Single.java
Single.onErrorReturnItem
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single<T> onErrorReturnItem(final T value) { """ Signals the specified value as success in case the current Single signals an error. <p> <img width="640" height="451" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operat...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Single<T> onErrorReturnItem(final T value) { ObjectHelper.requireNonNull(value, "value is null"); return RxJavaPlugins.onAssembly(new SingleOnErrorReturn<T>(this, null, value)); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Single", "<", "T", ">", "onErrorReturnItem", "(", "final", "T", "value", ")", "{", "ObjectHelper", ".", "requireNonNull", "(", "value", ",", "\"val...
Signals the specified value as success in case the current Single signals an error. <p> <img width="640" height="451" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.onErrorReturnItem.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>{@code onErrorReturnItem} does not operate by default on a...
[ "Signals", "the", "specified", "value", "as", "success", "in", "case", "the", "current", "Single", "signals", "an", "error", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "451", "src", "=", "https", ":", "//", "raw", ".", "github", ".", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Single.java#L3009-L3014
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/BeatGridFinder.java
BeatGridFinder.requestBeatGridFrom
public BeatGrid requestBeatGridFrom(final DataReference track) { """ Ask the specified player for the beat grid of the track in the specified slot with the specified rekordbox ID, first checking if we have a cache we can use instead. @param track uniquely identifies the track whose beat grid is desired @ret...
java
public BeatGrid requestBeatGridFrom(final DataReference track) { for (BeatGrid cached : hotCache.values()) { if (cached.dataReference.equals(track)) { // Found a hot cue hit, use it. return cached; } } return requestBeatGridInternal(track, false); }
[ "public", "BeatGrid", "requestBeatGridFrom", "(", "final", "DataReference", "track", ")", "{", "for", "(", "BeatGrid", "cached", ":", "hotCache", ".", "values", "(", ")", ")", "{", "if", "(", "cached", ".", "dataReference", ".", "equals", "(", "track", ")"...
Ask the specified player for the beat grid of the track in the specified slot with the specified rekordbox ID, first checking if we have a cache we can use instead. @param track uniquely identifies the track whose beat grid is desired @return the beat grid, if any
[ "Ask", "the", "specified", "player", "for", "the", "beat", "grid", "of", "the", "track", "in", "the", "specified", "slot", "with", "the", "specified", "rekordbox", "ID", "first", "checking", "if", "we", "have", "a", "cache", "we", "can", "use", "instead", ...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/BeatGridFinder.java#L278-L285
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/decomposition/hessenberg/TridiagonalHelper_DDRB.java
TridiagonalHelper_DDRB.computeY
public static void computeY( final int blockLength , final DSubmatrixD1 A , final DSubmatrixD1 V , int row , double gamma ) { """ <p> Computes the 'y' vector and stores the result in...
java
public static void computeY( final int blockLength , final DSubmatrixD1 A , final DSubmatrixD1 V , int row , double gamma ) { // Elements in 'y' before 'row' are known to be ze...
[ "public", "static", "void", "computeY", "(", "final", "int", "blockLength", ",", "final", "DSubmatrixD1", "A", ",", "final", "DSubmatrixD1", "V", ",", "int", "row", ",", "double", "gamma", ")", "{", "// Elements in 'y' before 'row' are known to be zero and the element...
<p> Computes the 'y' vector and stores the result in 'v'<br> <br> y = -&gamma;(A + U*V^T + V*U^T)u </p> @param blockLength @param A Contains the reflectors and the row being updated. @param V Contains previously computed 'v' vectors. @param row The row of 'A' that is to be updated.
[ "<p", ">", "Computes", "the", "y", "vector", "and", "stores", "the", "result", "in", "v", "<br", ">", "<br", ">", "y", "=", "-", "&gamma", ";", "(", "A", "+", "U", "*", "V^T", "+", "V", "*", "U^T", ")", "u", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/hessenberg/TridiagonalHelper_DDRB.java#L223-L255
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/SortedLists.java
SortedLists.binarySearch
public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { """ Searches the specified naturally ordered list for the specified object using the binary search algorithm. <p>Equivalent to {@li...
java
public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { checkNotNull(e); return binarySearch(list, e, Ordering.natural(), presentBehavior, absentBehavior); }
[ "public", "static", "<", "E", "extends", "Comparable", ">", "int", "binarySearch", "(", "List", "<", "?", "extends", "E", ">", "list", ",", "E", "e", ",", "KeyPresentBehavior", "presentBehavior", ",", "KeyAbsentBehavior", "absentBehavior", ")", "{", "checkNotN...
Searches the specified naturally ordered list for the specified object using the binary search algorithm. <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, KeyAbsentBehavior)} using {@link Ordering#natural}.
[ "Searches", "the", "specified", "naturally", "ordered", "list", "for", "the", "specified", "object", "using", "the", "binary", "search", "algorithm", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/SortedLists.java#L188-L195
jhalterman/failsafe
src/main/java/net/jodah/failsafe/FailurePolicy.java
FailurePolicy.isFailure
public boolean isFailure(R result, Throwable failure) { """ Returns whether an execution result can be retried given the configured failure conditions. @see #handle(Class...) @see #handle(List) @see #handleIf(BiPredicate) @see #handleIf(Predicate) @see #handleResult(R) @see #handleResultIf(Predicate) "...
java
public boolean isFailure(R result, Throwable failure) { for (BiPredicate<R, Throwable> predicate : failureConditions) { try { if (predicate.test(result, failure)) return true; } catch (Exception ignored) { // Ignore confused user-supplied predicates. // They should not ...
[ "public", "boolean", "isFailure", "(", "R", "result", ",", "Throwable", "failure", ")", "{", "for", "(", "BiPredicate", "<", "R", ",", "Throwable", ">", "predicate", ":", "failureConditions", ")", "{", "try", "{", "if", "(", "predicate", ".", "test", "("...
Returns whether an execution result can be retried given the configured failure conditions. @see #handle(Class...) @see #handle(List) @see #handleIf(BiPredicate) @see #handleIf(Predicate) @see #handleResult(R) @see #handleResultIf(Predicate)
[ "Returns", "whether", "an", "execution", "result", "can", "be", "retried", "given", "the", "configured", "failure", "conditions", "." ]
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/FailurePolicy.java#L156-L169
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java
FrameworkProject.createFileStructure
public static void createFileStructure(final File projectDir) throws IOException { """ Creates the file structure for a project @param projectDir The project base directory @throws IOException on io error """ /* * create an empty project file structure */ if (! projectDir.e...
java
public static void createFileStructure(final File projectDir) throws IOException { /* * create an empty project file structure */ if (! projectDir.exists() && ! projectDir.mkdirs()) { throw new IOException("failed creating project base dir: " + projectDir.getAbsolutePath()); ...
[ "public", "static", "void", "createFileStructure", "(", "final", "File", "projectDir", ")", "throws", "IOException", "{", "/*\n * create an empty project file structure\n */", "if", "(", "!", "projectDir", ".", "exists", "(", ")", "&&", "!", "projectDir", ...
Creates the file structure for a project @param projectDir The project base directory @throws IOException on io error
[ "Creates", "the", "file", "structure", "for", "a", "project" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java#L309-L324
elki-project/elki
elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/split/MSTSplit.java
MSTSplit.thresholdLength
private static double thresholdLength(double[][] matrix, int[] edges) { """ Choose the threshold length of edges to consider omittig. @param matrix Distance matrix @param edges Edges @return Distance threshold """ double[] lengths = new double[edges.length >> 1]; for(int i = 0, e = edges.length - ...
java
private static double thresholdLength(double[][] matrix, int[] edges) { double[] lengths = new double[edges.length >> 1]; for(int i = 0, e = edges.length - 1; i < e; i += 2) { lengths[i >> 1] = matrix[edges[i]][edges[i + 1]]; } Arrays.sort(lengths); final int pos = (lengths.length >> 1); // 50...
[ "private", "static", "double", "thresholdLength", "(", "double", "[", "]", "[", "]", "matrix", ",", "int", "[", "]", "edges", ")", "{", "double", "[", "]", "lengths", "=", "new", "double", "[", "edges", ".", "length", ">>", "1", "]", ";", "for", "(...
Choose the threshold length of edges to consider omittig. @param matrix Distance matrix @param edges Edges @return Distance threshold
[ "Choose", "the", "threshold", "length", "of", "edges", "to", "consider", "omittig", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/strategies/split/MSTSplit.java#L165-L173
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/namespace/DefaultNamespaceService.java
DefaultNamespaceService.doVerify
private void doVerify(Parameter p) throws NamespaceSyntaxWarning { """ Do namespace value verification against a resource location. This implementation assumes the namespace has been open prior to execution. @param p {@link Parameter}, the parameter to verify namespace value for which cannot be null and must ...
java
private void doVerify(Parameter p) throws NamespaceSyntaxWarning { if (p.getValue() == null) { throw new InvalidArgument("parameter value is null"); } Namespace ns = p.getNamespace(); String resourceLocation = ns.getResourceLocation(); if (resourceLocation == null) ...
[ "private", "void", "doVerify", "(", "Parameter", "p", ")", "throws", "NamespaceSyntaxWarning", "{", "if", "(", "p", ".", "getValue", "(", ")", "==", "null", ")", "{", "throw", "new", "InvalidArgument", "(", "\"parameter value is null\"", ")", ";", "}", "Name...
Do namespace value verification against a resource location. This implementation assumes the namespace has been open prior to execution. @param p {@link Parameter}, the parameter to verify namespace value for which cannot be null and must have a non-null namespace and value @throws NamespaceSyntaxWarning Thrown if par...
[ "Do", "namespace", "value", "verification", "against", "a", "resource", "location", ".", "This", "implementation", "assumes", "the", "namespace", "has", "been", "open", "prior", "to", "execution", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/namespace/DefaultNamespaceService.java#L409-L433
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/Util.java
Util.unsignedIntersect2by2
public static int unsignedIntersect2by2(final short[] set1, final int length1, final short[] set2, final int length2, final short[] buffer) { """ Intersect two sorted lists and write the result to the provided output array @param set1 first array @param length1 length of first array @param set2 second a...
java
public static int unsignedIntersect2by2(final short[] set1, final int length1, final short[] set2, final int length2, final short[] buffer) { final int THRESHOLD = 25; if (set1.length * THRESHOLD < set2.length) { return unsignedOneSidedGallopingIntersect2by2(set1, length1, set2, length2, buffer); ...
[ "public", "static", "int", "unsignedIntersect2by2", "(", "final", "short", "[", "]", "set1", ",", "final", "int", "length1", ",", "final", "short", "[", "]", "set2", ",", "final", "int", "length2", ",", "final", "short", "[", "]", "buffer", ")", "{", "...
Intersect two sorted lists and write the result to the provided output array @param set1 first array @param length1 length of first array @param set2 second array @param length2 length of second array @param buffer output array @return cardinality of the intersection
[ "Intersect", "two", "sorted", "lists", "and", "write", "the", "result", "to", "the", "provided", "output", "array" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/Util.java#L779-L789
HubSpot/jinjava
src/main/java/com/hubspot/jinjava/interpret/JinjavaInterpreter.java
JinjavaInterpreter.resolveProperty
public Object resolveProperty(Object object, String propertyName) { """ Resolve property of bean. @param object Bean. @param propertyName Name of property to resolve. @return Value of property. """ return resolveProperty(object, Collections.singletonList(propertyName)); }
java
public Object resolveProperty(Object object, String propertyName) { return resolveProperty(object, Collections.singletonList(propertyName)); }
[ "public", "Object", "resolveProperty", "(", "Object", "object", ",", "String", "propertyName", ")", "{", "return", "resolveProperty", "(", "object", ",", "Collections", ".", "singletonList", "(", "propertyName", ")", ")", ";", "}" ]
Resolve property of bean. @param object Bean. @param propertyName Name of property to resolve. @return Value of property.
[ "Resolve", "property", "of", "bean", "." ]
train
https://github.com/HubSpot/jinjava/blob/ce570935630f49c666170d2330b0b9ba4eddb955/src/main/java/com/hubspot/jinjava/interpret/JinjavaInterpreter.java#L433-L435
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_runtime_GET
public ArrayList<Long> serviceName_runtime_GET(String serviceName, String name, OvhTypeEnum type) throws IOException { """ List of runtime configurations to your hosting REST: GET /hosting/web/{serviceName}/runtime @param name [required] Filter the value of name property (like) @param type [required] Filter t...
java
public ArrayList<Long> serviceName_runtime_GET(String serviceName, String name, OvhTypeEnum type) throws IOException { String qPath = "/hosting/web/{serviceName}/runtime"; StringBuilder sb = path(qPath, serviceName); query(sb, "name", name); query(sb, "type", type); String resp = exec(qPath, "GET", sb.toStrin...
[ "public", "ArrayList", "<", "Long", ">", "serviceName_runtime_GET", "(", "String", "serviceName", ",", "String", "name", ",", "OvhTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/runtime\"", ";", "StringBuilde...
List of runtime configurations to your hosting REST: GET /hosting/web/{serviceName}/runtime @param name [required] Filter the value of name property (like) @param type [required] Filter the value of type property (=) @param serviceName [required] The internal name of your hosting
[ "List", "of", "runtime", "configurations", "to", "your", "hosting" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L352-L359
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/parse/BasicSqlQueryParser.java
BasicSqlQueryParser.removeBracketsAndQuotes
protected String removeBracketsAndQuotes( String text, boolean recursive, Position position ) { """ Remove any leading and trailing single-quotes, double-quotes, or square brackets from the supplied text. @param text the...
java
protected String removeBracketsAndQuotes( String text, boolean recursive, Position position ) { if (text.length() > 0) { char firstChar = text.charAt(0); switch (firstChar) { case ...
[ "protected", "String", "removeBracketsAndQuotes", "(", "String", "text", ",", "boolean", "recursive", ",", "Position", "position", ")", "{", "if", "(", "text", ".", "length", "(", ")", ">", "0", ")", "{", "char", "firstChar", "=", "text", ".", "charAt", ...
Remove any leading and trailing single-quotes, double-quotes, or square brackets from the supplied text. @param text the input text; may not be null @param recursive true if more than one pair of quotes, double-quotes, or square brackets should be removed, or false if just the first pair should be removed @param posit...
[ "Remove", "any", "leading", "and", "trailing", "single", "-", "quotes", "double", "-", "quotes", "or", "square", "brackets", "from", "the", "supplied", "text", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/parse/BasicSqlQueryParser.java#L1368-L1392
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/TypeParameterSourceAppender.java
TypeParameterSourceAppender.eInit
public void eInit(EObject context, String name, IJvmTypeProvider typeContext) { """ Initialize the type parameter. <p>Caution: This initialization function does not add the type parameter in its container. The container is responsible of adding the type parameter in its internal object. @param name the name of ...
java
public void eInit(EObject context, String name, IJvmTypeProvider typeContext) { this.builder.eInit(context, name, typeContext); }
[ "public", "void", "eInit", "(", "EObject", "context", ",", "String", "name", ",", "IJvmTypeProvider", "typeContext", ")", "{", "this", ".", "builder", ".", "eInit", "(", "context", ",", "name", ",", "typeContext", ")", ";", "}" ]
Initialize the type parameter. <p>Caution: This initialization function does not add the type parameter in its container. The container is responsible of adding the type parameter in its internal object. @param name the name of the type parameter. @param typeContext the provider of types or null.
[ "Initialize", "the", "type", "parameter", ".", "<p", ">", "Caution", ":", "This", "initialization", "function", "does", "not", "add", "the", "type", "parameter", "in", "its", "container", ".", "The", "container", "is", "responsible", "of", "adding", "the", "...
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/TypeParameterSourceAppender.java#L75-L77
vst/commons-math-extensions
src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java
DMatrixUtils.roundUpTo
public static BigDecimal roundUpTo(double value, double steps) { """ Returns the UP rounded value of the given value for the given steps. @param value The original value to be rounded. @param steps The steps. @return The UP rounded value of the given value for the given steps. """ final BigDecimal...
java
public static BigDecimal roundUpTo(double value, double steps) { final BigDecimal bValue = BigDecimal.valueOf(value); final BigDecimal bSteps = BigDecimal.valueOf(steps); if (Objects.equals(bSteps, BigDecimal.ZERO)) { return bValue; } else { return bValue.divide(...
[ "public", "static", "BigDecimal", "roundUpTo", "(", "double", "value", ",", "double", "steps", ")", "{", "final", "BigDecimal", "bValue", "=", "BigDecimal", ".", "valueOf", "(", "value", ")", ";", "final", "BigDecimal", "bSteps", "=", "BigDecimal", ".", "val...
Returns the UP rounded value of the given value for the given steps. @param value The original value to be rounded. @param steps The steps. @return The UP rounded value of the given value for the given steps.
[ "Returns", "the", "UP", "rounded", "value", "of", "the", "given", "value", "for", "the", "given", "steps", "." ]
train
https://github.com/vst/commons-math-extensions/blob/a11ee78ffe53ab7c016062be93c5af07aa8e1823/src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java#L329-L338
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.partitioningBy
public <D> Map<Boolean, D> partitioningBy(Predicate<? super T> predicate, Collector<? super T, ?, D> downstream) { """ Returns a {@code Map<Boolean, D>} which contains two partitions of the input elements according to a {@code Predicate}, which are reduced according to the supplied {@code Collector}. <p> Thi...
java
public <D> Map<Boolean, D> partitioningBy(Predicate<? super T> predicate, Collector<? super T, ?, D> downstream) { return collect(MoreCollectors.partitioningBy(predicate, downstream)); }
[ "public", "<", "D", ">", "Map", "<", "Boolean", ",", "D", ">", "partitioningBy", "(", "Predicate", "<", "?", "super", "T", ">", "predicate", ",", "Collector", "<", "?", "super", "T", ",", "?", ",", "D", ">", "downstream", ")", "{", "return", "colle...
Returns a {@code Map<Boolean, D>} which contains two partitions of the input elements according to a {@code Predicate}, which are reduced according to the supplied {@code Collector}. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. The operation may short-circuit if the downstream collect...
[ "Returns", "a", "{", "@code", "Map<Boolean", "D", ">", "}", "which", "contains", "two", "partitions", "of", "the", "input", "elements", "according", "to", "a", "{", "@code", "Predicate", "}", "which", "are", "reduced", "according", "to", "the", "supplied", ...
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L699-L701
Azure/azure-sdk-for-java
common/azure-common/src/main/java/com/azure/common/implementation/SwaggerInterfaceParser.java
SwaggerInterfaceParser.methodParser
public SwaggerMethodParser methodParser(Method swaggerMethod) { """ Get the method parser that is associated with the provided swaggerMethod. The method parser can be used to get details about the Swagger REST API call. @param swaggerMethod the method to generate a parser for @return the SwaggerMethodParser a...
java
public SwaggerMethodParser methodParser(Method swaggerMethod) { SwaggerMethodParser result = methodParsers.get(swaggerMethod); if (result == null) { result = new SwaggerMethodParser(swaggerMethod, serializer, host()); methodParsers.put(swaggerMethod, result); } re...
[ "public", "SwaggerMethodParser", "methodParser", "(", "Method", "swaggerMethod", ")", "{", "SwaggerMethodParser", "result", "=", "methodParsers", ".", "get", "(", "swaggerMethod", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "new", "Sw...
Get the method parser that is associated with the provided swaggerMethod. The method parser can be used to get details about the Swagger REST API call. @param swaggerMethod the method to generate a parser for @return the SwaggerMethodParser associated with the provided swaggerMethod
[ "Get", "the", "method", "parser", "that", "is", "associated", "with", "the", "provided", "swaggerMethod", ".", "The", "method", "parser", "can", "be", "used", "to", "get", "details", "about", "the", "Swagger", "REST", "API", "call", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common/src/main/java/com/azure/common/implementation/SwaggerInterfaceParser.java#L62-L69
lucee/Lucee
core/src/main/java/lucee/runtime/type/scope/storage/StorageScopeFile.java
StorageScopeFile.getFolderName
public static String getFolderName(String name, String cfid, boolean addExtension) { """ return a folder name that match given input @param name @param cfid @param addExtension @return """ if (addExtension) return getFolderName(name, cfid, false) + ".scpt"; if (!StringUtil.isEmpty(name)) name = encode(...
java
public static String getFolderName(String name, String cfid, boolean addExtension) { if (addExtension) return getFolderName(name, cfid, false) + ".scpt"; if (!StringUtil.isEmpty(name)) name = encode(name);// StringUtil.toVariableName(StringUtil.toLowerCase(name)); else name = "__empty__"; return name + "/" + cfid.s...
[ "public", "static", "String", "getFolderName", "(", "String", "name", ",", "String", "cfid", ",", "boolean", "addExtension", ")", "{", "if", "(", "addExtension", ")", "return", "getFolderName", "(", "name", ",", "cfid", ",", "false", ")", "+", "\".scpt\"", ...
return a folder name that match given input @param name @param cfid @param addExtension @return
[ "return", "a", "folder", "name", "that", "match", "given", "input" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/scope/storage/StorageScopeFile.java#L164-L169
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java
BeanProvider.getContextualReference
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Bean<?> bean) { """ /* public static <T> T getContextualReference(Class<T> type, Bean<T> bean) { return getContextualReference(type, getBeanManager(), bean); } """ //noinspection unchecked return getContextu...
java
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Bean<?> bean) { //noinspection unchecked return getContextualReference(type, beanManager, new HashSet<Bean<?>>((Collection) Arrays.asList(bean))); }
[ "private", "static", "<", "T", ">", "T", "getContextualReference", "(", "Class", "<", "T", ">", "type", ",", "BeanManager", "beanManager", ",", "Bean", "<", "?", ">", "bean", ")", "{", "//noinspection unchecked", "return", "getContextualReference", "(", "type"...
/* public static <T> T getContextualReference(Class<T> type, Bean<T> bean) { return getContextualReference(type, getBeanManager(), bean); }
[ "/", "*", "public", "static", "<T", ">", "T", "getContextualReference", "(", "Class<T", ">", "type", "Bean<T", ">", "bean", ")", "{", "return", "getContextualReference", "(", "type", "getBeanManager", "()", "bean", ")", ";", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java#L233-L237
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/AbstractIntList.java
AbstractIntList.beforeInsertDummies
protected void beforeInsertDummies(int index, int length) { """ Inserts <tt>length</tt> dummy elements before the specified position into the receiver. Shifts the element currently at that position (if any) and any subsequent elements to the right. <b>This method must set the new size to be <tt>size()+length</t...
java
protected void beforeInsertDummies(int index, int length) { if (index > size || index < 0) throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); if (length > 0) { ensureCapacity(size + length); setSizeRaw(size + length); replaceFromToWithFrom(index+length,size-1,this,index); } }
[ "protected", "void", "beforeInsertDummies", "(", "int", "index", ",", "int", "length", ")", "{", "if", "(", "index", ">", "size", "||", "index", "<", "0", ")", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index: \"", "+", "index", "+", "\", Size: \""...
Inserts <tt>length</tt> dummy elements before the specified position into the receiver. Shifts the element currently at that position (if any) and any subsequent elements to the right. <b>This method must set the new size to be <tt>size()+length</tt>. @param index index before which to insert dummy elements (must be i...
[ "Inserts", "<tt", ">", "length<", "/", "tt", ">", "dummy", "elements", "before", "the", "specified", "position", "into", "the", "receiver", ".", "Shifts", "the", "element", "currently", "at", "that", "position", "(", "if", "any", ")", "and", "any", "subseq...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/AbstractIntList.java#L96-L104
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/BlockDrawingHelper.java
BlockDrawingHelper.DrawPrimitive
private void DrawPrimitive( DrawSphere s, World w ) throws Exception { """ Draw a solid sphere made up of Minecraft blocks. @param s Contains information about the sphere to be drawn. @param w The world in which to draw. @throws Exception Throws an exception if the block type is not recognised. """ ...
java
private void DrawPrimitive( DrawSphere s, World w ) throws Exception { XMLBlockState blockType = new XMLBlockState(s.getType(), s.getColour(), null, s.getVariant()); if (!blockType.isValid()) throw new Exception("Unrecognised block type: " + s.getType().value()); int radius = s...
[ "private", "void", "DrawPrimitive", "(", "DrawSphere", "s", ",", "World", "w", ")", "throws", "Exception", "{", "XMLBlockState", "blockType", "=", "new", "XMLBlockState", "(", "s", ".", "getType", "(", ")", ",", "s", ".", "getColour", "(", ")", ",", "nul...
Draw a solid sphere made up of Minecraft blocks. @param s Contains information about the sphere to be drawn. @param w The world in which to draw. @throws Exception Throws an exception if the block type is not recognised.
[ "Draw", "a", "solid", "sphere", "made", "up", "of", "Minecraft", "blocks", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/BlockDrawingHelper.java#L248-L271
whitesource/agents
wss-agent-hash-calculator/src/main/java/org/whitesource/agent/hash/HashCalculator.java
HashCalculator.calculateSha1ByNameVersionAndType
public String calculateSha1ByNameVersionAndType(String name, String version, DependencyType dependencyType) throws IOException { """ Calculates SHA-1 for library by name, version and dependencyType @param name of library @param version of library @param dependencyType of library @return Calculated SHA-1 for ...
java
public String calculateSha1ByNameVersionAndType(String name, String version, DependencyType dependencyType) throws IOException { String sha1ToCalc = name + UNDERSCORE + version + UNDERSCORE + dependencyType.toString(); return calculateByteArraySHA1(sha1ToCalc.getBytes(StandardCharsets.UTF_8)); }
[ "public", "String", "calculateSha1ByNameVersionAndType", "(", "String", "name", ",", "String", "version", ",", "DependencyType", "dependencyType", ")", "throws", "IOException", "{", "String", "sha1ToCalc", "=", "name", "+", "UNDERSCORE", "+", "version", "+", "UNDERS...
Calculates SHA-1 for library by name, version and dependencyType @param name of library @param version of library @param dependencyType of library @return Calculated SHA-1 for library by name, version and dependencyType @throws IOException when failed to calculate sha-1
[ "Calculates", "SHA", "-", "1", "for", "library", "by", "name", "version", "and", "dependencyType" ]
train
https://github.com/whitesource/agents/blob/8a947a3dbad257aff70f23f79fb3a55ca90b765f/wss-agent-hash-calculator/src/main/java/org/whitesource/agent/hash/HashCalculator.java#L268-L271
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/genia/Event.java
Event.setThemes_event
public void setThemes_event(int i, Event v) { """ indexed setter for themes_event - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array """ if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_themes_event == null) jcasType.jcas.throwFe...
java
public void setThemes_event(int i, Event v) { if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_themes_event == null) jcasType.jcas.throwFeatMissing("themes_event", "ch.epfl.bbp.uima.genia.Event"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Event_Type)jcasType).casFeat...
[ "public", "void", "setThemes_event", "(", "int", "i", ",", "Event", "v", ")", "{", "if", "(", "Event_Type", ".", "featOkTst", "&&", "(", "(", "Event_Type", ")", "jcasType", ")", ".", "casFeat_themes_event", "==", "null", ")", "jcasType", ".", "jcas", "."...
indexed setter for themes_event - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "themes_event", "-", "sets", "an", "indexed", "value", "-" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/ch/epfl/bbp/uima/genia/Event.java#L273-L277
code4everything/util
src/main/java/com/zhazhapan/util/AopLogUtils.java
AopLogUtils.getDescriptionNoThrow
public static String getDescriptionNoThrow(String className, String methodName, Object[] args) { """ 获取 {@link AopLog}注解中的描述 @param className 类名:joinPoint#getTarget#getClass#getName @param methodName 方法名:joinPoint#getSignature#getName @param args 参数数组:joinPoint#getArgs @return 描述 @since 1.1.0 """ ...
java
public static String getDescriptionNoThrow(String className, String methodName, Object[] args) { try { return getDescription(className, methodName, args); } catch (ClassNotFoundException e) { LoggerUtils.error("get description from {}#{} error: {}", className, methodName, e.getMe...
[ "public", "static", "String", "getDescriptionNoThrow", "(", "String", "className", ",", "String", "methodName", ",", "Object", "[", "]", "args", ")", "{", "try", "{", "return", "getDescription", "(", "className", ",", "methodName", ",", "args", ")", ";", "}"...
获取 {@link AopLog}注解中的描述 @param className 类名:joinPoint#getTarget#getClass#getName @param methodName 方法名:joinPoint#getSignature#getName @param args 参数数组:joinPoint#getArgs @return 描述 @since 1.1.0
[ "获取", "{", "@link", "AopLog", "}", "注解中的描述" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/AopLogUtils.java#L52-L59