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
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Execution.java
Execution.newInstance
public static Execution newInstance(Specification specification, SystemUnderTest systemUnderTest, XmlReport xmlReport, String sections) { """ <p>newInstance.</p> @param specification a {@link com.greenpepper.server.domain.Specification} object. @param systemUnderTest a {@link com.greenpepper.server.domain.Syst...
java
public static Execution newInstance(Specification specification, SystemUnderTest systemUnderTest, XmlReport xmlReport, String sections) { Execution execution = Execution.newInstance(specification, systemUnderTest, xmlReport ); execution.setSections(sections); return execution; }
[ "public", "static", "Execution", "newInstance", "(", "Specification", "specification", ",", "SystemUnderTest", "systemUnderTest", ",", "XmlReport", "xmlReport", ",", "String", "sections", ")", "{", "Execution", "execution", "=", "Execution", ".", "newInstance", "(", ...
<p>newInstance.</p> @param specification a {@link com.greenpepper.server.domain.Specification} object. @param systemUnderTest a {@link com.greenpepper.server.domain.SystemUnderTest} object. @param xmlReport a {@link com.greenpepper.report.XmlReport} object. @param sections a {@link java.lang.String} object. @return a ...
[ "<p", ">", "newInstance", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Execution.java#L138-L143
vst/commons-math-extensions
src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java
DMatrixUtils._ttbdInner
private static double[] _ttbdInner (double target, double[] lower, double[] upper, RandomGenerator randomGenerator) { """ Returns a target-total bounded distribution sample. @param target The target total value. @param lower Lower limits. @param upper Upper limits. @param randomGenerator The random generator...
java
private static double[] _ttbdInner (double target, double[] lower, double[] upper, RandomGenerator randomGenerator) { // Initialize the return value: final double[] retval = new double[lower.length]; // Iterate over the retval and simulate: for (int i = 0; i < retval.length; i++) { ...
[ "private", "static", "double", "[", "]", "_ttbdInner", "(", "double", "target", ",", "double", "[", "]", "lower", ",", "double", "[", "]", "upper", ",", "RandomGenerator", "randomGenerator", ")", "{", "// Initialize the return value:", "final", "double", "[", ...
Returns a target-total bounded distribution sample. @param target The target total value. @param lower Lower limits. @param upper Upper limits. @param randomGenerator The random generator. @return A vector of target-total bounded sample.
[ "Returns", "a", "target", "-", "total", "bounded", "distribution", "sample", "." ]
train
https://github.com/vst/commons-math-extensions/blob/a11ee78ffe53ab7c016062be93c5af07aa8e1823/src/main/java/com/vsthost/rnd/commons/math/ext/linear/DMatrixUtils.java#L582-L622
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java
AssertMessages.outsideRangeInclusiveParameter
@Pure @Inline(value = "AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)", imported = { """ First parameter value is outside range. @param currentValue current value. @param minValue minimum value in range. @param maxValue maximum value in range. @return the error message. """AssertMessages.c...
java
@Pure @Inline(value = "AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)", imported = {AssertMessages.class}) public static String outsideRangeInclusiveParameter(Object currentValue, Object minValue, Object maxValue) { return outsideRangeInclusiveParameter(0, currentValue, minValue, maxValue); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"AssertMessages.outsideRangeInclusiveParameter(0, $1, $2, $3)\"", ",", "imported", "=", "{", "AssertMessages", ".", "class", "}", ")", "public", "static", "String", "outsideRangeInclusiveParameter", "(", "Object", "curren...
First parameter value is outside range. @param currentValue current value. @param minValue minimum value in range. @param maxValue maximum value in range. @return the error message.
[ "First", "parameter", "value", "is", "outside", "range", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/asserts/AssertMessages.java#L250-L255
RestComm/load-balancer
jar/src/main/java/org/mobicents/tools/sip/balancer/SIPBalancerForwarder.java
SIPBalancerForwarder.comesFromInternalNode
protected Boolean comesFromInternalNode(Response externalResponse,InvocationContext ctx,String host,Integer port,String transport,Boolean isIpV6) { """ need to verify that comes from external in case of single leg """ boolean found = false; if(host!=null && port!=null) { if(ctx.sipNodeMap(isIpV6).cont...
java
protected Boolean comesFromInternalNode(Response externalResponse,InvocationContext ctx,String host,Integer port,String transport,Boolean isIpV6) { boolean found = false; if(host!=null && port!=null) { if(ctx.sipNodeMap(isIpV6).containsKey(new KeySip(host, port,isIpV6))) found = true; // for(Node node :...
[ "protected", "Boolean", "comesFromInternalNode", "(", "Response", "externalResponse", ",", "InvocationContext", "ctx", ",", "String", "host", ",", "Integer", "port", ",", "String", "transport", ",", "Boolean", "isIpV6", ")", "{", "boolean", "found", "=", "false", ...
need to verify that comes from external in case of single leg
[ "need", "to", "verify", "that", "comes", "from", "external", "in", "case", "of", "single", "leg" ]
train
https://github.com/RestComm/load-balancer/blob/54768d0b81004b2653d429720016ad2617fe754f/jar/src/main/java/org/mobicents/tools/sip/balancer/SIPBalancerForwarder.java#L2283-L2300
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.regressionSuites
public Collection<RegressionSuite> regressionSuites(RegressionSuiteFilter filter) { """ Get Regression Suite filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items are returned. @return Collection of items as specified in the filter. """ ...
java
public Collection<RegressionSuite> regressionSuites(RegressionSuiteFilter filter) { return get(RegressionSuite.class, (filter != null) ? filter : new RegressionSuiteFilter()); }
[ "public", "Collection", "<", "RegressionSuite", ">", "regressionSuites", "(", "RegressionSuiteFilter", "filter", ")", "{", "return", "get", "(", "RegressionSuite", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "RegressionSuiteFi...
Get Regression Suite filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items are returned. @return Collection of items as specified in the filter.
[ "Get", "Regression", "Suite", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L380-L382
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/HashUtil.java
HashUtil.MurmurHash3_x64_64
public static long MurmurHash3_x64_64(byte[] data, int offset, int len) { """ Returns the MurmurHash3_x86_32 hash of a block inside a byte array. """ return MurmurHash3_x64_64(BYTE_ARRAY_LOADER, data, offset, len, DEFAULT_MURMUR_SEED); }
java
public static long MurmurHash3_x64_64(byte[] data, int offset, int len) { return MurmurHash3_x64_64(BYTE_ARRAY_LOADER, data, offset, len, DEFAULT_MURMUR_SEED); }
[ "public", "static", "long", "MurmurHash3_x64_64", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "len", ")", "{", "return", "MurmurHash3_x64_64", "(", "BYTE_ARRAY_LOADER", ",", "data", ",", "offset", ",", "len", ",", "DEFAULT_MURMUR_SEED", ...
Returns the MurmurHash3_x86_32 hash of a block inside a byte array.
[ "Returns", "the", "MurmurHash3_x86_32", "hash", "of", "a", "block", "inside", "a", "byte", "array", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/HashUtil.java#L139-L141
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java
OffsetTime.ofInstant
public static OffsetTime ofInstant(Instant instant, ZoneId zone) { """ Obtains an instance of {@code OffsetTime} from an {@code Instant} and zone ID. <p> This creates an offset time with the same instant as that specified. Finding the offset from UTC/Greenwich is simple as there is only one valid offset for ea...
java
public static OffsetTime ofInstant(Instant instant, ZoneId zone) { Objects.requireNonNull(instant, "instant"); Objects.requireNonNull(zone, "zone"); ZoneRules rules = zone.getRules(); ZoneOffset offset = rules.getOffset(instant); long localSecond = instant.getEpochSecond() + offs...
[ "public", "static", "OffsetTime", "ofInstant", "(", "Instant", "instant", ",", "ZoneId", "zone", ")", "{", "Objects", ".", "requireNonNull", "(", "instant", ",", "\"instant\"", ")", ";", "Objects", ".", "requireNonNull", "(", "zone", ",", "\"zone\"", ")", ";...
Obtains an instance of {@code OffsetTime} from an {@code Instant} and zone ID. <p> This creates an offset time with the same instant as that specified. Finding the offset from UTC/Greenwich is simple as there is only one valid offset for each instant. <p> The date component of the instant is dropped during the conversi...
[ "Obtains", "an", "instance", "of", "{", "@code", "OffsetTime", "}", "from", "an", "{", "@code", "Instant", "}", "and", "zone", "ID", ".", "<p", ">", "This", "creates", "an", "offset", "time", "with", "the", "same", "instant", "as", "that", "specified", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java#L249-L258
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/AllianceApi.java
AllianceApi.getAlliancesAllianceIdIcons
public AllianceIconsResponse getAlliancesAllianceIdIcons(Integer allianceId, String datasource, String ifNoneMatch) throws ApiException { """ Get alliance icon Get the icon urls for a alliance --- This route expires daily at 11:05 @param allianceId An EVE alliance ID (required) @param datasource ...
java
public AllianceIconsResponse getAlliancesAllianceIdIcons(Integer allianceId, String datasource, String ifNoneMatch) throws ApiException { ApiResponse<AllianceIconsResponse> resp = getAlliancesAllianceIdIconsWithHttpInfo(allianceId, datasource, ifNoneMatch); return resp.getDat...
[ "public", "AllianceIconsResponse", "getAlliancesAllianceIdIcons", "(", "Integer", "allianceId", ",", "String", "datasource", ",", "String", "ifNoneMatch", ")", "throws", "ApiException", "{", "ApiResponse", "<", "AllianceIconsResponse", ">", "resp", "=", "getAlliancesAllia...
Get alliance icon Get the icon urls for a alliance --- This route expires daily at 11:05 @param allianceId An EVE alliance ID (required) @param datasource The server name you would like data from (optional, default to tranquility) @param ifNoneMatch ETag from a previous request. A 304 will be returned if this matches ...
[ "Get", "alliance", "icon", "Get", "the", "icon", "urls", "for", "a", "alliance", "---", "This", "route", "expires", "daily", "at", "11", ":", "05" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/AllianceApi.java#L570-L575
RestComm/sipunit
src/main/java/org/cafesip/sipunit/PresenceSubscriber.java
PresenceSubscriber.removeBuddy
public boolean removeBuddy(Request req, long timeout) { """ This method is the same as removeBuddy(eventId, timeout) except that instead of creating the SUBSCRIBE request from parameters passed in, the given request message parameter is used for sending out the SUBSCRIBE message if the subscription is active. ...
java
public boolean removeBuddy(Request req, long timeout) { initErrorInfo(); if (parent.retireBuddy(targetUri) == null) { setReturnCode(SipSession.INVALID_ARGUMENT); setErrorMessage("Buddy removal for URI " + targetUri + " failed, not found in buddy list."); return false; } if (...
[ "public", "boolean", "removeBuddy", "(", "Request", "req", ",", "long", "timeout", ")", "{", "initErrorInfo", "(", ")", ";", "if", "(", "parent", ".", "retireBuddy", "(", "targetUri", ")", "==", "null", ")", "{", "setReturnCode", "(", "SipSession", ".", ...
This method is the same as removeBuddy(eventId, timeout) except that instead of creating the SUBSCRIBE request from parameters passed in, the given request message parameter is used for sending out the SUBSCRIBE message if the subscription is active. <p> The Request parameter passed into this method should come from c...
[ "This", "method", "is", "the", "same", "as", "removeBuddy", "(", "eventId", "timeout", ")", "except", "that", "instead", "of", "creating", "the", "SUBSCRIBE", "request", "from", "parameters", "passed", "in", "the", "given", "request", "message", "parameter", "...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/PresenceSubscriber.java#L481-L497
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/ModuleRoles.java
ModuleRoles.fetchAll
public CMAArray<CMARole> fetchAll(Map<String, String> query) { """ Fetch specific roles of the configured space. @param query the search criteria to search for. @return the array of roles. @throws IllegalArgumentException if configured spaceId is null. @throws CMANotWithEnvironmentsException if enviro...
java
public CMAArray<CMARole> fetchAll(Map<String, String> query) { throwIfEnvironmentIdIsSet(); return fetchAll(spaceId, query); }
[ "public", "CMAArray", "<", "CMARole", ">", "fetchAll", "(", "Map", "<", "String", ",", "String", ">", "query", ")", "{", "throwIfEnvironmentIdIsSet", "(", ")", ";", "return", "fetchAll", "(", "spaceId", ",", "query", ")", ";", "}" ]
Fetch specific roles of the configured space. @param query the search criteria to search for. @return the array of roles. @throws IllegalArgumentException if configured spaceId is null. @throws CMANotWithEnvironmentsException if environmentId was set using {@link CMAClient.Builder#setEnvironmentId(String)}. @se...
[ "Fetch", "specific", "roles", "of", "the", "configured", "space", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/ModuleRoles.java#L99-L103
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/json/JSONDeserializer.java
JSONDeserializer.fromString
public final IJSONSerializable<?> fromString(String string, final ValidationContext ctx) { """ Parses the JSON string and returns the IJSONSerializable. Use this method if you need to parse JSON that may contain one or more errors. <pre> ValidationContext ctx = new ValidationContext(); ctx.setValidate(true); ...
java
public final IJSONSerializable<?> fromString(String string, final ValidationContext ctx) { try { ctx.push("fromString"); if (null == (string = StringOps.toTrimOrNull(string))) { ctx.addError("NULL JSON String"); return n...
[ "public", "final", "IJSONSerializable", "<", "?", ">", "fromString", "(", "String", "string", ",", "final", "ValidationContext", "ctx", ")", "{", "try", "{", "ctx", ".", "push", "(", "\"fromString\"", ")", ";", "if", "(", "null", "==", "(", "string", "="...
Parses the JSON string and returns the IJSONSerializable. Use this method if you need to parse JSON that may contain one or more errors. <pre> ValidationContext ctx = new ValidationContext(); ctx.setValidate(true); ctx.setStopOnError(false); // find all errors IJSONSerializable<?> node = JSONDeserializer.getInstance()....
[ "Parses", "the", "JSON", "string", "and", "returns", "the", "IJSONSerializable", ".", "Use", "this", "method", "if", "you", "need", "to", "parse", "JSON", "that", "may", "contain", "one", "or", "more", "errors", ".", "<pre", ">", "ValidationContext", "ctx", ...
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/json/JSONDeserializer.java#L150-L184
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.localSeo_visibilityCheckResult_GET
public ArrayList<OvhVisibilityCheckResultResponse> localSeo_visibilityCheckResult_GET(String directory, Long id, String token) throws IOException { """ Get the result of a visibility check REST: GET /hosting/web/localSeo/visibilityCheckResult @param directory [required] Get the result only for one directory @...
java
public ArrayList<OvhVisibilityCheckResultResponse> localSeo_visibilityCheckResult_GET(String directory, Long id, String token) throws IOException { String qPath = "/hosting/web/localSeo/visibilityCheckResult"; StringBuilder sb = path(qPath); query(sb, "directory", directory); query(sb, "id", id); query(sb, "t...
[ "public", "ArrayList", "<", "OvhVisibilityCheckResultResponse", ">", "localSeo_visibilityCheckResult_GET", "(", "String", "directory", ",", "Long", "id", ",", "String", "token", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/localSeo/visibility...
Get the result of a visibility check REST: GET /hosting/web/localSeo/visibilityCheckResult @param directory [required] Get the result only for one directory @param token [required] Token received when requesting the check @param id [required] Id of the check
[ "Get", "the", "result", "of", "a", "visibility", "check" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L2247-L2255
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/ser/map/MapJsonSerializer.java
MapJsonSerializer.newInstance
public static <M extends Map<?, ?>> MapJsonSerializer<M, ?, ?> newInstance( KeySerializer<?> keySerializer, JsonSerializer<?> valueSerializer ) { """ <p>newInstance</p> @param keySerializer {@link KeySerializer} used to serialize the keys. @param valueSerializer {@link JsonSerializer} used to seria...
java
public static <M extends Map<?, ?>> MapJsonSerializer<M, ?, ?> newInstance( KeySerializer<?> keySerializer, JsonSerializer<?> valueSerializer ) { return new MapJsonSerializer( keySerializer, valueSerializer ); }
[ "public", "static", "<", "M", "extends", "Map", "<", "?", ",", "?", ">", ">", "MapJsonSerializer", "<", "M", ",", "?", ",", "?", ">", "newInstance", "(", "KeySerializer", "<", "?", ">", "keySerializer", ",", "JsonSerializer", "<", "?", ">", "valueSeria...
<p>newInstance</p> @param keySerializer {@link KeySerializer} used to serialize the keys. @param valueSerializer {@link JsonSerializer} used to serialize the values. @return a new instance of {@link MapJsonSerializer} @param <M> a M object.
[ "<p", ">", "newInstance<", "/", "p", ">" ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/ser/map/MapJsonSerializer.java#L49-L52
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/MethodAttribUtils.java
MethodAttribUtils.methodsEqual
public static final boolean methodsEqual(Method remoteMethod, Method beanMethod) { """ This utility method compares a method on the bean's remote interface with a method on the bean and returns true iff they are equal for the purpose of determining if the control descriptor associated with the bean method appli...
java
public static final boolean methodsEqual(Method remoteMethod, Method beanMethod) { if ((remoteMethod == null) || (beanMethod == null)) { return false; } //---------------------- // Compare method names //---------------------- if (!remoteMethod.getName()...
[ "public", "static", "final", "boolean", "methodsEqual", "(", "Method", "remoteMethod", ",", "Method", "beanMethod", ")", "{", "if", "(", "(", "remoteMethod", "==", "null", ")", "||", "(", "beanMethod", "==", "null", ")", ")", "{", "return", "false", ";", ...
This utility method compares a method on the bean's remote interface with a method on the bean and returns true iff they are equal for the purpose of determining if the control descriptor associated with the bean method applies to the remote interface method. Equality in this case means the methods are identical except...
[ "This", "utility", "method", "compares", "a", "method", "on", "the", "bean", "s", "remote", "interface", "with", "a", "method", "on", "the", "bean", "and", "returns", "true", "iff", "they", "are", "equal", "for", "the", "purpose", "of", "determining", "if"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/MethodAttribUtils.java#L1691-L1730
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/TwoInputTransformation.java
TwoInputTransformation.setStateKeySelectors
public void setStateKeySelectors(KeySelector<IN1, ?> stateKeySelector1, KeySelector<IN2, ?> stateKeySelector2) { """ Sets the {@link KeySelector KeySelectors} that must be used for partitioning keyed state of this transformation. @param stateKeySelector1 The {@code KeySelector} to set for the first input @par...
java
public void setStateKeySelectors(KeySelector<IN1, ?> stateKeySelector1, KeySelector<IN2, ?> stateKeySelector2) { this.stateKeySelector1 = stateKeySelector1; this.stateKeySelector2 = stateKeySelector2; }
[ "public", "void", "setStateKeySelectors", "(", "KeySelector", "<", "IN1", ",", "?", ">", "stateKeySelector1", ",", "KeySelector", "<", "IN2", ",", "?", ">", "stateKeySelector2", ")", "{", "this", ".", "stateKeySelector1", "=", "stateKeySelector1", ";", "this", ...
Sets the {@link KeySelector KeySelectors} that must be used for partitioning keyed state of this transformation. @param stateKeySelector1 The {@code KeySelector} to set for the first input @param stateKeySelector2 The {@code KeySelector} to set for the first input
[ "Sets", "the", "{", "@link", "KeySelector", "KeySelectors", "}", "that", "must", "be", "used", "for", "partitioning", "keyed", "state", "of", "this", "transformation", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/transformations/TwoInputTransformation.java#L120-L123
wuman/android-oauth-client
library/src/main/java/com/wuman/android/auth/AuthorizationFlow.java
AuthorizationFlow.new10aCredential
private OAuthHmacCredential new10aCredential(String userId) { """ Returns a new OAuth 1.0a credential instance based on the given user ID. @param userId user ID or {@code null} if not using a persisted credential store """ ClientParametersAuthentication clientAuthentication = (ClientParametersAuthe...
java
private OAuthHmacCredential new10aCredential(String userId) { ClientParametersAuthentication clientAuthentication = (ClientParametersAuthentication) getClientAuthentication(); OAuthHmacCredential.Builder builder = new OAuthHmacCredential.Builder(getMethod(), clientAuthentication.getClien...
[ "private", "OAuthHmacCredential", "new10aCredential", "(", "String", "userId", ")", "{", "ClientParametersAuthentication", "clientAuthentication", "=", "(", "ClientParametersAuthentication", ")", "getClientAuthentication", "(", ")", ";", "OAuthHmacCredential", ".", "Builder",...
Returns a new OAuth 1.0a credential instance based on the given user ID. @param userId user ID or {@code null} if not using a persisted credential store
[ "Returns", "a", "new", "OAuth", "1", ".", "0a", "credential", "instance", "based", "on", "the", "given", "user", "ID", "." ]
train
https://github.com/wuman/android-oauth-client/blob/6e01b81b7319a6954a1156e8b93c0b5cbeb61446/library/src/main/java/com/wuman/android/auth/AuthorizationFlow.java#L345-L364
VoltDB/voltdb
src/frontend/org/voltdb/StatsProcProfTable.java
StatsProcProfTable.compareByAvg
public int compareByAvg(ProcProfRow lhs, ProcProfRow rhs) { """ Sort by average, weighting the sampled average by the real invocation count. """ if (lhs.avg * lhs.invocations > rhs.avg * rhs.invocations) { return 1; } else if (lhs.avg * lhs.invocations < rhs.avg * rhs.invocations) {...
java
public int compareByAvg(ProcProfRow lhs, ProcProfRow rhs) { if (lhs.avg * lhs.invocations > rhs.avg * rhs.invocations) { return 1; } else if (lhs.avg * lhs.invocations < rhs.avg * rhs.invocations) { return -1; } else { return 0; } }
[ "public", "int", "compareByAvg", "(", "ProcProfRow", "lhs", ",", "ProcProfRow", "rhs", ")", "{", "if", "(", "lhs", ".", "avg", "*", "lhs", ".", "invocations", ">", "rhs", ".", "avg", "*", "rhs", ".", "invocations", ")", "{", "return", "1", ";", "}", ...
Sort by average, weighting the sampled average by the real invocation count.
[ "Sort", "by", "average", "weighting", "the", "sampled", "average", "by", "the", "real", "invocation", "count", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/StatsProcProfTable.java#L169-L178
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java
SlingApi.postConfigApacheSlingReferrerFilterAsync
public com.squareup.okhttp.Call postConfigApacheSlingReferrerFilterAsync(String runmode, Boolean allowEmpty, String allowEmptyTypeHint, String allowHosts, String allowHostsTypeHint, String allowHostsRegexp, String allowHostsRegexpTypeHint, String filterMethods, String filterMethodsTypeHint, final ApiCallback<Void> call...
java
public com.squareup.okhttp.Call postConfigApacheSlingReferrerFilterAsync(String runmode, Boolean allowEmpty, String allowEmptyTypeHint, String allowHosts, String allowHostsTypeHint, String allowHostsRegexp, String allowHostsRegexpTypeHint, String filterMethods, String filterMethodsTypeHint, final ApiCallback<Void> call...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postConfigApacheSlingReferrerFilterAsync", "(", "String", "runmode", ",", "Boolean", "allowEmpty", ",", "String", "allowEmptyTypeHint", ",", "String", "allowHosts", ",", "String", "allowHostsTypeHint", ","...
(asynchronously) @param runmode (required) @param allowEmpty (optional) @param allowEmptyTypeHint (optional) @param allowHosts (optional) @param allowHostsTypeHint (optional) @param allowHostsRegexp (optional) @param allowHostsRegexpTypeHint (optional) @param filterMethods (optional) @param filterMethodsTypeHi...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java#L3601-L3625
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseRecommendedActionsInner.java
DatabaseRecommendedActionsInner.listByDatabaseAdvisor
public List<RecommendedActionInner> listByDatabaseAdvisor(String resourceGroupName, String serverName, String databaseName, String advisorName) { """ Gets list of Database Recommended Actions. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the ...
java
public List<RecommendedActionInner> listByDatabaseAdvisor(String resourceGroupName, String serverName, String databaseName, String advisorName) { return listByDatabaseAdvisorWithServiceResponseAsync(resourceGroupName, serverName, databaseName, advisorName).toBlocking().single().body(); }
[ "public", "List", "<", "RecommendedActionInner", ">", "listByDatabaseAdvisor", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "advisorName", ")", "{", "return", "listByDatabaseAdvisorWithServiceResponseAsync", ...
Gets list of Database Recommended Actions. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param advisorName The name...
[ "Gets", "list", "of", "Database", "Recommended", "Actions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/DatabaseRecommendedActionsInner.java#L85-L87
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java
JsiiClient.makeRequest
private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) { """ Returns a new request object for a specific API and a specific object. @param api The API call @param objRef The object reference @return A JSON object """ ObjectNode req = makeRequest(api); req.set("objref", ...
java
private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) { ObjectNode req = makeRequest(api); req.set("objref", objRef.toJson()); return req; }
[ "private", "ObjectNode", "makeRequest", "(", "final", "String", "api", ",", "final", "JsiiObjectRef", "objRef", ")", "{", "ObjectNode", "req", "=", "makeRequest", "(", "api", ")", ";", "req", ".", "set", "(", "\"objref\"", ",", "objRef", ".", "toJson", "("...
Returns a new request object for a specific API and a specific object. @param api The API call @param objRef The object reference @return A JSON object
[ "Returns", "a", "new", "request", "object", "for", "a", "specific", "API", "and", "a", "specific", "object", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java#L288-L292
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/style/StylerFactoryHelper.java
StylerFactoryHelper.findForCssName
public static Collection<BaseStyler> findForCssName(String cssName) throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { """ Call {@link #findForCssName(java.lang.String, boolean) } with false """ return findForC...
java
public static Collection<BaseStyler> findForCssName(String cssName) throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { return findForCssName(cssName, false); }
[ "public", "static", "Collection", "<", "BaseStyler", ">", "findForCssName", "(", "String", "cssName", ")", "throws", "ClassNotFoundException", ",", "IOException", ",", "InstantiationException", ",", "IllegalAccessException", ",", "NoSuchMethodException", ",", "InvocationT...
Call {@link #findForCssName(java.lang.String, boolean) } with false
[ "Call", "{" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/StylerFactoryHelper.java#L94-L96
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java
MemoryEntityLockStore.update
@Override public void update(IEntityLock lock, java.util.Date newExpiration, Integer newLockType) throws LockingException { """ Make sure the store has a reference to the lock, and then add the lock to refresh the SmartCache wrapper. @param lock org.apereo.portal.concurrency.locking.IEntityLock...
java
@Override public void update(IEntityLock lock, java.util.Date newExpiration, Integer newLockType) throws LockingException { if (find(lock) == null) { throw new LockingException("Problem updating " + lock + " : not found in store."); } primAdd(lock, newExpiration); ...
[ "@", "Override", "public", "void", "update", "(", "IEntityLock", "lock", ",", "java", ".", "util", ".", "Date", "newExpiration", ",", "Integer", "newLockType", ")", "throws", "LockingException", "{", "if", "(", "find", "(", "lock", ")", "==", "null", ")", ...
Make sure the store has a reference to the lock, and then add the lock to refresh the SmartCache wrapper. @param lock org.apereo.portal.concurrency.locking.IEntityLock @param newExpiration java.util.Date @param newLockType Integer
[ "Make", "sure", "the", "store", "has", "a", "reference", "to", "the", "lock", "and", "then", "add", "the", "lock", "to", "refresh", "the", "SmartCache", "wrapper", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/MemoryEntityLockStore.java#L257-L264
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java
EntityGroupImpl.getChildren
@Override public Set<IGroupMember> getChildren() throws GroupsException { """ Returns an <code>Iterator</code> over the <code>GroupMembers</code> in our member <code> Collection</code>. Reflects pending changes. @return Iterator """ final EntityIdentifier cacheKey = getUnderlyingEntityIdentifi...
java
@Override public Set<IGroupMember> getChildren() throws GroupsException { final EntityIdentifier cacheKey = getUnderlyingEntityIdentifier(); Element element = childrenCache.get(cacheKey); if (element == null) { final Set<IGroupMember> children = buildChildrenSet(); ...
[ "@", "Override", "public", "Set", "<", "IGroupMember", ">", "getChildren", "(", ")", "throws", "GroupsException", "{", "final", "EntityIdentifier", "cacheKey", "=", "getUnderlyingEntityIdentifier", "(", ")", ";", "Element", "element", "=", "childrenCache", ".", "g...
Returns an <code>Iterator</code> over the <code>GroupMembers</code> in our member <code> Collection</code>. Reflects pending changes. @return Iterator
[ "Returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "over", "the", "<code", ">", "GroupMembers<", "/", "code", ">", "in", "our", "member", "<code", ">", "Collection<", "/", "code", ">", ".", "Reflects", "pending", "changes", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/EntityGroupImpl.java#L295-L310
guardtime/ksi-java-sdk
ksi-service-client-common-http/src/main/java/com/guardtime/ksi/service/client/http/HttpGetRequestFuture.java
HttpGetRequestFuture.validateHttpResponse
protected void validateHttpResponse(int statusCode, String responseMessage) throws HttpProtocolException { """ Validates HTTP response message. @param statusCode HTTP status code. @param responseMessage HTTP header response message. @throws HttpProtocolException will be thrown when HTTP status code is not ...
java
protected void validateHttpResponse(int statusCode, String responseMessage) throws HttpProtocolException { if (statusCode != HttpURLConnection.HTTP_OK) { throw new HttpProtocolException(statusCode, responseMessage); } }
[ "protected", "void", "validateHttpResponse", "(", "int", "statusCode", ",", "String", "responseMessage", ")", "throws", "HttpProtocolException", "{", "if", "(", "statusCode", "!=", "HttpURLConnection", ".", "HTTP_OK", ")", "{", "throw", "new", "HttpProtocolException",...
Validates HTTP response message. @param statusCode HTTP status code. @param responseMessage HTTP header response message. @throws HttpProtocolException will be thrown when HTTP status code is not 200 and response doesn't include data, or HTTP status code is not 200 and response content type isn't "application/ksi-resp...
[ "Validates", "HTTP", "response", "message", "." ]
train
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-service-client-common-http/src/main/java/com/guardtime/ksi/service/client/http/HttpGetRequestFuture.java#L44-L48
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java
WorkManagerImpl.fireWorkContextSetupFailed
private void fireWorkContextSetupFailed(Object workContext, String errorCode, WorkListener workListener, Work work, WorkException exception) { """ Calls listener with given error code. @param workContext work context listener @param errorCode error code @param workList...
java
private void fireWorkContextSetupFailed(Object workContext, String errorCode, WorkListener workListener, Work work, WorkException exception) { if (workListener != null) { WorkEvent event = new WorkEvent(this, WorkEvent.WORK_STARTED, work, null); ...
[ "private", "void", "fireWorkContextSetupFailed", "(", "Object", "workContext", ",", "String", "errorCode", ",", "WorkListener", "workListener", ",", "Work", "work", ",", "WorkException", "exception", ")", "{", "if", "(", "workListener", "!=", "null", ")", "{", "...
Calls listener with given error code. @param workContext work context listener @param errorCode error code @param workListener work listener @param work work instance @param exception exception
[ "Calls", "listener", "with", "given", "error", "code", "." ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/WorkManagerImpl.java#L1307-L1327
UrielCh/ovh-java-sdk
ovh-java-sdk-sslGateway/src/main/java/net/minidev/ovh/api/ApiOvhSslGateway.java
ApiOvhSslGateway.eligibility_GET
public OvhEligibilityStatus eligibility_GET(String domain) throws IOException { """ Check domain eligibility. Return list of eligible IP(s) for this domain. REST: GET /sslGateway/eligibility @param domain [required] domain to check eligibility for SSL Gateway offer API beta """ String qPath = "/sslGat...
java
public OvhEligibilityStatus eligibility_GET(String domain) throws IOException { String qPath = "/sslGateway/eligibility"; StringBuilder sb = path(qPath); query(sb, "domain", domain); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhEligibilityStatus.class); }
[ "public", "OvhEligibilityStatus", "eligibility_GET", "(", "String", "domain", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sslGateway/eligibility\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "query", "(", "sb", ",", "\"d...
Check domain eligibility. Return list of eligible IP(s) for this domain. REST: GET /sslGateway/eligibility @param domain [required] domain to check eligibility for SSL Gateway offer API beta
[ "Check", "domain", "eligibility", ".", "Return", "list", "of", "eligible", "IP", "(", "s", ")", "for", "this", "domain", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sslGateway/src/main/java/net/minidev/ovh/api/ApiOvhSslGateway.java#L37-L43
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/Form.java
Form.renderNameAndId
private String renderNameAndId(HttpServletRequest request, String id) { """ This mehtod will render the JavaScript associated with the id lookup if id has been set. @param request @param id @return """ // if id is not set then we need to exit if (id == null) return null; ...
java
private String renderNameAndId(HttpServletRequest request, String id) { // if id is not set then we need to exit if (id == null) return null; // Legacy Java Script support -- This writes out a single table with both the id and names // mixed. This is legacy support to m...
[ "private", "String", "renderNameAndId", "(", "HttpServletRequest", "request", ",", "String", "id", ")", "{", "// if id is not set then we need to exit", "if", "(", "id", "==", "null", ")", "return", "null", ";", "// Legacy Java Script support -- This writes out a single tab...
This mehtod will render the JavaScript associated with the id lookup if id has been set. @param request @param id @return
[ "This", "mehtod", "will", "render", "the", "JavaScript", "associated", "with", "the", "id", "lookup", "if", "id", "has", "been", "set", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/Form.java#L826-L854
ReactiveX/RxJavaFX
src/main/java/io/reactivex/rxjavafx/transformers/FxObservableTransformers.java
FxObservableTransformers.doOnCompleteCount
public static <T> ObservableTransformer<T,T> doOnCompleteCount(Consumer<Integer> onComplete) { """ Performs an action on onComplete with the provided emission count @param onComplete @param <T> """ return obs -> obs.lift(new OperatorEmissionCounter<>(new CountObserver(null,onComplete,null))); }
java
public static <T> ObservableTransformer<T,T> doOnCompleteCount(Consumer<Integer> onComplete) { return obs -> obs.lift(new OperatorEmissionCounter<>(new CountObserver(null,onComplete,null))); }
[ "public", "static", "<", "T", ">", "ObservableTransformer", "<", "T", ",", "T", ">", "doOnCompleteCount", "(", "Consumer", "<", "Integer", ">", "onComplete", ")", "{", "return", "obs", "->", "obs", ".", "lift", "(", "new", "OperatorEmissionCounter", "<>", ...
Performs an action on onComplete with the provided emission count @param onComplete @param <T>
[ "Performs", "an", "action", "on", "onComplete", "with", "the", "provided", "emission", "count" ]
train
https://github.com/ReactiveX/RxJavaFX/blob/8f44d4cc1caba9a8919f01cb1897aaea5514c7e5/src/main/java/io/reactivex/rxjavafx/transformers/FxObservableTransformers.java#L122-L124
alkacon/opencms-core
src/org/opencms/util/CmsRequestUtil.java
CmsRequestUtil.setCookieValue
public static void setCookieValue(CmsJspActionElement jsp, String name, String value) { """ Sets the value of a specific cookie.<p> If no cookie exists with the value, a new cookie will be created. @param jsp the CmsJspActionElement to use @param name the name of the cookie @param value the value of the cook...
java
public static void setCookieValue(CmsJspActionElement jsp, String name, String value) { Cookie[] cookies = jsp.getRequest().getCookies(); for (int i = 0; (cookies != null) && (i < cookies.length); i++) { if (name.equalsIgnoreCase(cookies[i].getName())) { cookies[i].setValue(...
[ "public", "static", "void", "setCookieValue", "(", "CmsJspActionElement", "jsp", ",", "String", "name", ",", "String", "value", ")", "{", "Cookie", "[", "]", "cookies", "=", "jsp", ".", "getRequest", "(", ")", ".", "getCookies", "(", ")", ";", "for", "("...
Sets the value of a specific cookie.<p> If no cookie exists with the value, a new cookie will be created. @param jsp the CmsJspActionElement to use @param name the name of the cookie @param value the value of the cookie
[ "Sets", "the", "value", "of", "a", "specific", "cookie", ".", "<p", ">", "If", "no", "cookie", "exists", "with", "the", "value", "a", "new", "cookie", "will", "be", "created", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsRequestUtil.java#L898-L909
threerings/nenya
core/src/main/java/com/threerings/media/image/ImageManager.java
ImageManager.getImage
public BufferedImage getImage (String rset, String path) { """ Like {@link #getImage(String)} but the image is loaded from the specified resource set rathern than the default resource set. """ return getImage(rset, path, null); }
java
public BufferedImage getImage (String rset, String path) { return getImage(rset, path, null); }
[ "public", "BufferedImage", "getImage", "(", "String", "rset", ",", "String", "path", ")", "{", "return", "getImage", "(", "rset", ",", "path", ",", "null", ")", ";", "}" ]
Like {@link #getImage(String)} but the image is loaded from the specified resource set rathern than the default resource set.
[ "Like", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/ImageManager.java#L191-L194
geomajas/geomajas-project-client-gwt2
impl/src/main/java/org/geomajas/gwt2/client/service/JsonService.java
JsonService.getLongValue
public static Long getLongValue(JSONObject jsonObject, String key) throws JSONException { """ Get a long value from a {@link JSONObject}. @param jsonObject The object to get the key value from. @param key The name of the key to search the value for. @return Returns the value for the key in the object . @thro...
java
public static Long getLongValue(JSONObject jsonObject, String key) throws JSONException { checkArguments(jsonObject, key); JSONValue value = jsonObject.get(key); if (value != null && value.isNumber() != null) { double number = ((JSONNumber) value).doubleValue(); return new Long((long) number); } return ...
[ "public", "static", "Long", "getLongValue", "(", "JSONObject", "jsonObject", ",", "String", "key", ")", "throws", "JSONException", "{", "checkArguments", "(", "jsonObject", ",", "key", ")", ";", "JSONValue", "value", "=", "jsonObject", ".", "get", "(", "key", ...
Get a long value from a {@link JSONObject}. @param jsonObject The object to get the key value from. @param key The name of the key to search the value for. @return Returns the value for the key in the object . @throws JSONException Thrown in case the key could not be found in the JSON object.
[ "Get", "a", "long", "value", "from", "a", "{", "@link", "JSONObject", "}", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/service/JsonService.java#L295-L303
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.addCache
protected void addCache(Class cls, String pkgname, List<String> classnames, List<Class> classes) { """ adds the list of classnames to the cache. @param cls the class to cache the classnames for @param pkgname the package name the classes were found in @param classnames the list of classnames to cache """...
java
protected void addCache(Class cls, String pkgname, List<String> classnames, List<Class> classes) { m_CacheNames.put(cls.getName() + "-" + pkgname, classnames); m_CacheClasses.put(cls.getName() + "-" + pkgname, classes); }
[ "protected", "void", "addCache", "(", "Class", "cls", ",", "String", "pkgname", ",", "List", "<", "String", ">", "classnames", ",", "List", "<", "Class", ">", "classes", ")", "{", "m_CacheNames", ".", "put", "(", "cls", ".", "getName", "(", ")", "+", ...
adds the list of classnames to the cache. @param cls the class to cache the classnames for @param pkgname the package name the classes were found in @param classnames the list of classnames to cache
[ "adds", "the", "list", "of", "classnames", "to", "the", "cache", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L496-L499
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/ExtensionSpider.java
ExtensionSpider.startScan
@SuppressWarnings( { """ Starts a new spider scan, with the given display name, using the given target and, optionally, spidering from the perspective of a user and with custom configurations. <p> <strong>Note:</strong> The preferred method to start the scan is with {@link #startScan(Target, User, Object[])}, u...
java
@SuppressWarnings({"fallthrough"}) @Override public int startScan(String displayName, Target target, User user, Object[] customConfigurations) { switch (Control.getSingleton().getMode()) { case safe: throw new IllegalStateException("Scans are not allowed in Safe mode"); case protect: String uri = getTarge...
[ "@", "SuppressWarnings", "(", "{", "\"fallthrough\"", "}", ")", "@", "Override", "public", "int", "startScan", "(", "String", "displayName", ",", "Target", "target", ",", "User", "user", ",", "Object", "[", "]", "customConfigurations", ")", "{", "switch", "(...
Starts a new spider scan, with the given display name, using the given target and, optionally, spidering from the perspective of a user and with custom configurations. <p> <strong>Note:</strong> The preferred method to start the scan is with {@link #startScan(Target, User, Object[])}, unless a custom display name is re...
[ "Starts", "a", "new", "spider", "scan", "with", "the", "given", "display", "name", "using", "the", "given", "target", "and", "optionally", "spidering", "from", "the", "perspective", "of", "a", "user", "and", "with", "custom", "configurations", ".", "<p", ">"...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L622-L645
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.getDateLastVisitedBy
public long getDateLastVisitedBy(CmsDbContext dbc, String poolName, CmsUser user, CmsResource resource) throws CmsException { """ Returns the date when the resource was last visited by the user.<p> @param dbc the database context @param poolName the name of the database pool to use @param user the user to...
java
public long getDateLastVisitedBy(CmsDbContext dbc, String poolName, CmsUser user, CmsResource resource) throws CmsException { return m_subscriptionDriver.getDateLastVisitedBy(dbc, poolName, user, resource); }
[ "public", "long", "getDateLastVisitedBy", "(", "CmsDbContext", "dbc", ",", "String", "poolName", ",", "CmsUser", "user", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "return", "m_subscriptionDriver", ".", "getDateLastVisitedBy", "(", "dbc", ",...
Returns the date when the resource was last visited by the user.<p> @param dbc the database context @param poolName the name of the database pool to use @param user the user to check the date @param resource the resource to check the date @return the date when the resource was last visited by the user @throws CmsExc...
[ "Returns", "the", "date", "when", "the", "resource", "was", "last", "visited", "by", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L3831-L3835
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildPutRequest
public HttpRequest buildPutRequest(GenericUrl url, HttpContent content) throws IOException { """ Builds a {@code PUT} request for the given URL and content. @param url HTTP request URL or {@code null} for none @param content HTTP request content or {@code null} for none @return new HTTP request """ re...
java
public HttpRequest buildPutRequest(GenericUrl url, HttpContent content) throws IOException { return buildRequest(HttpMethods.PUT, url, content); }
[ "public", "HttpRequest", "buildPutRequest", "(", "GenericUrl", "url", ",", "HttpContent", "content", ")", "throws", "IOException", "{", "return", "buildRequest", "(", "HttpMethods", ".", "PUT", ",", "url", ",", "content", ")", ";", "}" ]
Builds a {@code PUT} request for the given URL and content. @param url HTTP request URL or {@code null} for none @param content HTTP request content or {@code null} for none @return new HTTP request
[ "Builds", "a", "{", "@code", "PUT", "}", "request", "for", "the", "given", "URL", "and", "content", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L138-L140
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/SlimFixtureWithMap.java
SlimFixtureWithMap.setValuesFor
public void setValuesFor(String values, String name) { """ Stores list of values in map. @param values comma separated list of values. @param name name to use this list for. """ getMapHelper().setValuesForIn(values, name, getCurrentValues()); }
java
public void setValuesFor(String values, String name) { getMapHelper().setValuesForIn(values, name, getCurrentValues()); }
[ "public", "void", "setValuesFor", "(", "String", "values", ",", "String", "name", ")", "{", "getMapHelper", "(", ")", ".", "setValuesForIn", "(", "values", ",", "name", ",", "getCurrentValues", "(", ")", ")", ";", "}" ]
Stores list of values in map. @param values comma separated list of values. @param name name to use this list for.
[ "Stores", "list", "of", "values", "in", "map", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/SlimFixtureWithMap.java#L89-L91
greenmail-mail-test/greenmail
greenmail-core/src/main/java/com/icegreen/greenmail/util/PropertiesBasedServerSetupBuilder.java
PropertiesBasedServerSetupBuilder.build
public ServerSetup[] build(Properties properties) { """ Creates a server setup based on provided properties. @param properties the properties. @return the server setup, or an empty array. """ List<ServerSetup> serverSetups = new ArrayList<>(); String hostname = properties.getProperty("gree...
java
public ServerSetup[] build(Properties properties) { List<ServerSetup> serverSetups = new ArrayList<>(); String hostname = properties.getProperty("greenmail.hostname", ServerSetup.getLocalHostAddress()); long serverStartupTimeout = Long.parseLong(properties.getProperty("greenmail...
[ "public", "ServerSetup", "[", "]", "build", "(", "Properties", "properties", ")", "{", "List", "<", "ServerSetup", ">", "serverSetups", "=", "new", "ArrayList", "<>", "(", ")", ";", "String", "hostname", "=", "properties", ".", "getProperty", "(", "\"greenma...
Creates a server setup based on provided properties. @param properties the properties. @return the server setup, or an empty array.
[ "Creates", "a", "server", "setup", "based", "on", "provided", "properties", "." ]
train
https://github.com/greenmail-mail-test/greenmail/blob/6d19a62233d1ef6fedbbd1f6fdde2d28e713834a/greenmail-core/src/main/java/com/icegreen/greenmail/util/PropertiesBasedServerSetupBuilder.java#L58-L86
LearnLib/learnlib
algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/AbstractTTTLearner.java
AbstractTTTLearner.initializeState
protected void initializeState(TTTState<I, D> state) { """ Initializes a state. Creates its outgoing transition objects, and adds them to the "open" list. @param state the state to initialize """ for (int i = 0; i < alphabet.size(); i++) { I sym = alphabet.getSymbol(i); TTTT...
java
protected void initializeState(TTTState<I, D> state) { for (int i = 0; i < alphabet.size(); i++) { I sym = alphabet.getSymbol(i); TTTTransition<I, D> trans = createTransition(state, sym); trans.setNonTreeTarget(dtree.getRoot()); state.setTransition(i, trans); ...
[ "protected", "void", "initializeState", "(", "TTTState", "<", "I", ",", "D", ">", "state", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "alphabet", ".", "size", "(", ")", ";", "i", "++", ")", "{", "I", "sym", "=", "alphabet", ".",...
Initializes a state. Creates its outgoing transition objects, and adds them to the "open" list. @param state the state to initialize
[ "Initializes", "a", "state", ".", "Creates", "its", "outgoing", "transition", "objects", "and", "adds", "them", "to", "the", "open", "list", "." ]
train
https://github.com/LearnLib/learnlib/blob/fa38a14adcc0664099f180d671ffa42480318d7b/algorithms/active/ttt/src/main/java/de/learnlib/algorithms/ttt/base/AbstractTTTLearner.java#L177-L185
nextreports/nextreports-engine
src/ro/nextreports/engine/exporter/util/XlsxUtil.java
XlsxUtil.copyToSheet
public static int copyToSheet(XSSFSheet parentSheet, int parentSheetRow, int parentSheetColumn, XSSFSheet sheet) { """ Copy a sheet to another sheet at a specific (row, column) position @param parentSheet the sheet to copy into @param parentSheetRow the row inside parentSheet where we start to copy @param par...
java
public static int copyToSheet(XSSFSheet parentSheet, int parentSheetRow, int parentSheetColumn, XSSFSheet sheet) { return copyToSheet(parentSheet, parentSheetRow, parentSheetColumn, sheet, true); }
[ "public", "static", "int", "copyToSheet", "(", "XSSFSheet", "parentSheet", ",", "int", "parentSheetRow", ",", "int", "parentSheetColumn", ",", "XSSFSheet", "sheet", ")", "{", "return", "copyToSheet", "(", "parentSheet", ",", "parentSheetRow", ",", "parentSheetColumn...
Copy a sheet to another sheet at a specific (row, column) position @param parentSheet the sheet to copy into @param parentSheetRow the row inside parentSheet where we start to copy @param parentSheetColumn the column inside parentSheet where we start to copy @param sheet the sheet that is copied @return column number
[ "Copy", "a", "sheet", "to", "another", "sheet", "at", "a", "specific", "(", "row", "column", ")", "position" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/exporter/util/XlsxUtil.java#L28-L30
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_03_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_03_30_preview/implementation/JobsInner.java
JobsInner.getAsync
public Observable<JobInner> getAsync(String resourceGroupName, String accountName, String transformName, String jobName) { """ Get Job. Gets a Job. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param transformName T...
java
public Observable<JobInner> getAsync(String resourceGroupName, String accountName, String transformName, String jobName) { return getWithServiceResponseAsync(resourceGroupName, accountName, transformName, jobName).map(new Func1<ServiceResponse<JobInner>, JobInner>() { @Override public Jo...
[ "public", "Observable", "<", "JobInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "transformName", ",", "String", "jobName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "a...
Get Job. Gets a Job. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param transformName The Transform name. @param jobName The Job name. @throws IllegalArgumentException thrown if parameters fail the validation @return the obs...
[ "Get", "Job", ".", "Gets", "a", "Job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_03_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_03_30_preview/implementation/JobsInner.java#L418-L425
xiancloud/xian
xian-oauth20/xian-apifestOauth20/src/main/java/com/apifest/oauth20/bean/ClientCredentials.java
ClientCredentials.loadFromMap
public static ClientCredentials loadFromMap(Map<String, Object> map) { """ Used to create an instance when a record from DB is loaded. @param map Map that contains the record info @return instance of ClientCredentials """ ClientCredentials creds = new ClientCredentials(); creds.name = (Stri...
java
public static ClientCredentials loadFromMap(Map<String, Object> map) { ClientCredentials creds = new ClientCredentials(); creds.name = (String) map.get("name"); creds.id = (String) map.get("_id"); creds.secret = (String) map.get("secret"); creds.uri = (String) map.get("uri"); ...
[ "public", "static", "ClientCredentials", "loadFromMap", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "ClientCredentials", "creds", "=", "new", "ClientCredentials", "(", ")", ";", "creds", ".", "name", "=", "(", "String", ")", "map", ".",...
Used to create an instance when a record from DB is loaded. @param map Map that contains the record info @return instance of ClientCredentials
[ "Used", "to", "create", "an", "instance", "when", "a", "record", "from", "DB", "is", "loaded", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-oauth20/xian-apifestOauth20/src/main/java/com/apifest/oauth20/bean/ClientCredentials.java#L201-L216
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ExportConfigurationsInner.java
ExportConfigurationsInner.getAsync
public Observable<ApplicationInsightsComponentExportConfigurationInner> getAsync(String resourceGroupName, String resourceName, String exportId) { """ Get the Continuous Export configuration for this export id. @param resourceGroupName The name of the resource group. @param resourceName The name of the Applica...
java
public Observable<ApplicationInsightsComponentExportConfigurationInner> getAsync(String resourceGroupName, String resourceName, String exportId) { return getWithServiceResponseAsync(resourceGroupName, resourceName, exportId).map(new Func1<ServiceResponse<ApplicationInsightsComponentExportConfigurationInner>, Ap...
[ "public", "Observable", "<", "ApplicationInsightsComponentExportConfigurationInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "exportId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", "...
Get the Continuous Export configuration for this export id. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. @throws Illeg...
[ "Get", "the", "Continuous", "Export", "configuration", "for", "this", "export", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ExportConfigurationsInner.java#L394-L401
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
StorableGenerator.loadStorageForFetch
private void loadStorageForFetch(CodeBuilder b, TypeDesc type) { """ Generates code that loads a Storage instance on the stack, throwing a FetchException if Storage request fails. @param type type of Storage to request """ b.loadThis(); b.loadField(SUPPORT_FIELD_NAME, mSupportType); ...
java
private void loadStorageForFetch(CodeBuilder b, TypeDesc type) { b.loadThis(); b.loadField(SUPPORT_FIELD_NAME, mSupportType); TypeDesc storageType = TypeDesc.forClass(Storage.class); TypeDesc repositoryType = TypeDesc.forClass(Repository.class); b.invokeInterface ...
[ "private", "void", "loadStorageForFetch", "(", "CodeBuilder", "b", ",", "TypeDesc", "type", ")", "{", "b", ".", "loadThis", "(", ")", ";", "b", ".", "loadField", "(", "SUPPORT_FIELD_NAME", ",", "mSupportType", ")", ";", "TypeDesc", "storageType", "=", "TypeD...
Generates code that loads a Storage instance on the stack, throwing a FetchException if Storage request fails. @param type type of Storage to request
[ "Generates", "code", "that", "loads", "a", "Storage", "instance", "on", "the", "stack", "throwing", "a", "FetchException", "if", "Storage", "request", "fails", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java#L2132-L2158
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanId.java
BeanId.getBeanType
private static byte getBeanType(BeanMetaData bmd, boolean isHome) // d621921 { """ Returns the bean type id for serialization. @param bmd the non-null bean metadata @param isHome true if for the home instance @return the type id """ // 621921 - Always use BeanMetaData to decide which bean type id ...
java
private static byte getBeanType(BeanMetaData bmd, boolean isHome) // d621921 { // 621921 - Always use BeanMetaData to decide which bean type id to use. if (isHome) // d621921 { // Note: EJBFactory (EJBLink) does not support module versioning. if (bmd != null && bmd._...
[ "private", "static", "byte", "getBeanType", "(", "BeanMetaData", "bmd", ",", "boolean", "isHome", ")", "// d621921", "{", "// 621921 - Always use BeanMetaData to decide which bean type id to use.", "if", "(", "isHome", ")", "// d621921", "{", "// Note: EJBFactory (EJBLink) do...
Returns the bean type id for serialization. @param bmd the non-null bean metadata @param isHome true if for the home instance @return the type id
[ "Returns", "the", "bean", "type", "id", "for", "serialization", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/BeanId.java#L730-L754
micronaut-projects/micronaut-core
inject-java/src/main/java/io/micronaut/annotation/processing/GenericUtils.java
GenericUtils.interfaceGenericTypeFor
protected TypeMirror interfaceGenericTypeFor(TypeElement element, Class interfaceType) { """ Finds the generic type for the given interface for the given class element. <p> For example, for <code>class AProvider implements Provider</code> element = AProvider interfaceType = interface javax.inject.Provider.clas...
java
protected TypeMirror interfaceGenericTypeFor(TypeElement element, Class interfaceType) { return interfaceGenericTypeFor(element, interfaceType.getName()); }
[ "protected", "TypeMirror", "interfaceGenericTypeFor", "(", "TypeElement", "element", ",", "Class", "interfaceType", ")", "{", "return", "interfaceGenericTypeFor", "(", "element", ",", "interfaceType", ".", "getName", "(", ")", ")", ";", "}" ]
Finds the generic type for the given interface for the given class element. <p> For example, for <code>class AProvider implements Provider</code> element = AProvider interfaceType = interface javax.inject.Provider.class return A @param element The class element @param interfaceType The interface @return The gene...
[ "Finds", "the", "generic", "type", "for", "the", "given", "interface", "for", "the", "given", "class", "element", ".", "<p", ">", "For", "example", "for", "<code", ">", "class", "AProvider", "implements", "Provider<", "/", "code", ">", "element", "=", "APr...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/GenericUtils.java#L80-L82
alkacon/opencms-core
src-modules/org/opencms/workplace/administration/CmsAdminMenu.java
CmsAdminMenu.addItem
public CmsAdminMenuItem addItem( String groupName, String name, String icon, String link, String helpText, boolean enabled, float position, String target) { """ Adds a new item to the specified menu.<p> If the menu does not exist, it will be create...
java
public CmsAdminMenuItem addItem( String groupName, String name, String icon, String link, String helpText, boolean enabled, float position, String target) { groupName = CmsToolMacroResolver.resolveMacros(groupName, this); CmsAdminMenuGroup...
[ "public", "CmsAdminMenuItem", "addItem", "(", "String", "groupName", ",", "String", "name", ",", "String", "icon", ",", "String", "link", ",", "String", "helpText", ",", "boolean", "enabled", ",", "float", "position", ",", "String", "target", ")", "{", "grou...
Adds a new item to the specified menu.<p> If the menu does not exist, it will be created.<p> @param groupName the name of the group @param name the name of the item @param icon the icon to display @param link the link to open when selected @param helpText the help text to display @param enabled if enabled or not @par...
[ "Adds", "a", "new", "item", "to", "the", "specified", "menu", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/administration/CmsAdminMenu.java#L121-L142
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/store/DefaultRasterLayerStore.java
DefaultRasterLayerStore.getOrientedJDiff
private int getOrientedJDiff(RasterTile tile1, RasterTile tile2) { """ Returns the difference in j index, taking orientation of y-axis into account. Some layers (WMS 1.8.0) have different j-index orientation than screen coordinates (lower-left = (0,0) vs upper-left = (0,0)). @param tile1 tile @param tile2 til...
java
private int getOrientedJDiff(RasterTile tile1, RasterTile tile2) { double dy = tile2.getBounds().getY() - tile1.getBounds().getY(); int dj = tile2.getCode().getY() - tile1.getCode().getY(); return (dj * dy) > 0 ? dj : -dj; }
[ "private", "int", "getOrientedJDiff", "(", "RasterTile", "tile1", ",", "RasterTile", "tile2", ")", "{", "double", "dy", "=", "tile2", ".", "getBounds", "(", ")", ".", "getY", "(", ")", "-", "tile1", ".", "getBounds", "(", ")", ".", "getY", "(", ")", ...
Returns the difference in j index, taking orientation of y-axis into account. Some layers (WMS 1.8.0) have different j-index orientation than screen coordinates (lower-left = (0,0) vs upper-left = (0,0)). @param tile1 tile @param tile2 tile @return +/-(j2-j1)
[ "Returns", "the", "difference", "in", "j", "index", "taking", "orientation", "of", "y", "-", "axis", "into", "account", ".", "Some", "layers", "(", "WMS", "1", ".", "8", ".", "0", ")", "have", "different", "j", "-", "index", "orientation", "than", "scr...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/store/DefaultRasterLayerStore.java#L177-L181
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsInner.java
ElasticPoolsInner.listByServerAsync
public Observable<List<ElasticPoolInner>> listByServerAsync(String resourceGroupName, String serverName) { """ Returns a list of elastic pools in a server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the por...
java
public Observable<List<ElasticPoolInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<ElasticPoolInner>>, List<ElasticPoolInner>>() { @Override public List<E...
[ "public", "Observable", "<", "List", "<", "ElasticPoolInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ...
Returns a list of elastic pools in a server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validati...
[ "Returns", "a", "list", "of", "elastic", "pools", "in", "a", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsInner.java#L693-L700
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy.java
tunneltrafficpolicy.get
public static tunneltrafficpolicy get(nitro_service service, String name) throws Exception { """ Use this API to fetch tunneltrafficpolicy resource of given name . """ tunneltrafficpolicy obj = new tunneltrafficpolicy(); obj.set_name(name); tunneltrafficpolicy response = (tunneltrafficpolicy) obj.get_res...
java
public static tunneltrafficpolicy get(nitro_service service, String name) throws Exception{ tunneltrafficpolicy obj = new tunneltrafficpolicy(); obj.set_name(name); tunneltrafficpolicy response = (tunneltrafficpolicy) obj.get_resource(service); return response; }
[ "public", "static", "tunneltrafficpolicy", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "tunneltrafficpolicy", "obj", "=", "new", "tunneltrafficpolicy", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ...
Use this API to fetch tunneltrafficpolicy resource of given name .
[ "Use", "this", "API", "to", "fetch", "tunneltrafficpolicy", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tunnel/tunneltrafficpolicy.java#L408-L413
jbundle/osgi
core/src/main/java/org/jbundle/util/osgi/finder/ClassFinderActivator.java
ClassFinderActivator.waitForBundleStartup
public static boolean waitForBundleStartup(BundleContext context, Bundle bundle, int secsToWait) { """ Wait for bundle class name. @param context @param bundleClassName @return """ if ((bundle.getState() & Bundle.ACTIVE) == 0) { // Wait for it to start up! if (((bundle.getState()...
java
public static boolean waitForBundleStartup(BundleContext context, Bundle bundle, int secsToWait) { if ((bundle.getState() & Bundle.ACTIVE) == 0) { // Wait for it to start up! if (((bundle.getState() & Bundle.RESOLVED) != 0) || ((bundle.getState() & Bundle.INSTALLED) != 0)) { ...
[ "public", "static", "boolean", "waitForBundleStartup", "(", "BundleContext", "context", ",", "Bundle", "bundle", ",", "int", "secsToWait", ")", "{", "if", "(", "(", "bundle", ".", "getState", "(", ")", "&", "Bundle", ".", "ACTIVE", ")", "==", "0", ")", "...
Wait for bundle class name. @param context @param bundleClassName @return
[ "Wait", "for", "bundle", "class", "name", "." ]
train
https://github.com/jbundle/osgi/blob/beb02aef78736a4f799aaac001c8f0327bf0536c/core/src/main/java/org/jbundle/util/osgi/finder/ClassFinderActivator.java#L121-L151
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java
InternalService.updateProfile
public Observable<ComapiResult<Map<String, Object>>> updateProfile(@NonNull final Map<String, Object> profileDetails, final String eTag) { """ Updates profile for an active session. @param profileDetails Profile details. @param eTag ETag for server to check if local version of the data is the same as...
java
public Observable<ComapiResult<Map<String, Object>>> updateProfile(@NonNull final Map<String, Object> profileDetails, final String eTag) { final String token = getToken(); if (sessionController.isCreatingSession()) { return getTaskQueue().queueUpdateProfile(profileDetails, eTag); }...
[ "public", "Observable", "<", "ComapiResult", "<", "Map", "<", "String", ",", "Object", ">", ">", ">", "updateProfile", "(", "@", "NonNull", "final", "Map", "<", "String", ",", "Object", ">", "profileDetails", ",", "final", "String", "eTag", ")", "{", "fi...
Updates profile for an active session. @param profileDetails Profile details. @param eTag ETag for server to check if local version of the data is the same as the one the server side. @return Observable with to perform update profile for current session.
[ "Updates", "profile", "for", "an", "active", "session", "." ]
train
https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L319-L330
mangstadt/biweekly
src/main/java/biweekly/io/WriteContext.java
WriteContext.addDate
public void addDate(ICalDate date, boolean floating, TimeZone tz) { """ Records the timezoned date-time values that are being written. This is used to generate a DAYLIGHT property for vCalendar objects. @param floating true if the date is floating, false if not @param tz the timezone to format the date in or nu...
java
public void addDate(ICalDate date, boolean floating, TimeZone tz) { if (date != null && date.hasTime() && !floating && tz != null) { dates.add(date); } }
[ "public", "void", "addDate", "(", "ICalDate", "date", ",", "boolean", "floating", ",", "TimeZone", "tz", ")", "{", "if", "(", "date", "!=", "null", "&&", "date", ".", "hasTime", "(", ")", "&&", "!", "floating", "&&", "tz", "!=", "null", ")", "{", "...
Records the timezoned date-time values that are being written. This is used to generate a DAYLIGHT property for vCalendar objects. @param floating true if the date is floating, false if not @param tz the timezone to format the date in or null for UTC @param date the date value
[ "Records", "the", "timezoned", "date", "-", "time", "values", "that", "are", "being", "written", ".", "This", "is", "used", "to", "generate", "a", "DAYLIGHT", "property", "for", "vCalendar", "objects", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/WriteContext.java#L112-L116
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java
DatabaseUtils.stringForQuery
public static String stringForQuery(SQLiteStatement prog, String[] selectionArgs) { """ Utility method to run the pre-compiled query and return the value in the first column of the first row. """ prog.bindAllArgsAsStrings(selectionArgs); return prog.simpleQueryForString(); }
java
public static String stringForQuery(SQLiteStatement prog, String[] selectionArgs) { prog.bindAllArgsAsStrings(selectionArgs); return prog.simpleQueryForString(); }
[ "public", "static", "String", "stringForQuery", "(", "SQLiteStatement", "prog", ",", "String", "[", "]", "selectionArgs", ")", "{", "prog", ".", "bindAllArgsAsStrings", "(", "selectionArgs", ")", ";", "return", "prog", ".", "simpleQueryForString", "(", ")", ";",...
Utility method to run the pre-compiled query and return the value in the first column of the first row.
[ "Utility", "method", "to", "run", "the", "pre", "-", "compiled", "query", "and", "return", "the", "value", "in", "the", "first", "column", "of", "the", "first", "row", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java#L867-L870
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.lessThan
public boolean lessThan(Object left, Object right) { """ Test if left < right. @param left first value @param right second value @return test result. """ if ((left == right) || (left == null) || (right == null)) { return false; } else { return compare(left, right, "<") < 0; }...
java
public boolean lessThan(Object left, Object right) { if ((left == right) || (left == null) || (right == null)) { return false; } else { return compare(left, right, "<") < 0; } }
[ "public", "boolean", "lessThan", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "(", "left", "==", "right", ")", "||", "(", "left", "==", "null", ")", "||", "(", "right", "==", "null", ")", ")", "{", "return", "false", ";", "...
Test if left < right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", "<", "right", "." ]
train
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L814-L822
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java
FaceListsImpl.updateWithServiceResponseAsync
public Observable<ServiceResponse<Void>> updateWithServiceResponseAsync(String faceListId, UpdateFaceListsOptionalParameter updateOptionalParameter) { """ Update information of a face list. @param faceListId Id referencing a particular face list. @param updateOptionalParameter the object representing the optio...
java
public Observable<ServiceResponse<Void>> updateWithServiceResponseAsync(String faceListId, UpdateFaceListsOptionalParameter updateOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null."); ...
[ "public", "Observable", "<", "ServiceResponse", "<", "Void", ">", ">", "updateWithServiceResponseAsync", "(", "String", "faceListId", ",", "UpdateFaceListsOptionalParameter", "updateOptionalParameter", ")", "{", "if", "(", "this", ".", "client", ".", "azureRegion", "(...
Update information of a face list. @param faceListId Id referencing a particular face list. @param updateOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} obje...
[ "Update", "information", "of", "a", "face", "list", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java#L400-L411
foundation-runtime/service-directory
2.0/sd-core/src/main/java/com/cisco/oss/foundation/directory/utils/WebSocketSerializer.java
WebSocketSerializer.serializeResponse
private static String serializeResponse(ResponseHeader header, Response response) throws JsonGenerationException, JsonMappingException, IOException { """ Serialize the Response. @param header the ResponseHeader. @param response the Response. @return the JSON String. @throws JsonGenerationException @throw...
java
private static String serializeResponse(ResponseHeader header, Response response) throws JsonGenerationException, JsonMappingException, IOException{ ResponsePair p = new ResponsePair(); p.setResponseHeader(header); if(response == null){ p.setType(null); }else{ p.s...
[ "private", "static", "String", "serializeResponse", "(", "ResponseHeader", "header", ",", "Response", "response", ")", "throws", "JsonGenerationException", ",", "JsonMappingException", ",", "IOException", "{", "ResponsePair", "p", "=", "new", "ResponsePair", "(", ")",...
Serialize the Response. @param header the ResponseHeader. @param response the Response. @return the JSON String. @throws JsonGenerationException @throws JsonMappingException @throws IOException
[ "Serialize", "the", "Response", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-core/src/main/java/com/cisco/oss/foundation/directory/utils/WebSocketSerializer.java#L173-L183
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/Record.java
Record.addSortParams
public String addSortParams(boolean bIncludeFileName, boolean bForceUniqueKey) { """ Setup the SQL Sort String. (ie., (ORDER BY) 'AgencyName, AgencyNo'). @param bIncludeFileName If true, include the filename with the fieldname in the string. @param bForceUniqueKey If params must be unique, if they aren't, add t...
java
public String addSortParams(boolean bIncludeFileName, boolean bForceUniqueKey) { String strSort = DBConstants.BLANK; KeyArea keyArea = this.getKeyArea(-1); if (keyArea != null) // Leave orderby blank if no index specified strSort = keyArea.addSortParams(bIncludeFileName, b...
[ "public", "String", "addSortParams", "(", "boolean", "bIncludeFileName", ",", "boolean", "bForceUniqueKey", ")", "{", "String", "strSort", "=", "DBConstants", ".", "BLANK", ";", "KeyArea", "keyArea", "=", "this", ".", "getKeyArea", "(", "-", "1", ")", ";", "...
Setup the SQL Sort String. (ie., (ORDER BY) 'AgencyName, AgencyNo'). @param bIncludeFileName If true, include the filename with the fieldname in the string. @param bForceUniqueKey If params must be unique, if they aren't, add the unique key to the end. @return The SQL sort string. @see KeyArea
[ "Setup", "the", "SQL", "Sort", "String", ".", "(", "ie", ".", "(", "ORDER", "BY", ")", "AgencyName", "AgencyNo", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/Record.java#L1329-L1336
Stratio/stratio-cassandra
src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
CreateColumnFamilyStatement.getCFMetaData
public CFMetaData getCFMetaData(String keyspace, List<ByteBuffer> variables) throws InvalidRequestException { """ Returns a CFMetaData instance based on the parameters parsed from this <code>CREATE</code> statement, or defaults where applicable. @param keyspace keyspace to apply this column family to @return ...
java
public CFMetaData getCFMetaData(String keyspace, List<ByteBuffer> variables) throws InvalidRequestException { validate(variables); try { boolean isDense = columns.isEmpty(); CFMetaData newCFMD = new CFMetaData(keyspace, ...
[ "public", "CFMetaData", "getCFMetaData", "(", "String", "keyspace", ",", "List", "<", "ByteBuffer", ">", "variables", ")", "throws", "InvalidRequestException", "{", "validate", "(", "variables", ")", ";", "try", "{", "boolean", "isDense", "=", "columns", ".", ...
Returns a CFMetaData instance based on the parameters parsed from this <code>CREATE</code> statement, or defaults where applicable. @param keyspace keyspace to apply this column family to @return a CFMetaData instance corresponding to the values parsed from this statement @throws InvalidRequestException on failure to ...
[ "Returns", "a", "CFMetaData", "instance", "based", "on", "the", "parameters", "parsed", "from", "this", "<code", ">", "CREATE<", "/", "code", ">", "statement", "or", "defaults", "where", "applicable", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java#L167-L215
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java
PaymentChannelClientState.incrementPaymentBy
public synchronized IncrementedPayment incrementPaymentBy(Coin size, @Nullable KeyParameter userKey) throws ValueOutOfRangeException { """ <p>Updates the outputs on the payment contract transaction and re-signs it. The state must be READY in order to call this method. The signature that is returned sh...
java
public synchronized IncrementedPayment incrementPaymentBy(Coin size, @Nullable KeyParameter userKey) throws ValueOutOfRangeException { stateMachine.checkState(State.READY); checkNotExpired(); checkNotNull(size); // Validity of size will be checked by makeUnsignedChannelContract. ...
[ "public", "synchronized", "IncrementedPayment", "incrementPaymentBy", "(", "Coin", "size", ",", "@", "Nullable", "KeyParameter", "userKey", ")", "throws", "ValueOutOfRangeException", "{", "stateMachine", ".", "checkState", "(", "State", ".", "READY", ")", ";", "chec...
<p>Updates the outputs on the payment contract transaction and re-signs it. The state must be READY in order to call this method. The signature that is returned should be sent to the server so it has the ability to broadcast the best seen payment when the channel closes or times out.</p> <p>The returned signature is o...
[ "<p", ">", "Updates", "the", "outputs", "on", "the", "payment", "contract", "transaction", "and", "re", "-", "signs", "it", ".", "The", "state", "must", "be", "READY", "in", "order", "to", "call", "this", "method", ".", "The", "signature", "that", "is", ...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/channels/PaymentChannelClientState.java#L288-L319
graphql-java/graphql-java
src/main/java/graphql/execution/ExecutionStrategy.java
ExecutionStrategy.completeField
protected FieldValueInfo completeField(ExecutionContext executionContext, ExecutionStrategyParameters parameters, FetchedValue fetchedValue) { """ Called to complete a field based on the type of the field. <p> If the field is a scalar type, then it will be coerced and returned. However if the field type is an ...
java
protected FieldValueInfo completeField(ExecutionContext executionContext, ExecutionStrategyParameters parameters, FetchedValue fetchedValue) { Field field = parameters.getField().getSingleField(); GraphQLObjectType parentType = (GraphQLObjectType) parameters.getExecutionStepInfo().getUnwrappedNonNullTyp...
[ "protected", "FieldValueInfo", "completeField", "(", "ExecutionContext", "executionContext", ",", "ExecutionStrategyParameters", "parameters", ",", "FetchedValue", "fetchedValue", ")", "{", "Field", "field", "=", "parameters", ".", "getField", "(", ")", ".", "getSingleF...
Called to complete a field based on the type of the field. <p> If the field is a scalar type, then it will be coerced and returned. However if the field type is an complex object type, then the execution strategy will be called recursively again to execute the fields of that type before returning. <p> Graphql fragmen...
[ "Called", "to", "complete", "a", "field", "based", "on", "the", "type", "of", "the", "field", ".", "<p", ">", "If", "the", "field", "is", "a", "scalar", "type", "then", "it", "will", "be", "coerced", "and", "returned", ".", "However", "if", "the", "f...
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/ExecutionStrategy.java#L348-L381
abola/CrawlerPack
src/main/java/com/github/abola/crawler/CrawlerPack.java
CrawlerPack.addCookie
public CrawlerPack addCookie(String domain, String name, String value, String path, Date expires, boolean secure) { """ Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute, and secure attribute @param name the cookie name @par...
java
public CrawlerPack addCookie(String domain, String name, String value, String path, Date expires, boolean secure) { if( null == name ) { log.warn("addCookie: Cookie name null."); return this; } cookies.add(new Cookie(domain, name, value, ...
[ "public", "CrawlerPack", "addCookie", "(", "String", "domain", ",", "String", "name", ",", "String", "value", ",", "String", "path", ",", "Date", "expires", ",", "boolean", "secure", ")", "{", "if", "(", "null", "==", "name", ")", "{", "log", ".", "war...
Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute, and secure attribute @param name the cookie name @param value the cookie value @param domain the domain this cookie can be sent to @param path the path prefix for which this cookie can be sent @param expires t...
[ "Creates", "a", "cookie", "with", "the", "given", "name", "value", "domain", "attribute", "path", "attribute", "expiration", "attribute", "and", "secure", "attribute" ]
train
https://github.com/abola/CrawlerPack/blob/a7b7703b7fad519994dc04a9c51d90adc11d618f/src/main/java/com/github/abola/crawler/CrawlerPack.java#L139-L148
quattor/pan
panc/src/main/java/org/quattor/ant/PanCheckSyntaxTask.java
PanCheckSyntaxTask.addFiles
private void addFiles(FileSet fs) { """ Utility method that adds all of the files in a fileset to the list of files to be processed. Duplicate files appear only once in the final list. Files not ending with a valid source file extension are ignored. @param fs FileSet from which to get the file names """ ...
java
private void addFiles(FileSet fs) { // Get the files included in the fileset. DirectoryScanner ds = fs.getDirectoryScanner(getProject()); // The base directory for all files. File basedir = ds.getBasedir(); // Loop over each file creating a File object. for (String f :...
[ "private", "void", "addFiles", "(", "FileSet", "fs", ")", "{", "// Get the files included in the fileset.", "DirectoryScanner", "ds", "=", "fs", ".", "getDirectoryScanner", "(", "getProject", "(", ")", ")", ";", "// The base directory for all files.", "File", "basedir",...
Utility method that adds all of the files in a fileset to the list of files to be processed. Duplicate files appear only once in the final list. Files not ending with a valid source file extension are ignored. @param fs FileSet from which to get the file names
[ "Utility", "method", "that", "adds", "all", "of", "the", "files", "in", "a", "fileset", "to", "the", "list", "of", "files", "to", "be", "processed", ".", "Duplicate", "files", "appear", "only", "once", "in", "the", "final", "list", ".", "Files", "not", ...
train
https://github.com/quattor/pan/blob/009934a603dd0c08d3fa4bb7d9389c380a916f54/panc/src/main/java/org/quattor/ant/PanCheckSyntaxTask.java#L83-L97
radkovo/jStyleParser
src/main/java/cz/vutbr/web/domassign/MultiMap.java
MultiMap.hasPseudo
public boolean hasPseudo(E el, P pseudo) { """ Checks if the given pseudo element is available for the given element @param el The element @param pseudo The tested pseudo element @return true when there is some value associated with the given pair """ HashMap<P, D> map = pseudoMaps.get(el); ...
java
public boolean hasPseudo(E el, P pseudo) { HashMap<P, D> map = pseudoMaps.get(el); if (map == null) return false; else return map.containsKey(pseudo); }
[ "public", "boolean", "hasPseudo", "(", "E", "el", ",", "P", "pseudo", ")", "{", "HashMap", "<", "P", ",", "D", ">", "map", "=", "pseudoMaps", ".", "get", "(", "el", ")", ";", "if", "(", "map", "==", "null", ")", "return", "false", ";", "else", ...
Checks if the given pseudo element is available for the given element @param el The element @param pseudo The tested pseudo element @return true when there is some value associated with the given pair
[ "Checks", "if", "the", "given", "pseudo", "element", "is", "available", "for", "the", "given", "element" ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/domassign/MultiMap.java#L180-L187
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayConcat
public static Expression arrayConcat(String expression1, String expression2) { """ Returned expression results in new array with the concatenation of the input arrays. """ return arrayConcat(x(expression1), x(expression2)); }
java
public static Expression arrayConcat(String expression1, String expression2) { return arrayConcat(x(expression1), x(expression2)); }
[ "public", "static", "Expression", "arrayConcat", "(", "String", "expression1", ",", "String", "expression2", ")", "{", "return", "arrayConcat", "(", "x", "(", "expression1", ")", ",", "x", "(", "expression2", ")", ")", ";", "}" ]
Returned expression results in new array with the concatenation of the input arrays.
[ "Returned", "expression", "results", "in", "new", "array", "with", "the", "concatenation", "of", "the", "input", "arrays", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L97-L99
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java
TiledMap.getObjectType
public String getObjectType(int groupID, int objectID) { """ Return the type of an specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The type of an object or null, when error occurred """ if (groupID >= 0 && groupID < objectGroups.size()...
java
public String getObjectType(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); return object....
[ "public", "String", "getObjectType", "(", "int", "groupID", ",", "int", "objectID", ")", "{", "if", "(", "groupID", ">=", "0", "&&", "groupID", "<", "objectGroups", ".", "size", "(", ")", ")", "{", "ObjectGroup", "grp", "=", "(", "ObjectGroup", ")", "o...
Return the type of an specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The type of an object or null, when error occurred
[ "Return", "the", "type", "of", "an", "specific", "object", "from", "a", "specific", "group", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java#L826-L835
spotify/styx
styx-common/src/main/java/com/spotify/styx/util/TimeUtil.java
TimeUtil.isAligned
public static boolean isAligned(Instant instant, Schedule schedule) { """ Tests if a given instant is aligned with the execution times of a {@link Schedule}. @param instant The instant to test @param schedule The schedule to test against @return true if the given instant aligns with the schedule """ ...
java
public static boolean isAligned(Instant instant, Schedule schedule) { // executionTime.isMatch ignores seconds for unix cron // so we fail the check immediately if there is a sub-minute value if (!instant.truncatedTo(ChronoUnit.MINUTES).equals(instant)) { return false; } final ExecutionTime e...
[ "public", "static", "boolean", "isAligned", "(", "Instant", "instant", ",", "Schedule", "schedule", ")", "{", "// executionTime.isMatch ignores seconds for unix cron", "// so we fail the check immediately if there is a sub-minute value", "if", "(", "!", "instant", ".", "truncat...
Tests if a given instant is aligned with the execution times of a {@link Schedule}. @param instant The instant to test @param schedule The schedule to test against @return true if the given instant aligns with the schedule
[ "Tests", "if", "a", "given", "instant", "is", "aligned", "with", "the", "execution", "times", "of", "a", "{", "@link", "Schedule", "}", "." ]
train
https://github.com/spotify/styx/blob/0d63999beeb93a17447e3bbccaa62175b74cf6e4/styx-common/src/main/java/com/spotify/styx/util/TimeUtil.java#L189-L200
undertow-io/undertow
core/src/main/java/io/undertow/Handlers.java
Handlers.virtualHost
public static NameVirtualHostHandler virtualHost(final HttpHandler defaultHandler, final HttpHandler hostHandler, String... hostnames) { """ Creates a new virtual host handler that uses the provided handler as the root handler for the given hostnames. @param defaultHandler The default handler @param hostHandle...
java
public static NameVirtualHostHandler virtualHost(final HttpHandler defaultHandler, final HttpHandler hostHandler, String... hostnames) { return virtualHost(hostHandler, hostnames).setDefaultHandler(defaultHandler); }
[ "public", "static", "NameVirtualHostHandler", "virtualHost", "(", "final", "HttpHandler", "defaultHandler", ",", "final", "HttpHandler", "hostHandler", ",", "String", "...", "hostnames", ")", "{", "return", "virtualHost", "(", "hostHandler", ",", "hostnames", ")", "...
Creates a new virtual host handler that uses the provided handler as the root handler for the given hostnames. @param defaultHandler The default handler @param hostHandler The host handler @param hostnames The host names @return A new virtual host handler
[ "Creates", "a", "new", "virtual", "host", "handler", "that", "uses", "the", "provided", "handler", "as", "the", "root", "handler", "for", "the", "given", "hostnames", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/Handlers.java#L167-L169
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemNumber.java
ElemNumber.int2singlealphaCount
protected String int2singlealphaCount(long val, CharArrayWrapper table) { """ Convert a long integer into alphabetic counting, in other words count using the sequence A B C ... Z. @param val Value to convert -- must be greater than zero. @param table a table containing one character for each digit in the radi...
java
protected String int2singlealphaCount(long val, CharArrayWrapper table) { int radix = table.getLength(); // TODO: throw error on out of range input if (val > radix) { return getZeroString(); } else return (new Character(table.getChar((int)val - 1))).toString(); // index into ta...
[ "protected", "String", "int2singlealphaCount", "(", "long", "val", ",", "CharArrayWrapper", "table", ")", "{", "int", "radix", "=", "table", ".", "getLength", "(", ")", ";", "// TODO: throw error on out of range input", "if", "(", "val", ">", "radix", ")", "{",...
Convert a long integer into alphabetic counting, in other words count using the sequence A B C ... Z. @param val Value to convert -- must be greater than zero. @param table a table containing one character for each digit in the radix @return String representing alpha count of number. @see TransformerImpl#DecimalToRoma...
[ "Convert", "a", "long", "integer", "into", "alphabetic", "counting", "in", "other", "words", "count", "using", "the", "sequence", "A", "B", "C", "...", "Z", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemNumber.java#L1592-L1604
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/OperatorSimplify.java
OperatorSimplify.isSimpleAsFeature
public boolean isSimpleAsFeature(Geometry geom, SpatialReference spatialRef, ProgressTracker progressTracker) { """ Tests if the Geometry is simple (second call will use a cached IsKnownSimple flag and immediately return). @param geom The Geometry to be tested. @param spatialRef Spatial reference from which t...
java
public boolean isSimpleAsFeature(Geometry geom, SpatialReference spatialRef, ProgressTracker progressTracker) { return isSimpleAsFeature(geom, spatialRef, false, null, progressTracker); }
[ "public", "boolean", "isSimpleAsFeature", "(", "Geometry", "geom", ",", "SpatialReference", "spatialRef", ",", "ProgressTracker", "progressTracker", ")", "{", "return", "isSimpleAsFeature", "(", "geom", ",", "spatialRef", ",", "false", ",", "null", ",", "progressTra...
Tests if the Geometry is simple (second call will use a cached IsKnownSimple flag and immediately return). @param geom The Geometry to be tested. @param spatialRef Spatial reference from which the tolerance is obtained. Can be null, then a very small tolerance value is derived from the geometry bounds. @param progressT...
[ "Tests", "if", "the", "Geometry", "is", "simple", "(", "second", "call", "will", "use", "a", "cached", "IsKnownSimple", "flag", "and", "immediately", "return", ")", ".", "@param", "geom", "The", "Geometry", "to", "be", "tested", ".", "@param", "spatialRef", ...
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/OperatorSimplify.java#L69-L72
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.addIntentAsync
public Observable<UUID> addIntentAsync(UUID appId, String versionId, AddIntentOptionalParameter addIntentOptionalParameter) { """ Adds an intent classifier to the application. @param appId The application ID. @param versionId The version ID. @param addIntentOptionalParameter the object representing the option...
java
public Observable<UUID> addIntentAsync(UUID appId, String versionId, AddIntentOptionalParameter addIntentOptionalParameter) { return addIntentWithServiceResponseAsync(appId, versionId, addIntentOptionalParameter).map(new Func1<ServiceResponse<UUID>, UUID>() { @Override public UUID call(S...
[ "public", "Observable", "<", "UUID", ">", "addIntentAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "AddIntentOptionalParameter", "addIntentOptionalParameter", ")", "{", "return", "addIntentWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", ...
Adds an intent classifier to the application. @param appId The application ID. @param versionId The version ID. @param addIntentOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the obser...
[ "Adds", "an", "intent", "classifier", "to", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L610-L617
netty/netty
example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java
Http2ServerInitializer.configureClearText
private void configureClearText(SocketChannel ch) { """ Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.0 """ final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec(); p.addLast(sourceCodec); p.addLast(new HttpServerU...
java
private void configureClearText(SocketChannel ch) { final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec(); p.addLast(sourceCodec); p.addLast(new HttpServerUpgradeHandler(sourceCodec, upgradeCodecFactory)); p.addLast(new SimpleChannelI...
[ "private", "void", "configureClearText", "(", "SocketChannel", "ch", ")", "{", "final", "ChannelPipeline", "p", "=", "ch", ".", "pipeline", "(", ")", ";", "final", "HttpServerCodec", "sourceCodec", "=", "new", "HttpServerCodec", "(", ")", ";", "p", ".", "add...
Configure the pipeline for a cleartext upgrade from HTTP to HTTP/2.0
[ "Configure", "the", "pipeline", "for", "a", "cleartext", "upgrade", "from", "HTTP", "to", "HTTP", "/", "2", ".", "0" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/http2/helloworld/multiplex/server/Http2ServerInitializer.java#L91-L111
alipay/sofa-rpc
extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistry.java
SofaRegistry.addAttributes
private void addAttributes(PublisherRegistration publisherRegistration, String group) { """ 添加额外的属性 @param publisherRegistration 注册或者订阅对象 @param group 分组 """ // if group == null; group = "DEFAULT_GROUP" if (StringUtils.isNotEmpty(group)) { publisherRegistration.setGrou...
java
private void addAttributes(PublisherRegistration publisherRegistration, String group) { // if group == null; group = "DEFAULT_GROUP" if (StringUtils.isNotEmpty(group)) { publisherRegistration.setGroup(group); } }
[ "private", "void", "addAttributes", "(", "PublisherRegistration", "publisherRegistration", ",", "String", "group", ")", "{", "// if group == null; group = \"DEFAULT_GROUP\"", "if", "(", "StringUtils", ".", "isNotEmpty", "(", "group", ")", ")", "{", "publisherRegistration"...
添加额外的属性 @param publisherRegistration 注册或者订阅对象 @param group 分组
[ "添加额外的属性" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistry.java#L305-L311
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/CursorRenderer.java
CursorRenderer.addImage
public void addImage(int id, Media media) { """ Add a cursor image. Once there are no more images to add, a call to {@link #load()} will be necessary. @param id The cursor id. @param media The cursor media. @throws LionEngineException If invalid media. """ final Integer key = Integer.valueOf(id); ...
java
public void addImage(int id, Media media) { final Integer key = Integer.valueOf(id); surfaces.put(key, Drawable.loadImage(media)); if (surfaceId == null) { surfaceId = key; } }
[ "public", "void", "addImage", "(", "int", "id", ",", "Media", "media", ")", "{", "final", "Integer", "key", "=", "Integer", ".", "valueOf", "(", "id", ")", ";", "surfaces", ".", "put", "(", "key", ",", "Drawable", ".", "loadImage", "(", "media", ")",...
Add a cursor image. Once there are no more images to add, a call to {@link #load()} will be necessary. @param id The cursor id. @param media The cursor media. @throws LionEngineException If invalid media.
[ "Add", "a", "cursor", "image", ".", "Once", "there", "are", "no", "more", "images", "to", "add", "a", "call", "to", "{", "@link", "#load", "()", "}", "will", "be", "necessary", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/CursorRenderer.java#L89-L97
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/Type1Font.java
Type1Font.getKerning
public int getKerning(int char1, int char2) { """ Gets the kerning between two Unicode characters. The characters are converted to names and this names are used to find the kerning pairs in the <CODE>HashMap</CODE> <CODE>KernPairs</CODE>. @param char1 the first char @param char2 the second char @return the ke...
java
public int getKerning(int char1, int char2) { String first = GlyphList.unicodeToName(char1); if (first == null) return 0; String second = GlyphList.unicodeToName(char2); if (second == null) return 0; Object obj[] = (Object[])KernPairs.get(first); ...
[ "public", "int", "getKerning", "(", "int", "char1", ",", "int", "char2", ")", "{", "String", "first", "=", "GlyphList", ".", "unicodeToName", "(", "char1", ")", ";", "if", "(", "first", "==", "null", ")", "return", "0", ";", "String", "second", "=", ...
Gets the kerning between two Unicode characters. The characters are converted to names and this names are used to find the kerning pairs in the <CODE>HashMap</CODE> <CODE>KernPairs</CODE>. @param char1 the first char @param char2 the second char @return the kerning to be applied
[ "Gets", "the", "kerning", "between", "two", "Unicode", "characters", ".", "The", "characters", "are", "converted", "to", "names", "and", "this", "names", "are", "used", "to", "find", "the", "kerning", "pairs", "in", "the", "<CODE", ">", "HashMap<", "/", "C...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/Type1Font.java#L317-L333
carewebframework/carewebframework-core
org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/HelpConverterMojo.java
HelpConverterMojo.registerExternalLoaders
private void registerExternalLoaders() throws MojoExecutionException { """ Adds any additional source loaders specified in configuration. @throws MojoExecutionException Error registering external loader. """ if (archiveLoaders != null) { for (String entry : archiveLoaders) { ...
java
private void registerExternalLoaders() throws MojoExecutionException { if (archiveLoaders != null) { for (String entry : archiveLoaders) { try { SourceLoader loader = (SourceLoader) Class.forName(entry).newInstance(); registerLoader(loader); ...
[ "private", "void", "registerExternalLoaders", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "archiveLoaders", "!=", "null", ")", "{", "for", "(", "String", "entry", ":", "archiveLoaders", ")", "{", "try", "{", "SourceLoader", "loader", "=", "("...
Adds any additional source loaders specified in configuration. @throws MojoExecutionException Error registering external loader.
[ "Adds", "any", "additional", "source", "loaders", "specified", "in", "configuration", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/HelpConverterMojo.java#L165-L176
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java
FormLayout.takeIntoAccount
private boolean takeIntoAccount(Component component, CellConstraints cc) { """ Checks and answers whether the given component with the specified CellConstraints shall be taken into account for the layout. @param component the component to test @param cc the component's associated CellConstraints @return {@co...
java
private boolean takeIntoAccount(Component component, CellConstraints cc) { return component.isVisible() || cc.honorsVisibility == null && !getHonorsVisibility() || Boolean.FALSE.equals(cc.honorsVisibility); }
[ "private", "boolean", "takeIntoAccount", "(", "Component", "component", ",", "CellConstraints", "cc", ")", "{", "return", "component", ".", "isVisible", "(", ")", "||", "cc", ".", "honorsVisibility", "==", "null", "&&", "!", "getHonorsVisibility", "(", ")", "|...
Checks and answers whether the given component with the specified CellConstraints shall be taken into account for the layout. @param component the component to test @param cc the component's associated CellConstraints @return {@code true} if a) {@code component} is visible, or b) {@code component} has no individual se...
[ "Checks", "and", "answers", "whether", "the", "given", "component", "with", "the", "specified", "CellConstraints", "shall", "be", "taken", "into", "account", "for", "the", "layout", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L1665-L1669
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java
ListManagementTermsImpl.getAllTermsAsync
public Observable<Terms> getAllTermsAsync(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter) { """ Gets all terms from the list with list Id equal to the list Id passed. @param listId List Id of the image list. @param language Language of the terms. @param getAllTermsOp...
java
public Observable<Terms> getAllTermsAsync(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter) { return getAllTermsWithServiceResponseAsync(listId, language, getAllTermsOptionalParameter).map(new Func1<ServiceResponse<Terms>, Terms>() { @Override pub...
[ "public", "Observable", "<", "Terms", ">", "getAllTermsAsync", "(", "String", "listId", ",", "String", "language", ",", "GetAllTermsOptionalParameter", "getAllTermsOptionalParameter", ")", "{", "return", "getAllTermsWithServiceResponseAsync", "(", "listId", ",", "language...
Gets all terms from the list with list Id equal to the list Id passed. @param listId List Id of the image list. @param language Language of the terms. @param getAllTermsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if paramet...
[ "Gets", "all", "terms", "from", "the", "list", "with", "list", "Id", "equal", "to", "the", "list", "Id", "passed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java#L299-L306
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java
PrimaveraReader.addUDFValue
private void addUDFValue(FieldTypeClass fieldType, FieldContainer container, Row row) { """ Adds a user defined field value to a task. @param fieldType field type @param container FieldContainer instance @param row UDF data """ Integer fieldId = row.getInteger("udf_type_id"); String fieldName ...
java
private void addUDFValue(FieldTypeClass fieldType, FieldContainer container, Row row) { Integer fieldId = row.getInteger("udf_type_id"); String fieldName = m_udfFields.get(fieldId); Object value = null; FieldType field = m_project.getCustomFields().getFieldByAlias(fieldType, fieldName); ...
[ "private", "void", "addUDFValue", "(", "FieldTypeClass", "fieldType", ",", "FieldContainer", "container", ",", "Row", "row", ")", "{", "Integer", "fieldId", "=", "row", ".", "getInteger", "(", "\"udf_type_id\"", ")", ";", "String", "fieldName", "=", "m_udfFields...
Adds a user defined field value to a task. @param fieldType field type @param container FieldContainer instance @param row UDF data
[ "Adds", "a", "user", "defined", "field", "value", "to", "a", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L880-L941
JavaMoney/jsr354-ri
moneta-core/src/main/java/org/javamoney/moneta/Money.java
Money.ofMinor
public static Money ofMinor(CurrencyUnit currency, long amountMinor, int fractionDigits) { """ Obtains an instance of {@code Money} from an amount in minor units. For example, {@code ofMinor(USD, 1234, 2)} creates the instance {@code USD 12.34}. @param currency the currency, not null @param amountMinor the am...
java
public static Money ofMinor(CurrencyUnit currency, long amountMinor, int fractionDigits) { if(fractionDigits < 0) { throw new IllegalArgumentException("The fractionDigits cannot be negative"); } return of(BigDecimal.valueOf(amountMinor, fractionDigits), currency); }
[ "public", "static", "Money", "ofMinor", "(", "CurrencyUnit", "currency", ",", "long", "amountMinor", ",", "int", "fractionDigits", ")", "{", "if", "(", "fractionDigits", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The fractionDigits can...
Obtains an instance of {@code Money} from an amount in minor units. For example, {@code ofMinor(USD, 1234, 2)} creates the instance {@code USD 12.34}. @param currency the currency, not null @param amountMinor the amount of money in the minor division of the currency @param fractionDigits number of digits @return the ...
[ "Obtains", "an", "instance", "of", "{" ]
train
https://github.com/JavaMoney/jsr354-ri/blob/cf8ff2bbaf9b115acc05eb9b0c76c8397c308284/moneta-core/src/main/java/org/javamoney/moneta/Money.java#L831-L836
cloudfoundry/uaa
server/src/main/java/org/cloudfoundry/identity/uaa/oauth/refresh/RefreshTokenCreator.java
RefreshTokenCreator.isRefreshTokenSupported
protected boolean isRefreshTokenSupported(String grantType, Set<String> scope) { """ Check the current authorization request to indicate whether a refresh token should be issued or not. @param grantType the current grant type @param scope @return boolean to indicate if refresh token is supported """ ...
java
protected boolean isRefreshTokenSupported(String grantType, Set<String> scope) { if (!isRestrictRefreshGrant) { return GRANT_TYPE_AUTHORIZATION_CODE.equals(grantType) || GRANT_TYPE_PASSWORD.equals(grantType) || GRANT_TYPE_USER_TOKEN.equals(grantType) || ...
[ "protected", "boolean", "isRefreshTokenSupported", "(", "String", "grantType", ",", "Set", "<", "String", ">", "scope", ")", "{", "if", "(", "!", "isRestrictRefreshGrant", ")", "{", "return", "GRANT_TYPE_AUTHORIZATION_CODE", ".", "equals", "(", "grantType", ")", ...
Check the current authorization request to indicate whether a refresh token should be issued or not. @param grantType the current grant type @param scope @return boolean to indicate if refresh token is supported
[ "Check", "the", "current", "authorization", "request", "to", "indicate", "whether", "a", "refresh", "token", "should", "be", "issued", "or", "not", "." ]
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/oauth/refresh/RefreshTokenCreator.java#L145-L155
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/AppUtil.java
AppUtil.startWebBrowser
public static void startWebBrowser(@NonNull final Context context, @NonNull final Uri uri) { """ Starts the web browser in order to show a specific URI. If an error occurs while starting the web browser an {@link ActivityNotFoundException} will be thrown. @param context The context, the web browser should be ...
java
public static void startWebBrowser(@NonNull final Context context, @NonNull final Uri uri) { Condition.INSTANCE.ensureNotNull(context, "The context may not be null"); Condition.INSTANCE.ensureNotNull(uri, "The URI may not be null"); Intent intent = new Intent(Intent.ACTION_VIEW, uri); i...
[ "public", "static", "void", "startWebBrowser", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "NonNull", "final", "Uri", "uri", ")", "{", "Condition", ".", "INSTANCE", ".", "ensureNotNull", "(", "context", ",", "\"The context may not be null\"", "...
Starts the web browser in order to show a specific URI. If an error occurs while starting the web browser an {@link ActivityNotFoundException} will be thrown. @param context The context, the web browser should be started from, as an instance of the class {@link Context}. The context may not be null @param uri The URI,...
[ "Starts", "the", "web", "browser", "in", "order", "to", "show", "a", "specific", "URI", ".", "If", "an", "error", "occurs", "while", "starting", "the", "web", "browser", "an", "{", "@link", "ActivityNotFoundException", "}", "will", "be", "thrown", "." ]
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/AppUtil.java#L197-L207
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
ReflectionToStringBuilder.toStringExclude
public static String toStringExclude(final Object object, final String... excludeFieldNames) { """ Builds a String for a toString method excluding the given field names. @param object The object to "toString". @param excludeFieldNames The field names to exclude @return The toString value. """ re...
java
public static String toStringExclude(final Object object, final String... excludeFieldNames) { return new ReflectionToStringBuilder(object).setExcludeFieldNames(excludeFieldNames).toString(); }
[ "public", "static", "String", "toStringExclude", "(", "final", "Object", "object", ",", "final", "String", "...", "excludeFieldNames", ")", "{", "return", "new", "ReflectionToStringBuilder", "(", "object", ")", ".", "setExcludeFieldNames", "(", "excludeFieldNames", ...
Builds a String for a toString method excluding the given field names. @param object The object to "toString". @param excludeFieldNames The field names to exclude @return The toString value.
[ "Builds", "a", "String", "for", "a", "toString", "method", "excluding", "the", "given", "field", "names", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java#L424-L426
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobLauncherFactory.java
JobLauncherFactory.newJobLauncher
public static @Nonnull JobLauncher newJobLauncher(Properties sysProps, Properties jobProps, SharedResourcesBroker<GobblinScopeTypes> instanceBroker) throws Exception { """ Create a new {@link JobLauncher}. <p> This method will never return a {@code null}. </p> @param sysProps system configuration pro...
java
public static @Nonnull JobLauncher newJobLauncher(Properties sysProps, Properties jobProps, SharedResourcesBroker<GobblinScopeTypes> instanceBroker) throws Exception { return newJobLauncher(sysProps, jobProps, instanceBroker, ImmutableList.of()); }
[ "public", "static", "@", "Nonnull", "JobLauncher", "newJobLauncher", "(", "Properties", "sysProps", ",", "Properties", "jobProps", ",", "SharedResourcesBroker", "<", "GobblinScopeTypes", ">", "instanceBroker", ")", "throws", "Exception", "{", "return", "newJobLauncher",...
Create a new {@link JobLauncher}. <p> This method will never return a {@code null}. </p> @param sysProps system configuration properties @param jobProps job configuration properties @param instanceBroker @return newly created {@link JobLauncher}
[ "Create", "a", "new", "{", "@link", "JobLauncher", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobLauncherFactory.java#L83-L86
Harium/keel
src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java
FourierTransform.FFT
public static void FFT(ComplexNumber[] data, Direction direction) { """ 1-D Fast Fourier Transform. @param data Data to transform. @param direction Transformation direction. """ double[] real = ComplexNumber.getReal(data); double[] img = ComplexNumber.getImaginary(data); if ...
java
public static void FFT(ComplexNumber[] data, Direction direction) { double[] real = ComplexNumber.getReal(data); double[] img = ComplexNumber.getImaginary(data); if (direction == Direction.Forward) FFT(real, img); else FFT(img, real); if (direction ...
[ "public", "static", "void", "FFT", "(", "ComplexNumber", "[", "]", "data", ",", "Direction", "direction", ")", "{", "double", "[", "]", "real", "=", "ComplexNumber", ".", "getReal", "(", "data", ")", ";", "double", "[", "]", "img", "=", "ComplexNumber", ...
1-D Fast Fourier Transform. @param data Data to transform. @param direction Transformation direction.
[ "1", "-", "D", "Fast", "Fourier", "Transform", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/transform/FourierTransform.java#L168-L185
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/xml/XMLViewer.java
XMLViewer.showCWF
public static Window showCWF(BaseComponent root, String... excludedProperties) { """ Display the CWF markup for the component tree rooted at root. @param root Root component of tree. @param excludedProperties Excluded properties. @return The dialog. """ Window window = showXML(CWF2XML.toDocument(r...
java
public static Window showCWF(BaseComponent root, String... excludedProperties) { Window window = showXML(CWF2XML.toDocument(root, excludedProperties)); window.setTitle("CWF Markup"); return window; }
[ "public", "static", "Window", "showCWF", "(", "BaseComponent", "root", ",", "String", "...", "excludedProperties", ")", "{", "Window", "window", "=", "showXML", "(", "CWF2XML", ".", "toDocument", "(", "root", ",", "excludedProperties", ")", ")", ";", "window",...
Display the CWF markup for the component tree rooted at root. @param root Root component of tree. @param excludedProperties Excluded properties. @return The dialog.
[ "Display", "the", "CWF", "markup", "for", "the", "component", "tree", "rooted", "at", "root", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/xml/XMLViewer.java#L89-L93
knightliao/apollo
src/main/java/com/github/knightliao/apollo/utils/time/DateUtils.java
DateUtils.isOverlay
public static boolean isOverlay(Date date1Start, Date date1End, Date date2Start, Date date2End) { """ 校验两段时间是否有重合 @param date1Start 时间段1开始 @param date1End 时间段1结束 @param date2Start 时间段2开始 @param date2End 时间段2结束 @return <p/> <code>true</code>:有重合 <p/> <code>false</code>:无重合 """ return ((d...
java
public static boolean isOverlay(Date date1Start, Date date1End, Date date2Start, Date date2End) { return ((date1Start.getTime() >= date2Start.getTime()) && date1Start.getTime() <= date2End.getTime()) || ((date2Start.getTime() >= date1Start.getTime()) && date2Start.getTime() <= date1End.getTim...
[ "public", "static", "boolean", "isOverlay", "(", "Date", "date1Start", ",", "Date", "date1End", ",", "Date", "date2Start", ",", "Date", "date2End", ")", "{", "return", "(", "(", "date1Start", ".", "getTime", "(", ")", ">=", "date2Start", ".", "getTime", "(...
校验两段时间是否有重合 @param date1Start 时间段1开始 @param date1End 时间段1结束 @param date2Start 时间段2开始 @param date2End 时间段2结束 @return <p/> <code>true</code>:有重合 <p/> <code>false</code>:无重合
[ "校验两段时间是否有重合" ]
train
https://github.com/knightliao/apollo/blob/d7a283659fa3e67af6375db8969b2d065a8ce6eb/src/main/java/com/github/knightliao/apollo/utils/time/DateUtils.java#L1132-L1135
Steveice10/OpenNBT
src/main/java/com/github/steveice10/opennbt/tag/TagRegistry.java
TagRegistry.createInstance
public static Tag createInstance(int id, String tagName) throws TagCreateException { """ Creates an instance of the tag with the given id, using the String constructor. @param id Id of the tag. @param tagName Name to give the tag. @return The created tag. @throws TagCreateException If an error occurs wh...
java
public static Tag createInstance(int id, String tagName) throws TagCreateException { Class<? extends Tag> clazz = idToTag.get(id); if(clazz == null) { throw new TagCreateException("Could not find tag with ID \"" + id + "\"."); } try { Constructor<? extends Tag> c...
[ "public", "static", "Tag", "createInstance", "(", "int", "id", ",", "String", "tagName", ")", "throws", "TagCreateException", "{", "Class", "<", "?", "extends", "Tag", ">", "clazz", "=", "idToTag", ".", "get", "(", "id", ")", ";", "if", "(", "clazz", "...
Creates an instance of the tag with the given id, using the String constructor. @param id Id of the tag. @param tagName Name to give the tag. @return The created tag. @throws TagCreateException If an error occurs while creating the tag.
[ "Creates", "an", "instance", "of", "the", "tag", "with", "the", "given", "id", "using", "the", "String", "constructor", "." ]
train
https://github.com/Steveice10/OpenNBT/blob/9bf4adb2afd206a21bc4309c85d642494d1fb536/src/main/java/com/github/steveice10/opennbt/tag/TagRegistry.java#L116-L129
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
ConditionMessage.forCondition
public static Builder forCondition(String condition, Object... details) { """ Factory method for a builder to construct a new {@link ConditionMessage} for a condition. @param condition the condition @param details details of the condition @return a {@link Builder} builder @see #forCondition(Class, Object...) ...
java
public static Builder forCondition(String condition, Object... details) { return new ConditionMessage().andCondition(condition, details); }
[ "public", "static", "Builder", "forCondition", "(", "String", "condition", ",", "Object", "...", "details", ")", "{", "return", "new", "ConditionMessage", "(", ")", ".", "andCondition", "(", "condition", ",", "details", ")", ";", "}" ]
Factory method for a builder to construct a new {@link ConditionMessage} for a condition. @param condition the condition @param details details of the condition @return a {@link Builder} builder @see #forCondition(Class, Object...) @see #andCondition(String, Object...)
[ "Factory", "method", "for", "a", "builder", "to", "construct", "a", "new", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java#L194-L196
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/util/Args.java
Args.checkUri
public static void checkUri(String uri, String message, Object... args) { """ Validates that an argument is a valid URI. @param uri The value to check. @param message An exception message. @param args Exception message arguments. """ try { new URI(uri); } catch (URISyntaxException e) { ...
java
public static void checkUri(String uri, String message, Object... args) { try { new URI(uri); } catch (URISyntaxException e) { throw new IllegalArgumentException(String.format(message, args), e); } }
[ "public", "static", "void", "checkUri", "(", "String", "uri", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "try", "{", "new", "URI", "(", "uri", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "throw", "new", "I...
Validates that an argument is a valid URI. @param uri The value to check. @param message An exception message. @param args Exception message arguments.
[ "Validates", "that", "an", "argument", "is", "a", "valid", "URI", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/util/Args.java#L120-L126
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/webwork/DJResult.java
DJResult.doExecute
protected void doExecute(final String _finalLocation, final ActionInvocation _invocation) throws Exception { """ Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed). Subclasses must implement this class to handle custom logic f...
java
protected void doExecute(final String _finalLocation, final ActionInvocation _invocation) throws Exception { checkParams(); documentFormat = getFormat(_invocation); if (LOG.isDebugEnabled()) { LOG.debug("Creating JasperReport for dynamicReport, format = " + documentFormat); }...
[ "protected", "void", "doExecute", "(", "final", "String", "_finalLocation", ",", "final", "ActionInvocation", "_invocation", ")", "throws", "Exception", "{", "checkParams", "(", ")", ";", "documentFormat", "=", "getFormat", "(", "_invocation", ")", ";", "if", "(...
Executes the result given a final location (jsp page, action, etc) and the action invocation (the state in which the action was executed). Subclasses must implement this class to handle custom logic for result handling. @param _finalLocation the location (jsp page, action, etc) to go to. @param _invocation the exec...
[ "Executes", "the", "result", "given", "a", "final", "location", "(", "jsp", "page", "action", "etc", ")", "and", "the", "action", "invocation", "(", "the", "state", "in", "which", "the", "action", "was", "executed", ")", ".", "Subclasses", "must", "impleme...
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/webwork/DJResult.java#L104-L139
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.listPreparationAndReleaseTaskStatus
public PagedList<JobPreparationAndReleaseTaskExecutionInformation> listPreparationAndReleaseTaskStatus(final String jobId) { """ Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run. This API returns the Job Preparation and Job...
java
public PagedList<JobPreparationAndReleaseTaskExecutionInformation> listPreparationAndReleaseTaskStatus(final String jobId) { ServiceResponseWithHeaders<Page<JobPreparationAndReleaseTaskExecutionInformation>, JobListPreparationAndReleaseTaskStatusHeaders> response = listPreparationAndReleaseTaskStatusSinglePageA...
[ "public", "PagedList", "<", "JobPreparationAndReleaseTaskExecutionInformation", ">", "listPreparationAndReleaseTaskStatus", "(", "final", "String", "jobId", ")", "{", "ServiceResponseWithHeaders", "<", "Page", "<", "JobPreparationAndReleaseTaskExecutionInformation", ">", ",", "...
Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run. This API returns the Job Preparation and Job Release task status on all compute nodes that have run the Job Preparation or Job Release task. This includes nodes which have since b...
[ "Lists", "the", "execution", "status", "of", "the", "Job", "Preparation", "and", "Job", "Release", "task", "for", "the", "specified", "job", "across", "the", "compute", "nodes", "where", "the", "job", "has", "run", ".", "This", "API", "returns", "the", "Jo...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L2814-L2822
SUSE/salt-netapi-client
src/main/java/com/suse/salt/netapi/client/impl/HttpAsyncClientImpl.java
HttpAsyncClientImpl.prepareRequest
private <T> HttpUriRequest prepareRequest(URI uri, Map<String, String> headers, String jsonData) { """ Prepares the HTTP request object creating a POST or GET request depending on if data is supplied or not. @param jsonData json POST data, will use GET if null @return HttpUriRequest object the prepared reques...
java
private <T> HttpUriRequest prepareRequest(URI uri, Map<String, String> headers, String jsonData) { HttpUriRequest httpRequest; if (jsonData != null) { // POST data HttpPost httpPost = new HttpPost(uri); httpPost.setEntity(new StringEntity(jsonData, ContentType.APPLICA...
[ "private", "<", "T", ">", "HttpUriRequest", "prepareRequest", "(", "URI", "uri", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "String", "jsonData", ")", "{", "HttpUriRequest", "httpRequest", ";", "if", "(", "jsonData", "!=", "null", ")", ...
Prepares the HTTP request object creating a POST or GET request depending on if data is supplied or not. @param jsonData json POST data, will use GET if null @return HttpUriRequest object the prepared request
[ "Prepares", "the", "HTTP", "request", "object", "creating", "a", "POST", "or", "GET", "request", "depending", "on", "if", "data", "is", "supplied", "or", "not", "." ]
train
https://github.com/SUSE/salt-netapi-client/blob/a0bdf643c8e34fa4def4b915366594c1491fdad5/src/main/java/com/suse/salt/netapi/client/impl/HttpAsyncClientImpl.java#L74-L89
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTPCryptoContext.java
SRTPCryptoContext.reverseTransformPacket
public boolean reverseTransformPacket(RawPacket pkt) { """ Transform a SRTP packet into a RTP packet. This method is called when a SRTP packet is received. Operations done by the this operation include: Authentication check, Packet replay check and Decryption. Both encryption and authentication functionali...
java
public boolean reverseTransformPacket(RawPacket pkt) { int seqNo = pkt.getSequenceNumber(); if (!seqNumSet) { seqNumSet = true; seqNum = seqNo; } // Guess the SRTP index (48 bit), see rFC 3711, 3.3.1 // Stores the guessed roc in this.guessedROC long guessedIndex = guessIndex(seqNo); // Replay c...
[ "public", "boolean", "reverseTransformPacket", "(", "RawPacket", "pkt", ")", "{", "int", "seqNo", "=", "pkt", ".", "getSequenceNumber", "(", ")", ";", "if", "(", "!", "seqNumSet", ")", "{", "seqNumSet", "=", "true", ";", "seqNum", "=", "seqNo", ";", "}",...
Transform a SRTP packet into a RTP packet. This method is called when a SRTP packet is received. Operations done by the this operation include: Authentication check, Packet replay check and Decryption. Both encryption and authentication functionality can be turned off as long as the SRTPPolicy used in this SRTPCrypto...
[ "Transform", "a", "SRTP", "packet", "into", "a", "RTP", "packet", ".", "This", "method", "is", "called", "when", "a", "SRTP", "packet", "is", "received", "." ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTPCryptoContext.java#L397-L451
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/checkbox/LabeledCheckboxPanel.java
LabeledCheckboxPanel.newCheckBox
protected CheckBox newCheckBox(final String id, final IModel<M> model) { """ Factory method for create a new {@link CheckBox}. This method is invoked in the constructor from this class and can be overridden so users can provide their own version of a new {@link CheckBox}. @param id the id @param model the ...
java
protected CheckBox newCheckBox(final String id, final IModel<M> model) { final IModel<Boolean> propertyModel = new PropertyModel<>(model.getObject(), this.getId()); return ComponentFactory.newCheckBox(id, propertyModel); }
[ "protected", "CheckBox", "newCheckBox", "(", "final", "String", "id", ",", "final", "IModel", "<", "M", ">", "model", ")", "{", "final", "IModel", "<", "Boolean", ">", "propertyModel", "=", "new", "PropertyModel", "<>", "(", "model", ".", "getObject", "(",...
Factory method for create a new {@link CheckBox}. This method is invoked in the constructor from this class and can be overridden so users can provide their own version of a new {@link CheckBox}. @param id the id @param model the model @return the new {@link CheckBox}.
[ "Factory", "method", "for", "create", "a", "new", "{", "@link", "CheckBox", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "this", "class", "and", "can", "be", "overridden", "so", "users", "can", "provide", "their", "own",...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/checkbox/LabeledCheckboxPanel.java#L92-L96
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/MetricContext.java
MetricContext.contextAwareCounter
public ContextAwareCounter contextAwareCounter(String name, ContextAwareMetricFactory<ContextAwareCounter> factory) { """ Get a {@link ContextAwareCounter} with a given name. @param name name of the {@link ContextAwareCounter} @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareC...
java
public ContextAwareCounter contextAwareCounter(String name, ContextAwareMetricFactory<ContextAwareCounter> factory) { return this.innerMetricContext.getOrCreate(name, factory); }
[ "public", "ContextAwareCounter", "contextAwareCounter", "(", "String", "name", ",", "ContextAwareMetricFactory", "<", "ContextAwareCounter", ">", "factory", ")", "{", "return", "this", ".", "innerMetricContext", ".", "getOrCreate", "(", "name", ",", "factory", ")", ...
Get a {@link ContextAwareCounter} with a given name. @param name name of the {@link ContextAwareCounter} @param factory a {@link ContextAwareMetricFactory} for building {@link ContextAwareCounter}s @return the {@link ContextAwareCounter} with the given name
[ "Get", "a", "{", "@link", "ContextAwareCounter", "}", "with", "a", "given", "name", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/MetricContext.java#L436-L438
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java
DifferentialFunctionFactory.reductionBroadcastableWithOrigShape
public SDVariable reductionBroadcastableWithOrigShape(int origRank, int[] reduceDims, SDVariable toExpand) { """ Add 1s as required to the array make an array possible to be broadcast with the original (pre-reduce) array. <p> Example: if doing [a,b,c].sum(1), result is [a,c]. To 'undo' this in a way that can be ...
java
public SDVariable reductionBroadcastableWithOrigShape(int origRank, int[] reduceDims, SDVariable toExpand) { if (Shape.isWholeArray(origRank, reduceDims)) { //Output is [1,1] which is already broadcastable return toExpand; } else if (origRank == 2 && reduceDims.length == 1) { ...
[ "public", "SDVariable", "reductionBroadcastableWithOrigShape", "(", "int", "origRank", ",", "int", "[", "]", "reduceDims", ",", "SDVariable", "toExpand", ")", "{", "if", "(", "Shape", ".", "isWholeArray", "(", "origRank", ",", "reduceDims", ")", ")", "{", "//O...
Add 1s as required to the array make an array possible to be broadcast with the original (pre-reduce) array. <p> Example: if doing [a,b,c].sum(1), result is [a,c]. To 'undo' this in a way that can be auto-broadcast, we want to expand as required - i.e., [a,c] -> [a,1,c] which can be auto-broadcast with the original [a,...
[ "Add", "1s", "as", "required", "to", "the", "array", "make", "an", "array", "possible", "to", "be", "broadcast", "with", "the", "original", "(", "pre", "-", "reduce", ")", "array", ".", "<p", ">", "Example", ":", "if", "doing", "[", "a", "b", "c", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/functions/DifferentialFunctionFactory.java#L791-L806
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/nlp/AipNlp.java
AipNlp.simnet
public JSONObject simnet(String text1, String text2, HashMap<String, Object> options) { """ 短文本相似度接口 短文本相似度接口用来判断两个文本的相似度得分。 @param text1 - 待比较文本1(GBK编码),最大512字节* @param text2 - 待比较文本2(GBK编码),最大512字节 @param options - 可选参数对象,key: value都为string类型 options - options列表: model 默认为"BOW",可选"BOW"、"CNN"与"GRNN" @ret...
java
public JSONObject simnet(String text1, String text2, HashMap<String, Object> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("text_1", text1); request.addBody("text_2", text2); if (options != null) { ...
[ "public", "JSONObject", "simnet", "(", "String", "text1", ",", "String", "text2", ",", "HashMap", "<", "String", ",", "Object", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")",...
短文本相似度接口 短文本相似度接口用来判断两个文本的相似度得分。 @param text1 - 待比较文本1(GBK编码),最大512字节* @param text2 - 待比较文本2(GBK编码),最大512字节 @param options - 可选参数对象,key: value都为string类型 options - options列表: model 默认为"BOW",可选"BOW"、"CNN"与"GRNN" @return JSONObject
[ "短文本相似度接口", "短文本相似度接口用来判断两个文本的相似度得分。" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/nlp/AipNlp.java#L204-L221
ebean-orm/ebean-querybean
src/main/java/io/ebean/typequery/TQRootBean.java
TQRootBean.textSimple
public R textSimple(String query, TextSimple options) { """ Add a Text simple expression (document store only). <p> This automatically makes the query a document store query. </p> """ peekExprList().textSimple(query, options); return root; }
java
public R textSimple(String query, TextSimple options) { peekExprList().textSimple(query, options); return root; }
[ "public", "R", "textSimple", "(", "String", "query", ",", "TextSimple", "options", ")", "{", "peekExprList", "(", ")", ".", "textSimple", "(", "query", ",", "options", ")", ";", "return", "root", ";", "}" ]
Add a Text simple expression (document store only). <p> This automatically makes the query a document store query. </p>
[ "Add", "a", "Text", "simple", "expression", "(", "document", "store", "only", ")", ".", "<p", ">", "This", "automatically", "makes", "the", "query", "a", "document", "store", "query", ".", "<", "/", "p", ">" ]
train
https://github.com/ebean-orm/ebean-querybean/blob/821650cb817c9c0fdcc97f93408dc79170b12423/src/main/java/io/ebean/typequery/TQRootBean.java#L1410-L1413
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.logQueryByCommons
public ProxyDataSourceBuilder logQueryByCommons(CommonsLogLevel logLevel, String commonsLoggerName) { """ Register {@link CommonsQueryLoggingListener}. @param logLevel log level for commons @param commonsLoggerName commons logger name @return builder @since 1.3.1 """ this.createCommonsQu...
java
public ProxyDataSourceBuilder logQueryByCommons(CommonsLogLevel logLevel, String commonsLoggerName) { this.createCommonsQueryListener = true; this.commonsLogLevel = logLevel; this.commonsLoggerName = commonsLoggerName; return this; }
[ "public", "ProxyDataSourceBuilder", "logQueryByCommons", "(", "CommonsLogLevel", "logLevel", ",", "String", "commonsLoggerName", ")", "{", "this", ".", "createCommonsQueryListener", "=", "true", ";", "this", ".", "commonsLogLevel", "=", "logLevel", ";", "this", ".", ...
Register {@link CommonsQueryLoggingListener}. @param logLevel log level for commons @param commonsLoggerName commons logger name @return builder @since 1.3.1
[ "Register", "{", "@link", "CommonsQueryLoggingListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L218-L223
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/AlluxioMasterProcess.java
AlluxioMasterProcess.startServing
protected void startServing(String startMessage, String stopMessage) { """ Starts serving, letting {@link MetricsSystem} start sink and starting the web ui server and RPC Server. @param startMessage empty string or the message that the master gains the leadership @param stopMessage empty string or the message...
java
protected void startServing(String startMessage, String stopMessage) { MetricsSystem.startSinks(ServerConfiguration.get(PropertyKey.METRICS_CONF_FILE)); startServingWebServer(); startJvmMonitorProcess(); LOG.info( "Alluxio master version {} started{}. bindAddress={}, connectAddress={}, webAddres...
[ "protected", "void", "startServing", "(", "String", "startMessage", ",", "String", "stopMessage", ")", "{", "MetricsSystem", ".", "startSinks", "(", "ServerConfiguration", ".", "get", "(", "PropertyKey", ".", "METRICS_CONF_FILE", ")", ")", ";", "startServingWebServe...
Starts serving, letting {@link MetricsSystem} start sink and starting the web ui server and RPC Server. @param startMessage empty string or the message that the master gains the leadership @param stopMessage empty string or the message that the master loses the leadership
[ "Starts", "serving", "letting", "{", "@link", "MetricsSystem", "}", "start", "sink", "and", "starting", "the", "web", "ui", "server", "and", "RPC", "Server", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/AlluxioMasterProcess.java#L256-L266