repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 194 | func_name stringlengths 6 111 | whole_func_string stringlengths 80 3.8k | language stringclasses 1
value | func_code_string stringlengths 80 3.8k | func_code_tokens listlengths 20 697 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 434 | split_name stringclasses 1
value | func_code_url stringlengths 111 308 |
|---|---|---|---|---|---|---|---|---|---|---|
oboehm/jfachwert | src/main/java/de/jfachwert/bank/Geldbetrag.java | Geldbetrag.valueOf | public static Geldbetrag valueOf(String other) {
try {
return DEFAULT_FORMATTER.parse(other);
} catch (MonetaryParseException ex) {
throw new IllegalArgumentException(other, ex);
}
} | java | public static Geldbetrag valueOf(String other) {
try {
return DEFAULT_FORMATTER.parse(other);
} catch (MonetaryParseException ex) {
throw new IllegalArgumentException(other, ex);
}
} | [
"public",
"static",
"Geldbetrag",
"valueOf",
"(",
"String",
"other",
")",
"{",
"try",
"{",
"return",
"DEFAULT_FORMATTER",
".",
"parse",
"(",
"other",
")",
";",
"}",
"catch",
"(",
"MonetaryParseException",
"ex",
")",
"{",
"throw",
"new",
"IllegalArgumentExcepti... | Wandelt den angegebenen MonetaryAmount in einen Geldbetrag um. Um die
Anzahl von Objekten gering zu halten, wird nur dann tatsaechlich eine
neues Objekt erzeugt, wenn es sich nicht vermeiden laesst.
<p>
In Anlehnung an {@link BigDecimal} heisst die Methode "valueOf".
</p>
@param other the other
@return ein Geldbetrag | [
"Wandelt",
"den",
"angegebenen",
"MonetaryAmount",
"in",
"einen",
"Geldbetrag",
"um",
".",
"Um",
"die",
"Anzahl",
"von",
"Objekten",
"gering",
"zu",
"halten",
"wird",
"nur",
"dann",
"tatsaechlich",
"eine",
"neues",
"Objekt",
"erzeugt",
"wenn",
"es",
"sich",
"n... | train | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/bank/Geldbetrag.java#L238-L244 |
GoogleCloudPlatform/bigdata-interop | gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageReadChannel.java | GoogleCloudStorageReadChannel.openFooterStream | private InputStream openFooterStream() {
contentChannelPosition = currentPosition;
int offset = Math.toIntExact(currentPosition - (size - footerContent.length));
int length = footerContent.length - offset;
logger.atFine().log(
"Opened stream (prefetched footer) from %s position for '%s'",
... | java | private InputStream openFooterStream() {
contentChannelPosition = currentPosition;
int offset = Math.toIntExact(currentPosition - (size - footerContent.length));
int length = footerContent.length - offset;
logger.atFine().log(
"Opened stream (prefetched footer) from %s position for '%s'",
... | [
"private",
"InputStream",
"openFooterStream",
"(",
")",
"{",
"contentChannelPosition",
"=",
"currentPosition",
";",
"int",
"offset",
"=",
"Math",
".",
"toIntExact",
"(",
"currentPosition",
"-",
"(",
"size",
"-",
"footerContent",
".",
"length",
")",
")",
";",
"... | Opens the underlying stream from {@link #footerContent}, sets its position to the {@link
#currentPosition}. | [
"Opens",
"the",
"underlying",
"stream",
"from",
"{"
] | train | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageReadChannel.java#L865-L873 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/context/configure/AbstractConfiguration.java | AbstractConfiguration.getPropertyValueAs | public <T> T getPropertyValueAs(final String propertyName, final boolean required, final Class<T> type) {
try {
return convert(getPropertyValue(propertyName, required), type);
}
catch (ConversionException e) {
if (required) {
throw new ConfigurationException(String.format(
"Fai... | java | public <T> T getPropertyValueAs(final String propertyName, final boolean required, final Class<T> type) {
try {
return convert(getPropertyValue(propertyName, required), type);
}
catch (ConversionException e) {
if (required) {
throw new ConfigurationException(String.format(
"Fai... | [
"public",
"<",
"T",
">",
"T",
"getPropertyValueAs",
"(",
"final",
"String",
"propertyName",
",",
"final",
"boolean",
"required",
",",
"final",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"try",
"{",
"return",
"convert",
"(",
"getPropertyValue",
"(",
"propert... | Gets the value of the configuration property identified by name as a value of the specified Class type.
The required parameter can be used to indicate the property is not required and that a ConfigurationException
should not be thrown if the property is undeclared or undefined.
@param propertyName a String value indic... | [
"Gets",
"the",
"value",
"of",
"the",
"configuration",
"property",
"identified",
"by",
"name",
"as",
"a",
"value",
"of",
"the",
"specified",
"Class",
"type",
".",
"The",
"required",
"parameter",
"can",
"be",
"used",
"to",
"indicate",
"the",
"property",
"is",
... | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/context/configure/AbstractConfiguration.java#L247-L260 |
BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java | BFS.isEquivalentInTheSet | protected boolean isEquivalentInTheSet(Node node, boolean direction, Set<Node> set)
{
for (Node eq : direction == UPWARD ? node.getUpperEquivalent() : node.getLowerEquivalent())
{
if (set.contains(eq)) return true;
boolean isIn = isEquivalentInTheSet(eq, direction, set);
if (isIn) return true;
}
... | java | protected boolean isEquivalentInTheSet(Node node, boolean direction, Set<Node> set)
{
for (Node eq : direction == UPWARD ? node.getUpperEquivalent() : node.getLowerEquivalent())
{
if (set.contains(eq)) return true;
boolean isIn = isEquivalentInTheSet(eq, direction, set);
if (isIn) return true;
}
... | [
"protected",
"boolean",
"isEquivalentInTheSet",
"(",
"Node",
"node",
",",
"boolean",
"direction",
",",
"Set",
"<",
"Node",
">",
"set",
")",
"{",
"for",
"(",
"Node",
"eq",
":",
"direction",
"==",
"UPWARD",
"?",
"node",
".",
"getUpperEquivalent",
"(",
")",
... | Checks if an equivalent of the given node is in the set.
@param node Node to check equivalents
@param direction Direction to go to get equivalents
@param set Node set
@return true if an equivalent is in the set | [
"Checks",
"if",
"an",
"equivalent",
"of",
"the",
"given",
"node",
"is",
"in",
"the",
"set",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/algorithm/BFS.java#L280-L289 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/LoadJobConfiguration.java | LoadJobConfiguration.newBuilder | public static Builder newBuilder(
TableId destinationTable, List<String> sourceUris, FormatOptions format) {
return newBuilder(destinationTable, sourceUris).setFormatOptions(format);
} | java | public static Builder newBuilder(
TableId destinationTable, List<String> sourceUris, FormatOptions format) {
return newBuilder(destinationTable, sourceUris).setFormatOptions(format);
} | [
"public",
"static",
"Builder",
"newBuilder",
"(",
"TableId",
"destinationTable",
",",
"List",
"<",
"String",
">",
"sourceUris",
",",
"FormatOptions",
"format",
")",
"{",
"return",
"newBuilder",
"(",
"destinationTable",
",",
"sourceUris",
")",
".",
"setFormatOption... | Creates a builder for a BigQuery Load Job configuration given the destination table, format and
source URIs. | [
"Creates",
"a",
"builder",
"for",
"a",
"BigQuery",
"Load",
"Job",
"configuration",
"given",
"the",
"destination",
"table",
"format",
"and",
"source",
"URIs",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/LoadJobConfiguration.java#L517-L520 |
graknlabs/grakn | server/src/server/kb/concept/TypeImpl.java | TypeImpl.checkNonOverlapOfImplicitRelations | private void checkNonOverlapOfImplicitRelations(Schema.ImplicitType implicitType, AttributeType attributeType) {
if (attributes(implicitType).anyMatch(rt -> rt.equals(attributeType))) {
throw TransactionException.duplicateHas(this, attributeType);
}
} | java | private void checkNonOverlapOfImplicitRelations(Schema.ImplicitType implicitType, AttributeType attributeType) {
if (attributes(implicitType).anyMatch(rt -> rt.equals(attributeType))) {
throw TransactionException.duplicateHas(this, attributeType);
}
} | [
"private",
"void",
"checkNonOverlapOfImplicitRelations",
"(",
"Schema",
".",
"ImplicitType",
"implicitType",
",",
"AttributeType",
"attributeType",
")",
"{",
"if",
"(",
"attributes",
"(",
"implicitType",
")",
".",
"anyMatch",
"(",
"rt",
"->",
"rt",
".",
"equals",
... | Checks if the provided AttributeType is already used in an other implicit relation.
@param implicitType The implicit relation to check against.
@param attributeType The AttributeType which should not be in that implicit relation
@throws TransactionException when the AttributeType is already used in another implicit r... | [
"Checks",
"if",
"the",
"provided",
"AttributeType",
"is",
"already",
"used",
"in",
"an",
"other",
"implicit",
"relation",
"."
] | train | https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/kb/concept/TypeImpl.java#L453-L457 |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/validate/ValidationException.java | ValidationException.fromResults | public static ValidationException fromResults(String correlationId, List<ValidationResult> results, boolean strict)
throws ValidationException {
boolean hasErrors = false;
for (ValidationResult result : results) {
if (result.getType() == ValidationResultType.Error)
hasErrors = true;
if (strict && resul... | java | public static ValidationException fromResults(String correlationId, List<ValidationResult> results, boolean strict)
throws ValidationException {
boolean hasErrors = false;
for (ValidationResult result : results) {
if (result.getType() == ValidationResultType.Error)
hasErrors = true;
if (strict && resul... | [
"public",
"static",
"ValidationException",
"fromResults",
"(",
"String",
"correlationId",
",",
"List",
"<",
"ValidationResult",
">",
"results",
",",
"boolean",
"strict",
")",
"throws",
"ValidationException",
"{",
"boolean",
"hasErrors",
"=",
"false",
";",
"for",
"... | Creates a new ValidationException based on errors in validation results. If
validation results have no errors, than null is returned.
@param correlationId (optional) transaction id to trace execution through
call chain.
@param results list of validation results that may contain errors
@param strict true t... | [
"Creates",
"a",
"new",
"ValidationException",
"based",
"on",
"errors",
"in",
"validation",
"results",
".",
"If",
"validation",
"results",
"have",
"no",
"errors",
"than",
"null",
"is",
"returned",
"."
] | train | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/validate/ValidationException.java#L88-L99 |
youngmonkeys/ezyfox-sfs2x | src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/UserZoneEventHandler.java | UserZoneEventHandler.notifyHandlers | private void notifyHandlers(ApiZone apiZone, User sfsUser) {
ApiUser apiUser = fetchUserAgent(sfsUser);
for (ZoneHandlerClass handler : handlers) {
Object userAgent = checkUserAgent(handler, apiUser);
if (!checkHandler(handler, apiZone))
continue;
noti... | java | private void notifyHandlers(ApiZone apiZone, User sfsUser) {
ApiUser apiUser = fetchUserAgent(sfsUser);
for (ZoneHandlerClass handler : handlers) {
Object userAgent = checkUserAgent(handler, apiUser);
if (!checkHandler(handler, apiZone))
continue;
noti... | [
"private",
"void",
"notifyHandlers",
"(",
"ApiZone",
"apiZone",
",",
"User",
"sfsUser",
")",
"{",
"ApiUser",
"apiUser",
"=",
"fetchUserAgent",
"(",
"sfsUser",
")",
";",
"for",
"(",
"ZoneHandlerClass",
"handler",
":",
"handlers",
")",
"{",
"Object",
"userAgent"... | Propagate event to handlers
@param apiZone
api zone reference
@param sfsUser
smartfox user object | [
"Propagate",
"event",
"to",
"handlers"
] | train | https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/serverhandler/UserZoneEventHandler.java#L75-L83 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/script/Script.java | Script.getPubKeyHash | public byte[] getPubKeyHash() throws ScriptException {
if (ScriptPattern.isP2PKH(this))
return ScriptPattern.extractHashFromP2PKH(this);
else if (ScriptPattern.isP2SH(this))
return ScriptPattern.extractHashFromP2SH(this);
else if (ScriptPattern.isP2WH(this))
r... | java | public byte[] getPubKeyHash() throws ScriptException {
if (ScriptPattern.isP2PKH(this))
return ScriptPattern.extractHashFromP2PKH(this);
else if (ScriptPattern.isP2SH(this))
return ScriptPattern.extractHashFromP2SH(this);
else if (ScriptPattern.isP2WH(this))
r... | [
"public",
"byte",
"[",
"]",
"getPubKeyHash",
"(",
")",
"throws",
"ScriptException",
"{",
"if",
"(",
"ScriptPattern",
".",
"isP2PKH",
"(",
"this",
")",
")",
"return",
"ScriptPattern",
".",
"extractHashFromP2PKH",
"(",
"this",
")",
";",
"else",
"if",
"(",
"S... | <p>If the program somehow pays to a hash, returns the hash.</p>
<p>Otherwise this method throws a ScriptException.</p> | [
"<p",
">",
"If",
"the",
"program",
"somehow",
"pays",
"to",
"a",
"hash",
"returns",
"the",
"hash",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/Script.java#L255-L264 |
rzwitserloot/lombok | src/eclipseAgent/lombok/eclipse/agent/PatchVal.java | PatchVal.skipResolveInitializerIfAlreadyCalled | public static TypeBinding skipResolveInitializerIfAlreadyCalled(Expression expr, BlockScope scope) {
if (expr.resolvedType != null) return expr.resolvedType;
try {
return expr.resolveType(scope);
} catch (NullPointerException e) {
return null;
} catch (ArrayIndexOutOfBoundsException e) {
// This will o... | java | public static TypeBinding skipResolveInitializerIfAlreadyCalled(Expression expr, BlockScope scope) {
if (expr.resolvedType != null) return expr.resolvedType;
try {
return expr.resolveType(scope);
} catch (NullPointerException e) {
return null;
} catch (ArrayIndexOutOfBoundsException e) {
// This will o... | [
"public",
"static",
"TypeBinding",
"skipResolveInitializerIfAlreadyCalled",
"(",
"Expression",
"expr",
",",
"BlockScope",
"scope",
")",
"{",
"if",
"(",
"expr",
".",
"resolvedType",
"!=",
"null",
")",
"return",
"expr",
".",
"resolvedType",
";",
"try",
"{",
"retur... | and patches .resolve() on LocalDeclaration itself to just-in-time replace the 'val' vartype with the right one. | [
"and",
"patches",
".",
"resolve",
"()",
"on",
"LocalDeclaration",
"itself",
"to",
"just",
"-",
"in",
"-",
"time",
"replace",
"the",
"val",
"vartype",
"with",
"the",
"right",
"one",
"."
] | train | https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/eclipseAgent/lombok/eclipse/agent/PatchVal.java#L61-L71 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CharsTrieBuilder.java | CharsTrieBuilder.writeDeltaTo | @Deprecated
@Override
protected int writeDeltaTo(int jumpTarget) {
int i=charsLength-jumpTarget;
assert(i>=0);
if(i<=CharsTrie.kMaxOneUnitDelta) {
return write(i);
}
int length;
if(i<=CharsTrie.kMaxTwoUnitDelta) {
intUnits[0]=(char)(CharsTr... | java | @Deprecated
@Override
protected int writeDeltaTo(int jumpTarget) {
int i=charsLength-jumpTarget;
assert(i>=0);
if(i<=CharsTrie.kMaxOneUnitDelta) {
return write(i);
}
int length;
if(i<=CharsTrie.kMaxTwoUnitDelta) {
intUnits[0]=(char)(CharsTr... | [
"@",
"Deprecated",
"@",
"Override",
"protected",
"int",
"writeDeltaTo",
"(",
"int",
"jumpTarget",
")",
"{",
"int",
"i",
"=",
"charsLength",
"-",
"jumpTarget",
";",
"assert",
"(",
"i",
">=",
"0",
")",
";",
"if",
"(",
"i",
"<=",
"CharsTrie",
".",
"kMaxOn... | {@inheritDoc}
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"{"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CharsTrieBuilder.java#L251-L270 |
aws/aws-sdk-java | aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperFieldModel.java | DynamoDBMapperFieldModel.betweenAny | public final Condition betweenAny(final V lo, final V hi) {
return lo == null ? (hi == null ? null : le(hi)) : (hi == null ? ge(lo) : (lo.equals(hi) ? eq(lo) : between(lo,hi)));
} | java | public final Condition betweenAny(final V lo, final V hi) {
return lo == null ? (hi == null ? null : le(hi)) : (hi == null ? ge(lo) : (lo.equals(hi) ? eq(lo) : between(lo,hi)));
} | [
"public",
"final",
"Condition",
"betweenAny",
"(",
"final",
"V",
"lo",
",",
"final",
"V",
"hi",
")",
"{",
"return",
"lo",
"==",
"null",
"?",
"(",
"hi",
"==",
"null",
"?",
"null",
":",
"le",
"(",
"hi",
")",
")",
":",
"(",
"hi",
"==",
"null",
"?"... | Creates a condition which filters on any non-null argument; if {@code lo}
is null a {@code LE} condition is applied on {@code hi}, if {@code hi}
is null a {@code GE} condition is applied on {@code lo}.
@param lo The start of the range (inclusive).
@param hi The end of the range (inclusive).
@return The condition or nul... | [
"Creates",
"a",
"condition",
"which",
"filters",
"on",
"any",
"non",
"-",
"null",
"argument",
";",
"if",
"{"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBMapperFieldModel.java#L385-L387 |
elastic/elasticsearch-hadoop | mr/src/main/java/org/elasticsearch/hadoop/rest/pooling/PooledHttpTransportFactory.java | PooledHttpTransportFactory.borrowFrom | private Transport borrowFrom(TransportPool pool, String hostInfo) {
if (!pool.getJobPoolingKey().equals(jobKey)) {
throw new EsHadoopIllegalArgumentException("PooledTransportFactory found a pool with a different owner than this job. " +
"This could be a different job incorrectly ... | java | private Transport borrowFrom(TransportPool pool, String hostInfo) {
if (!pool.getJobPoolingKey().equals(jobKey)) {
throw new EsHadoopIllegalArgumentException("PooledTransportFactory found a pool with a different owner than this job. " +
"This could be a different job incorrectly ... | [
"private",
"Transport",
"borrowFrom",
"(",
"TransportPool",
"pool",
",",
"String",
"hostInfo",
")",
"{",
"if",
"(",
"!",
"pool",
".",
"getJobPoolingKey",
"(",
")",
".",
"equals",
"(",
"jobKey",
")",
")",
"{",
"throw",
"new",
"EsHadoopIllegalArgumentException",... | Creates a Transport using the given TransportPool.
@param pool Transport is borrowed from
@param hostInfo For logging purposes
@return A Transport backed by a pooled resource | [
"Creates",
"a",
"Transport",
"using",
"the",
"given",
"TransportPool",
"."
] | train | https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/rest/pooling/PooledHttpTransportFactory.java#L101-L114 |
super-csv/super-csv | super-csv/src/main/java/org/supercsv/util/MethodCache.java | MethodCache.getGetMethod | public Method getGetMethod(final Object object, final String fieldName) {
if( object == null ) {
throw new NullPointerException("object should not be null");
} else if( fieldName == null ) {
throw new NullPointerException("fieldName should not be null");
}
Method method = getCache.get(object.getClass()... | java | public Method getGetMethod(final Object object, final String fieldName) {
if( object == null ) {
throw new NullPointerException("object should not be null");
} else if( fieldName == null ) {
throw new NullPointerException("fieldName should not be null");
}
Method method = getCache.get(object.getClass()... | [
"public",
"Method",
"getGetMethod",
"(",
"final",
"Object",
"object",
",",
"final",
"String",
"fieldName",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"object should not be null\"",
")",
";",
"}",
"else... | Returns the getter method for field on an object.
@param object
the object
@param fieldName
the field name
@return the getter associated with the field on the object
@throws NullPointerException
if object or fieldName is null
@throws SuperCsvReflectionException
if the getter doesn't exist or is not visible | [
"Returns",
"the",
"getter",
"method",
"for",
"field",
"on",
"an",
"object",
"."
] | train | https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/util/MethodCache.java#L53-L66 |
salesforce/Argus | ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/AuditResources.java | AuditResources.findByEntityId | @GET
@Path("/entity/{entityid}")
@Description("Returns the audit trail for an entity.")
@Produces(MediaType.APPLICATION_JSON)
public List<AuditDto> findByEntityId(@PathParam("entityid") BigInteger entityid,
@QueryParam("limit") BigInteger limit) {
if (entityid == null || entityid.compare... | java | @GET
@Path("/entity/{entityid}")
@Description("Returns the audit trail for an entity.")
@Produces(MediaType.APPLICATION_JSON)
public List<AuditDto> findByEntityId(@PathParam("entityid") BigInteger entityid,
@QueryParam("limit") BigInteger limit) {
if (entityid == null || entityid.compare... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/entity/{entityid}\"",
")",
"@",
"Description",
"(",
"\"Returns the audit trail for an entity.\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_JSON",
")",
"public",
"List",
"<",
"AuditDto",
">",
"findByEntityId",
"(",
... | Returns the audit record for the given id.
@param entityid The entity Id. Cannot be null.
@param limit max no of records
@return The audit object.
@throws WebApplicationException Throws the exception for invalid input data. | [
"Returns",
"the",
"audit",
"record",
"for",
"the",
"given",
"id",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/AuditResources.java#L75-L95 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/objdetect/Yolo2OutputLayer.java | Yolo2OutputLayer.getConfidenceMatrix | public INDArray getConfidenceMatrix(INDArray networkOutput, int example, int bbNumber){
//Input format: [minibatch, 5B+C, H, W], with order [x,y,w,h,c]
//Therefore: confidences are at depths 4 + bbNumber * 5
INDArray conf = networkOutput.get(point(example), point(4+bbNumber*5), all(), all());
... | java | public INDArray getConfidenceMatrix(INDArray networkOutput, int example, int bbNumber){
//Input format: [minibatch, 5B+C, H, W], with order [x,y,w,h,c]
//Therefore: confidences are at depths 4 + bbNumber * 5
INDArray conf = networkOutput.get(point(example), point(4+bbNumber*5), all(), all());
... | [
"public",
"INDArray",
"getConfidenceMatrix",
"(",
"INDArray",
"networkOutput",
",",
"int",
"example",
",",
"int",
"bbNumber",
")",
"{",
"//Input format: [minibatch, 5B+C, H, W], with order [x,y,w,h,c]",
"//Therefore: confidences are at depths 4 + bbNumber * 5",
"INDArray",
"conf",
... | Get the confidence matrix (confidence for all x/y positions) for the specified bounding box, from the network
output activations array
@param networkOutput Network output activations
@param example Example number, in minibatch
@param bbNumber Bounding box number
@return Confidence matrix | [
"Get",
"the",
"confidence",
"matrix",
"(",
"confidence",
"for",
"all",
"x",
"/",
"y",
"positions",
")",
"for",
"the",
"specified",
"bounding",
"box",
"from",
"the",
"network",
"output",
"activations",
"array"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/objdetect/Yolo2OutputLayer.java#L648-L655 |
scireum/server-sass | src/main/java/org/serversass/Functions.java | Functions.rgba | public static Expression rgba(Generator generator, FunctionCall input) {
if (input.getParameters().size() == 4) {
return new Color(input.getExpectedIntParam(0),
input.getExpectedIntParam(1),
input.getExpectedIntParam(2),
... | java | public static Expression rgba(Generator generator, FunctionCall input) {
if (input.getParameters().size() == 4) {
return new Color(input.getExpectedIntParam(0),
input.getExpectedIntParam(1),
input.getExpectedIntParam(2),
... | [
"public",
"static",
"Expression",
"rgba",
"(",
"Generator",
"generator",
",",
"FunctionCall",
"input",
")",
"{",
"if",
"(",
"input",
".",
"getParameters",
"(",
")",
".",
"size",
"(",
")",
"==",
"4",
")",
"{",
"return",
"new",
"Color",
"(",
"input",
"."... | Creates a color from given RGB and alpha values.
@param generator the surrounding generator
@param input the function call to evaluate
@return the result of the evaluation | [
"Creates",
"a",
"color",
"from",
"given",
"RGB",
"and",
"alpha",
"values",
"."
] | train | https://github.com/scireum/server-sass/blob/e74af983567f10c43420d70cd31165dd080ba8fc/src/main/java/org/serversass/Functions.java#L55-L69 |
CleverTap/clevertap-android-sdk | clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java | CleverTapAPI.pushGcmRegistrationId | @SuppressWarnings("WeakerAccess")
public void pushGcmRegistrationId(String gcmId, boolean register) {
pushDeviceToken(gcmId, register, PushType.GCM);
} | java | @SuppressWarnings("WeakerAccess")
public void pushGcmRegistrationId(String gcmId, boolean register) {
pushDeviceToken(gcmId, register, PushType.GCM);
} | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"public",
"void",
"pushGcmRegistrationId",
"(",
"String",
"gcmId",
",",
"boolean",
"register",
")",
"{",
"pushDeviceToken",
"(",
"gcmId",
",",
"register",
",",
"PushType",
".",
"GCM",
")",
";",
"}"
] | Sends the GCM registration ID to CleverTap.
@param gcmId The GCM registration ID
@param register Boolean indicating whether to register
or not for receiving push messages from CleverTap.
Set this to true to receive push messages from CleverTap,
and false to not receive any messages from CleverTap. | [
"Sends",
"the",
"GCM",
"registration",
"ID",
"to",
"CleverTap",
"."
] | train | https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L4807-L4810 |
jeremylong/DependencyCheck | core/src/main/java/org/owasp/dependencycheck/analyzer/DependencyBundlingAnalyzer.java | DependencyBundlingAnalyzer.hashesMatch | private boolean hashesMatch(Dependency dependency1, Dependency dependency2) {
if (dependency1 == null || dependency2 == null || dependency1.getSha1sum() == null || dependency2.getSha1sum() == null) {
return false;
}
return dependency1.getSha1sum().equals(dependency2.getSha1sum());
... | java | private boolean hashesMatch(Dependency dependency1, Dependency dependency2) {
if (dependency1 == null || dependency2 == null || dependency1.getSha1sum() == null || dependency2.getSha1sum() == null) {
return false;
}
return dependency1.getSha1sum().equals(dependency2.getSha1sum());
... | [
"private",
"boolean",
"hashesMatch",
"(",
"Dependency",
"dependency1",
",",
"Dependency",
"dependency2",
")",
"{",
"if",
"(",
"dependency1",
"==",
"null",
"||",
"dependency2",
"==",
"null",
"||",
"dependency1",
".",
"getSha1sum",
"(",
")",
"==",
"null",
"||",
... | Compares the SHA1 hashes of two dependencies to determine if they are
equal.
@param dependency1 a dependency object to compare
@param dependency2 a dependency object to compare
@return true if the sha1 hashes of the two dependencies match; otherwise
false | [
"Compares",
"the",
"SHA1",
"hashes",
"of",
"two",
"dependencies",
"to",
"determine",
"if",
"they",
"are",
"equal",
"."
] | train | https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/DependencyBundlingAnalyzer.java#L390-L395 |
jcuda/jcuda | JCudaJava/src/main/java/jcuda/runtime/JCuda.java | JCuda.cudaGraphicsUnmapResources | public static int cudaGraphicsUnmapResources(int count, cudaGraphicsResource resources[], cudaStream_t stream)
{
return checkResult(cudaGraphicsUnmapResourcesNative(count, resources, stream));
} | java | public static int cudaGraphicsUnmapResources(int count, cudaGraphicsResource resources[], cudaStream_t stream)
{
return checkResult(cudaGraphicsUnmapResourcesNative(count, resources, stream));
} | [
"public",
"static",
"int",
"cudaGraphicsUnmapResources",
"(",
"int",
"count",
",",
"cudaGraphicsResource",
"resources",
"[",
"]",
",",
"cudaStream_t",
"stream",
")",
"{",
"return",
"checkResult",
"(",
"cudaGraphicsUnmapResourcesNative",
"(",
"count",
",",
"resources",... | Unmap graphics resources.
<pre>
cudaError_t cudaGraphicsUnmapResources (
int count,
cudaGraphicsResource_t* resources,
cudaStream_t stream = 0 )
</pre>
<div>
<p>Unmap graphics resources. Unmaps the
<tt>count</tt> graphics resources in <tt>resources</tt>.
</p>
<p>Once unmapped, the resources in <tt>resources</tt> may... | [
"Unmap",
"graphics",
"resources",
"."
] | train | https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L11559-L11562 |
dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/DateControl.java | DateControl.setDefaultCalendarProvider | public final void setDefaultCalendarProvider(Callback<DateControl, Calendar> provider) {
requireNonNull(provider);
defaultCalendarProviderProperty().set(provider);
} | java | public final void setDefaultCalendarProvider(Callback<DateControl, Calendar> provider) {
requireNonNull(provider);
defaultCalendarProviderProperty().set(provider);
} | [
"public",
"final",
"void",
"setDefaultCalendarProvider",
"(",
"Callback",
"<",
"DateControl",
",",
"Calendar",
">",
"provider",
")",
"{",
"requireNonNull",
"(",
"provider",
")",
";",
"defaultCalendarProviderProperty",
"(",
")",
".",
"set",
"(",
"provider",
")",
... | Sets the value of {@link #defaultCalendarProviderProperty()}.
@param provider the default calendar provider | [
"Sets",
"the",
"value",
"of",
"{",
"@link",
"#defaultCalendarProviderProperty",
"()",
"}",
"."
] | train | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/DateControl.java#L1383-L1386 |
deephacks/confit | api-model/src/main/java/org/deephacks/confit/model/Bean.java | Bean.addProperty | public void addProperty(final String propertyName, final String value) {
Preconditions.checkNotNull(propertyName);
Preconditions.checkNotNull(value);
List<String> values = properties.get(propertyName);
if (values == null) {
values = new ArrayList<>();
values.add(v... | java | public void addProperty(final String propertyName, final String value) {
Preconditions.checkNotNull(propertyName);
Preconditions.checkNotNull(value);
List<String> values = properties.get(propertyName);
if (values == null) {
values = new ArrayList<>();
values.add(v... | [
"public",
"void",
"addProperty",
"(",
"final",
"String",
"propertyName",
",",
"final",
"String",
"value",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"propertyName",
")",
";",
"Preconditions",
".",
"checkNotNull",
"(",
"value",
")",
";",
"List",
"<",
... | Add a value to a property on this bean.
@param propertyName name of the property as defined by the bean's schema.
@param value final String representations of the property that conforms to
its type as defined by the bean's schema. | [
"Add",
"a",
"value",
"to",
"a",
"property",
"on",
"this",
"bean",
"."
] | train | https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/api-model/src/main/java/org/deephacks/confit/model/Bean.java#L163-L174 |
ziccardi/jnrpe | jnrpe-lib/src/main/java/it/jnrpe/utils/LoadedClassCache.java | LoadedClassCache.getClass | public static Class getClass(final ClassLoader cl, final String className) throws ClassNotFoundException {
if (LOADED_PLUGINS.get(cl) == null) {
LOADED_PLUGINS.put(cl, new ClassesData());
}
ClassesData cd = LOADED_PLUGINS.get(cl);
Class clazz = cd.getClass(className);
... | java | public static Class getClass(final ClassLoader cl, final String className) throws ClassNotFoundException {
if (LOADED_PLUGINS.get(cl) == null) {
LOADED_PLUGINS.put(cl, new ClassesData());
}
ClassesData cd = LOADED_PLUGINS.get(cl);
Class clazz = cd.getClass(className);
... | [
"public",
"static",
"Class",
"getClass",
"(",
"final",
"ClassLoader",
"cl",
",",
"final",
"String",
"className",
")",
"throws",
"ClassNotFoundException",
"{",
"if",
"(",
"LOADED_PLUGINS",
".",
"get",
"(",
"cl",
")",
"==",
"null",
")",
"{",
"LOADED_PLUGINS",
... | Returns a class object. If the class is new, a new Class object is
created, otherwise the cached object is returned.
@param cl
the classloader
@param className
the class name
@return the class object associated to the given class name * @throws ClassNotFoundException
if the class can't be loaded | [
"Returns",
"a",
"class",
"object",
".",
"If",
"the",
"class",
"is",
"new",
"a",
"new",
"Class",
"object",
"is",
"created",
"otherwise",
"the",
"cached",
"object",
"is",
"returned",
"."
] | train | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/utils/LoadedClassCache.java#L139-L152 |
algolia/instantsearch-android | core/src/main/java/com/algolia/instantsearch/core/utils/JSONUtils.java | JSONUtils.getMapFromJSONPath | public static HashMap<String, String> getMapFromJSONPath(JSONObject record, String path) {
return getObjectFromJSONPath(record, path);
} | java | public static HashMap<String, String> getMapFromJSONPath(JSONObject record, String path) {
return getObjectFromJSONPath(record, path);
} | [
"public",
"static",
"HashMap",
"<",
"String",
",",
"String",
">",
"getMapFromJSONPath",
"(",
"JSONObject",
"record",
",",
"String",
"path",
")",
"{",
"return",
"getObjectFromJSONPath",
"(",
"record",
",",
"path",
")",
";",
"}"
] | Gets a Map of attributes from a json object given a path to traverse.
@param record a JSONObject to traverse.
@param path the json path to follow.
@return the attributes as a {@link HashMap}, or null if it was not found. | [
"Gets",
"a",
"Map",
"of",
"attributes",
"from",
"a",
"json",
"object",
"given",
"a",
"path",
"to",
"traverse",
"."
] | train | https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/utils/JSONUtils.java#L33-L35 |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTOutputStream.java | SRTOutputStream.write | public void write(byte[] b, int off, int len) throws IOException
{
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15
logger.logp(Level.FINE, CLASS_NAME,"write", "Writing");
}
if (_observer != null)
_obser... | java | public void write(byte[] b, int off, int len) throws IOException
{
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15
logger.logp(Level.FINE, CLASS_NAME,"write", "Writing");
}
if (_observer != null)
_obser... | [
"public",
"void",
"write",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"if",
"(",
"com",
".",
"ibm",
".",
"ejs",
".",
"ras",
".",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
... | This method was created in VisualAge.
@param b byte[]
@param off int
@param len int | [
"This",
"method",
"was",
"created",
"in",
"VisualAge",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTOutputStream.java#L120-L129 |
NoraUi/NoraUi | src/main/java/com/github/noraui/application/steps/Step.java | Step.displayMessageAtTheBeginningOfMethod | protected void displayMessageAtTheBeginningOfMethod(String methodName, String act, String concernedActivity, List<String> concernedActivities) {
logger.debug("{} {}: {} with {} concernedActivity(ies)", act, methodName, concernedActivity, concernedActivities.size());
int i = 0;
for (final Stri... | java | protected void displayMessageAtTheBeginningOfMethod(String methodName, String act, String concernedActivity, List<String> concernedActivities) {
logger.debug("{} {}: {} with {} concernedActivity(ies)", act, methodName, concernedActivity, concernedActivities.size());
int i = 0;
for (final Stri... | [
"protected",
"void",
"displayMessageAtTheBeginningOfMethod",
"(",
"String",
"methodName",
",",
"String",
"act",
",",
"String",
"concernedActivity",
",",
"List",
"<",
"String",
">",
"concernedActivities",
")",
"{",
"logger",
".",
"debug",
"(",
"\"{} {}: {} with {} conc... | Displays message (concerned activity and list of authorized activities) at the beginning of method in logs.
@param methodName
is name of java method
@param act
is name of activity
@param concernedActivity
is concerned activity
@param concernedActivities
is a list of authorized activities | [
"Displays",
"message",
"(",
"concerned",
"activity",
"and",
"list",
"of",
"authorized",
"activities",
")",
"at",
"the",
"beginning",
"of",
"method",
"in",
"logs",
"."
] | train | https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L825-L832 |
square/picasso | picasso/src/main/java/com/squareup/picasso3/Picasso.java | Picasso.cancelTag | public void cancelTag(@NonNull Object tag) {
checkMain();
checkNotNull(tag, "tag == null");
List<Action> actions = new ArrayList<>(targetToAction.values());
//noinspection ForLoopReplaceableByForEach
for (int i = 0, n = actions.size(); i < n; i++) {
Action action = actions.get(i);
if (t... | java | public void cancelTag(@NonNull Object tag) {
checkMain();
checkNotNull(tag, "tag == null");
List<Action> actions = new ArrayList<>(targetToAction.values());
//noinspection ForLoopReplaceableByForEach
for (int i = 0, n = actions.size(); i < n; i++) {
Action action = actions.get(i);
if (t... | [
"public",
"void",
"cancelTag",
"(",
"@",
"NonNull",
"Object",
"tag",
")",
"{",
"checkMain",
"(",
")",
";",
"checkNotNull",
"(",
"tag",
",",
"\"tag == null\"",
")",
";",
"List",
"<",
"Action",
">",
"actions",
"=",
"new",
"ArrayList",
"<>",
"(",
"targetToA... | Cancel any existing requests with given tag. You can set a tag
on new requests with {@link RequestCreator#tag(Object)}.
@see RequestCreator#tag(Object) | [
"Cancel",
"any",
"existing",
"requests",
"with",
"given",
"tag",
".",
"You",
"can",
"set",
"a",
"tag",
"on",
"new",
"requests",
"with",
"{",
"@link",
"RequestCreator#tag",
"(",
"Object",
")",
"}",
"."
] | train | https://github.com/square/picasso/blob/89f55b76e3be2b65e5997b7698f782f16f8547e3/picasso/src/main/java/com/squareup/picasso3/Picasso.java#L242-L264 |
sarl/sarl | main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java | SARLRuntime.setDefaultSREInstall | public static void setDefaultSREInstall(ISREInstall sre, IProgressMonitor monitor) throws CoreException {
setDefaultSREInstall(sre, monitor, true);
} | java | public static void setDefaultSREInstall(ISREInstall sre, IProgressMonitor monitor) throws CoreException {
setDefaultSREInstall(sre, monitor, true);
} | [
"public",
"static",
"void",
"setDefaultSREInstall",
"(",
"ISREInstall",
"sre",
",",
"IProgressMonitor",
"monitor",
")",
"throws",
"CoreException",
"{",
"setDefaultSREInstall",
"(",
"sre",
",",
"monitor",
",",
"true",
")",
";",
"}"
] | Sets a SRE as the system-wide default SRE, and notifies registered SRE install
change listeners of the change.
@param sre The SRE to make the default. May be <code>null</code> to clear
the default.
@param monitor progress monitor or <code>null</code>
@throws CoreException if trying to set the default SRE install encou... | [
"Sets",
"a",
"SRE",
"as",
"the",
"system",
"-",
"wide",
"default",
"SRE",
"and",
"notifies",
"registered",
"SRE",
"install",
"change",
"listeners",
"of",
"the",
"change",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/SARLRuntime.java#L345-L347 |
Javacord/Javacord | javacord-core/src/main/java/org/javacord/core/util/event/EventDispatcherBase.java | EventDispatcherBase.dispatchEvent | protected <T> void dispatchEvent(DispatchQueueSelector queueSelector, List<T> listeners, Consumer<T> consumer) {
api.getThreadPool().getSingleThreadExecutorService("Event Dispatch Queues Manager").submit(() -> {
if (queueSelector != null) { // Object dependent listeners
// Don't allo... | java | protected <T> void dispatchEvent(DispatchQueueSelector queueSelector, List<T> listeners, Consumer<T> consumer) {
api.getThreadPool().getSingleThreadExecutorService("Event Dispatch Queues Manager").submit(() -> {
if (queueSelector != null) { // Object dependent listeners
// Don't allo... | [
"protected",
"<",
"T",
">",
"void",
"dispatchEvent",
"(",
"DispatchQueueSelector",
"queueSelector",
",",
"List",
"<",
"T",
">",
"listeners",
",",
"Consumer",
"<",
"T",
">",
"consumer",
")",
"{",
"api",
".",
"getThreadPool",
"(",
")",
".",
"getSingleThreadExe... | Dispatches an event to the given listeners using the provided consumer.
Calling this method usually looks like this:
{@code dispatchEvent(server, listeners, listener -> listener.onXyz(event));}
@param queueSelector The object which is used to determine in which queue the event should be dispatched. Usually
the object ... | [
"Dispatches",
"an",
"event",
"to",
"the",
"given",
"listeners",
"using",
"the",
"provided",
"consumer",
".",
"Calling",
"this",
"method",
"usually",
"looks",
"like",
"this",
":",
"{",
"@code",
"dispatchEvent",
"(",
"server",
"listeners",
"listener",
"-",
">",
... | train | https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/util/event/EventDispatcherBase.java#L181-L200 |
apache/flink | flink-core/src/main/java/org/apache/flink/configuration/Configuration.java | Configuration.getEnum | @PublicEvolving
public <T extends Enum<T>> T getEnum(
final Class<T> enumClass,
final ConfigOption<String> configOption) {
checkNotNull(enumClass, "enumClass must not be null");
checkNotNull(configOption, "configOption must not be null");
final String configValue = getString(configOption);
try {
retu... | java | @PublicEvolving
public <T extends Enum<T>> T getEnum(
final Class<T> enumClass,
final ConfigOption<String> configOption) {
checkNotNull(enumClass, "enumClass must not be null");
checkNotNull(configOption, "configOption must not be null");
final String configValue = getString(configOption);
try {
retu... | [
"@",
"PublicEvolving",
"public",
"<",
"T",
"extends",
"Enum",
"<",
"T",
">",
">",
"T",
"getEnum",
"(",
"final",
"Class",
"<",
"T",
">",
"enumClass",
",",
"final",
"ConfigOption",
"<",
"String",
">",
"configOption",
")",
"{",
"checkNotNull",
"(",
"enumCla... | Returns the value associated with the given config option as an enum.
@param enumClass The return enum class
@param configOption The configuration option
@throws IllegalArgumentException If the string associated with the given config option cannot
be parsed as a value of the provided enum class. | [
"Returns",
"the",
"value",
"associated",
"with",
"the",
"given",
"config",
"option",
"as",
"an",
"enum",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java#L622-L639 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java | TileBoundingBoxUtils.getTileGridWGS84 | public static TileGrid getTileGridWGS84(BoundingBox boundingBox, int zoom) {
int tilesPerLat = tilesPerWGS84LatSide(zoom);
int tilesPerLon = tilesPerWGS84LonSide(zoom);
double tileSizeLat = tileSizeLatPerWGS84Side(tilesPerLat);
double tileSizeLon = tileSizeLonPerWGS84Side(tilesPerLon);
int minX = (int) ((b... | java | public static TileGrid getTileGridWGS84(BoundingBox boundingBox, int zoom) {
int tilesPerLat = tilesPerWGS84LatSide(zoom);
int tilesPerLon = tilesPerWGS84LonSide(zoom);
double tileSizeLat = tileSizeLatPerWGS84Side(tilesPerLat);
double tileSizeLon = tileSizeLonPerWGS84Side(tilesPerLon);
int minX = (int) ((b... | [
"public",
"static",
"TileGrid",
"getTileGridWGS84",
"(",
"BoundingBox",
"boundingBox",
",",
"int",
"zoom",
")",
"{",
"int",
"tilesPerLat",
"=",
"tilesPerWGS84LatSide",
"(",
"zoom",
")",
";",
"int",
"tilesPerLon",
"=",
"tilesPerWGS84LonSide",
"(",
"zoom",
")",
";... | Get the tile grid that includes the entire tile bounding box
@param boundingBox
wgs84 bounding box
@param zoom
zoom level
@return tile grid
@since 1.2.0 | [
"Get",
"the",
"tile",
"grid",
"that",
"includes",
"the",
"entire",
"tile",
"bounding",
"box"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1135-L1164 |
aehrc/ontology-core | ontology-import/src/main/java/au/csiro/ontology/importer/rf2/RF2Importer.java | RF2Importer.getOntologyBuilder | protected OntologyBuilder getOntologyBuilder(VersionRows vr, String rootModuleId, String rootModuleVersion,
Map<String, String> metadata) {
return new OntologyBuilder(vr, rootModuleId, rootModuleVersion, metadata);
} | java | protected OntologyBuilder getOntologyBuilder(VersionRows vr, String rootModuleId, String rootModuleVersion,
Map<String, String> metadata) {
return new OntologyBuilder(vr, rootModuleId, rootModuleVersion, metadata);
} | [
"protected",
"OntologyBuilder",
"getOntologyBuilder",
"(",
"VersionRows",
"vr",
",",
"String",
"rootModuleId",
",",
"String",
"rootModuleVersion",
",",
"Map",
"<",
"String",
",",
"String",
">",
"metadata",
")",
"{",
"return",
"new",
"OntologyBuilder",
"(",
"vr",
... | Hook method for subclasses to override.
@param vr
@param rootModuleId
@param rootModuleVersion
@param includeInactiveAxioms
@return | [
"Hook",
"method",
"for",
"subclasses",
"to",
"override",
"."
] | train | https://github.com/aehrc/ontology-core/blob/446aa691119f2bbcb8d184566084b8da7a07a44e/ontology-import/src/main/java/au/csiro/ontology/importer/rf2/RF2Importer.java#L663-L666 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java | OjbTagsHandler.processNested | public String processNested(Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
XClass type = OjbMemberTagsHandler.getMemberType();
int dim = OjbMemberTagsHandler.getMemberDimension();
NestedDef nestedD... | java | public String processNested(Properties attributes) throws XDocletException
{
String name = OjbMemberTagsHandler.getMemberName();
XClass type = OjbMemberTagsHandler.getMemberType();
int dim = OjbMemberTagsHandler.getMemberDimension();
NestedDef nestedD... | [
"public",
"String",
"processNested",
"(",
"Properties",
"attributes",
")",
"throws",
"XDocletException",
"{",
"String",
"name",
"=",
"OjbMemberTagsHandler",
".",
"getMemberName",
"(",
")",
";",
"XClass",
"type",
"=",
"OjbMemberTagsHandler",
".",
"getMemberType",
"("... | Addes the current member as a nested object.
@param template The template
@param attributes The attributes of the tag
@exception XDocletException If an error occurs
@doc.tag type="content" | [
"Addes",
"the",
"current",
"member",
"as",
"a",
"nested",
"object",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L1084-L1127 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLOutputUtil.java | XMLOutputUtil.writeElementList | public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterator<String> listValueIterator)
throws IOException {
while (listValueIterator.hasNext()) {
xmlOutput.openTag(tagName);
xmlOutput.writeText(listValueIterator.next());
xmlOutput.closeTag(ta... | java | public static void writeElementList(XMLOutput xmlOutput, String tagName, Iterator<String> listValueIterator)
throws IOException {
while (listValueIterator.hasNext()) {
xmlOutput.openTag(tagName);
xmlOutput.writeText(listValueIterator.next());
xmlOutput.closeTag(ta... | [
"public",
"static",
"void",
"writeElementList",
"(",
"XMLOutput",
"xmlOutput",
",",
"String",
"tagName",
",",
"Iterator",
"<",
"String",
">",
"listValueIterator",
")",
"throws",
"IOException",
"{",
"while",
"(",
"listValueIterator",
".",
"hasNext",
"(",
")",
")"... | Write a list of Strings to document as elements with given tag name.
@param xmlOutput
the XMLOutput object to write to
@param tagName
the tag name
@param listValueIterator
Iterator over String values to write | [
"Write",
"a",
"list",
"of",
"Strings",
"to",
"document",
"as",
"elements",
"with",
"given",
"tag",
"name",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLOutputUtil.java#L58-L65 |
threerings/narya | core/src/main/java/com/threerings/presents/data/TimeBaseObject.java | TimeBaseObject.getDelta | protected long getDelta (long timeStamp, long maxValue)
{
boolean even = (evenBase > oddBase);
long base = even ? evenBase : oddBase;
long delta = timeStamp - base;
// make sure this timestamp is not sufficiently old that we can't
// generate a delta time with it
if ... | java | protected long getDelta (long timeStamp, long maxValue)
{
boolean even = (evenBase > oddBase);
long base = even ? evenBase : oddBase;
long delta = timeStamp - base;
// make sure this timestamp is not sufficiently old that we can't
// generate a delta time with it
if ... | [
"protected",
"long",
"getDelta",
"(",
"long",
"timeStamp",
",",
"long",
"maxValue",
")",
"{",
"boolean",
"even",
"=",
"(",
"evenBase",
">",
"oddBase",
")",
";",
"long",
"base",
"=",
"even",
"?",
"evenBase",
":",
"oddBase",
";",
"long",
"delta",
"=",
"t... | Obtains a delta with the specified maximum value, swapping from
even to odd, if necessary. | [
"Obtains",
"a",
"delta",
"with",
"the",
"specified",
"maximum",
"value",
"swapping",
"from",
"even",
"to",
"odd",
"if",
"necessary",
"."
] | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/data/TimeBaseObject.java#L103-L132 |
lucee/Lucee | core/src/main/java/lucee/runtime/PageSourcePool.java | PageSourcePool.getPageSource | public PageSource getPageSource(String key, boolean updateAccesTime) { // DO NOT CHANGE INTERFACE (used by Argus Monitor)
PageSource ps = pageSources.get(key.toLowerCase());
if (ps == null) return null;
if (updateAccesTime) ps.setLastAccessTime();
return ps;
} | java | public PageSource getPageSource(String key, boolean updateAccesTime) { // DO NOT CHANGE INTERFACE (used by Argus Monitor)
PageSource ps = pageSources.get(key.toLowerCase());
if (ps == null) return null;
if (updateAccesTime) ps.setLastAccessTime();
return ps;
} | [
"public",
"PageSource",
"getPageSource",
"(",
"String",
"key",
",",
"boolean",
"updateAccesTime",
")",
"{",
"// DO NOT CHANGE INTERFACE (used by Argus Monitor)",
"PageSource",
"ps",
"=",
"pageSources",
".",
"get",
"(",
"key",
".",
"toLowerCase",
"(",
")",
")",
";",
... | return pages matching to key
@param key key for the page
@param updateAccesTime define if do update access time
@return page | [
"return",
"pages",
"matching",
"to",
"key"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/PageSourcePool.java#L67-L72 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java | EnhancedBigtableStub.createSampleRowKeysCallable | private UnaryCallable<String, List<KeyOffset>> createSampleRowKeysCallable() {
UnaryCallable<SampleRowKeysRequest, List<SampleRowKeysResponse>> spoolable =
stub.sampleRowKeysCallable().all();
UnaryCallable<SampleRowKeysRequest, List<SampleRowKeysResponse>> retryable =
Callables.retrying(spoolab... | java | private UnaryCallable<String, List<KeyOffset>> createSampleRowKeysCallable() {
UnaryCallable<SampleRowKeysRequest, List<SampleRowKeysResponse>> spoolable =
stub.sampleRowKeysCallable().all();
UnaryCallable<SampleRowKeysRequest, List<SampleRowKeysResponse>> retryable =
Callables.retrying(spoolab... | [
"private",
"UnaryCallable",
"<",
"String",
",",
"List",
"<",
"KeyOffset",
">",
">",
"createSampleRowKeysCallable",
"(",
")",
"{",
"UnaryCallable",
"<",
"SampleRowKeysRequest",
",",
"List",
"<",
"SampleRowKeysResponse",
">",
">",
"spoolable",
"=",
"stub",
".",
"s... | Creates a callable chain to handle SampleRowKeys RPcs. The chain will:
<ul>
<li>Convert a table id to a {@link com.google.bigtable.v2.SampleRowKeysRequest}.
<li>Dispatch the request to the GAPIC's {@link BigtableStub#sampleRowKeysCallable()}.
<li>Spool responses into a list.
<li>Retry on failure.
<li>Convert the respo... | [
"Creates",
"a",
"callable",
"chain",
"to",
"handle",
"SampleRowKeys",
"RPcs",
".",
"The",
"chain",
"will",
":"
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java#L279-L288 |
zaproxy/zaproxy | src/org/parosproxy/paros/core/scanner/VariantURLQuery.java | VariantURLQuery.getEscapedValue | @Override
protected String getEscapedValue(HttpMessage msg, String value) {
// ZAP: unfortunately the method setQuery() defined inside the httpclient Apache component
// create trouble when special characters like ?+? are set inside the parameter,
// because this method implementation s... | java | @Override
protected String getEscapedValue(HttpMessage msg, String value) {
// ZAP: unfortunately the method setQuery() defined inside the httpclient Apache component
// create trouble when special characters like ?+? are set inside the parameter,
// because this method implementation s... | [
"@",
"Override",
"protected",
"String",
"getEscapedValue",
"(",
"HttpMessage",
"msg",
",",
"String",
"value",
")",
"{",
"// ZAP: unfortunately the method setQuery() defined inside the httpclient Apache component\r",
"// create trouble when special characters like ?+? are set inside the p... | Encode the parameter for a correct URL introduction
@param msg the message object
@param value the value that need to be encoded
@return the Encoded value | [
"Encode",
"the",
"parameter",
"for",
"a",
"correct",
"URL",
"introduction"
] | train | https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/core/scanner/VariantURLQuery.java#L51-L59 |
datasift/datasift-java | src/main/java/com/datasift/client/accounts/DataSiftAccount.java | DataSiftAccount.getToken | public FutureData<Token> getToken(String identity, String service) {
FutureData<Token> future = new FutureData<>();
URI uri = newParams().put("id", identity)
.forURL(config.newAPIEndpointURI(IDENTITY + "/" + identity + "/token/" + service));
Request request = config.http().
... | java | public FutureData<Token> getToken(String identity, String service) {
FutureData<Token> future = new FutureData<>();
URI uri = newParams().put("id", identity)
.forURL(config.newAPIEndpointURI(IDENTITY + "/" + identity + "/token/" + service));
Request request = config.http().
... | [
"public",
"FutureData",
"<",
"Token",
">",
"getToken",
"(",
"String",
"identity",
",",
"String",
"service",
")",
"{",
"FutureData",
"<",
"Token",
">",
"future",
"=",
"new",
"FutureData",
"<>",
"(",
")",
";",
"URI",
"uri",
"=",
"newParams",
"(",
")",
".... | /*
Fetch a token using it's service ID and it's Identity's ID
@param identity the ID of the identity to query
@param service the service of the token to fetch
@return The identity for the ID provided | [
"/",
"*",
"Fetch",
"a",
"token",
"using",
"it",
"s",
"service",
"ID",
"and",
"it",
"s",
"Identity",
"s",
"ID"
] | train | https://github.com/datasift/datasift-java/blob/09de124f2a1a507ff6181e59875c6f325290850e/src/main/java/com/datasift/client/accounts/DataSiftAccount.java#L209-L217 |
apache/incubator-heron | heron/spi/src/java/org/apache/heron/spi/utils/NetworkUtils.java | NetworkUtils.getInetSocketAddress | public static InetSocketAddress getInetSocketAddress(String endpoint) {
String[] array = endpoint.split(":");
return new InetSocketAddress(array[0], Integer.parseInt(array[1]));
} | java | public static InetSocketAddress getInetSocketAddress(String endpoint) {
String[] array = endpoint.split(":");
return new InetSocketAddress(array[0], Integer.parseInt(array[1]));
} | [
"public",
"static",
"InetSocketAddress",
"getInetSocketAddress",
"(",
"String",
"endpoint",
")",
"{",
"String",
"[",
"]",
"array",
"=",
"endpoint",
".",
"split",
"(",
"\":\"",
")",
";",
"return",
"new",
"InetSocketAddress",
"(",
"array",
"[",
"0",
"]",
",",
... | Convert an endpoint from String (host:port) to InetSocketAddress
@param endpoint a String in (host:port) format
@return an InetSocketAddress representing the endpoint | [
"Convert",
"an",
"endpoint",
"from",
"String",
"(",
"host",
":",
"port",
")",
"to",
"InetSocketAddress"
] | train | https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/utils/NetworkUtils.java#L534-L537 |
geomajas/geomajas-project-client-gwt | common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java | HtmlBuilder.trClass | public static String trClass(String clazz, String... content) {
return tagClass(Html.Tag.TR, clazz, content);
} | java | public static String trClass(String clazz, String... content) {
return tagClass(Html.Tag.TR, clazz, content);
} | [
"public",
"static",
"String",
"trClass",
"(",
"String",
"clazz",
",",
"String",
"...",
"content",
")",
"{",
"return",
"tagClass",
"(",
"Html",
".",
"Tag",
".",
"TR",
",",
"clazz",
",",
"content",
")",
";",
"}"
] | Build a HTML TableRow with given CSS class for a string.
Given content does <b>not</b> consists of HTML snippets and
as such is being prepared with {@link HtmlBuilder#htmlEncode(String)}.
@param clazz class for tr element
@param content content string
@return HTML tr element as string | [
"Build",
"a",
"HTML",
"TableRow",
"with",
"given",
"CSS",
"class",
"for",
"a",
"string",
".",
"Given",
"content",
"does",
"<b",
">",
"not<",
"/",
"b",
">",
"consists",
"of",
"HTML",
"snippets",
"and",
"as",
"such",
"is",
"being",
"prepared",
"with",
"{... | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L140-L142 |
redkale/redkale | src/org/redkale/net/http/HttpRequest.java | HttpRequest.getHeader | public String getHeader(String name, String defaultValue) {
return header.getValue(name, defaultValue);
} | java | public String getHeader(String name, String defaultValue) {
return header.getValue(name, defaultValue);
} | [
"public",
"String",
"getHeader",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"return",
"header",
".",
"getValue",
"(",
"name",
",",
"defaultValue",
")",
";",
"}"
] | 获取指定的header值, 没有返回默认值
@param name header名
@param defaultValue 默认值
@return header值 | [
"获取指定的header值",
"没有返回默认值"
] | train | https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpRequest.java#L1016-L1018 |
tvesalainen/util | util/src/main/java/org/vesalainen/bean/BeanHelper.java | BeanHelper.getField | public static Field getField(Class cls, String fieldname) throws NoSuchFieldException
{
while (true)
{
try
{
return cls.getDeclaredField(fieldname);
}
catch (NoSuchFieldException ex)
{
cls = cls.get... | java | public static Field getField(Class cls, String fieldname) throws NoSuchFieldException
{
while (true)
{
try
{
return cls.getDeclaredField(fieldname);
}
catch (NoSuchFieldException ex)
{
cls = cls.get... | [
"public",
"static",
"Field",
"getField",
"(",
"Class",
"cls",
",",
"String",
"fieldname",
")",
"throws",
"NoSuchFieldException",
"{",
"while",
"(",
"true",
")",
"{",
"try",
"{",
"return",
"cls",
".",
"getDeclaredField",
"(",
"fieldname",
")",
";",
"}",
"ca... | Returns Declared field either from given class or it's super class
@param cls
@param fieldname
@return
@throws NoSuchFieldException | [
"Returns",
"Declared",
"field",
"either",
"from",
"given",
"class",
"or",
"it",
"s",
"super",
"class"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/bean/BeanHelper.java#L269-L290 |
JadiraOrg/jadira | cloning/src/main/java/org/jadira/reflection/core/misc/ClassUtils.java | ClassUtils.collectFields | public static Field[] collectFields(Class<?> c, int inclusiveModifiers, int exclusiveModifiers) {
return collectFields(c, inclusiveModifiers, exclusiveModifiers, Object.class);
} | java | public static Field[] collectFields(Class<?> c, int inclusiveModifiers, int exclusiveModifiers) {
return collectFields(c, inclusiveModifiers, exclusiveModifiers, Object.class);
} | [
"public",
"static",
"Field",
"[",
"]",
"collectFields",
"(",
"Class",
"<",
"?",
">",
"c",
",",
"int",
"inclusiveModifiers",
",",
"int",
"exclusiveModifiers",
")",
"{",
"return",
"collectFields",
"(",
"c",
",",
"inclusiveModifiers",
",",
"exclusiveModifiers",
"... | Produces an array with all the instance fields of the specified class which match the supplied rules
@param c The class specified
@param inclusiveModifiers An int indicating the {@link Modifier}s that may be applied
@param exclusiveModifiers An int indicating the {@link Modifier}s that must be excluded
@return The arra... | [
"Produces",
"an",
"array",
"with",
"all",
"the",
"instance",
"fields",
"of",
"the",
"specified",
"class",
"which",
"match",
"the",
"supplied",
"rules"
] | train | https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/core/misc/ClassUtils.java#L203-L206 |
RestComm/sip-servlets | containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java | SipNamingContextListener.removeSipFactory | public static void removeSipFactory(Context envCtx, String appName, SipFactory sipFactory) {
if(envCtx != null) {
try {
javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName);
sipContext.unbind(SIP_FACTORY_JNDI_NAME);
} catch (NamingException e) {
... | java | public static void removeSipFactory(Context envCtx, String appName, SipFactory sipFactory) {
if(envCtx != null) {
try {
javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName);
sipContext.unbind(SIP_FACTORY_JNDI_NAME);
} catch (NamingException e) {
... | [
"public",
"static",
"void",
"removeSipFactory",
"(",
"Context",
"envCtx",
",",
"String",
"appName",
",",
"SipFactory",
"sipFactory",
")",
"{",
"if",
"(",
"envCtx",
"!=",
"null",
")",
"{",
"try",
"{",
"javax",
".",
"naming",
".",
"Context",
"sipContext",
"=... | Removes the sip factory binding from the jndi mapping
@param appName the application name subcontext
@param sipFactory the sip factory to remove | [
"Removes",
"the",
"sip",
"factory",
"binding",
"from",
"the",
"jndi",
"mapping"
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L295-L304 |
roboconf/roboconf-platform | core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/reconfigurables/ReconfigurableClient.java | ReconfigurableClient.switchMessagingType | public void switchMessagingType( String factoryName ) {
// Create a new client
this.logger.fine( "The messaging is requested to switch its type to " + factoryName + "." );
JmxWrapperForMessagingClient newMessagingClient = null;
try {
IMessagingClient rawClient = createMessagingClient( factoryName );
if( ... | java | public void switchMessagingType( String factoryName ) {
// Create a new client
this.logger.fine( "The messaging is requested to switch its type to " + factoryName + "." );
JmxWrapperForMessagingClient newMessagingClient = null;
try {
IMessagingClient rawClient = createMessagingClient( factoryName );
if( ... | [
"public",
"void",
"switchMessagingType",
"(",
"String",
"factoryName",
")",
"{",
"// Create a new client",
"this",
".",
"logger",
".",
"fine",
"(",
"\"The messaging is requested to switch its type to \"",
"+",
"factoryName",
"+",
"\".\"",
")",
";",
"JmxWrapperForMessaging... | Changes the internal messaging client.
@param factoryName the factory name (see {@link MessagingConstants}) | [
"Changes",
"the",
"internal",
"messaging",
"client",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/reconfigurables/ReconfigurableClient.java#L160-L206 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java | ArabicShaping.deshapeNormalize | private int deshapeNormalize(char[] dest, int start, int length) {
int lacount = 0;
int yehHamzaComposeEnabled = 0;
int seenComposeEnabled = 0;
yehHamzaComposeEnabled = ((options&YEHHAMZA_MASK) == YEHHAMZA_TWOCELL_NEAR) ? 1 : 0;
seenComposeEnabled = ((options&SEEN_MASK) == SEEN_... | java | private int deshapeNormalize(char[] dest, int start, int length) {
int lacount = 0;
int yehHamzaComposeEnabled = 0;
int seenComposeEnabled = 0;
yehHamzaComposeEnabled = ((options&YEHHAMZA_MASK) == YEHHAMZA_TWOCELL_NEAR) ? 1 : 0;
seenComposeEnabled = ((options&SEEN_MASK) == SEEN_... | [
"private",
"int",
"deshapeNormalize",
"(",
"char",
"[",
"]",
"dest",
",",
"int",
"start",
",",
"int",
"length",
")",
"{",
"int",
"lacount",
"=",
"0",
";",
"int",
"yehHamzaComposeEnabled",
"=",
"0",
";",
"int",
"seenComposeEnabled",
"=",
"0",
";",
"yehHam... | /*
Name : deshapeNormalize
Function: Convert the input buffer from FExx Range into 06xx Range
even the lamalef is converted to the special region in the 06xx range.
According to the options the user enters, all seen family characters
followed by a tail character are merged to seen tail family character and
any yeh f... | [
"/",
"*",
"Name",
":",
"deshapeNormalize",
"Function",
":",
"Convert",
"the",
"input",
"buffer",
"from",
"FExx",
"Range",
"into",
"06xx",
"Range",
"even",
"the",
"lamalef",
"is",
"converted",
"to",
"the",
"special",
"region",
"in",
"the",
"06xx",
"range",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java#L1587-L1614 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | DefaultGroovyMethods.findIndexValues | public static <T> List<Number> findIndexValues(Iterable<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) {
return findIndexValues(self, 0, condition);
} | java | public static <T> List<Number> findIndexValues(Iterable<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) {
return findIndexValues(self, 0, condition);
} | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"Number",
">",
"findIndexValues",
"(",
"Iterable",
"<",
"T",
">",
"self",
",",
"@",
"ClosureParams",
"(",
"FirstParam",
".",
"FirstGenericType",
".",
"class",
")",
"Closure",
"condition",
")",
"{",
"return",
... | Iterates over the elements of an Iterable and returns
the index values of the items that match the condition specified in the closure.
@param self an Iterable
@param condition the matching condition
@return a list of numbers corresponding to the index values of all matched objects
@since 2.5.0 | [
"Iterates",
"over",
"the",
"elements",
"of",
"an",
"Iterable",
"and",
"returns",
"the",
"index",
"values",
"of",
"the",
"items",
"that",
"match",
"the",
"condition",
"specified",
"in",
"the",
"closure",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L17013-L17015 |
raydac/java-binary-block-parser | jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java | JBBPUtils.ulong2str | public static String ulong2str(final long ulongValue, final int radix, final char[] charBuffer) {
if (radix < 2 || radix > 36) {
throw new IllegalArgumentException("Illegal radix [" + radix + ']');
}
if (ulongValue == 0) {
return "0";
} else {
final String result;
if (ulongValue... | java | public static String ulong2str(final long ulongValue, final int radix, final char[] charBuffer) {
if (radix < 2 || radix > 36) {
throw new IllegalArgumentException("Illegal radix [" + radix + ']');
}
if (ulongValue == 0) {
return "0";
} else {
final String result;
if (ulongValue... | [
"public",
"static",
"String",
"ulong2str",
"(",
"final",
"long",
"ulongValue",
",",
"final",
"int",
"radix",
",",
"final",
"char",
"[",
"]",
"charBuffer",
")",
"{",
"if",
"(",
"radix",
"<",
"2",
"||",
"radix",
">",
"36",
")",
"{",
"throw",
"new",
"Il... | Convert unsigned long value into string representation with defined radix
base.
@param ulongValue value to be converted in string
@param radix radix base to be used for conversion, must be 2..36
@param charBuffer char buffer to be used for conversion operations, should
be not less than 64 char length, if length i... | [
"Convert",
"unsigned",
"long",
"value",
"into",
"string",
"representation",
"with",
"defined",
"radix",
"base",
"."
] | train | https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java#L773-L800 |
rundeck/rundeck | examples/example-java-step-plugin/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleNodeStepPlugin.java | ExampleNodeStepPlugin.executeNodeStep | public void executeNodeStep(final PluginStepContext context,
final Map<String, Object> configuration,
final INodeEntry entry) throws NodeStepException {
System.out.println("Example node step executing on node: " + entry.getNodename());
Sys... | java | public void executeNodeStep(final PluginStepContext context,
final Map<String, Object> configuration,
final INodeEntry entry) throws NodeStepException {
System.out.println("Example node step executing on node: " + entry.getNodename());
Sys... | [
"public",
"void",
"executeNodeStep",
"(",
"final",
"PluginStepContext",
"context",
",",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"configuration",
",",
"final",
"INodeEntry",
"entry",
")",
"throws",
"NodeStepException",
"{",
"System",
".",
"out",
".",
... | The {@link #performNodeStep(com.dtolabs.rundeck.plugins.step.PluginStepContext,
com.dtolabs.rundeck.core.common.INodeEntry)} method is invoked when your plugin should perform its logic for the
appropriate node. The {@link PluginStepContext} provides access to the configuration of the plugin, and details
about the step... | [
"The",
"{"
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/examples/example-java-step-plugin/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleNodeStepPlugin.java#L129-L141 |
CloudSlang/cs-actions | cs-vmware/src/main/java/io/cloudslang/content/vmware/services/GuestService.java | GuestService.mountTools | public Map<String, String> mountTools(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler()
.getMor(connectionResour... | java | public Map<String, String> mountTools(HttpInputs httpInputs, VmInputs vmInputs) throws Exception {
ConnectionResources connectionResources = new ConnectionResources(httpInputs, vmInputs);
try {
ManagedObjectReference vmMor = new MorObjectHandler()
.getMor(connectionResour... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"mountTools",
"(",
"HttpInputs",
"httpInputs",
",",
"VmInputs",
"vmInputs",
")",
"throws",
"Exception",
"{",
"ConnectionResources",
"connectionResources",
"=",
"new",
"ConnectionResources",
"(",
"httpInputs",
",",
... | Method used to connect to specified data center and start the Install Tools process on virtual machine identified
by the inputs provided.
@param httpInputs Object that has all the inputs necessary to made a connection to data center
@param vmInputs Object that has all the specific inputs necessary to identify the ta... | [
"Method",
"used",
"to",
"connect",
"to",
"specified",
"data",
"center",
"and",
"start",
"the",
"Install",
"Tools",
"process",
"on",
"virtual",
"machine",
"identified",
"by",
"the",
"inputs",
"provided",
"."
] | train | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-vmware/src/main/java/io/cloudslang/content/vmware/services/GuestService.java#L81-L101 |
gosu-lang/gosu-lang | gosu-lab/src/main/java/editor/util/EditorUtilities.java | EditorUtilities.findAncestor | public static <T> T findAncestor( Component start, Class<T> aClass )
{
if( start == null )
{
return null;
}
return findAtOrAbove( start.getParent(), aClass );
} | java | public static <T> T findAncestor( Component start, Class<T> aClass )
{
if( start == null )
{
return null;
}
return findAtOrAbove( start.getParent(), aClass );
} | [
"public",
"static",
"<",
"T",
">",
"T",
"findAncestor",
"(",
"Component",
"start",
",",
"Class",
"<",
"T",
">",
"aClass",
")",
"{",
"if",
"(",
"start",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"findAtOrAbove",
"(",
"start",
".",
... | Finds the first widget above the passed in widget of the given class | [
"Finds",
"the",
"first",
"widget",
"above",
"the",
"passed",
"in",
"widget",
"of",
"the",
"given",
"class"
] | train | https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-lab/src/main/java/editor/util/EditorUtilities.java#L757-L764 |
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.createPrebuiltEntityRole | public UUID createPrebuiltEntityRole(UUID appId, String versionId, UUID entityId, CreatePrebuiltEntityRoleOptionalParameter createPrebuiltEntityRoleOptionalParameter) {
return createPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createPrebuiltEntityRoleOptionalParameter).toBlocking().sin... | java | public UUID createPrebuiltEntityRole(UUID appId, String versionId, UUID entityId, CreatePrebuiltEntityRoleOptionalParameter createPrebuiltEntityRoleOptionalParameter) {
return createPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createPrebuiltEntityRoleOptionalParameter).toBlocking().sin... | [
"public",
"UUID",
"createPrebuiltEntityRole",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"CreatePrebuiltEntityRoleOptionalParameter",
"createPrebuiltEntityRoleOptionalParameter",
")",
"{",
"return",
"createPrebuiltEntityRoleWithServiceResponse... | Create an entity role for an entity in the application.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity model ID.
@param createPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentExcept... | [
"Create",
"an",
"entity",
"role",
"for",
"an",
"entity",
"in",
"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#L8032-L8034 |
dihedron/dihedron-commons | src/main/java/org/dihedron/core/streams/Streams.java | Streams.copy | public static long copy(InputStream input, OutputStream output) throws IOException {
return copy(input, output, false);
} | java | public static long copy(InputStream input, OutputStream output) throws IOException {
return copy(input, output, false);
} | [
"public",
"static",
"long",
"copy",
"(",
"InputStream",
"input",
",",
"OutputStream",
"output",
")",
"throws",
"IOException",
"{",
"return",
"copy",
"(",
"input",
",",
"output",
",",
"false",
")",
";",
"}"
] | Copies all the bytes it can read from the input stream into the output
stream; input and output streams management (opening, flushing, closing)
are all up to the caller.
@param input
an open and ready-to-be-read input stream.
@param output
an open output stream.
@return
the total number of bytes copied.
@throws IOExce... | [
"Copies",
"all",
"the",
"bytes",
"it",
"can",
"read",
"from",
"the",
"input",
"stream",
"into",
"the",
"output",
"stream",
";",
"input",
"and",
"output",
"streams",
"management",
"(",
"opening",
"flushing",
"closing",
")",
"are",
"all",
"up",
"to",
"the",
... | train | https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/core/streams/Streams.java#L56-L58 |
Wadpam/guja | guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java | GeneratedDContactDaoImpl.queryByTags | public Iterable<DContact> queryByTags(Object parent, java.lang.Object tags) {
return queryByField(parent, DContactMapper.Field.TAGS.getFieldName(), tags);
} | java | public Iterable<DContact> queryByTags(Object parent, java.lang.Object tags) {
return queryByField(parent, DContactMapper.Field.TAGS.getFieldName(), tags);
} | [
"public",
"Iterable",
"<",
"DContact",
">",
"queryByTags",
"(",
"Object",
"parent",
",",
"java",
".",
"lang",
".",
"Object",
"tags",
")",
"{",
"return",
"queryByField",
"(",
"parent",
",",
"DContactMapper",
".",
"Field",
".",
"TAGS",
".",
"getFieldName",
"... | query-by method for field tags
@param tags the specified attribute
@return an Iterable of DContacts for the specified tags | [
"query",
"-",
"by",
"method",
"for",
"field",
"tags"
] | train | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-contact/src/main/java/com/wadpam/guja/dao/GeneratedDContactDaoImpl.java#L268-L270 |
apache/groovy | subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java | DateTimeExtensions.downto | public static void downto(Temporal from, Temporal to, Closure closure) {
downto(from, to, defaultUnitFor(from), closure);
} | java | public static void downto(Temporal from, Temporal to, Closure closure) {
downto(from, to, defaultUnitFor(from), closure);
} | [
"public",
"static",
"void",
"downto",
"(",
"Temporal",
"from",
",",
"Temporal",
"to",
",",
"Closure",
"closure",
")",
"{",
"downto",
"(",
"from",
",",
"to",
",",
"defaultUnitFor",
"(",
"from",
")",
",",
"closure",
")",
";",
"}"
] | Iterates from this to the {@code to} {@link java.time.temporal.Temporal}, inclusive, decrementing by one
unit each iteration, calling the closure once per iteration. The closure may accept a single
{@link java.time.temporal.Temporal} argument.
<p>
The particular unit decremented by depends on the specific sub-type of {... | [
"Iterates",
"from",
"this",
"to",
"the",
"{",
"@code",
"to",
"}",
"{",
"@link",
"java",
".",
"time",
".",
"temporal",
".",
"Temporal",
"}",
"inclusive",
"decrementing",
"by",
"one",
"unit",
"each",
"iteration",
"calling",
"the",
"closure",
"once",
"per",
... | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L201-L203 |
netscaler/sdx_nitro | src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_vserver_appflow_config.java | ns_vserver_appflow_config.get_nitro_bulk_response | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
ns_vserver_appflow_config_responses result = (ns_vserver_appflow_config_responses) service.get_payload_formatter().string_to_resource(ns_vserver_appflow_config_responses.class, response);
if(result.error... | java | protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
{
ns_vserver_appflow_config_responses result = (ns_vserver_appflow_config_responses) service.get_payload_formatter().string_to_resource(ns_vserver_appflow_config_responses.class, response);
if(result.error... | [
"protected",
"base_resource",
"[",
"]",
"get_nitro_bulk_response",
"(",
"nitro_service",
"service",
",",
"String",
"response",
")",
"throws",
"Exception",
"{",
"ns_vserver_appflow_config_responses",
"result",
"=",
"(",
"ns_vserver_appflow_config_responses",
")",
"service",
... | <pre>
Converts API response of bulk operation into object and returns the object array in case of get request.
</pre> | [
"<pre",
">",
"Converts",
"API",
"response",
"of",
"bulk",
"operation",
"into",
"object",
"and",
"returns",
"the",
"object",
"array",
"in",
"case",
"of",
"get",
"request",
".",
"<",
"/",
"pre",
">"
] | train | https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_vserver_appflow_config.java#L470-L487 |
netty/netty | resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java | DnsNameResolver.resolveAll | public final Future<List<DnsRecord>> resolveAll(DnsQuestion question) {
return resolveAll(question, EMPTY_ADDITIONALS, executor().<List<DnsRecord>>newPromise());
} | java | public final Future<List<DnsRecord>> resolveAll(DnsQuestion question) {
return resolveAll(question, EMPTY_ADDITIONALS, executor().<List<DnsRecord>>newPromise());
} | [
"public",
"final",
"Future",
"<",
"List",
"<",
"DnsRecord",
">",
">",
"resolveAll",
"(",
"DnsQuestion",
"question",
")",
"{",
"return",
"resolveAll",
"(",
"question",
",",
"EMPTY_ADDITIONALS",
",",
"executor",
"(",
")",
".",
"<",
"List",
"<",
"DnsRecord",
... | Resolves the {@link DnsRecord}s that are matched by the specified {@link DnsQuestion}. Unlike
{@link #query(DnsQuestion)}, this method handles redirection, CNAMEs and multiple name servers.
If the specified {@link DnsQuestion} is {@code A} or {@code AAAA}, this method looks up the configured
{@link HostsFileEntries} be... | [
"Resolves",
"the",
"{",
"@link",
"DnsRecord",
"}",
"s",
"that",
"are",
"matched",
"by",
"the",
"specified",
"{",
"@link",
"DnsQuestion",
"}",
".",
"Unlike",
"{",
"@link",
"#query",
"(",
"DnsQuestion",
")",
"}",
"this",
"method",
"handles",
"redirection",
"... | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java#L711-L713 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java | ApiOvhEmailexchange.organizationName_service_exchangeService_protocol_activeSyncMailNotification_POST | public OvhTask organizationName_service_exchangeService_protocol_activeSyncMailNotification_POST(String organizationName, String exchangeService, Long notifiedAccountId) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification";
StringBuil... | java | public OvhTask organizationName_service_exchangeService_protocol_activeSyncMailNotification_POST(String organizationName, String exchangeService, Long notifiedAccountId) throws IOException {
String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification";
StringBuil... | [
"public",
"OvhTask",
"organizationName_service_exchangeService_protocol_activeSyncMailNotification_POST",
"(",
"String",
"organizationName",
",",
"String",
"exchangeService",
",",
"Long",
"notifiedAccountId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/email/... | Subscribe new address to ActiveSync quarantine notifications
REST: POST /email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification
@param notifiedAccountId [required] Exchange Account Id
@param organizationName [required] The internal name of your exchange organization
@param exch... | [
"Subscribe",
"new",
"address",
"to",
"ActiveSync",
"quarantine",
"notifications"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L2355-L2362 |
lessthanoptimal/BoofCV | main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java | BaseDetectFiducialSquare.prepareForOutput | private void prepareForOutput(Polygon2D_F64 imageShape, Result result) {
// the rotation estimate, apply in counter clockwise direction
// since result.rotation is a clockwise rotation in the visual sense, which
// is CCW on the grid
int rotationCCW = (4-result.rotation)%4;
for (int j = 0; j < rotationCCW; j+... | java | private void prepareForOutput(Polygon2D_F64 imageShape, Result result) {
// the rotation estimate, apply in counter clockwise direction
// since result.rotation is a clockwise rotation in the visual sense, which
// is CCW on the grid
int rotationCCW = (4-result.rotation)%4;
for (int j = 0; j < rotationCCW; j+... | [
"private",
"void",
"prepareForOutput",
"(",
"Polygon2D_F64",
"imageShape",
",",
"Result",
"result",
")",
"{",
"// the rotation estimate, apply in counter clockwise direction",
"// since result.rotation is a clockwise rotation in the visual sense, which",
"// is CCW on the grid",
"int",
... | Takes the found quadrilateral and the computed 3D information and prepares it for output | [
"Takes",
"the",
"found",
"quadrilateral",
"and",
"the",
"computed",
"3D",
"information",
"and",
"prepares",
"it",
"for",
"output"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java#L397-L414 |
joniles/mpxj | src/main/java/net/sf/mpxj/ResourceAssignment.java | ResourceAssignment.setNumber | public void setNumber(int index, Number value)
{
set(selectField(AssignmentFieldLists.CUSTOM_NUMBER, index), value);
} | java | public void setNumber(int index, Number value)
{
set(selectField(AssignmentFieldLists.CUSTOM_NUMBER, index), value);
} | [
"public",
"void",
"setNumber",
"(",
"int",
"index",
",",
"Number",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"AssignmentFieldLists",
".",
"CUSTOM_NUMBER",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set a number value.
@param index number index (1-20)
@param value number value | [
"Set",
"a",
"number",
"value",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ResourceAssignment.java#L1606-L1609 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Duration.java | Duration.minus | public Duration minus(Duration duration) {
long secsToSubtract = duration.getSeconds();
int nanosToSubtract = duration.getNano();
if (secsToSubtract == Long.MIN_VALUE) {
return plus(Long.MAX_VALUE, -nanosToSubtract).plus(1, 0);
}
return plus(-secsToSubtract, -nanosToS... | java | public Duration minus(Duration duration) {
long secsToSubtract = duration.getSeconds();
int nanosToSubtract = duration.getNano();
if (secsToSubtract == Long.MIN_VALUE) {
return plus(Long.MAX_VALUE, -nanosToSubtract).plus(1, 0);
}
return plus(-secsToSubtract, -nanosToS... | [
"public",
"Duration",
"minus",
"(",
"Duration",
"duration",
")",
"{",
"long",
"secsToSubtract",
"=",
"duration",
".",
"getSeconds",
"(",
")",
";",
"int",
"nanosToSubtract",
"=",
"duration",
".",
"getNano",
"(",
")",
";",
"if",
"(",
"secsToSubtract",
"==",
... | Returns a copy of this duration with the specified duration subtracted.
<p>
This instance is immutable and unaffected by this method call.
@param duration the duration to subtract, positive or negative, not null
@return a {@code Duration} based on this duration with the specified duration subtracted, not null
@throws... | [
"Returns",
"a",
"copy",
"of",
"this",
"duration",
"with",
"the",
"specified",
"duration",
"subtracted",
".",
"<p",
">",
"This",
"instance",
"is",
"immutable",
"and",
"unaffected",
"by",
"this",
"method",
"call",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Duration.java#L826-L833 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/BreakIterator.java | BreakIterator.registerInstance | public static Object registerInstance(BreakIterator iter, Locale locale, int kind) {
return registerInstance(iter, ULocale.forLocale(locale), kind);
} | java | public static Object registerInstance(BreakIterator iter, Locale locale, int kind) {
return registerInstance(iter, ULocale.forLocale(locale), kind);
} | [
"public",
"static",
"Object",
"registerInstance",
"(",
"BreakIterator",
"iter",
",",
"Locale",
"locale",
",",
"int",
"kind",
")",
"{",
"return",
"registerInstance",
"(",
"iter",
",",
"ULocale",
".",
"forLocale",
"(",
"locale",
")",
",",
"kind",
")",
";",
"... | <strong>[icu]</strong> Registers a new break iterator of the indicated kind, to use in the given
locale. Clones of the iterator will be returned if a request for a break iterator
of the given kind matches or falls back to this locale.
<p>Because ICU may choose to cache BreakIterator objects internally, this must
be c... | [
"<strong",
">",
"[",
"icu",
"]",
"<",
"/",
"strong",
">",
"Registers",
"a",
"new",
"break",
"iterator",
"of",
"the",
"indicated",
"kind",
"to",
"use",
"in",
"the",
"given",
"locale",
".",
"Clones",
"of",
"the",
"iterator",
"will",
"be",
"returned",
"if... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/BreakIterator.java#L729-L731 |
alkacon/opencms-core | src/org/opencms/db/CmsUserSettings.java | CmsUserSettings.getAdditionalPreference | public String getAdditionalPreference(String name, boolean useDefault) {
String value = m_additionalPreferences.get(name);
if ((value == null) && useDefault) {
I_CmsPreference pref = OpenCms.getWorkplaceManager().getDefaultUserSettings().getPreferences().get(name);
if (pref != n... | java | public String getAdditionalPreference(String name, boolean useDefault) {
String value = m_additionalPreferences.get(name);
if ((value == null) && useDefault) {
I_CmsPreference pref = OpenCms.getWorkplaceManager().getDefaultUserSettings().getPreferences().get(name);
if (pref != n... | [
"public",
"String",
"getAdditionalPreference",
"(",
"String",
"name",
",",
"boolean",
"useDefault",
")",
"{",
"String",
"value",
"=",
"m_additionalPreferences",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"(",
"value",
"==",
"null",
")",
"&&",
"useDefault"... | Gets the value for a user defined preference.<p>
@param name the name of the preference
@param useDefault true if the default value should be returned in case the preference is not set
@return the preference value | [
"Gets",
"the",
"value",
"for",
"a",
"user",
"defined",
"preference",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsUserSettings.java#L489-L499 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/UserApi.java | UserApi.deleteCustomAttribute | public void deleteCustomAttribute(final Object userIdOrUsername, final CustomAttribute customAttribute) throws GitLabApiException {
if (Objects.isNull(customAttribute)) {
throw new IllegalArgumentException("customAttributes can't be null");
}
deleteCustomAttribute(userIdOrUsername, ... | java | public void deleteCustomAttribute(final Object userIdOrUsername, final CustomAttribute customAttribute) throws GitLabApiException {
if (Objects.isNull(customAttribute)) {
throw new IllegalArgumentException("customAttributes can't be null");
}
deleteCustomAttribute(userIdOrUsername, ... | [
"public",
"void",
"deleteCustomAttribute",
"(",
"final",
"Object",
"userIdOrUsername",
",",
"final",
"CustomAttribute",
"customAttribute",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"Objects",
".",
"isNull",
"(",
"customAttribute",
")",
")",
"{",
"throw",
... | Delete a custom attribute for the given user
@param userIdOrUsername the user in the form of an Integer(ID), String(username), or User instance
@param customAttribute to remove
@throws GitLabApiException on failure while deleting customAttributes | [
"Delete",
"a",
"custom",
"attribute",
"for",
"the",
"given",
"user"
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/UserApi.java#L965-L971 |
UrielCh/ovh-java-sdk | ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java | ApiOvhHorizonView.serviceName_customerNetwork_customerNetworkId_DELETE | public ArrayList<OvhTask> serviceName_customerNetwork_customerNetworkId_DELETE(String serviceName, Long customerNetworkId) throws IOException {
String qPath = "/horizonView/{serviceName}/customerNetwork/{customerNetworkId}";
StringBuilder sb = path(qPath, serviceName, customerNetworkId);
String resp = exec(qPath,... | java | public ArrayList<OvhTask> serviceName_customerNetwork_customerNetworkId_DELETE(String serviceName, Long customerNetworkId) throws IOException {
String qPath = "/horizonView/{serviceName}/customerNetwork/{customerNetworkId}";
StringBuilder sb = path(qPath, serviceName, customerNetworkId);
String resp = exec(qPath,... | [
"public",
"ArrayList",
"<",
"OvhTask",
">",
"serviceName_customerNetwork_customerNetworkId_DELETE",
"(",
"String",
"serviceName",
",",
"Long",
"customerNetworkId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/horizonView/{serviceName}/customerNetwork/{customer... | Delete this Customer Network
REST: DELETE /horizonView/{serviceName}/customerNetwork/{customerNetworkId}
@param serviceName [required] Domain of the service
@param customerNetworkId [required] Customer Network id | [
"Delete",
"this",
"Customer",
"Network"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java#L445-L450 |
demidenko05/beigesoft-accounting | src/main/java/org/beigesoft/accounting/processor/PrcManufactureSave.java | PrcManufactureSave.makeOtherEntries | @Override
public final void makeOtherEntries(final Map<String, Object> pAddParam,
final Manufacture pEntity, final IRequestData pRequestData,
final boolean pIsNew) throws Exception {
//always new
ManufactureForDraw manufactureForDraw = new ManufactureForDraw(pEntity);
if (pEntity.getReversedId()... | java | @Override
public final void makeOtherEntries(final Map<String, Object> pAddParam,
final Manufacture pEntity, final IRequestData pRequestData,
final boolean pIsNew) throws Exception {
//always new
ManufactureForDraw manufactureForDraw = new ManufactureForDraw(pEntity);
if (pEntity.getReversedId()... | [
"@",
"Override",
"public",
"final",
"void",
"makeOtherEntries",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"pAddParam",
",",
"final",
"Manufacture",
"pEntity",
",",
"final",
"IRequestData",
"pRequestData",
",",
"final",
"boolean",
"pIsNew",
")",
"... | <p>Make other entries include reversing if it's need when save.</p>
@param pAddParam additional param
@param pEntity entity
@param pRequestData Request Data
@param pIsNew if entity was new
@throws Exception - an exception | [
"<p",
">",
"Make",
"other",
"entries",
"include",
"reversing",
"if",
"it",
"s",
"need",
"when",
"save",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/demidenko05/beigesoft-accounting/blob/e6f423949008218ddd05953b078f1ea8805095c1/src/main/java/org/beigesoft/accounting/processor/PrcManufactureSave.java#L116-L139 |
playn/playn | scene/src/playn/scene/LayerUtil.java | LayerUtil.screenToLayer | public static Point screenToLayer(Layer layer, float x, float y) {
Point into = new Point(x, y);
return screenToLayer(layer, into, into);
} | java | public static Point screenToLayer(Layer layer, float x, float y) {
Point into = new Point(x, y);
return screenToLayer(layer, into, into);
} | [
"public",
"static",
"Point",
"screenToLayer",
"(",
"Layer",
"layer",
",",
"float",
"x",
",",
"float",
"y",
")",
"{",
"Point",
"into",
"=",
"new",
"Point",
"(",
"x",
",",
"y",
")",
";",
"return",
"screenToLayer",
"(",
"layer",
",",
"into",
",",
"into"... | Converts the supplied point from screen coordinates to coordinates
relative to the specified layer. | [
"Converts",
"the",
"supplied",
"point",
"from",
"screen",
"coordinates",
"to",
"coordinates",
"relative",
"to",
"the",
"specified",
"layer",
"."
] | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/LayerUtil.java#L94-L97 |
pip-services3-java/pip-services3-components-java | src/org/pipservices3/components/config/YamlConfigReader.java | YamlConfigReader.readObject | public static Object readObject(String correlationId, String path, ConfigParams parameters)
throws ApplicationException {
return new YamlConfigReader(path).readObject(correlationId, parameters);
} | java | public static Object readObject(String correlationId, String path, ConfigParams parameters)
throws ApplicationException {
return new YamlConfigReader(path).readObject(correlationId, parameters);
} | [
"public",
"static",
"Object",
"readObject",
"(",
"String",
"correlationId",
",",
"String",
"path",
",",
"ConfigParams",
"parameters",
")",
"throws",
"ApplicationException",
"{",
"return",
"new",
"YamlConfigReader",
"(",
"path",
")",
".",
"readObject",
"(",
"correl... | Reads configuration file, parameterizes its content and converts it into JSON
object.
@param correlationId (optional) transaction id to trace execution through
call chain.
@param path a path to configuration file.
@param parameters values to parameters the configuration.
@return a JSON object with configur... | [
"Reads",
"configuration",
"file",
"parameterizes",
"its",
"content",
"and",
"converts",
"it",
"into",
"JSON",
"object",
"."
] | train | https://github.com/pip-services3-java/pip-services3-components-java/blob/122352fbf9b208f6417376da7b8ad725bc85ee58/src/org/pipservices3/components/config/YamlConfigReader.java#L113-L116 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java | DBCleanService.getRepositoryDBCleaner | public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn, RepositoryEntry rEntry)
throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
boole... | java | public static DBCleanerTool getRepositoryDBCleaner(Connection jdbcConn, RepositoryEntry rEntry)
throws DBCleanException
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
WorkspaceEntry wsEntry = rEntry.getWorkspaceEntries().get(0);
boole... | [
"public",
"static",
"DBCleanerTool",
"getRepositoryDBCleaner",
"(",
"Connection",
"jdbcConn",
",",
"RepositoryEntry",
"rEntry",
")",
"throws",
"DBCleanException",
"{",
"SecurityHelper",
".",
"validateSecurityPermission",
"(",
"JCRRuntimePermissions",
".",
"MANAGE_REPOSITORY_P... | Returns database cleaner for repository.
@param jdbcConn
database connection which need to use
@param rEntry
repository configuration
@return DBCleanerTool
@throws DBCleanException | [
"Returns",
"database",
"cleaner",
"for",
"repository",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/clean/rdbms/DBCleanService.java#L158-L179 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java | SparseCpuLevel1.droti | @Override
protected void droti(long N, INDArray X, DataBuffer indexes, INDArray Y, double c, double s) {
cblas_droti((int) N, (DoublePointer) X.data().addressPointer(), (IntPointer) indexes.addressPointer(),
(DoublePointer) Y.data().addressPointer(), c, s);
} | java | @Override
protected void droti(long N, INDArray X, DataBuffer indexes, INDArray Y, double c, double s) {
cblas_droti((int) N, (DoublePointer) X.data().addressPointer(), (IntPointer) indexes.addressPointer(),
(DoublePointer) Y.data().addressPointer(), c, s);
} | [
"@",
"Override",
"protected",
"void",
"droti",
"(",
"long",
"N",
",",
"INDArray",
"X",
",",
"DataBuffer",
"indexes",
",",
"INDArray",
"Y",
",",
"double",
"c",
",",
"double",
"s",
")",
"{",
"cblas_droti",
"(",
"(",
"int",
")",
"N",
",",
"(",
"DoublePo... | Applies Givens rotation to sparse vectors one of which is in compressed form.
@param N The number of elements in vectors X and Y
@param X a double sparse vector
@param indexes The indexes of the sparse vector
@param Y a double full-storage vector
@param c a scalar
@param s a scalar | [
"Applies",
"Givens",
"rotation",
"to",
"sparse",
"vectors",
"one",
"of",
"which",
"is",
"in",
"compressed",
"form",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java#L232-L236 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/font/effects/OutlineEffect.java | OutlineEffect.getStroke | public Stroke getStroke() {
if (stroke == null) {
return new BasicStroke(width, BasicStroke.CAP_SQUARE, join);
}
return stroke;
} | java | public Stroke getStroke() {
if (stroke == null) {
return new BasicStroke(width, BasicStroke.CAP_SQUARE, join);
}
return stroke;
} | [
"public",
"Stroke",
"getStroke",
"(",
")",
"{",
"if",
"(",
"stroke",
"==",
"null",
")",
"{",
"return",
"new",
"BasicStroke",
"(",
"width",
",",
"BasicStroke",
".",
"CAP_SQUARE",
",",
"join",
")",
";",
"}",
"return",
"stroke",
";",
"}"
] | Get the stroke being used to draw the outline
@return The stroke being used to draw the outline | [
"Get",
"the",
"stroke",
"being",
"used",
"to",
"draw",
"the",
"outline"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/font/effects/OutlineEffect.java#L113-L119 |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/RestClient.java | RestClient.getAttachmentMetaData | public Attachment getAttachmentMetaData(String assetId, String attachmentId) throws IOException, BadVersionException, RequestFailureException {
// At the moment can only get all attachments
Asset ass = getAsset(assetId);
List<Attachment> allAttachments = ass.getAttachments();
for (Attach... | java | public Attachment getAttachmentMetaData(String assetId, String attachmentId) throws IOException, BadVersionException, RequestFailureException {
// At the moment can only get all attachments
Asset ass = getAsset(assetId);
List<Attachment> allAttachments = ass.getAttachments();
for (Attach... | [
"public",
"Attachment",
"getAttachmentMetaData",
"(",
"String",
"assetId",
",",
"String",
"attachmentId",
")",
"throws",
"IOException",
",",
"BadVersionException",
",",
"RequestFailureException",
"{",
"// At the moment can only get all attachments",
"Asset",
"ass",
"=",
"ge... | Returns the meta data about an attachment
@param assetId
The ID of the asset owning the attachment
@param attachmentId
The ID of the attachment
@return The attachment meta data
@throws IOException
@throws RequestFailureException | [
"Returns",
"the",
"meta",
"data",
"about",
"an",
"attachment"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/RestClient.java#L503-L515 |
apache/groovy | src/main/groovy/groovy/util/Node.java | Node.breadthFirst | public void breadthFirst(Map<String, Object> options, Closure c) {
boolean preorder = Boolean.valueOf(options.get("preorder").toString());
if (preorder) callClosureForNode(c, this, 1);
breadthFirstRest(preorder, 2, c);
if (!preorder) callClosureForNode(c, this, 1);
} | java | public void breadthFirst(Map<String, Object> options, Closure c) {
boolean preorder = Boolean.valueOf(options.get("preorder").toString());
if (preorder) callClosureForNode(c, this, 1);
breadthFirstRest(preorder, 2, c);
if (!preorder) callClosureForNode(c, this, 1);
} | [
"public",
"void",
"breadthFirst",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"options",
",",
"Closure",
"c",
")",
"{",
"boolean",
"preorder",
"=",
"Boolean",
".",
"valueOf",
"(",
"options",
".",
"get",
"(",
"\"preorder\"",
")",
".",
"toString",
"(",
... | Calls the provided closure for all the nodes in the tree
using a breadth-first traversal.
A boolean 'preorder' options is supported.
@param options map containing options
@param c the closure to run for each node (a one or two parameter can be used; if one parameter is given the
closure will be passed the node, for a ... | [
"Calls",
"the",
"provided",
"closure",
"for",
"all",
"the",
"nodes",
"in",
"the",
"tree",
"using",
"a",
"breadth",
"-",
"first",
"traversal",
".",
"A",
"boolean",
"preorder",
"options",
"is",
"supported",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/Node.java#L711-L716 |
kaazing/java.client | amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java | AmqpClient.closeConnection | AmqpClient closeConnection(int replyCode, String replyText, int classId, int methodId1) {
this.closeConnection(replyCode, replyText, classId, methodId1, null, null);
return this;
} | java | AmqpClient closeConnection(int replyCode, String replyText, int classId, int methodId1) {
this.closeConnection(replyCode, replyText, classId, methodId1, null, null);
return this;
} | [
"AmqpClient",
"closeConnection",
"(",
"int",
"replyCode",
",",
"String",
"replyText",
",",
"int",
"classId",
",",
"int",
"methodId1",
")",
"{",
"this",
".",
"closeConnection",
"(",
"replyCode",
",",
"replyText",
",",
"classId",
",",
"methodId1",
",",
"null",
... | Closes the Amqp Server connection.
@param replyCode
@param replyText
@param classId
@param methodId1
@return AmqpClient | [
"Closes",
"the",
"Amqp",
"Server",
"connection",
"."
] | train | https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java#L882-L885 |
jbundle/webapp | base/src/main/java/org/jbundle/util/webapp/base/BaseWebappServlet.java | BaseWebappServlet.copyStream | public static void copyStream(Reader inStream, Writer outStream, boolean ignoreErrors)
{
char[] data = new char[BUFFER];
int count;
try {
while((count = inStream.read(data, 0, BUFFER)) != -1)
{
outStream.write(data, 0, count);
}
} c... | java | public static void copyStream(Reader inStream, Writer outStream, boolean ignoreErrors)
{
char[] data = new char[BUFFER];
int count;
try {
while((count = inStream.read(data, 0, BUFFER)) != -1)
{
outStream.write(data, 0, count);
}
} c... | [
"public",
"static",
"void",
"copyStream",
"(",
"Reader",
"inStream",
",",
"Writer",
"outStream",
",",
"boolean",
"ignoreErrors",
")",
"{",
"char",
"[",
"]",
"data",
"=",
"new",
"char",
"[",
"BUFFER",
"]",
";",
"int",
"count",
";",
"try",
"{",
"while",
... | Copy the input stream to the output stream
@param inStream
@param outStream
@param ignoreErrors | [
"Copy",
"the",
"input",
"stream",
"to",
"the",
"output",
"stream"
] | train | https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/base/src/main/java/org/jbundle/util/webapp/base/BaseWebappServlet.java#L165-L178 |
salesforce/Argus | ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/NotificationDto.java | NotificationDto.transformToDto | public static NotificationDto transformToDto(Notification notification) {
if (notification == null) {
throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
}
NotificationDto result = createDtoObject(NotificationDto.... | java | public static NotificationDto transformToDto(Notification notification) {
if (notification == null) {
throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
}
NotificationDto result = createDtoObject(NotificationDto.... | [
"public",
"static",
"NotificationDto",
"transformToDto",
"(",
"Notification",
"notification",
")",
"{",
"if",
"(",
"notification",
"==",
"null",
")",
"{",
"throw",
"new",
"WebApplicationException",
"(",
"\"Null entity object cannot be converted to Dto object.\"",
",",
"St... | Converts notification entity object to notificationDto object.
@param notification notification entity. Cannot be null.
@return notificationDto.
@throws WebApplicationException If an error occurs. | [
"Converts",
"notification",
"entity",
"object",
"to",
"notificationDto",
"object",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/NotificationDto.java#L78-L90 |
networknt/light-4j | client/src/main/java/com/networknt/client/oauth/OauthHelper.java | OauthHelper.adjustNoChunkedEncoding | public static void adjustNoChunkedEncoding(ClientRequest request, String requestBody) {
String fixedLengthString = request.getRequestHeaders().getFirst(Headers.CONTENT_LENGTH);
String transferEncodingString = request.getRequestHeaders().getLast(Headers.TRANSFER_ENCODING);
if(transferEncodingStri... | java | public static void adjustNoChunkedEncoding(ClientRequest request, String requestBody) {
String fixedLengthString = request.getRequestHeaders().getFirst(Headers.CONTENT_LENGTH);
String transferEncodingString = request.getRequestHeaders().getLast(Headers.TRANSFER_ENCODING);
if(transferEncodingStri... | [
"public",
"static",
"void",
"adjustNoChunkedEncoding",
"(",
"ClientRequest",
"request",
",",
"String",
"requestBody",
")",
"{",
"String",
"fixedLengthString",
"=",
"request",
".",
"getRequestHeaders",
"(",
")",
".",
"getFirst",
"(",
"Headers",
".",
"CONTENT_LENGTH",... | this method is to support sending a server which doesn't support chunked transfer encoding. | [
"this",
"method",
"is",
"to",
"support",
"sending",
"a",
"server",
"which",
"doesn",
"t",
"support",
"chunked",
"transfer",
"encoding",
"."
] | train | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/oauth/OauthHelper.java#L736-L751 |
actorapp/actor-platform | actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/collections/SparseBooleanArray.java | SparseBooleanArray.append | public void append(int key, boolean value) {
if (mSize != 0 && key <= mKeys[mSize - 1]) {
put(key, value);
return;
}
mKeys = GrowingArrayUtils.append(mKeys, mSize, key);
mValues = GrowingArrayUtils.append(mValues, mSize, value);
mSize++;
} | java | public void append(int key, boolean value) {
if (mSize != 0 && key <= mKeys[mSize - 1]) {
put(key, value);
return;
}
mKeys = GrowingArrayUtils.append(mKeys, mSize, key);
mValues = GrowingArrayUtils.append(mValues, mSize, value);
mSize++;
} | [
"public",
"void",
"append",
"(",
"int",
"key",
",",
"boolean",
"value",
")",
"{",
"if",
"(",
"mSize",
"!=",
"0",
"&&",
"key",
"<=",
"mKeys",
"[",
"mSize",
"-",
"1",
"]",
")",
"{",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
";",
"}",
... | Puts a key/value pair into the array, optimizing for the case where
the key is greater than all existing keys in the array. | [
"Puts",
"a",
"key",
"/",
"value",
"pair",
"into",
"the",
"array",
"optimizing",
"for",
"the",
"case",
"where",
"the",
"key",
"is",
"greater",
"than",
"all",
"existing",
"keys",
"in",
"the",
"array",
"."
] | train | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/collections/SparseBooleanArray.java#L212-L220 |
joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/TurboProjectReader.java | TurboProjectReader.defineField | private static void defineField(Map<String, FieldType> container, String name, FieldType type, String alias)
{
container.put(name, type);
if (alias != null)
{
ALIASES.put(type, alias);
}
} | java | private static void defineField(Map<String, FieldType> container, String name, FieldType type, String alias)
{
container.put(name, type);
if (alias != null)
{
ALIASES.put(type, alias);
}
} | [
"private",
"static",
"void",
"defineField",
"(",
"Map",
"<",
"String",
",",
"FieldType",
">",
"container",
",",
"String",
"name",
",",
"FieldType",
"type",
",",
"String",
"alias",
")",
"{",
"container",
".",
"put",
"(",
"name",
",",
"type",
")",
";",
"... | Configure the mapping between a database column and a field, including definition of
an alias.
@param container column to field map
@param name column name
@param type field type
@param alias field alias | [
"Configure",
"the",
"mapping",
"between",
"a",
"database",
"column",
"and",
"a",
"field",
"including",
"definition",
"of",
"an",
"alias",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/TurboProjectReader.java#L504-L511 |
pac4j/pac4j | pac4j-core/src/main/java/org/pac4j/core/exception/http/RedirectionActionHelper.java | RedirectionActionHelper.buildRedirectUrlAction | public static RedirectionAction buildRedirectUrlAction(final WebContext context, final String location) {
if (ContextHelper.isPost(context) && useModernHttpCodes) {
return new SeeOtherAction(location);
} else {
return new FoundAction(location);
}
} | java | public static RedirectionAction buildRedirectUrlAction(final WebContext context, final String location) {
if (ContextHelper.isPost(context) && useModernHttpCodes) {
return new SeeOtherAction(location);
} else {
return new FoundAction(location);
}
} | [
"public",
"static",
"RedirectionAction",
"buildRedirectUrlAction",
"(",
"final",
"WebContext",
"context",
",",
"final",
"String",
"location",
")",
"{",
"if",
"(",
"ContextHelper",
".",
"isPost",
"(",
"context",
")",
"&&",
"useModernHttpCodes",
")",
"{",
"return",
... | Build the appropriate redirection action for a location.
@param context the web context
@param location the location
@return the appropriate redirection action | [
"Build",
"the",
"appropriate",
"redirection",
"action",
"for",
"a",
"location",
"."
] | train | https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/exception/http/RedirectionActionHelper.java#L25-L31 |
dita-ot/dita-ot | src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/writer/CHMIndexWriter.java | CHMIndexWriter.outputIndexTerm | private void outputIndexTerm(final IndexTerm term, final XMLSerializer serializer) throws SAXException {
List<IndexTermTarget> targets = term.getTargetList();
final List<IndexTerm> subTerms = term.getSubTerms();
int targetNum = targets.size();
final int subTermNum = subTerms.size();
... | java | private void outputIndexTerm(final IndexTerm term, final XMLSerializer serializer) throws SAXException {
List<IndexTermTarget> targets = term.getTargetList();
final List<IndexTerm> subTerms = term.getSubTerms();
int targetNum = targets.size();
final int subTermNum = subTerms.size();
... | [
"private",
"void",
"outputIndexTerm",
"(",
"final",
"IndexTerm",
"term",
",",
"final",
"XMLSerializer",
"serializer",
")",
"throws",
"SAXException",
"{",
"List",
"<",
"IndexTermTarget",
">",
"targets",
"=",
"term",
".",
"getTargetList",
"(",
")",
";",
"final",
... | Output the given indexterm into the XML writer.
@param term term to serialize
@param serializer XML output to write to | [
"Output",
"the",
"given",
"indexterm",
"into",
"the",
"XML",
"writer",
"."
] | train | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/writer/CHMIndexWriter.java#L87-L127 |
Azure/azure-sdk-for-java | compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java | DisksInner.grantAccess | public AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) {
return grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).toBlocking().last().body();
} | java | public AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) {
return grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).toBlocking().last().body();
} | [
"public",
"AccessUriInner",
"grantAccess",
"(",
"String",
"resourceGroupName",
",",
"String",
"diskName",
",",
"GrantAccessData",
"grantAccessData",
")",
"{",
"return",
"grantAccessWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"diskName",
",",
"grantAccessData",... | Grants access to a disk.
@param resourceGroupName The name of the resource group.
@param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
@param grantAcc... | [
"Grants",
"access",
"to",
"a",
"disk",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L951-L953 |
jbossws/jbossws-common | src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java | ReflectionUtils.assertNoPrimitiveParameters | public static void assertNoPrimitiveParameters(final Method method, Class<? extends Annotation> annotation)
{
for (Class<?> type : method.getParameterTypes())
{
if (type.isPrimitive())
{
throw annotation == null ? MESSAGES.methodCannotDeclarePrimitiveParameters(method) : MES... | java | public static void assertNoPrimitiveParameters(final Method method, Class<? extends Annotation> annotation)
{
for (Class<?> type : method.getParameterTypes())
{
if (type.isPrimitive())
{
throw annotation == null ? MESSAGES.methodCannotDeclarePrimitiveParameters(method) : MES... | [
"public",
"static",
"void",
"assertNoPrimitiveParameters",
"(",
"final",
"Method",
"method",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotation",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
">",
"type",
":",
"method",
".",
"getParameterTypes",
"(... | Asserts method don't declare primitive parameters.
@param method to validate
@param annotation annotation to propagate in exception message | [
"Asserts",
"method",
"don",
"t",
"declare",
"primitive",
"parameters",
"."
] | train | https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L53-L62 |
Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/KeyDecoder.java | KeyDecoder.decodeBooleanDesc | public static boolean decodeBooleanDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return src[srcOffset] == 127;
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | java | public static boolean decodeBooleanDesc(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return src[srcOffset] == 127;
} catch (IndexOutOfBoundsException e) {
throw new CorruptEncodingException(null, e);
}
} | [
"public",
"static",
"boolean",
"decodeBooleanDesc",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"try",
"{",
"return",
"src",
"[",
"srcOffset",
"]",
"==",
"127",
";",
"}",
"catch",
"(",
"IndexOutOfBou... | Decodes a boolean from exactly 1 byte, as encoded for descending order.
@param src source of encoded bytes
@param srcOffset offset into source array
@return boolean value | [
"Decodes",
"a",
"boolean",
"from",
"exactly",
"1",
"byte",
"as",
"encoded",
"for",
"descending",
"order",
"."
] | train | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L234-L242 |
wildfly/wildfly-core | embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java | EmbeddedProcessFactory.createHostController | public static HostController createHostController(String jbossHomePath, String modulePath, String[] systemPackages, String[] cmdargs) {
if (jbossHomePath == null || jbossHomePath.isEmpty()) {
throw EmbeddedLogger.ROOT_LOGGER.invalidJBossHome(jbossHomePath);
}
File jbossHomeDir = new ... | java | public static HostController createHostController(String jbossHomePath, String modulePath, String[] systemPackages, String[] cmdargs) {
if (jbossHomePath == null || jbossHomePath.isEmpty()) {
throw EmbeddedLogger.ROOT_LOGGER.invalidJBossHome(jbossHomePath);
}
File jbossHomeDir = new ... | [
"public",
"static",
"HostController",
"createHostController",
"(",
"String",
"jbossHomePath",
",",
"String",
"modulePath",
",",
"String",
"[",
"]",
"systemPackages",
",",
"String",
"[",
"]",
"cmdargs",
")",
"{",
"if",
"(",
"jbossHomePath",
"==",
"null",
"||",
... | Create an embedded host controller.
@param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty.
@param modulePath the location of the root of the module repository. May be {@code null} if the standard
location under {@code jbossHomePath} should be used
@param sys... | [
"Create",
"an",
"embedded",
"host",
"controller",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java#L206-L221 |
smartsheet-platform/smartsheet-java-sdk | src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java | SightResourcesImpl.moveSight | public Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException {
return this.createResource("sights/" + sightId + "/move", Sight.class, destination);
} | java | public Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException {
return this.createResource("sights/" + sightId + "/move", Sight.class, destination);
} | [
"public",
"Sight",
"moveSight",
"(",
"long",
"sightId",
",",
"ContainerDestination",
"destination",
")",
"throws",
"SmartsheetException",
"{",
"return",
"this",
".",
"createResource",
"(",
"\"sights/\"",
"+",
"sightId",
"+",
"\"/move\"",
",",
"Sight",
".",
"class"... | Creates s copy of the specified Sight.
It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move
@param sightId the Id of the Sight
@param destination the destination to copy to
@return the newly created Sight resource.
@throws IllegalArgumentException if any argument is null or empty string... | [
"Creates",
"s",
"copy",
"of",
"the",
"specified",
"Sight",
"."
] | train | https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java#L203-L205 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | DefaultGroovyMethods.putAt | public static void putAt(BitSet self, IntRange range, boolean value) {
RangeInfo info = subListBorders(self.length(), range);
self.set(info.from, info.to, value);
} | java | public static void putAt(BitSet self, IntRange range, boolean value) {
RangeInfo info = subListBorders(self.length(), range);
self.set(info.from, info.to, value);
} | [
"public",
"static",
"void",
"putAt",
"(",
"BitSet",
"self",
",",
"IntRange",
"range",
",",
"boolean",
"value",
")",
"{",
"RangeInfo",
"info",
"=",
"subListBorders",
"(",
"self",
".",
"length",
"(",
")",
",",
"range",
")",
";",
"self",
".",
"set",
"(",
... | Support assigning a range of values with a single assignment statement.
@param self a BitSet
@param range the range of values to set
@param value value
@see java.util.BitSet
@see groovy.lang.Range
@since 1.5.0 | [
"Support",
"assigning",
"a",
"range",
"of",
"values",
"with",
"a",
"single",
"assignment",
"statement",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L14151-L14154 |
etourdot/xincproc | xpointer/src/main/java/org/etourdot/xincproc/xpointer/XPointerEngine.java | XPointerEngine.executeToDestination | public int executeToDestination(final String pointerStr, final Source source, final Destination destination)
throws XPointerException
{
final Pointer pointer = getPointer(pointerStr);
final XdmNode node = processor.newDocumentBuilder().wrap(source);
if (pointer != null)
{... | java | public int executeToDestination(final String pointerStr, final Source source, final Destination destination)
throws XPointerException
{
final Pointer pointer = getPointer(pointerStr);
final XdmNode node = processor.newDocumentBuilder().wrap(source);
if (pointer != null)
{... | [
"public",
"int",
"executeToDestination",
"(",
"final",
"String",
"pointerStr",
",",
"final",
"Source",
"source",
",",
"final",
"Destination",
"destination",
")",
"throws",
"XPointerException",
"{",
"final",
"Pointer",
"pointer",
"=",
"getPointer",
"(",
"pointerStr",... | Execute a xpointer expression on a xml source.
The result is send to a Saxon {@link net.sf.saxon.s9api.Destination}
@param pointerStr xpointer expression
@param source xml source
@param destination Saxon destination of result stream
@return number of elements in result infoset excluding comments et processing instruct... | [
"Execute",
"a",
"xpointer",
"expression",
"on",
"a",
"xml",
"source",
".",
"The",
"result",
"is",
"send",
"to",
"a",
"Saxon",
"{",
"@link",
"net",
".",
"sf",
".",
"saxon",
".",
"s9api",
".",
"Destination",
"}"
] | train | https://github.com/etourdot/xincproc/blob/6e9e9352e1975957ae6821a04c248ea49c7323ec/xpointer/src/main/java/org/etourdot/xincproc/xpointer/XPointerEngine.java#L192-L216 |
Coveros/selenified | src/main/java/com/coveros/selenified/element/Element.java | Element.isNotEnabled | private boolean isNotEnabled(String action, String expected, String extra) {
// wait for element to be displayed
if (!is.enabled()) {
waitForState.enabled();
}
if (!is.enabled()) {
reporter.fail(action, expected, extra + prettyOutput() + NOT_ENABLED);
... | java | private boolean isNotEnabled(String action, String expected, String extra) {
// wait for element to be displayed
if (!is.enabled()) {
waitForState.enabled();
}
if (!is.enabled()) {
reporter.fail(action, expected, extra + prettyOutput() + NOT_ENABLED);
... | [
"private",
"boolean",
"isNotEnabled",
"(",
"String",
"action",
",",
"String",
"expected",
",",
"String",
"extra",
")",
"{",
"// wait for element to be displayed",
"if",
"(",
"!",
"is",
".",
"enabled",
"(",
")",
")",
"{",
"waitForState",
".",
"enabled",
"(",
... | Determines if the element is displayed. If it isn't, it'll wait up to the
default time (5 seconds) for the element to be displayed
@param action - what action is occurring
@param expected - what is the expected result
@param extra - what actually is occurring
@return Boolean: is the element enabled? | [
"Determines",
"if",
"the",
"element",
"is",
"displayed",
".",
"If",
"it",
"isn",
"t",
"it",
"ll",
"wait",
"up",
"to",
"the",
"default",
"time",
"(",
"5",
"seconds",
")",
"for",
"the",
"element",
"to",
"be",
"displayed"
] | train | https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/Element.java#L637-L648 |
elki-project/elki | elki/src/main/java/de/lmu/ifi/dbs/elki/workflow/OutputStep.java | OutputStep.runResultHandlers | public void runResultHandlers(ResultHierarchy hier, Database db) {
// Run result handlers
for(ResultHandler resulthandler : resulthandlers) {
Thread.currentThread().setName(resulthandler.toString());
resulthandler.processNewResult(hier, db);
}
} | java | public void runResultHandlers(ResultHierarchy hier, Database db) {
// Run result handlers
for(ResultHandler resulthandler : resulthandlers) {
Thread.currentThread().setName(resulthandler.toString());
resulthandler.processNewResult(hier, db);
}
} | [
"public",
"void",
"runResultHandlers",
"(",
"ResultHierarchy",
"hier",
",",
"Database",
"db",
")",
"{",
"// Run result handlers",
"for",
"(",
"ResultHandler",
"resulthandler",
":",
"resulthandlers",
")",
"{",
"Thread",
".",
"currentThread",
"(",
")",
".",
"setName... | Run the result handlers.
@param hier Result to run on
@param db Database | [
"Run",
"the",
"result",
"handlers",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/workflow/OutputStep.java#L66-L72 |
jhunters/jprotobuf | jprotobuf-precompile-plugin/src/main/java/com/baidu/jprotobuf/mojo/JprotobufPreCompileMain.java | JprotobufPreCompileMain.isStartWith | private static boolean isStartWith(String testString, String[] targetStrings) {
for (String s : targetStrings) {
if (testString.startsWith(s)) {
return true;
}
}
return false;
} | java | private static boolean isStartWith(String testString, String[] targetStrings) {
for (String s : targetStrings) {
if (testString.startsWith(s)) {
return true;
}
}
return false;
} | [
"private",
"static",
"boolean",
"isStartWith",
"(",
"String",
"testString",
",",
"String",
"[",
"]",
"targetStrings",
")",
"{",
"for",
"(",
"String",
"s",
":",
"targetStrings",
")",
"{",
"if",
"(",
"testString",
".",
"startsWith",
"(",
"s",
")",
")",
"{"... | Checks if is start with.
@param testString the test string
@param targetStrings the target strings
@return true, if is start with | [
"Checks",
"if",
"is",
"start",
"with",
"."
] | train | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/jprotobuf-precompile-plugin/src/main/java/com/baidu/jprotobuf/mojo/JprotobufPreCompileMain.java#L112-L120 |
Azure/autorest-clientruntime-for-java | azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java | AzureClient.updateStateFromGetResourceOperationAsync | private <T> Observable<PollingState<T>> updateStateFromGetResourceOperationAsync(final PollingState<T> pollingState, String url) {
return pollAsync(url, pollingState.loggingContext())
.flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
@Override
... | java | private <T> Observable<PollingState<T>> updateStateFromGetResourceOperationAsync(final PollingState<T> pollingState, String url) {
return pollAsync(url, pollingState.loggingContext())
.flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
@Override
... | [
"private",
"<",
"T",
">",
"Observable",
"<",
"PollingState",
"<",
"T",
">",
">",
"updateStateFromGetResourceOperationAsync",
"(",
"final",
"PollingState",
"<",
"T",
">",
"pollingState",
",",
"String",
"url",
")",
"{",
"return",
"pollAsync",
"(",
"url",
",",
... | Polls from the provided URL and updates the polling state with the
polling response.
@param pollingState the polling state for the current operation.
@param url the url to poll from
@param <T> the return type of the caller. | [
"Polls",
"from",
"the",
"provided",
"URL",
"and",
"updates",
"the",
"polling",
"state",
"with",
"the",
"polling",
"response",
"."
] | train | https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java#L621-L634 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java | DBTransaction.addColumn | public void addColumn(String storeName, String rowKey, String columnName, String columnValue) {
addColumn(storeName, rowKey, columnName, Utils.toBytes(columnValue));
} | java | public void addColumn(String storeName, String rowKey, String columnName, String columnValue) {
addColumn(storeName, rowKey, columnName, Utils.toBytes(columnValue));
} | [
"public",
"void",
"addColumn",
"(",
"String",
"storeName",
",",
"String",
"rowKey",
",",
"String",
"columnName",
",",
"String",
"columnValue",
")",
"{",
"addColumn",
"(",
"storeName",
",",
"rowKey",
",",
"columnName",
",",
"Utils",
".",
"toBytes",
"(",
"colu... | Add or set a column with the given string value. The column value is converted to
binary form using UTF-8.
@param storeName Name of store that owns row.
@param rowKey Key of row that owns column.
@param columnName Name of column.
@param columnValue Column value as a string. | [
"Add",
"or",
"set",
"a",
"column",
"with",
"the",
"given",
"string",
"value",
".",
"The",
"column",
"value",
"is",
"converted",
"to",
"binary",
"form",
"using",
"UTF",
"-",
"8",
"."
] | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L206-L208 |
ManfredTremmel/gwt-bean-validators | gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/java/net/URLConnection.java | URLConnection.getHeaderFieldLong | public long getHeaderFieldLong(final String name, final long pdefault) {
final String value = this.getHeaderField(name);
try {
return Long.parseLong(value);
} catch (final Exception e) { // NOPMD
}
return pdefault;
} | java | public long getHeaderFieldLong(final String name, final long pdefault) {
final String value = this.getHeaderField(name);
try {
return Long.parseLong(value);
} catch (final Exception e) { // NOPMD
}
return pdefault;
} | [
"public",
"long",
"getHeaderFieldLong",
"(",
"final",
"String",
"name",
",",
"final",
"long",
"pdefault",
")",
"{",
"final",
"String",
"value",
"=",
"this",
".",
"getHeaderField",
"(",
"name",
")",
";",
"try",
"{",
"return",
"Long",
".",
"parseLong",
"(",
... | Returns the value of the named field parsed as a number.
<p>
This form of {@code getHeaderField} exists because some connection types (e.g., {@code http-ng}
) have pre-parsed headers. Classes for that connection type can override this method and
short-circuit the parsing.
</p>
@param name the name of the header field.... | [
"Returns",
"the",
"value",
"of",
"the",
"named",
"field",
"parsed",
"as",
"a",
"number",
".",
"<p",
">",
"This",
"form",
"of",
"{",
"@code",
"getHeaderField",
"}",
"exists",
"because",
"some",
"connection",
"types",
"(",
"e",
".",
"g",
".",
"{",
"@code... | train | https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/java/net/URLConnection.java#L471-L478 |
samskivert/samskivert | src/main/java/com/samskivert/util/ConfigUtil.java | ConfigUtil.getStream | public static InputStream getStream (String path, ClassLoader loader)
{
// first try the supplied class loader
InputStream in = getResourceAsStream(path, loader);
if (in != null) {
return in;
}
// if that didn't work, try the system class loader (but only if it's... | java | public static InputStream getStream (String path, ClassLoader loader)
{
// first try the supplied class loader
InputStream in = getResourceAsStream(path, loader);
if (in != null) {
return in;
}
// if that didn't work, try the system class loader (but only if it's... | [
"public",
"static",
"InputStream",
"getStream",
"(",
"String",
"path",
",",
"ClassLoader",
"loader",
")",
"{",
"// first try the supplied class loader",
"InputStream",
"in",
"=",
"getResourceAsStream",
"(",
"path",
",",
"loader",
")",
";",
"if",
"(",
"in",
"!=",
... | Returns an input stream referencing a file that exists somewhere in the classpath.
<p> The supplied classloader is searched first, followed by the system classloader.
@param path The path to the file, relative to the root of the classpath directory from which
it will be loaded (e.g. <code>com/foo/bar/foo.gif</code>). | [
"Returns",
"an",
"input",
"stream",
"referencing",
"a",
"file",
"that",
"exists",
"somewhere",
"in",
"the",
"classpath",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/ConfigUtil.java#L484-L503 |
uber/AutoDispose | android/autodispose-android-archcomponents/src/main/java/com/uber/autodispose/android/lifecycle/AndroidLifecycleScopeProvider.java | AndroidLifecycleScopeProvider.from | public static AndroidLifecycleScopeProvider from(
Lifecycle lifecycle, Lifecycle.Event untilEvent) {
return from(lifecycle, new UntilEventFunction(untilEvent));
} | java | public static AndroidLifecycleScopeProvider from(
Lifecycle lifecycle, Lifecycle.Event untilEvent) {
return from(lifecycle, new UntilEventFunction(untilEvent));
} | [
"public",
"static",
"AndroidLifecycleScopeProvider",
"from",
"(",
"Lifecycle",
"lifecycle",
",",
"Lifecycle",
".",
"Event",
"untilEvent",
")",
"{",
"return",
"from",
"(",
"lifecycle",
",",
"new",
"UntilEventFunction",
"(",
"untilEvent",
")",
")",
";",
"}"
] | Creates a {@link AndroidLifecycleScopeProvider} for Android Lifecycles.
@param lifecycle the lifecycle to scope for.
@param untilEvent the event until the scope is valid.
@return a {@link AndroidLifecycleScopeProvider} against this lifecycle. | [
"Creates",
"a",
"{",
"@link",
"AndroidLifecycleScopeProvider",
"}",
"for",
"Android",
"Lifecycles",
"."
] | train | https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/android/autodispose-android-archcomponents/src/main/java/com/uber/autodispose/android/lifecycle/AndroidLifecycleScopeProvider.java#L100-L103 |
auth0/Auth0.Android | auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java | AuthenticationAPIClient.createUser | @SuppressWarnings("WeakerAccess")
public DatabaseConnectionRequest<DatabaseUser, AuthenticationException> createUser(@NonNull String email, @NonNull String password, @NonNull String connection) {
//noinspection ConstantConditions
return createUser(email, password, null, connection);
} | java | @SuppressWarnings("WeakerAccess")
public DatabaseConnectionRequest<DatabaseUser, AuthenticationException> createUser(@NonNull String email, @NonNull String password, @NonNull String connection) {
//noinspection ConstantConditions
return createUser(email, password, null, connection);
} | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"public",
"DatabaseConnectionRequest",
"<",
"DatabaseUser",
",",
"AuthenticationException",
">",
"createUser",
"(",
"@",
"NonNull",
"String",
"email",
",",
"@",
"NonNull",
"String",
"password",
",",
"@",
"NonNul... | Creates a user in a DB connection using <a href="https://auth0.com/docs/api/authentication#signup">'/dbconnections/signup' endpoint</a>
Example usage:
<pre>
{@code
client.createUser("{email}", "{password}", "{database connection name}")
.start(new BaseCallback<DatabaseUser>() {
{@literal}Override
public void onSuccess(... | [
"Creates",
"a",
"user",
"in",
"a",
"DB",
"connection",
"using",
"<a",
"href",
"=",
"https",
":",
"//",
"auth0",
".",
"com",
"/",
"docs",
"/",
"api",
"/",
"authentication#signup",
">",
"/",
"dbconnections",
"/",
"signup",
"endpoint<",
"/",
"a",
">",
"Ex... | train | https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java#L558-L562 |
finmath/finmath-lib | src/main/java/net/finmath/montecarlo/interestrate/products/DigitalFloorlet.java | DigitalFloorlet.getValue | @Override
public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException {
// This is on the Libor discretization
int liborIndex = model.getLiborPeriodIndex(maturity);
double paymentDate = model.getLiborPeriod(liborIndex+1);
double periodLength ... | java | @Override
public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException {
// This is on the Libor discretization
int liborIndex = model.getLiborPeriodIndex(maturity);
double paymentDate = model.getLiborPeriod(liborIndex+1);
double periodLength ... | [
"@",
"Override",
"public",
"RandomVariable",
"getValue",
"(",
"double",
"evaluationTime",
",",
"LIBORModelMonteCarloSimulationModel",
"model",
")",
"throws",
"CalculationException",
"{",
"// This is on the Libor discretization",
"int",
"liborIndex",
"=",
"model",
".",
"getL... | This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.
Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time.
Cashflows prior evaluationTime... | [
"This",
"method",
"returns",
"the",
"value",
"random",
"variable",
"of",
"the",
"product",
"within",
"the",
"specified",
"model",
"evaluated",
"at",
"a",
"given",
"evalutationTime",
".",
"Note",
":",
"For",
"a",
"lattice",
"this",
"is",
"often",
"the",
"valu... | train | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/DigitalFloorlet.java#L43-L81 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/CacheUtil.java | CacheUtil.getPrefix | public static String getPrefix(URI uri, ClassLoader classLoader) {
if (uri == null && classLoader == null) {
return null;
} else {
StringBuilder sb = new StringBuilder();
if (uri != null) {
sb.append(uri.toASCIIString()).append('/');
}
... | java | public static String getPrefix(URI uri, ClassLoader classLoader) {
if (uri == null && classLoader == null) {
return null;
} else {
StringBuilder sb = new StringBuilder();
if (uri != null) {
sb.append(uri.toASCIIString()).append('/');
}
... | [
"public",
"static",
"String",
"getPrefix",
"(",
"URI",
"uri",
",",
"ClassLoader",
"classLoader",
")",
"{",
"if",
"(",
"uri",
"==",
"null",
"&&",
"classLoader",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"StringBuilder",
"sb",
"=",
... | Gets the prefix of cache name without Hazelcast's {@link javax.cache.CacheManager}
specific prefix {@link com.hazelcast.cache.HazelcastCacheManager#CACHE_MANAGER_PREFIX}.
@param uri an implementation specific URI for the
Hazelcast's {@link javax.cache.CacheManager} (null means use
Hazelcast's {@link javax.cach... | [
"Gets",
"the",
"prefix",
"of",
"cache",
"name",
"without",
"Hazelcast",
"s",
"{",
"@link",
"javax",
".",
"cache",
".",
"CacheManager",
"}",
"specific",
"prefix",
"{",
"@link",
"com",
".",
"hazelcast",
".",
"cache",
".",
"HazelcastCacheManager#CACHE_MANAGER_PREFI... | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/CacheUtil.java#L44-L57 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.