repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 188 | func_name stringlengths 7 127 | whole_func_string stringlengths 77 3.91k | language stringclasses 1
value | func_code_string stringlengths 77 3.91k | func_code_tokens listlengths 20 745 | func_documentation_string stringlengths 61 1.98k | func_documentation_tokens listlengths 1 477 | split_name stringclasses 1
value | func_code_url stringlengths 111 288 |
|---|---|---|---|---|---|---|---|---|---|---|
networknt/light-4j | client/src/main/java/org/apache/hc/core5/util/copied/ByteArrayBuffer.java | ByteArrayBuffer.indexOf | public int indexOf(final byte b, final int from, final int to) {
int beginIndex = from;
if (beginIndex < 0) {
beginIndex = 0;
}
int endIndex = to;
if (endIndex > this.len) {
endIndex = this.len;
}
if (beginIndex > endIndex) {
re... | java | public int indexOf(final byte b, final int from, final int to) {
int beginIndex = from;
if (beginIndex < 0) {
beginIndex = 0;
}
int endIndex = to;
if (endIndex > this.len) {
endIndex = this.len;
}
if (beginIndex > endIndex) {
re... | [
"public",
"int",
"indexOf",
"(",
"final",
"byte",
"b",
",",
"final",
"int",
"from",
",",
"final",
"int",
"to",
")",
"{",
"int",
"beginIndex",
"=",
"from",
";",
"if",
"(",
"beginIndex",
"<",
"0",
")",
"{",
"beginIndex",
"=",
"0",
";",
"}",
"int",
... | Returns the index within this buffer of the first occurrence of the
specified byte, starting the search at the specified
{@code beginIndex} and finishing at {@code endIndex}.
If no such byte occurs in this buffer within the specified bounds,
{@code -1} is returned.
<p>
There is no restriction on the value of {@code beg... | [
"Returns",
"the",
"index",
"within",
"this",
"buffer",
"of",
"the",
"first",
"occurrence",
"of",
"the",
"specified",
"byte",
"starting",
"the",
"search",
"at",
"the",
"specified",
"{",
"@code",
"beginIndex",
"}",
"and",
"finishing",
"at",
"{",
"@code",
"endI... | train | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/org/apache/hc/core5/util/copied/ByteArrayBuffer.java#L309-L327 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java | VirtualMachineScaleSetsInner.powerOffAsync | public Observable<OperationStatusResponseInner> powerOffAsync(String resourceGroupName, String vmScaleSetName) {
return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() {
@Override
... | java | public Observable<OperationStatusResponseInner> powerOffAsync(String resourceGroupName, String vmScaleSetName) {
return powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() {
@Override
... | [
"public",
"Observable",
"<",
"OperationStatusResponseInner",
">",
"powerOffAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"vmScaleSetName",
")",
"{",
"return",
"powerOffWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"vmScaleSetName",
")",
".",
"map"... | Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
@param resourceGroupName The name of the resource group.
@param vmScaleSetName The name of the VM scale ... | [
"Power",
"off",
"(",
"stop",
")",
"one",
"or",
"more",
"virtual",
"machines",
"in",
"a",
"VM",
"scale",
"set",
".",
"Note",
"that",
"resources",
"are",
"still",
"attached",
"and",
"you",
"are",
"getting",
"charged",
"for",
"the",
"resources",
".",
"Inste... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L1751-L1758 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatter.java | DateTimeFormatter.ofPattern | public static DateTimeFormatter ofPattern(String pattern, Locale locale) {
return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale);
} | java | public static DateTimeFormatter ofPattern(String pattern, Locale locale) {
return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale);
} | [
"public",
"static",
"DateTimeFormatter",
"ofPattern",
"(",
"String",
"pattern",
",",
"Locale",
"locale",
")",
"{",
"return",
"new",
"DateTimeFormatterBuilder",
"(",
")",
".",
"appendPattern",
"(",
"pattern",
")",
".",
"toFormatter",
"(",
"locale",
")",
";",
"}... | Creates a formatter using the specified pattern and locale.
<p>
This method will create a formatter based on a simple
<a href="#patterns">pattern of letters and symbols</a>
as described in the class documentation.
For example, {@code d MMM uuuu} will format 2011-12-03 as '3 Dec 2011'.
<p>
The formatter will use the spe... | [
"Creates",
"a",
"formatter",
"using",
"the",
"specified",
"pattern",
"and",
"locale",
".",
"<p",
">",
"This",
"method",
"will",
"create",
"a",
"formatter",
"based",
"on",
"a",
"simple",
"<a",
"href",
"=",
"#patterns",
">",
"pattern",
"of",
"letters",
"and"... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimeFormatter.java#L559-L561 |
micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/context/DefaultBeanContext.java | DefaultBeanContext.getBean | public @Nonnull <T> T getBean(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) {
ArgumentUtils.requireNonNull("beanType", beanType);
return getBeanInternal(resolutionContext, beanType, qualifier, true, true);
} | java | public @Nonnull <T> T getBean(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) {
ArgumentUtils.requireNonNull("beanType", beanType);
return getBeanInternal(resolutionContext, beanType, qualifier, true, true);
} | [
"public",
"@",
"Nonnull",
"<",
"T",
">",
"T",
"getBean",
"(",
"@",
"Nullable",
"BeanResolutionContext",
"resolutionContext",
",",
"@",
"Nonnull",
"Class",
"<",
"T",
">",
"beanType",
",",
"@",
"Nullable",
"Qualifier",
"<",
"T",
">",
"qualifier",
")",
"{",
... | Get a bean of the given type and qualifier.
@param resolutionContext The bean context resolution
@param beanType The bean type
@param qualifier The qualifier
@param <T> The bean type parameter
@return The found bean | [
"Get",
"a",
"bean",
"of",
"the",
"given",
"type",
"and",
"qualifier",
"."
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/DefaultBeanContext.java#L1011-L1014 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java | ClassFinder.loadClass | public ClassSymbol loadClass(ModuleSymbol msym, Name flatname) throws CompletionFailure {
Assert.checkNonNull(msym);
Name packageName = Convert.packagePart(flatname);
PackageSymbol ps = syms.lookupPackage(msym, packageName);
Assert.checkNonNull(ps.modle, () -> "msym=" + msym + "; flatNa... | java | public ClassSymbol loadClass(ModuleSymbol msym, Name flatname) throws CompletionFailure {
Assert.checkNonNull(msym);
Name packageName = Convert.packagePart(flatname);
PackageSymbol ps = syms.lookupPackage(msym, packageName);
Assert.checkNonNull(ps.modle, () -> "msym=" + msym + "; flatNa... | [
"public",
"ClassSymbol",
"loadClass",
"(",
"ModuleSymbol",
"msym",
",",
"Name",
"flatname",
")",
"throws",
"CompletionFailure",
"{",
"Assert",
".",
"checkNonNull",
"(",
"msym",
")",
";",
"Name",
"packageName",
"=",
"Convert",
".",
"packagePart",
"(",
"flatname",... | Load a toplevel class with given fully qualified name
The class is entered into `classes' only if load was successful. | [
"Load",
"a",
"toplevel",
"class",
"with",
"given",
"fully",
"qualified",
"name",
"The",
"class",
"is",
"entered",
"into",
"classes",
"only",
"if",
"load",
"was",
"successful",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java#L399-L418 |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDFactoryDaoImpl.java | GeneratedDFactoryDaoImpl.queryByUpdatedBy | public Iterable<DFactory> queryByUpdatedBy(java.lang.String updatedBy) {
return queryByField(null, DFactoryMapper.Field.UPDATEDBY.getFieldName(), updatedBy);
} | java | public Iterable<DFactory> queryByUpdatedBy(java.lang.String updatedBy) {
return queryByField(null, DFactoryMapper.Field.UPDATEDBY.getFieldName(), updatedBy);
} | [
"public",
"Iterable",
"<",
"DFactory",
">",
"queryByUpdatedBy",
"(",
"java",
".",
"lang",
".",
"String",
"updatedBy",
")",
"{",
"return",
"queryByField",
"(",
"null",
",",
"DFactoryMapper",
".",
"Field",
".",
"UPDATEDBY",
".",
"getFieldName",
"(",
")",
",",
... | query-by method for field updatedBy
@param updatedBy the specified attribute
@return an Iterable of DFactorys for the specified updatedBy | [
"query",
"-",
"by",
"method",
"for",
"field",
"updatedBy"
] | train | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDFactoryDaoImpl.java#L115-L117 |
hdbeukel/james-core | src/main/java/org/jamesframework/core/subset/neigh/SingleAdditionNeighbourhood.java | SingleAdditionNeighbourhood.getRandomMove | @Override
public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) {
// check size limit
if(maxSizeReached(solution)){
// size limit would be exceeded
return null;
}
// get set of candidate IDs for addition (possibly fixed IDs are discarded)
... | java | @Override
public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) {
// check size limit
if(maxSizeReached(solution)){
// size limit would be exceeded
return null;
}
// get set of candidate IDs for addition (possibly fixed IDs are discarded)
... | [
"@",
"Override",
"public",
"SubsetMove",
"getRandomMove",
"(",
"SubsetSolution",
"solution",
",",
"Random",
"rnd",
")",
"{",
"// check size limit",
"if",
"(",
"maxSizeReached",
"(",
"solution",
")",
")",
"{",
"// size limit would be exceeded",
"return",
"null",
";",... | Generates a random addition move for the given subset solution that adds a single ID to the selection.
Possible fixed IDs are not considered to be added and the maximum subset size is taken into account.
If no addition move can be generated, <code>null</code> is returned.
@param solution solution for which a random ad... | [
"Generates",
"a",
"random",
"addition",
"move",
"for",
"the",
"given",
"subset",
"solution",
"that",
"adds",
"a",
"single",
"ID",
"to",
"the",
"selection",
".",
"Possible",
"fixed",
"IDs",
"are",
"not",
"considered",
"to",
"be",
"added",
"and",
"the",
"max... | train | https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/SingleAdditionNeighbourhood.java#L104-L121 |
querydsl/querydsl | querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/HibernateUpdateClause.java | HibernateUpdateClause.setLockMode | @SuppressWarnings("unchecked")
public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) {
lockModes.put(path, lockMode);
return this;
} | java | @SuppressWarnings("unchecked")
public HibernateUpdateClause setLockMode(Path<?> path, LockMode lockMode) {
lockModes.put(path, lockMode);
return this;
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"HibernateUpdateClause",
"setLockMode",
"(",
"Path",
"<",
"?",
">",
"path",
",",
"LockMode",
"lockMode",
")",
"{",
"lockModes",
".",
"put",
"(",
"path",
",",
"lockMode",
")",
";",
"return",
"this"... | Set the lock mode for the given path.
@return the current object | [
"Set",
"the",
"lock",
"mode",
"for",
"the",
"given",
"path",
"."
] | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/HibernateUpdateClause.java#L143-L147 |
spotify/docker-client | src/main/java/com/spotify/docker/client/DockerHost.java | DockerHost.fromEnv | public static DockerHost fromEnv() {
final String host = endpointFromEnv();
final String certPath = certPathFromEnv();
return new DockerHost(host, certPath);
} | java | public static DockerHost fromEnv() {
final String host = endpointFromEnv();
final String certPath = certPathFromEnv();
return new DockerHost(host, certPath);
} | [
"public",
"static",
"DockerHost",
"fromEnv",
"(",
")",
"{",
"final",
"String",
"host",
"=",
"endpointFromEnv",
"(",
")",
";",
"final",
"String",
"certPath",
"=",
"certPathFromEnv",
"(",
")",
";",
"return",
"new",
"DockerHost",
"(",
"host",
",",
"certPath",
... | Create a {@link DockerHost} from DOCKER_HOST and DOCKER_PORT env vars.
@return The DockerHost object. | [
"Create",
"a",
"{",
"@link",
"DockerHost",
"}",
"from",
"DOCKER_HOST",
"and",
"DOCKER_PORT",
"env",
"vars",
"."
] | train | https://github.com/spotify/docker-client/blob/f297361891f3bb6a2980b08057eede628d681791/src/main/java/com/spotify/docker/client/DockerHost.java#L169-L173 |
albfernandez/itext2 | src/main/java/com/lowagie/text/rtf/text/RtfSection.java | RtfSection.updateIndentation | private void updateIndentation(float indentLeft, float indentRight, float indentContent) {
if(this.title != null) {
this.title.setIndentLeft((int) (this.title.getIndentLeft() + indentLeft * RtfElement.TWIPS_FACTOR));
this.title.setIndentRight((int) (this.title.getIndentRight() + indentRi... | java | private void updateIndentation(float indentLeft, float indentRight, float indentContent) {
if(this.title != null) {
this.title.setIndentLeft((int) (this.title.getIndentLeft() + indentLeft * RtfElement.TWIPS_FACTOR));
this.title.setIndentRight((int) (this.title.getIndentRight() + indentRi... | [
"private",
"void",
"updateIndentation",
"(",
"float",
"indentLeft",
",",
"float",
"indentRight",
",",
"float",
"indentContent",
")",
"{",
"if",
"(",
"this",
".",
"title",
"!=",
"null",
")",
"{",
"this",
".",
"title",
".",
"setIndentLeft",
"(",
"(",
"int",
... | Updates the left, right and content indentation of all RtfParagraph and RtfSection
elements that this RtfSection contains.
@param indentLeft The left indentation to add.
@param indentRight The right indentation to add.
@param indentContent The content indentation to add. | [
"Updates",
"the",
"left",
"right",
"and",
"content",
"indentation",
"of",
"all",
"RtfParagraph",
"and",
"RtfSection",
"elements",
"that",
"this",
"RtfSection",
"contains",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/text/RtfSection.java#L183-L197 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java | ManagedDatabasesInner.createOrUpdateAsync | public Observable<ManagedDatabaseInner> createOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).map(new Func1<ServiceResponse<... | java | public Observable<ManagedDatabaseInner> createOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).map(new Func1<ServiceResponse<... | [
"public",
"Observable",
"<",
"ManagedDatabaseInner",
">",
"createOrUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"managedInstanceName",
",",
"String",
"databaseName",
",",
"ManagedDatabaseInner",
"parameters",
")",
"{",
"return",
"createOrUpdateWithServic... | Creates a new database or updates an existing database.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param managedInstanceName The name of the managed instance.
@param databaseName The name of the datab... | [
"Creates",
"a",
"new",
"database",
"or",
"updates",
"an",
"existing",
"database",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L544-L551 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java | TmdbSearch.searchPeople | public ResultList<PersonFind> searchPeople(String query, Integer page, Boolean includeAdult, SearchType searchType) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.ADULT, includeAdult);
parameters.add(Pa... | java | public ResultList<PersonFind> searchPeople(String query, Integer page, Boolean includeAdult, SearchType searchType) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.QUERY, query);
parameters.add(Param.ADULT, includeAdult);
parameters.add(Pa... | [
"public",
"ResultList",
"<",
"PersonFind",
">",
"searchPeople",
"(",
"String",
"query",
",",
"Integer",
"page",
",",
"Boolean",
"includeAdult",
",",
"SearchType",
"searchType",
")",
"throws",
"MovieDbException",
"{",
"TmdbParameters",
"parameters",
"=",
"new",
"Tm... | This is a good starting point to start finding people on TMDb.
The idea is to be a quick and light method so you can iterate through people quickly.
@param query
@param includeAdult
@param page
@param searchType
@return
@throws MovieDbException | [
"This",
"is",
"a",
"good",
"starting",
"point",
"to",
"start",
"finding",
"people",
"on",
"TMDb",
"."
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbSearch.java#L206-L217 |
matomo-org/piwik-java-tracker | src/main/java/org/piwik/java/tracking/PiwikRequest.java | PiwikRequest.setPageCustomVariable | @Deprecated
public void setPageCustomVariable(String key, String value){
if (value == null){
removeCustomVariable(PAGE_CUSTOM_VARIABLE, key);
} else {
setCustomVariable(PAGE_CUSTOM_VARIABLE, new CustomVariable(key, value), null);
}
} | java | @Deprecated
public void setPageCustomVariable(String key, String value){
if (value == null){
removeCustomVariable(PAGE_CUSTOM_VARIABLE, key);
} else {
setCustomVariable(PAGE_CUSTOM_VARIABLE, new CustomVariable(key, value), null);
}
} | [
"@",
"Deprecated",
"public",
"void",
"setPageCustomVariable",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"removeCustomVariable",
"(",
"PAGE_CUSTOM_VARIABLE",
",",
"key",
")",
";",
"}",
"else",
"{",
"... | Set a page custom variable with the specified key and value at the first available index.
All page custom variables with this key will be overwritten or deleted
@param key the key of the variable to set
@param value the value of the variable to set at the specified key. A null value will remove this custom variable
@d... | [
"Set",
"a",
"page",
"custom",
"variable",
"with",
"the",
"specified",
"key",
"and",
"value",
"at",
"the",
"first",
"available",
"index",
".",
"All",
"page",
"custom",
"variables",
"with",
"this",
"key",
"will",
"be",
"overwritten",
"or",
"deleted"
] | train | https://github.com/matomo-org/piwik-java-tracker/blob/23df71d27a89e89dc7a539b2eda88c90a206458b/src/main/java/org/piwik/java/tracking/PiwikRequest.java#L985-L992 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java | EvaluationCalibration.getProbabilityHistogram | public Histogram getProbabilityHistogram(int labelClassIdx) {
String title = "Network Probabilities Histogram - P(class " + labelClassIdx + ") - Data Labelled Class "
+ labelClassIdx + " Only";
int[] counts = probHistogramByLabelClass.getColumn(labelClassIdx).dup().data().asInt()... | java | public Histogram getProbabilityHistogram(int labelClassIdx) {
String title = "Network Probabilities Histogram - P(class " + labelClassIdx + ") - Data Labelled Class "
+ labelClassIdx + " Only";
int[] counts = probHistogramByLabelClass.getColumn(labelClassIdx).dup().data().asInt()... | [
"public",
"Histogram",
"getProbabilityHistogram",
"(",
"int",
"labelClassIdx",
")",
"{",
"String",
"title",
"=",
"\"Network Probabilities Histogram - P(class \"",
"+",
"labelClassIdx",
"+",
"\") - Data Labelled Class \"",
"+",
"labelClassIdx",
"+",
"\" Only\"",
";",
"int",
... | Return a probability histogram of the specified label class index. That is, for label class index i,
a histogram of P(class_i | input) is returned, only for those examples that are labelled as class i.
@param labelClassIdx Index of the label class to get the histogram for
@return Probability histogram | [
"Return",
"a",
"probability",
"histogram",
"of",
"the",
"specified",
"label",
"class",
"index",
".",
"That",
"is",
"for",
"label",
"class",
"index",
"i",
"a",
"histogram",
"of",
"P",
"(",
"class_i",
"|",
"input",
")",
"is",
"returned",
"only",
"for",
"th... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/EvaluationCalibration.java#L467-L472 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/lang/Assert.java | Assert.isAssignable | public static void isAssignable(Class<?> superType, Class<?> subType) throws IllegalArgumentException {
isAssignable(superType, subType, "{} is not assignable to {})", subType, superType);
} | java | public static void isAssignable(Class<?> superType, Class<?> subType) throws IllegalArgumentException {
isAssignable(superType, subType, "{} is not assignable to {})", subType, superType);
} | [
"public",
"static",
"void",
"isAssignable",
"(",
"Class",
"<",
"?",
">",
"superType",
",",
"Class",
"<",
"?",
">",
"subType",
")",
"throws",
"IllegalArgumentException",
"{",
"isAssignable",
"(",
"superType",
",",
"subType",
",",
"\"{} is not assignable to {})\"",
... | 断言 {@code superType.isAssignableFrom(subType)} 是否为 {@code true}.
<pre class="code">
Assert.isAssignable(Number.class, myClass);
</pre>
@param superType 需要检查的父类或接口
@param subType 需要检查的子类
@throws IllegalArgumentException 如果子类非继承父类,抛出此异常 | [
"断言",
"{",
"@code",
"superType",
".",
"isAssignableFrom",
"(",
"subType",
")",
"}",
"是否为",
"{",
"@code",
"true",
"}",
"."
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L468-L470 |
beanshell/beanshell | src/main/java/bsh/Interpreter.java | Interpreter.source | public Object source( String filename )
throws FileNotFoundException, IOException, EvalError
{
return source( filename, globalNameSpace );
} | java | public Object source( String filename )
throws FileNotFoundException, IOException, EvalError
{
return source( filename, globalNameSpace );
} | [
"public",
"Object",
"source",
"(",
"String",
"filename",
")",
"throws",
"FileNotFoundException",
",",
"IOException",
",",
"EvalError",
"{",
"return",
"source",
"(",
"filename",
",",
"globalNameSpace",
")",
";",
"}"
] | Read text from fileName and eval it.
Convenience method. Use the global namespace. | [
"Read",
"text",
"from",
"fileName",
"and",
"eval",
"it",
".",
"Convenience",
"method",
".",
"Use",
"the",
"global",
"namespace",
"."
] | train | https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Interpreter.java#L580-L584 |
baratine/baratine | framework/src/main/java/com/caucho/v5/amp/remote/ServiceRefLinkFactory.java | ServiceRefLinkFactory.createLinkService | public ServiceRefAmp createLinkService(String path, PodRef podCaller)
{
StubLink actorLink;
String address = _scheme + "//" + _serviceRefOut.address() + path;
ServiceRefAmp parentRef = _actorOut.getServiceRef();
if (_queryMapRef != null) {
//String addressSelf = "/system";
... | java | public ServiceRefAmp createLinkService(String path, PodRef podCaller)
{
StubLink actorLink;
String address = _scheme + "//" + _serviceRefOut.address() + path;
ServiceRefAmp parentRef = _actorOut.getServiceRef();
if (_queryMapRef != null) {
//String addressSelf = "/system";
... | [
"public",
"ServiceRefAmp",
"createLinkService",
"(",
"String",
"path",
",",
"PodRef",
"podCaller",
")",
"{",
"StubLink",
"actorLink",
";",
"String",
"address",
"=",
"_scheme",
"+",
"\"//\"",
"+",
"_serviceRefOut",
".",
"address",
"(",
")",
"+",
"path",
";",
... | Return the serviceRef for a foreign path and calling pod.
@param path the service path on the foreign server
@param podCaller the name of the calling pod. | [
"Return",
"the",
"serviceRef",
"for",
"a",
"foreign",
"path",
"and",
"calling",
"pod",
"."
] | train | https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/amp/remote/ServiceRefLinkFactory.java#L86-L115 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/db/GeoPackageCoreConnection.java | GeoPackageCoreConnection.querySingleRowResults | public List<Object> querySingleRowResults(String sql, String[] args) {
return querySingleRowResults(sql, args, null);
} | java | public List<Object> querySingleRowResults(String sql, String[] args) {
return querySingleRowResults(sql, args, null);
} | [
"public",
"List",
"<",
"Object",
">",
"querySingleRowResults",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"args",
")",
"{",
"return",
"querySingleRowResults",
"(",
"sql",
",",
"args",
",",
"null",
")",
";",
"}"
] | Query for values in a single (first) row
@param sql
sql statement
@param args
arguments
@return single row results
@since 3.1.0 | [
"Query",
"for",
"values",
"in",
"a",
"single",
"(",
"first",
")",
"row"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/db/GeoPackageCoreConnection.java#L634-L636 |
joniles/mpxj | src/main/java/net/sf/mpxj/json/JsonWriter.java | JsonWriter.writeIntegerField | private void writeIntegerField(String fieldName, Object value) throws IOException
{
int val = ((Number) value).intValue();
if (val != 0)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | java | private void writeIntegerField(String fieldName, Object value) throws IOException
{
int val = ((Number) value).intValue();
if (val != 0)
{
m_writer.writeNameValuePair(fieldName, val);
}
} | [
"private",
"void",
"writeIntegerField",
"(",
"String",
"fieldName",
",",
"Object",
"value",
")",
"throws",
"IOException",
"{",
"int",
"val",
"=",
"(",
"(",
"Number",
")",
"value",
")",
".",
"intValue",
"(",
")",
";",
"if",
"(",
"val",
"!=",
"0",
")",
... | Write an integer field to the JSON file.
@param fieldName field name
@param value field value | [
"Write",
"an",
"integer",
"field",
"to",
"the",
"JSON",
"file",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonWriter.java#L370-L377 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java | LogAnalyticsInner.beginExportThrottledRequestsAsync | public Observable<LogAnalyticsOperationResultInner> beginExportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) {
return beginExportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1<ServiceResponse<LogAnalyticsOperationResultInner>, LogAnalyticsOperationResu... | java | public Observable<LogAnalyticsOperationResultInner> beginExportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) {
return beginExportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1<ServiceResponse<LogAnalyticsOperationResultInner>, LogAnalyticsOperationResu... | [
"public",
"Observable",
"<",
"LogAnalyticsOperationResultInner",
">",
"beginExportThrottledRequestsAsync",
"(",
"String",
"location",
",",
"ThrottledRequestsInput",
"parameters",
")",
"{",
"return",
"beginExportThrottledRequestsWithServiceResponseAsync",
"(",
"location",
",",
"... | Export logs that show total throttled Api requests for this subscription in the given time window.
@param location The location upon which virtual-machine-sizes is queried.
@param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api.
@throws IllegalArgumentException thrown if parameters fail the... | [
"Export",
"logs",
"that",
"show",
"total",
"throttled",
"Api",
"requests",
"for",
"this",
"subscription",
"in",
"the",
"given",
"time",
"window",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java#L339-L346 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java | VersionsImpl.cloneWithServiceResponseAsync | public Observable<ServiceResponse<String>> cloneWithServiceResponseAsync(UUID appId, String versionId, CloneOptionalParameter cloneOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
... | java | public Observable<ServiceResponse<String>> cloneWithServiceResponseAsync(UUID appId, String versionId, CloneOptionalParameter cloneOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"String",
">",
">",
"cloneWithServiceResponseAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"CloneOptionalParameter",
"cloneOptionalParameter",
")",
"{",
"if",
"(",
"this",
".",
"client",
".",
"e... | Creates a new version using the current snapshot of the selected application version.
@param appId The application ID.
@param versionId The version ID.
@param cloneOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters f... | [
"Creates",
"a",
"new",
"version",
"using",
"the",
"current",
"snapshot",
"of",
"the",
"selected",
"application",
"version",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java#L162-L175 |
joniles/mpxj | src/main/java/net/sf/mpxj/sample/MpxjConvert.java | MpxjConvert.process | public void process(String inputFile, String outputFile) throws Exception
{
System.out.println("Reading input file started.");
long start = System.currentTimeMillis();
ProjectFile projectFile = readFile(inputFile);
long elapsed = System.currentTimeMillis() - start;
System.out.println("R... | java | public void process(String inputFile, String outputFile) throws Exception
{
System.out.println("Reading input file started.");
long start = System.currentTimeMillis();
ProjectFile projectFile = readFile(inputFile);
long elapsed = System.currentTimeMillis() - start;
System.out.println("R... | [
"public",
"void",
"process",
"(",
"String",
"inputFile",
",",
"String",
"outputFile",
")",
"throws",
"Exception",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Reading input file started.\"",
")",
";",
"long",
"start",
"=",
"System",
".",
"currentTimeMillis... | Convert one project file format to another.
@param inputFile input file
@param outputFile output file
@throws Exception | [
"Convert",
"one",
"project",
"file",
"format",
"to",
"another",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MpxjConvert.java#L80-L94 |
snowflakedb/snowflake-jdbc | src/main/java/net/snowflake/client/core/SFTrustManager.java | SFTrustManager.validateRevocationStatus | void validateRevocationStatus(X509Certificate[] chain, String peerHost) throws CertificateException
{
final List<Certificate> bcChain = convertToBouncyCastleCertificate(chain);
final List<SFPair<Certificate, Certificate>> pairIssuerSubjectList =
getPairIssuerSubject(bcChain);
if (peerHost.startsW... | java | void validateRevocationStatus(X509Certificate[] chain, String peerHost) throws CertificateException
{
final List<Certificate> bcChain = convertToBouncyCastleCertificate(chain);
final List<SFPair<Certificate, Certificate>> pairIssuerSubjectList =
getPairIssuerSubject(bcChain);
if (peerHost.startsW... | [
"void",
"validateRevocationStatus",
"(",
"X509Certificate",
"[",
"]",
"chain",
",",
"String",
"peerHost",
")",
"throws",
"CertificateException",
"{",
"final",
"List",
"<",
"Certificate",
">",
"bcChain",
"=",
"convertToBouncyCastleCertificate",
"(",
"chain",
")",
";"... | Certificate Revocation checks
@param chain chain of certificates attached.
@param peerHost Hostname of the server
@throws CertificateException if any certificate validation fails | [
"Certificate",
"Revocation",
"checks"
] | train | https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFTrustManager.java#L585-L631 |
the-fascinator/plugin-indexer-solr | src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java | SolrIndexer.cacheConfig | private void cacheConfig(String oid, JsonSimpleConfig config) {
if (useCache && config != null) {
configCache.put(oid, config);
}
} | java | private void cacheConfig(String oid, JsonSimpleConfig config) {
if (useCache && config != null) {
configCache.put(oid, config);
}
} | [
"private",
"void",
"cacheConfig",
"(",
"String",
"oid",
",",
"JsonSimpleConfig",
"config",
")",
"{",
"if",
"(",
"useCache",
"&&",
"config",
"!=",
"null",
")",
"{",
"configCache",
".",
"put",
"(",
"oid",
",",
"config",
")",
";",
"}",
"}"
] | Add a config class to the cache if caching if configured
@param oid
: The config OID to use as an index
@param config
: The instantiated JsonConfigHelper to cache | [
"Add",
"a",
"config",
"class",
"to",
"the",
"cache",
"if",
"caching",
"if",
"configured"
] | train | https://github.com/the-fascinator/plugin-indexer-solr/blob/001159b18b78a87daa5d8b2a17ced28694bae156/src/main/java/com/googlecode/fascinator/indexer/SolrIndexer.java#L1163-L1167 |
GenesysPureEngage/authentication-client-java | src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java | AuthenticationApi.retrieveTokenWithHttpInfo | public ApiResponse<DefaultOAuth2AccessToken> retrieveTokenWithHttpInfo(String grantType, String accept, String authorization, String clientId, String password, String refreshToken, String scope, String username) throws ApiException {
com.squareup.okhttp.Call call = retrieveTokenValidateBeforeCall(grantType, acc... | java | public ApiResponse<DefaultOAuth2AccessToken> retrieveTokenWithHttpInfo(String grantType, String accept, String authorization, String clientId, String password, String refreshToken, String scope, String username) throws ApiException {
com.squareup.okhttp.Call call = retrieveTokenValidateBeforeCall(grantType, acc... | [
"public",
"ApiResponse",
"<",
"DefaultOAuth2AccessToken",
">",
"retrieveTokenWithHttpInfo",
"(",
"String",
"grantType",
",",
"String",
"accept",
",",
"String",
"authorization",
",",
"String",
"clientId",
",",
"String",
"password",
",",
"String",
"refreshToken",
",",
... | Retrieve access token
Retrieve an access token based on the grant type &mdash; Authorization Code Grant, Resource Owner Password Credentials Grant or Client Credentials Grant. For more information, see [Token Endpoint](https://tools.ietf.org/html/rfc6749). **Note:** For the optional **scope** parameter, the Authent... | [
"Retrieve",
"access",
"token",
"Retrieve",
"an",
"access",
"token",
"based",
"on",
"the",
"grant",
"type",
"&",
";",
"mdash",
";",
"Authorization",
"Code",
"Grant",
"Resource",
"Owner",
"Password",
"Credentials",
"Grant",
"or",
"Client",
"Credentials",
"Grant... | train | https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java#L1068-L1072 |
janvanbesien/java-ipv6 | src/main/java/com/googlecode/ipv6/IPv6Network.java | IPv6Network.fromTwoAddresses | public static IPv6Network fromTwoAddresses(IPv6Address one, IPv6Address two)
{
final IPv6NetworkMask longestPrefixLength = IPv6NetworkMask.fromPrefixLength(IPv6NetworkHelpers.longestPrefixLength(one, two));
return new IPv6Network(one.maskWithNetworkMask(longestPrefixLength), longestPrefixLength);
... | java | public static IPv6Network fromTwoAddresses(IPv6Address one, IPv6Address two)
{
final IPv6NetworkMask longestPrefixLength = IPv6NetworkMask.fromPrefixLength(IPv6NetworkHelpers.longestPrefixLength(one, two));
return new IPv6Network(one.maskWithNetworkMask(longestPrefixLength), longestPrefixLength);
... | [
"public",
"static",
"IPv6Network",
"fromTwoAddresses",
"(",
"IPv6Address",
"one",
",",
"IPv6Address",
"two",
")",
"{",
"final",
"IPv6NetworkMask",
"longestPrefixLength",
"=",
"IPv6NetworkMask",
".",
"fromPrefixLength",
"(",
"IPv6NetworkHelpers",
".",
"longestPrefixLength"... | Create an IPv6 network from the two addresses within the network. This will construct the smallest possible network ("longest prefix
length") which contains both addresses.
@param one address one
@param two address two, should be bigger than address one
@return ipv6 network | [
"Create",
"an",
"IPv6",
"network",
"from",
"the",
"two",
"addresses",
"within",
"the",
"network",
".",
"This",
"will",
"construct",
"the",
"smallest",
"possible",
"network",
"(",
"longest",
"prefix",
"length",
")",
"which",
"contains",
"both",
"addresses",
"."... | train | https://github.com/janvanbesien/java-ipv6/blob/9af15b4a6c0074f9fa23dfa030027c631b9c2f78/src/main/java/com/googlecode/ipv6/IPv6Network.java#L76-L80 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java | MetricStore.getSubtaskMetricStore | public synchronized ComponentMetricStore getSubtaskMetricStore(String jobID, String taskID, int subtaskIndex) {
JobMetricStore job = jobID == null ? null : jobs.get(jobID);
if (job == null) {
return null;
}
TaskMetricStore task = job.getTaskMetricStore(taskID);
if (task == null) {
return null;
}
ret... | java | public synchronized ComponentMetricStore getSubtaskMetricStore(String jobID, String taskID, int subtaskIndex) {
JobMetricStore job = jobID == null ? null : jobs.get(jobID);
if (job == null) {
return null;
}
TaskMetricStore task = job.getTaskMetricStore(taskID);
if (task == null) {
return null;
}
ret... | [
"public",
"synchronized",
"ComponentMetricStore",
"getSubtaskMetricStore",
"(",
"String",
"jobID",
",",
"String",
"taskID",
",",
"int",
"subtaskIndex",
")",
"{",
"JobMetricStore",
"job",
"=",
"jobID",
"==",
"null",
"?",
"null",
":",
"jobs",
".",
"get",
"(",
"j... | Returns the {@link ComponentMetricStore} for the given job/task ID and subtask index.
@param jobID job ID
@param taskID task ID
@param subtaskIndex subtask index
@return SubtaskMetricStore for the given IDs and index, or null if no store for the given arguments exists | [
"Returns",
"the",
"{",
"@link",
"ComponentMetricStore",
"}",
"for",
"the",
"given",
"job",
"/",
"task",
"ID",
"and",
"subtask",
"index",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/metrics/MetricStore.java#L145-L155 |
BorderTech/wcomponents | wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java | ExampleSection.selectExample | public void selectExample(final WComponent example, final String exampleName) {
WComponent currentExample = container.getChildAt(0).getParent();
if (currentExample != null && currentExample.getClass().equals(example.getClass())) {
// Same example selected, do nothing
return;
}
resetExample();
containe... | java | public void selectExample(final WComponent example, final String exampleName) {
WComponent currentExample = container.getChildAt(0).getParent();
if (currentExample != null && currentExample.getClass().equals(example.getClass())) {
// Same example selected, do nothing
return;
}
resetExample();
containe... | [
"public",
"void",
"selectExample",
"(",
"final",
"WComponent",
"example",
",",
"final",
"String",
"exampleName",
")",
"{",
"WComponent",
"currentExample",
"=",
"container",
".",
"getChildAt",
"(",
"0",
")",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"curren... | Selects an example.
@param example the example to select.
@param exampleName the name of the example being selected. | [
"Selects",
"an",
"example",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/picker/ExampleSection.java#L149-L183 |
classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.addImplementedInterface | void addImplementedInterface(final String interfaceName, final Map<String, ClassInfo> classNameToClassInfo) {
final ClassInfo interfaceClassInfo = getOrCreateClassInfo(interfaceName,
/* classModifiers = */ Modifier.INTERFACE, classNameToClassInfo);
interfaceClassInfo.isInterface = true;
... | java | void addImplementedInterface(final String interfaceName, final Map<String, ClassInfo> classNameToClassInfo) {
final ClassInfo interfaceClassInfo = getOrCreateClassInfo(interfaceName,
/* classModifiers = */ Modifier.INTERFACE, classNameToClassInfo);
interfaceClassInfo.isInterface = true;
... | [
"void",
"addImplementedInterface",
"(",
"final",
"String",
"interfaceName",
",",
"final",
"Map",
"<",
"String",
",",
"ClassInfo",
">",
"classNameToClassInfo",
")",
"{",
"final",
"ClassInfo",
"interfaceClassInfo",
"=",
"getOrCreateClassInfo",
"(",
"interfaceName",
",",... | Add an implemented interface to this class.
@param interfaceName
the interface name
@param classNameToClassInfo
the map from class name to class info | [
"Add",
"an",
"implemented",
"interface",
"to",
"this",
"class",
"."
] | train | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L383-L390 |
super-csv/super-csv | super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/ParseDateTimeZone.java | ParseDateTimeZone.execute | public Object execute(final Object value, final CsvContext context) {
validateInputNotNull(value, context);
if (!(value instanceof String)) {
throw new SuperCsvCellProcessorException(String.class, value,
context, this);
}
final DateTimeZone result;
try {
result = DateTimeZone.forID((String) value);... | java | public Object execute(final Object value, final CsvContext context) {
validateInputNotNull(value, context);
if (!(value instanceof String)) {
throw new SuperCsvCellProcessorException(String.class, value,
context, this);
}
final DateTimeZone result;
try {
result = DateTimeZone.forID((String) value);... | [
"public",
"Object",
"execute",
"(",
"final",
"Object",
"value",
",",
"final",
"CsvContext",
"context",
")",
"{",
"validateInputNotNull",
"(",
"value",
",",
"context",
")",
";",
"if",
"(",
"!",
"(",
"value",
"instanceof",
"String",
")",
")",
"{",
"throw",
... | {@inheritDoc}
@throws SuperCsvCellProcessorException
if value is null or is not a String | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/ParseDateTimeZone.java#L59-L74 |
johnkil/Android-AppMsg | library/src/com/devspark/appmsg/AppMsg.java | AppMsg.makeText | private static AppMsg makeText(Activity context, CharSequence text, Style style, View view, boolean floating) {
return makeText(context, text, style, view, floating, 0);
} | java | private static AppMsg makeText(Activity context, CharSequence text, Style style, View view, boolean floating) {
return makeText(context, text, style, view, floating, 0);
} | [
"private",
"static",
"AppMsg",
"makeText",
"(",
"Activity",
"context",
",",
"CharSequence",
"text",
",",
"Style",
"style",
",",
"View",
"view",
",",
"boolean",
"floating",
")",
"{",
"return",
"makeText",
"(",
"context",
",",
"text",
",",
"style",
",",
"vie... | Make a {@link AppMsg} with a custom view. It can be used to create non-floating notifications if floating is false.
@param context The context to use. Usually your
{@link android.app.Activity} object.
@param view
View to be used.
@param text The text to show. Can be formatted text.
@param style The style with ... | [
"Make",
"a",
"{",
"@link",
"AppMsg",
"}",
"with",
"a",
"custom",
"view",
".",
"It",
"can",
"be",
"used",
"to",
"create",
"non",
"-",
"floating",
"notifications",
"if",
"floating",
"is",
"false",
"."
] | train | https://github.com/johnkil/Android-AppMsg/blob/e7fdd7870530a24e6d825278ee0863be0521e8b8/library/src/com/devspark/appmsg/AppMsg.java#L292-L294 |
hankcs/HanLP | src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java | Matrix.constructWithCopy | public static Matrix constructWithCopy(double[][] A)
{
int m = A.length;
int n = A[0].length;
Matrix X = new Matrix(m, n);
double[][] C = X.getArray();
for (int i = 0; i < m; i++)
{
if (A[i].length != n)
{
throw new IllegalArgum... | java | public static Matrix constructWithCopy(double[][] A)
{
int m = A.length;
int n = A[0].length;
Matrix X = new Matrix(m, n);
double[][] C = X.getArray();
for (int i = 0; i < m; i++)
{
if (A[i].length != n)
{
throw new IllegalArgum... | [
"public",
"static",
"Matrix",
"constructWithCopy",
"(",
"double",
"[",
"]",
"[",
"]",
"A",
")",
"{",
"int",
"m",
"=",
"A",
".",
"length",
";",
"int",
"n",
"=",
"A",
"[",
"0",
"]",
".",
"length",
";",
"Matrix",
"X",
"=",
"new",
"Matrix",
"(",
"m... | Construct a matrix from a copy of a 2-D array.
@param A Two-dimensional array of doubles.
@throws IllegalArgumentException All rows must have the same length | [
"Construct",
"a",
"matrix",
"from",
"a",
"copy",
"of",
"a",
"2",
"-",
"D",
"array",
"."
] | train | https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/dependency/nnparser/Matrix.java#L199-L218 |
calrissian/mango | mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterators.java | CloseableIterators.groupBy | public static <T> CloseableIterator<List<T>> groupBy(final CloseableIterator<? extends T> iterator, final Function<? super T, ?> groupingFunction) {
return wrap(Iterators2.groupBy(iterator, groupingFunction), iterator);
} | java | public static <T> CloseableIterator<List<T>> groupBy(final CloseableIterator<? extends T> iterator, final Function<? super T, ?> groupingFunction) {
return wrap(Iterators2.groupBy(iterator, groupingFunction), iterator);
} | [
"public",
"static",
"<",
"T",
">",
"CloseableIterator",
"<",
"List",
"<",
"T",
">",
">",
"groupBy",
"(",
"final",
"CloseableIterator",
"<",
"?",
"extends",
"T",
">",
"iterator",
",",
"final",
"Function",
"<",
"?",
"super",
"T",
",",
"?",
">",
"grouping... | Divides a closeableiterator into unmodifiable sublists of equivalent elements. The iterator groups elements
in consecutive order, forming a new partition when the value from the provided function changes. For example,
grouping the iterator {@code [1, 3, 2, 4, 5]} with a function grouping even and odd numbers
yields {@c... | [
"Divides",
"a",
"closeableiterator",
"into",
"unmodifiable",
"sublists",
"of",
"equivalent",
"elements",
".",
"The",
"iterator",
"groups",
"elements",
"in",
"consecutive",
"order",
"forming",
"a",
"new",
"partition",
"when",
"the",
"value",
"from",
"the",
"provide... | train | https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterators.java#L104-L106 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java | TheMovieDbApi.getSeasonExternalID | public ExternalID getSeasonExternalID(int tvID, int seasonNumber, String language) throws MovieDbException {
return tmdbSeasons.getSeasonExternalID(tvID, seasonNumber, language);
} | java | public ExternalID getSeasonExternalID(int tvID, int seasonNumber, String language) throws MovieDbException {
return tmdbSeasons.getSeasonExternalID(tvID, seasonNumber, language);
} | [
"public",
"ExternalID",
"getSeasonExternalID",
"(",
"int",
"tvID",
",",
"int",
"seasonNumber",
",",
"String",
"language",
")",
"throws",
"MovieDbException",
"{",
"return",
"tmdbSeasons",
".",
"getSeasonExternalID",
"(",
"tvID",
",",
"seasonNumber",
",",
"language",
... | Get the external ids that we have stored for a TV season by season
number.
@param tvID tvID
@param seasonNumber seasonNumber
@param language language
@return
@throws MovieDbException exception | [
"Get",
"the",
"external",
"ids",
"that",
"we",
"have",
"stored",
"for",
"a",
"TV",
"season",
"by",
"season",
"number",
"."
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L1726-L1728 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java | BaseNDArrayFactory.valueArrayOf | @Override
public INDArray valueArrayOf(int[] shape, double value) {
INDArray ret = Nd4j.createUninitialized(shape, Nd4j.order());
ret.assign(value);
return ret;
} | java | @Override
public INDArray valueArrayOf(int[] shape, double value) {
INDArray ret = Nd4j.createUninitialized(shape, Nd4j.order());
ret.assign(value);
return ret;
} | [
"@",
"Override",
"public",
"INDArray",
"valueArrayOf",
"(",
"int",
"[",
"]",
"shape",
",",
"double",
"value",
")",
"{",
"INDArray",
"ret",
"=",
"Nd4j",
".",
"createUninitialized",
"(",
"shape",
",",
"Nd4j",
".",
"order",
"(",
")",
")",
";",
"ret",
".",... | Creates an ndarray with the specified value
as the only value in the ndarray
@param shape the shape of the ndarray
@param value the value to assign
@return the created ndarray | [
"Creates",
"an",
"ndarray",
"with",
"the",
"specified",
"value",
"as",
"the",
"only",
"value",
"in",
"the",
"ndarray"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java#L796-L801 |
shinesolutions/swagger-aem | java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java | SlingApi.postConfigApacheFelixJettyBasedHttpServiceAsync | public com.squareup.okhttp.Call postConfigApacheFelixJettyBasedHttpServiceAsync(String runmode, Boolean orgApacheFelixHttpsNio, String orgApacheFelixHttpsNioTypeHint, String orgApacheFelixHttpsKeystore, String orgApacheFelixHttpsKeystoreTypeHint, String orgApacheFelixHttpsKeystorePassword, String orgApacheFelixHttpsKey... | java | public com.squareup.okhttp.Call postConfigApacheFelixJettyBasedHttpServiceAsync(String runmode, Boolean orgApacheFelixHttpsNio, String orgApacheFelixHttpsNioTypeHint, String orgApacheFelixHttpsKeystore, String orgApacheFelixHttpsKeystoreTypeHint, String orgApacheFelixHttpsKeystorePassword, String orgApacheFelixHttpsKey... | [
"public",
"com",
".",
"squareup",
".",
"okhttp",
".",
"Call",
"postConfigApacheFelixJettyBasedHttpServiceAsync",
"(",
"String",
"runmode",
",",
"Boolean",
"orgApacheFelixHttpsNio",
",",
"String",
"orgApacheFelixHttpsNioTypeHint",
",",
"String",
"orgApacheFelixHttpsKeystore",
... | (asynchronously)
@param runmode (required)
@param orgApacheFelixHttpsNio (optional)
@param orgApacheFelixHttpsNioTypeHint (optional)
@param orgApacheFelixHttpsKeystore (optional)
@param orgApacheFelixHttpsKeystoreTypeHint (optional)
@param orgApacheFelixHttpsKeystorePassword (optional)
@param orgApacheFelixHttps... | [
"(",
"asynchronously",
")"
] | train | https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java#L3112-L3136 |
jparsec/jparsec | jparsec-examples/src/main/java/org/jparsec/examples/common/Strings.java | Strings.prependEach | public static String prependEach(String delim, Iterable<?> objects) {
StringBuilder builder = new StringBuilder();
for (Object obj : objects) {
builder.append(delim);
builder.append(obj);
}
return builder.toString();
} | java | public static String prependEach(String delim, Iterable<?> objects) {
StringBuilder builder = new StringBuilder();
for (Object obj : objects) {
builder.append(delim);
builder.append(obj);
}
return builder.toString();
} | [
"public",
"static",
"String",
"prependEach",
"(",
"String",
"delim",
",",
"Iterable",
"<",
"?",
">",
"objects",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Object",
"obj",
":",
"objects",
")",
"{",
"buil... | Prepends {@code delim} before each object of {@code objects}. | [
"Prepends",
"{"
] | train | https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec-examples/src/main/java/org/jparsec/examples/common/Strings.java#L28-L35 |
alkacon/opencms-core | src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java | CmsJspContentAccessValueWrapper.createWrapper | public static CmsJspContentAccessValueWrapper createWrapper(
CmsObject cms,
I_CmsXmlContentValue value,
I_CmsXmlDocument content,
String valueName,
Locale locale) {
if ((value != null) && (cms != null)) {
return new CmsJspContentAccessValueWrapper(cms, value)... | java | public static CmsJspContentAccessValueWrapper createWrapper(
CmsObject cms,
I_CmsXmlContentValue value,
I_CmsXmlDocument content,
String valueName,
Locale locale) {
if ((value != null) && (cms != null)) {
return new CmsJspContentAccessValueWrapper(cms, value)... | [
"public",
"static",
"CmsJspContentAccessValueWrapper",
"createWrapper",
"(",
"CmsObject",
"cms",
",",
"I_CmsXmlContentValue",
"value",
",",
"I_CmsXmlDocument",
"content",
",",
"String",
"valueName",
",",
"Locale",
"locale",
")",
"{",
"if",
"(",
"(",
"value",
"!=",
... | Factory method to create a new XML content value wrapper.<p>
In case either parameter is <code>null</code>, the {@link #NULL_VALUE_WRAPPER} is returned.<p>
@param cms the current users OpenCms context
@param value the value to warp
@param content the content document, required to set the null value info
@param valueN... | [
"Factory",
"method",
"to",
"create",
"a",
"new",
"XML",
"content",
"value",
"wrapper",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspContentAccessValueWrapper.java#L419-L437 |
ManfredTremmel/gwt-bean-validators | gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/util/Contracts.java | Contracts.assertNotEmpty | public static void assertNotEmpty(final String pstring, final String pmessage) {
if (pstring == null || pstring.length() == 0) {
throw new IllegalArgumentException(pmessage);
}
} | java | public static void assertNotEmpty(final String pstring, final String pmessage) {
if (pstring == null || pstring.length() == 0) {
throw new IllegalArgumentException(pmessage);
}
} | [
"public",
"static",
"void",
"assertNotEmpty",
"(",
"final",
"String",
"pstring",
",",
"final",
"String",
"pmessage",
")",
"{",
"if",
"(",
"pstring",
"==",
"null",
"||",
"pstring",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"IllegalArgu... | check if a string is not empty.
@param pstring string to check
@param pmessage error message to throw if test fails | [
"check",
"if",
"a",
"string",
"is",
"not",
"empty",
"."
] | train | https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/util/Contracts.java#L77-L81 |
HadoopGenomics/Hadoop-BAM | src/main/java/org/seqdoop/hadoop_bam/BAMInputFormat.java | BAMInputFormat.addProbabilisticSplits | private int addProbabilisticSplits(
List<InputSplit> splits, int i, List<InputSplit> newSplits,
Configuration cfg)
throws IOException
{
final Path path = ((FileSplit)splits.get(i)).getPath();
try (final SeekableStream sin = WrapSeekable.openPath(path.getFileSystem(cfg), path)) {
final BA... | java | private int addProbabilisticSplits(
List<InputSplit> splits, int i, List<InputSplit> newSplits,
Configuration cfg)
throws IOException
{
final Path path = ((FileSplit)splits.get(i)).getPath();
try (final SeekableStream sin = WrapSeekable.openPath(path.getFileSystem(cfg), path)) {
final BA... | [
"private",
"int",
"addProbabilisticSplits",
"(",
"List",
"<",
"InputSplit",
">",
"splits",
",",
"int",
"i",
",",
"List",
"<",
"InputSplit",
">",
"newSplits",
",",
"Configuration",
"cfg",
")",
"throws",
"IOException",
"{",
"final",
"Path",
"path",
"=",
"(",
... | file repeatedly and checking addIndexedSplits for an index repeatedly. | [
"file",
"repeatedly",
"and",
"checking",
"addIndexedSplits",
"for",
"an",
"index",
"repeatedly",
"."
] | train | https://github.com/HadoopGenomics/Hadoop-BAM/blob/9f974cf635a8d72f69604021cc3d5f3469d38d2f/src/main/java/org/seqdoop/hadoop_bam/BAMInputFormat.java#L481-L540 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/string/StringParser.java | StringParser.parseFloat | public static float parseFloat (@Nullable final Object aObject, final float fDefault)
{
if (aObject == null)
return fDefault;
if (aObject instanceof Number)
return ((Number) aObject).floatValue ();
return parseFloat (aObject.toString (), fDefault);
} | java | public static float parseFloat (@Nullable final Object aObject, final float fDefault)
{
if (aObject == null)
return fDefault;
if (aObject instanceof Number)
return ((Number) aObject).floatValue ();
return parseFloat (aObject.toString (), fDefault);
} | [
"public",
"static",
"float",
"parseFloat",
"(",
"@",
"Nullable",
"final",
"Object",
"aObject",
",",
"final",
"float",
"fDefault",
")",
"{",
"if",
"(",
"aObject",
"==",
"null",
")",
"return",
"fDefault",
";",
"if",
"(",
"aObject",
"instanceof",
"Number",
")... | Parse the given {@link Object} as float. Note: both the locale independent
form of a float can be parsed here (e.g. 4.523) as well as a localized form
using the comma as the decimal separator (e.g. the German 4,523).
@param aObject
The object to parse. May be <code>null</code>.
@param fDefault
The default value to be ... | [
"Parse",
"the",
"given",
"{",
"@link",
"Object",
"}",
"as",
"float",
".",
"Note",
":",
"both",
"the",
"locale",
"independent",
"form",
"of",
"a",
"float",
"can",
"be",
"parsed",
"here",
"(",
"e",
".",
"g",
".",
"4",
".",
"523",
")",
"as",
"well",
... | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L588-L595 |
JOML-CI/JOML | src/org/joml/Matrix4x3f.java | Matrix4x3f.setOrthoSymmetric | public Matrix4x3f setOrthoSymmetric(float width, float height, float zNear, float zFar) {
return setOrthoSymmetric(width, height, zNear, zFar, false);
} | java | public Matrix4x3f setOrthoSymmetric(float width, float height, float zNear, float zFar) {
return setOrthoSymmetric(width, height, zNear, zFar, false);
} | [
"public",
"Matrix4x3f",
"setOrthoSymmetric",
"(",
"float",
"width",
",",
"float",
"height",
",",
"float",
"zNear",
",",
"float",
"zFar",
")",
"{",
"return",
"setOrthoSymmetric",
"(",
"width",
",",
"height",
",",
"zNear",
",",
"zFar",
",",
"false",
")",
";"... | Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system
using OpenGL's NDC z range of <code>[-1..+1]</code>.
<p>
This method is equivalent to calling {@link #setOrtho(float, float, float, float, float, float) setOrtho()} with
<code>left=-width/2</code>, <code>right=... | [
"Set",
"this",
"matrix",
"to",
"be",
"a",
"symmetric",
"orthographic",
"projection",
"transformation",
"for",
"a",
"right",
"-",
"handed",
"coordinate",
"system",
"using",
"OpenGL",
"s",
"NDC",
"z",
"range",
"of",
"<code",
">",
"[",
"-",
"1",
"..",
"+",
... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L5584-L5586 |
jOOQ/jOOL | jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java | Unchecked.doubleToLongFunction | public static DoubleToLongFunction doubleToLongFunction(CheckedDoubleToLongFunction function, Consumer<Throwable> handler) {
return t -> {
try {
return function.applyAsLong(t);
}
catch (Throwable e) {
handler.accept(e);
throw n... | java | public static DoubleToLongFunction doubleToLongFunction(CheckedDoubleToLongFunction function, Consumer<Throwable> handler) {
return t -> {
try {
return function.applyAsLong(t);
}
catch (Throwable e) {
handler.accept(e);
throw n... | [
"public",
"static",
"DoubleToLongFunction",
"doubleToLongFunction",
"(",
"CheckedDoubleToLongFunction",
"function",
",",
"Consumer",
"<",
"Throwable",
">",
"handler",
")",
"{",
"return",
"t",
"->",
"{",
"try",
"{",
"return",
"function",
".",
"applyAsLong",
"(",
"t... | Wrap a {@link CheckedDoubleToLongFunction} in a {@link DoubleToLongFunction} with a custom handler for checked exceptions.
<p>
Example:
<code><pre>
DoubleStream.of(1.0, 2.0, 3.0).mapToLong(Unchecked.doubleToLongFunction(
d -> {
if (d < 0.0)
throw new Exception("Only positive numbers allowed");
return (long) d;
},
e... | [
"Wrap",
"a",
"{",
"@link",
"CheckedDoubleToLongFunction",
"}",
"in",
"a",
"{",
"@link",
"DoubleToLongFunction",
"}",
"with",
"a",
"custom",
"handler",
"for",
"checked",
"exceptions",
".",
"<p",
">",
"Example",
":",
"<code",
">",
"<pre",
">",
"DoubleStream",
... | train | https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L1451-L1462 |
plaid/plaid-java | src/main/java/com/plaid/client/internal/Util.java | Util.isPositive | public static void isPositive(Integer value, String name) {
notNull(value, name);
if (value < 0) {
throw new IllegalArgumentException(name + "must be a positive number.");
}
} | java | public static void isPositive(Integer value, String name) {
notNull(value, name);
if (value < 0) {
throw new IllegalArgumentException(name + "must be a positive number.");
}
} | [
"public",
"static",
"void",
"isPositive",
"(",
"Integer",
"value",
",",
"String",
"name",
")",
"{",
"notNull",
"(",
"value",
",",
"name",
")",
";",
"if",
"(",
"value",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"name",
"+",
"\... | Checks that i is not null and is a positive number
@param value The integer value to check.
@param name The name of the variable being checked, included when an error is raised.
@throws IllegalArgumentException If i is null or less than 0 | [
"Checks",
"that",
"i",
"is",
"not",
"null",
"and",
"is",
"a",
"positive",
"number"
] | train | https://github.com/plaid/plaid-java/blob/360f1f8a5178fa0c3c2c2e07a58f8ccec5f33117/src/main/java/com/plaid/client/internal/Util.java#L92-L98 |
trellis-ldp/trellis | components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java | TrellisWebDAV.updateProperties | @PROPPATCH
@Consumes({APPLICATION_XML})
@Produces({APPLICATION_XML})
@Timed
public void updateProperties(@Suspended final AsyncResponse response,
@Context final Request request, @Context final UriInfo uriInfo,
@Context final HttpHeaders headers, @Context final SecurityContext sec... | java | @PROPPATCH
@Consumes({APPLICATION_XML})
@Produces({APPLICATION_XML})
@Timed
public void updateProperties(@Suspended final AsyncResponse response,
@Context final Request request, @Context final UriInfo uriInfo,
@Context final HttpHeaders headers, @Context final SecurityContext sec... | [
"@",
"PROPPATCH",
"@",
"Consumes",
"(",
"{",
"APPLICATION_XML",
"}",
")",
"@",
"Produces",
"(",
"{",
"APPLICATION_XML",
"}",
")",
"@",
"Timed",
"public",
"void",
"updateProperties",
"(",
"@",
"Suspended",
"final",
"AsyncResponse",
"response",
",",
"@",
"Cont... | Update properties on a resource.
@param response the async response
@param request the request
@param uriInfo the URI info
@param headers the headers
@param security the security context
@param propertyUpdate the property update request
@throws ParserConfigurationException if the XML parser is not properly configured | [
"Update",
"properties",
"on",
"a",
"resource",
"."
] | train | https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java#L266-L286 |
BioPAX/Paxtools | paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java | QueryExecuter.runPathsFromToMultiSet | public static Set<BioPAXElement> runPathsFromToMultiSet(
Set<Set<BioPAXElement>> sourceSets,
Set<Set<BioPAXElement>> targetSets,
Model model,
LimitType limitType,
int limit,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
graph = new GraphL3(model, filters);
}
else... | java | public static Set<BioPAXElement> runPathsFromToMultiSet(
Set<Set<BioPAXElement>> sourceSets,
Set<Set<BioPAXElement>> targetSets,
Model model,
LimitType limitType,
int limit,
Filter... filters)
{
Graph graph;
if (model.getLevel() == BioPAXLevel.L3)
{
graph = new GraphL3(model, filters);
}
else... | [
"public",
"static",
"Set",
"<",
"BioPAXElement",
">",
"runPathsFromToMultiSet",
"(",
"Set",
"<",
"Set",
"<",
"BioPAXElement",
">",
">",
"sourceSets",
",",
"Set",
"<",
"Set",
"<",
"BioPAXElement",
">",
">",
"targetSets",
",",
"Model",
"model",
",",
"LimitType... | Gets paths the graph composed of the paths from a source node, and ends at a target node.
@param sourceSets Seeds for start points of paths
@param targetSets Seeds for end points of paths
@param model BioPAX model
@param limitType either NORMAL or SHORTEST_PLUS_K
@param limit Length limit fothe paths to be found
@param... | [
"Gets",
"paths",
"the",
"graph",
"composed",
"of",
"the",
"paths",
"from",
"a",
"source",
"node",
"and",
"ends",
"at",
"a",
"target",
"node",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/paxtools-query/src/main/java/org/biopax/paxtools/query/QueryExecuter.java#L229-L251 |
couchbase/couchbase-java-client | src/main/java/com/couchbase/client/java/document/json/JsonObject.java | JsonObject.put | public JsonObject put(String name, Number value) {
content.put(name, value);
return this;
} | java | public JsonObject put(String name, Number value) {
content.put(name, value);
return this;
} | [
"public",
"JsonObject",
"put",
"(",
"String",
"name",
",",
"Number",
"value",
")",
"{",
"content",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Stores a {@link Number} value identified by the field name.
@param name the name of the JSON field.
@param value the value of the JSON field.
@return the {@link JsonObject}. | [
"Stores",
"a",
"{",
"@link",
"Number",
"}",
"value",
"identified",
"by",
"the",
"field",
"name",
"."
] | train | https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L811-L814 |
alkacon/opencms-core | src/org/opencms/xml/CmsXmlUtils.java | CmsXmlUtils.unmarshalHelper | public static Document unmarshalHelper(InputSource source, EntityResolver resolver) throws CmsXmlException {
return unmarshalHelper(source, resolver, false);
} | java | public static Document unmarshalHelper(InputSource source, EntityResolver resolver) throws CmsXmlException {
return unmarshalHelper(source, resolver, false);
} | [
"public",
"static",
"Document",
"unmarshalHelper",
"(",
"InputSource",
"source",
",",
"EntityResolver",
"resolver",
")",
"throws",
"CmsXmlException",
"{",
"return",
"unmarshalHelper",
"(",
"source",
",",
"resolver",
",",
"false",
")",
";",
"}"
] | Helper to unmarshal (read) xml contents from an input source into a document.<p>
Using this method ensures that the OpenCms XML entity resolver is used.<p>
Important: The encoding provided will NOT be used during unmarshalling,
the XML parser will do this on the base of the information in the source String.
The encod... | [
"Helper",
"to",
"unmarshal",
"(",
"read",
")",
"xml",
"contents",
"from",
"an",
"input",
"source",
"into",
"a",
"document",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/CmsXmlUtils.java#L745-L748 |
UrielCh/ovh-java-sdk | ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java | ApiOvhEmaildomain.delegatedAccount_email_filter_name_changeActivity_POST | public OvhTaskFilter delegatedAccount_email_filter_name_changeActivity_POST(String email, String name, Boolean activity) throws IOException {
String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}/changeActivity";
StringBuilder sb = path(qPath, email, name);
HashMap<String, Object>o = new HashMap<St... | java | public OvhTaskFilter delegatedAccount_email_filter_name_changeActivity_POST(String email, String name, Boolean activity) throws IOException {
String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}/changeActivity";
StringBuilder sb = path(qPath, email, name);
HashMap<String, Object>o = new HashMap<St... | [
"public",
"OvhTaskFilter",
"delegatedAccount_email_filter_name_changeActivity_POST",
"(",
"String",
"email",
",",
"String",
"name",
",",
"Boolean",
"activity",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/email/domain/delegatedAccount/{email}/filter/{name}/cha... | Change filter activity
REST: POST /email/domain/delegatedAccount/{email}/filter/{name}/changeActivity
@param activity [required] New activity
@param email [required] Email
@param name [required] Filter name | [
"Change",
"filter",
"activity"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L161-L168 |
mikepenz/Android-Iconics | library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java | IconicsDrawable.iconText | @NonNull
public IconicsDrawable iconText(@NonNull String icon, @Nullable Typeface typeface) {
mPlainIcon = icon;
mIcon = null;
mIconBrush.getPaint().setTypeface(typeface == null ? Typeface.DEFAULT : typeface);
invalidateSelf();
return this;
} | java | @NonNull
public IconicsDrawable iconText(@NonNull String icon, @Nullable Typeface typeface) {
mPlainIcon = icon;
mIcon = null;
mIconBrush.getPaint().setTypeface(typeface == null ? Typeface.DEFAULT : typeface);
invalidateSelf();
return this;
} | [
"@",
"NonNull",
"public",
"IconicsDrawable",
"iconText",
"(",
"@",
"NonNull",
"String",
"icon",
",",
"@",
"Nullable",
"Typeface",
"typeface",
")",
"{",
"mPlainIcon",
"=",
"icon",
";",
"mIcon",
"=",
"null",
";",
"mIconBrush",
".",
"getPaint",
"(",
")",
".",... | Loads and draws given text
@return The current IconicsDrawable for chaining. | [
"Loads",
"and",
"draws",
"given",
"text"
] | train | https://github.com/mikepenz/Android-Iconics/blob/0b2c8f7d07b6d2715a417563c66311e7e1fcc7d8/library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java#L404-L412 |
cache2k/cache2k | cache2k-core/src/main/java/org/cache2k/core/HeapCache.java | HeapCache.removeEntryForEviction | public void removeEntryForEviction(Entry<K, V> e) {
boolean f = hash.remove(e);
checkForHashCodeChange(e);
timing.cancelExpiryTimer(e);
e.setGone();
} | java | public void removeEntryForEviction(Entry<K, V> e) {
boolean f = hash.remove(e);
checkForHashCodeChange(e);
timing.cancelExpiryTimer(e);
e.setGone();
} | [
"public",
"void",
"removeEntryForEviction",
"(",
"Entry",
"<",
"K",
",",
"V",
">",
"e",
")",
"{",
"boolean",
"f",
"=",
"hash",
".",
"remove",
"(",
"e",
")",
";",
"checkForHashCodeChange",
"(",
"e",
")",
";",
"timing",
".",
"cancelExpiryTimer",
"(",
"e"... | Remove the entry from the hash table. The entry is already removed from the replacement list.
Stop the timer, if needed. The remove races with a clear. The clear
is not updating each entry state to e.isGone() but just drops the whole hash table instead.
<p>With completion of the method the entry content is no more vis... | [
"Remove",
"the",
"entry",
"from",
"the",
"hash",
"table",
".",
"The",
"entry",
"is",
"already",
"removed",
"from",
"the",
"replacement",
"list",
".",
"Stop",
"the",
"timer",
"if",
"needed",
".",
"The",
"remove",
"races",
"with",
"a",
"clear",
".",
"The",... | train | https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/HeapCache.java#L1322-L1327 |
mozilla/rhino | src/org/mozilla/javascript/UintMap.java | UintMap.getInt | public int getInt(int key, int defaultValue) {
if (key < 0) Kit.codeBug();
int index = findIndex(key);
if (0 <= index) {
if (ivaluesShift != 0) {
return keys[ivaluesShift + index];
}
return 0;
}
return defaultValue;
} | java | public int getInt(int key, int defaultValue) {
if (key < 0) Kit.codeBug();
int index = findIndex(key);
if (0 <= index) {
if (ivaluesShift != 0) {
return keys[ivaluesShift + index];
}
return 0;
}
return defaultValue;
} | [
"public",
"int",
"getInt",
"(",
"int",
"key",
",",
"int",
"defaultValue",
")",
"{",
"if",
"(",
"key",
"<",
"0",
")",
"Kit",
".",
"codeBug",
"(",
")",
";",
"int",
"index",
"=",
"findIndex",
"(",
"key",
")",
";",
"if",
"(",
"0",
"<=",
"index",
")... | Get integer value assigned with key.
@return key integer value or defaultValue if key is absent | [
"Get",
"integer",
"value",
"assigned",
"with",
"key",
"."
] | train | https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/UintMap.java#L77-L87 |
banq/jdonframework | src/main/java/com/jdon/util/UtilDateTime.java | UtilDateTime.toDate | public static java.util.Date toDate(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) {
int month, day, year, hour, minute, second;
try {
month = Integer.parseInt(monthStr);
day = Integer.parseInt(dayStr);
year = Integer.parseInt(yearStr);
hour =... | java | public static java.util.Date toDate(String monthStr, String dayStr, String yearStr, String hourStr, String minuteStr, String secondStr) {
int month, day, year, hour, minute, second;
try {
month = Integer.parseInt(monthStr);
day = Integer.parseInt(dayStr);
year = Integer.parseInt(yearStr);
hour =... | [
"public",
"static",
"java",
".",
"util",
".",
"Date",
"toDate",
"(",
"String",
"monthStr",
",",
"String",
"dayStr",
",",
"String",
"yearStr",
",",
"String",
"hourStr",
",",
"String",
"minuteStr",
",",
"String",
"secondStr",
")",
"{",
"int",
"month",
",",
... | Makes a Date from separate Strings for month, day, year, hour, minute,
and second.
@param monthStr
The month String
@param dayStr
The day String
@param yearStr
The year String
@param hourStr
The hour String
@param minuteStr
The minute String
@param secondStr
The second String
@return A Date made from separate Strings ... | [
"Makes",
"a",
"Date",
"from",
"separate",
"Strings",
"for",
"month",
"day",
"year",
"hour",
"minute",
"and",
"second",
"."
] | train | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilDateTime.java#L375-L389 |
apiman/apiman | gateway/engine/ispn/src/main/java/io/apiman/gateway/engine/ispn/io/RegistryCacheMapWrapper.java | RegistryCacheMapWrapper.unmarshalAs | private <T> T unmarshalAs(String valueAsString, Class<T> asClass) throws IOException {
return mapper.reader(asClass).readValue(valueAsString);
} | java | private <T> T unmarshalAs(String valueAsString, Class<T> asClass) throws IOException {
return mapper.reader(asClass).readValue(valueAsString);
} | [
"private",
"<",
"T",
">",
"T",
"unmarshalAs",
"(",
"String",
"valueAsString",
",",
"Class",
"<",
"T",
">",
"asClass",
")",
"throws",
"IOException",
"{",
"return",
"mapper",
".",
"reader",
"(",
"asClass",
")",
".",
"readValue",
"(",
"valueAsString",
")",
... | Unmarshall the given type of object.
@param valueAsString
@param asClass
@throws IOException | [
"Unmarshall",
"the",
"given",
"type",
"of",
"object",
"."
] | train | https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/ispn/src/main/java/io/apiman/gateway/engine/ispn/io/RegistryCacheMapWrapper.java#L188-L190 |
lucee/Lucee | core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java | ResourceUtil.getPathToChild | public static String getPathToChild(Resource file, Resource dir) {
if (dir == null || !file.getResourceProvider().getScheme().equals(dir.getResourceProvider().getScheme())) return null;
boolean isFile = file.isFile();
String str = "/";
while (file != null) {
if (file.equals(dir)) {
if (isFile) return str.sub... | java | public static String getPathToChild(Resource file, Resource dir) {
if (dir == null || !file.getResourceProvider().getScheme().equals(dir.getResourceProvider().getScheme())) return null;
boolean isFile = file.isFile();
String str = "/";
while (file != null) {
if (file.equals(dir)) {
if (isFile) return str.sub... | [
"public",
"static",
"String",
"getPathToChild",
"(",
"Resource",
"file",
",",
"Resource",
"dir",
")",
"{",
"if",
"(",
"dir",
"==",
"null",
"||",
"!",
"file",
".",
"getResourceProvider",
"(",
")",
".",
"getScheme",
"(",
")",
".",
"equals",
"(",
"dir",
"... | return diffrents of one file to a other if first is child of second otherwise return null
@param file file to search
@param dir directory to search | [
"return",
"diffrents",
"of",
"one",
"file",
"to",
"a",
"other",
"if",
"first",
"is",
"child",
"of",
"second",
"otherwise",
"return",
"null"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java#L819-L832 |
jhunters/jprotobuf | src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java | ProtobufIDLProxy.createSingle | public static IDLProxyObject createSingle(Reader reader, boolean debug, File path) throws IOException {
return createSingle(reader, debug, path, true);
} | java | public static IDLProxyObject createSingle(Reader reader, boolean debug, File path) throws IOException {
return createSingle(reader, debug, path, true);
} | [
"public",
"static",
"IDLProxyObject",
"createSingle",
"(",
"Reader",
"reader",
",",
"boolean",
"debug",
",",
"File",
"path",
")",
"throws",
"IOException",
"{",
"return",
"createSingle",
"(",
"reader",
",",
"debug",
",",
"path",
",",
"true",
")",
";",
"}"
] | Creates the single.
@param reader the reader
@param debug the debug
@param path the path
@return the IDL proxy object
@throws IOException Signals that an I/O exception has occurred. | [
"Creates",
"the",
"single",
"."
] | train | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java#L1057-L1059 |
networknt/light-4j | client/src/main/java/com/networknt/client/Http2Client.java | Http2Client.populateHeader | public Result populateHeader(ClientRequest request, String authToken, String correlationId, String traceabilityId) {
if(traceabilityId != null) {
addAuthTokenTrace(request, authToken, traceabilityId);
} else {
addAuthToken(request, authToken);
}
Result<Jwt> result... | java | public Result populateHeader(ClientRequest request, String authToken, String correlationId, String traceabilityId) {
if(traceabilityId != null) {
addAuthTokenTrace(request, authToken, traceabilityId);
} else {
addAuthToken(request, authToken);
}
Result<Jwt> result... | [
"public",
"Result",
"populateHeader",
"(",
"ClientRequest",
"request",
",",
"String",
"authToken",
",",
"String",
"correlationId",
",",
"String",
"traceabilityId",
")",
"{",
"if",
"(",
"traceabilityId",
"!=",
"null",
")",
"{",
"addAuthTokenTrace",
"(",
"request",
... | Support API to API calls with scope token. The token is the original token from consumer and
the client credentials token of caller API is added from cache. authToken, correlationId and
traceabilityId are passed in as strings.
This method is used in API to API call
@param request the http request
@param authToken the... | [
"Support",
"API",
"to",
"API",
"calls",
"with",
"scope",
"token",
".",
"The",
"token",
"is",
"the",
"original",
"token",
"from",
"consumer",
"and",
"the",
"client",
"credentials",
"token",
"of",
"caller",
"API",
"is",
"added",
"from",
"cache",
".",
"authTo... | train | https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/client/src/main/java/com/networknt/client/Http2Client.java#L370-L381 |
derari/cthul | objects/src/main/java/org/cthul/objects/Boxing.java | Boxing.unboxAll | public static Object unboxAll(Object[] src, int srcPos, int len) {
if (srcPos >= src.length) {
throw new IndexOutOfBoundsException(String.valueOf(srcPos));
}
Class<?> type = src[srcPos].getClass();
return unboxAll(type, src, srcPos, len);
} | java | public static Object unboxAll(Object[] src, int srcPos, int len) {
if (srcPos >= src.length) {
throw new IndexOutOfBoundsException(String.valueOf(srcPos));
}
Class<?> type = src[srcPos].getClass();
return unboxAll(type, src, srcPos, len);
} | [
"public",
"static",
"Object",
"unboxAll",
"(",
"Object",
"[",
"]",
"src",
",",
"int",
"srcPos",
",",
"int",
"len",
")",
"{",
"if",
"(",
"srcPos",
">=",
"src",
".",
"length",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"String",
".",
"va... | Transforms an array of {@code Boolean}, {@code Character}, or {@code Number}
into a primitive array.
@param src source array
@param srcPos start position
@param len length
@return primitive array | [
"Transforms",
"an",
"array",
"of",
"{"
] | train | https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/Boxing.java#L157-L163 |
vatbub/common | core/src/main/java/com/github/vatbub/common/core/Prefs.java | Prefs.setPreference | public void setPreference(String prefKey, String prefValue) {
props.setProperty(prefKey, prefValue);
savePreferences();
} | java | public void setPreference(String prefKey, String prefValue) {
props.setProperty(prefKey, prefValue);
savePreferences();
} | [
"public",
"void",
"setPreference",
"(",
"String",
"prefKey",
",",
"String",
"prefValue",
")",
"{",
"props",
".",
"setProperty",
"(",
"prefKey",
",",
"prefValue",
")",
";",
"savePreferences",
"(",
")",
";",
"}"
] | Sets the value of the specified preference in the properties file
@param prefKey The key of the preference to save
@param prefValue The value of the preference to save | [
"Sets",
"the",
"value",
"of",
"the",
"specified",
"preference",
"in",
"the",
"properties",
"file"
] | train | https://github.com/vatbub/common/blob/8b9fd2ece0a23d520ce53b66c84cbd094e378443/core/src/main/java/com/github/vatbub/common/core/Prefs.java#L73-L76 |
Azure/azure-sdk-for-java | kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/ClustersInner.java | ClustersInner.beginUpdate | public ClusterInner beginUpdate(String resourceGroupName, String clusterName, ClusterUpdate parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body();
} | java | public ClusterInner beginUpdate(String resourceGroupName, String clusterName, ClusterUpdate parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body();
} | [
"public",
"ClusterInner",
"beginUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"clusterName",
",",
"ClusterUpdate",
"parameters",
")",
"{",
"return",
"beginUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"clusterName",
",",
"parameters",
")",
... | Update a Kusto cluster.
@param resourceGroupName The name of the resource group containing the Kusto cluster.
@param clusterName The name of the Kusto cluster.
@param parameters The Kusto cluster parameters supplied to the Update operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@thr... | [
"Update",
"a",
"Kusto",
"cluster",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/ClustersInner.java#L480-L482 |
cdk/cdk | base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java | CDKAtomTypeMatcher.isSingleHeteroAtom | private boolean isSingleHeteroAtom(IAtom atom, IAtomContainer container) {
List<IAtom> connected = container.getConnectedAtomsList(atom);
for (IAtom atom1 : connected) {
boolean aromatic = container.getBond(atom, atom1).isAromatic();
// ignoring non-aromatic bonds
... | java | private boolean isSingleHeteroAtom(IAtom atom, IAtomContainer container) {
List<IAtom> connected = container.getConnectedAtomsList(atom);
for (IAtom atom1 : connected) {
boolean aromatic = container.getBond(atom, atom1).isAromatic();
// ignoring non-aromatic bonds
... | [
"private",
"boolean",
"isSingleHeteroAtom",
"(",
"IAtom",
"atom",
",",
"IAtomContainer",
"container",
")",
"{",
"List",
"<",
"IAtom",
">",
"connected",
"=",
"container",
".",
"getConnectedAtomsList",
"(",
"atom",
")",
";",
"for",
"(",
"IAtom",
"atom1",
":",
... | Determines whether the bonds (up to two spheres away) are only to non
hetroatoms. Currently used in N.planar3 perception of (e.g. pyrrole).
@param atom an atom to test
@param container container of the atom
@return whether the atom's only bonds are to heteroatoms
@see #perceiveNitrogens(IAtomContainer, IAtom, RingSea... | [
"Determines",
"whether",
"the",
"bonds",
"(",
"up",
"to",
"two",
"spheres",
"away",
")",
"are",
"only",
"to",
"non",
"hetroatoms",
".",
"Currently",
"used",
"in",
"N",
".",
"planar3",
"perception",
"of",
"(",
"e",
".",
"g",
".",
"pyrrole",
")",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java#L989-L1017 |
jglobus/JGlobus | ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java | X509Credential.verify | public void verify() throws CredentialException {
try {
String caCertsLocation = "file:" + CoGProperties.getDefault().getCaCertLocations();
KeyStore keyStore = Stores.getTrustStore(caCertsLocation + "/" + Stores.getDefaultCAFilesPattern());
CertStore crlStore = Stores.getCRL... | java | public void verify() throws CredentialException {
try {
String caCertsLocation = "file:" + CoGProperties.getDefault().getCaCertLocations();
KeyStore keyStore = Stores.getTrustStore(caCertsLocation + "/" + Stores.getDefaultCAFilesPattern());
CertStore crlStore = Stores.getCRL... | [
"public",
"void",
"verify",
"(",
")",
"throws",
"CredentialException",
"{",
"try",
"{",
"String",
"caCertsLocation",
"=",
"\"file:\"",
"+",
"CoGProperties",
".",
"getDefault",
"(",
")",
".",
"getCaCertLocations",
"(",
")",
";",
"KeyStore",
"keyStore",
"=",
"St... | Verifies the validity of the credentials. All certificate path validation is performed using trusted
certificates in default locations.
@exception CredentialException
if one of the certificates in the chain expired or if path validiation fails. | [
"Verifies",
"the",
"validity",
"of",
"the",
"credentials",
".",
"All",
"certificate",
"path",
"validation",
"is",
"performed",
"using",
"trusted",
"certificates",
"in",
"default",
"locations",
"."
] | train | https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java#L435-L449 |
alkacon/opencms-core | src/org/opencms/workplace/editors/CmsEditor.java | CmsEditor.commitTempFile | protected void commitTempFile() throws CmsException {
CmsObject cms = getCms();
CmsFile tempFile;
List<CmsProperty> properties;
try {
switchToTempProject();
tempFile = cms.readFile(getParamTempfile(), CmsResourceFilter.ALL);
properties = cms.readPrope... | java | protected void commitTempFile() throws CmsException {
CmsObject cms = getCms();
CmsFile tempFile;
List<CmsProperty> properties;
try {
switchToTempProject();
tempFile = cms.readFile(getParamTempfile(), CmsResourceFilter.ALL);
properties = cms.readPrope... | [
"protected",
"void",
"commitTempFile",
"(",
")",
"throws",
"CmsException",
"{",
"CmsObject",
"cms",
"=",
"getCms",
"(",
")",
";",
"CmsFile",
"tempFile",
";",
"List",
"<",
"CmsProperty",
">",
"properties",
";",
"try",
"{",
"switchToTempProject",
"(",
")",
";"... | Writes the content of a temporary file back to the original file.<p>
@throws CmsException if something goes wrong | [
"Writes",
"the",
"content",
"of",
"a",
"temporary",
"file",
"back",
"to",
"the",
"original",
"file",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/CmsEditor.java#L786-L838 |
Jasig/uPortal | uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java | PositionManager.applyToNodes | static void applyToNodes(List<NodeInfo> order, Element compViewParent) {
// first set up a bogus node to assist with inserting
Node insertPoint = compViewParent.getOwnerDocument().createElement("bogus");
Node first = compViewParent.getFirstChild();
if (first != null) compViewParent.inse... | java | static void applyToNodes(List<NodeInfo> order, Element compViewParent) {
// first set up a bogus node to assist with inserting
Node insertPoint = compViewParent.getOwnerDocument().createElement("bogus");
Node first = compViewParent.getFirstChild();
if (first != null) compViewParent.inse... | [
"static",
"void",
"applyToNodes",
"(",
"List",
"<",
"NodeInfo",
">",
"order",
",",
"Element",
"compViewParent",
")",
"{",
"// first set up a bogus node to assist with inserting",
"Node",
"insertPoint",
"=",
"compViewParent",
".",
"getOwnerDocument",
"(",
")",
".",
"cr... | This method applies the ordering specified in the passed in order list to the child nodes of
the compViewParent. Nodes specified in the list but located elsewhere are pulled in. | [
"This",
"method",
"applies",
"the",
"ordering",
"specified",
"in",
"the",
"passed",
"in",
"order",
"list",
"to",
"the",
"child",
"nodes",
"of",
"the",
"compViewParent",
".",
"Nodes",
"specified",
"in",
"the",
"list",
"but",
"located",
"elsewhere",
"are",
"pu... | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/PositionManager.java#L241-L254 |
marvinlabs/android-intents | library/src/main/java/com/marvinlabs/intents/PhoneIntents.java | PhoneIntents.newCallNumberIntent | public static Intent newCallNumberIntent(String phoneNumber) {
final Intent intent;
if (phoneNumber == null || phoneNumber.trim().length() <= 0) {
intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"));
} else {
intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"... | java | public static Intent newCallNumberIntent(String phoneNumber) {
final Intent intent;
if (phoneNumber == null || phoneNumber.trim().length() <= 0) {
intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"));
} else {
intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"... | [
"public",
"static",
"Intent",
"newCallNumberIntent",
"(",
"String",
"phoneNumber",
")",
"{",
"final",
"Intent",
"intent",
";",
"if",
"(",
"phoneNumber",
"==",
"null",
"||",
"phoneNumber",
".",
"trim",
"(",
")",
".",
"length",
"(",
")",
"<=",
"0",
")",
"{... | Creates an intent that will immediately dispatch a call to the given number. NOTE that unlike
{@link #newDialNumberIntent(String)}, this intent requires the {@link android.Manifest.permission#CALL_PHONE}
permission to be set.
@param phoneNumber the number to call
@return the intent | [
"Creates",
"an",
"intent",
"that",
"will",
"immediately",
"dispatch",
"a",
"call",
"to",
"the",
"given",
"number",
".",
"NOTE",
"that",
"unlike",
"{",
"@link",
"#newDialNumberIntent",
"(",
"String",
")",
"}",
"this",
"intent",
"requires",
"the",
"{",
"@link"... | train | https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/PhoneIntents.java#L143-L151 |
mangstadt/biweekly | src/main/java/biweekly/component/ICalComponent.java | ICalComponent.removeComponents | public <T extends ICalComponent> List<T> removeComponents(Class<T> clazz) {
List<ICalComponent> removed = components.removeAll(clazz);
return castList(removed, clazz);
} | java | public <T extends ICalComponent> List<T> removeComponents(Class<T> clazz) {
List<ICalComponent> removed = components.removeAll(clazz);
return castList(removed, clazz);
} | [
"public",
"<",
"T",
"extends",
"ICalComponent",
">",
"List",
"<",
"T",
">",
"removeComponents",
"(",
"Class",
"<",
"T",
">",
"clazz",
")",
"{",
"List",
"<",
"ICalComponent",
">",
"removed",
"=",
"components",
".",
"removeAll",
"(",
"clazz",
")",
";",
"... | Removes all sub-components of the given class from this component.
@param clazz the class of the components to remove (e.g. "VEvent.class")
@param <T> the component class
@return the removed components (this list is immutable) | [
"Removes",
"all",
"sub",
"-",
"components",
"of",
"the",
"given",
"class",
"from",
"this",
"component",
"."
] | train | https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/ICalComponent.java#L175-L178 |
WiQuery/wiquery | wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/tabs/Tabs.java | Tabs.setAjaxActivateEvent | public Tabs setAjaxActivateEvent(ITabsAjaxEvent activateEvent)
{
this.ajaxEvents.put(TabEvent.activate, activateEvent);
setActivateEvent(new TabsAjaxJsScopeUiEvent(this, TabEvent.activate));
return this;
} | java | public Tabs setAjaxActivateEvent(ITabsAjaxEvent activateEvent)
{
this.ajaxEvents.put(TabEvent.activate, activateEvent);
setActivateEvent(new TabsAjaxJsScopeUiEvent(this, TabEvent.activate));
return this;
} | [
"public",
"Tabs",
"setAjaxActivateEvent",
"(",
"ITabsAjaxEvent",
"activateEvent",
")",
"{",
"this",
".",
"ajaxEvents",
".",
"put",
"(",
"TabEvent",
".",
"activate",
",",
"activateEvent",
")",
";",
"setActivateEvent",
"(",
"new",
"TabsAjaxJsScopeUiEvent",
"(",
"thi... | Sets the call-back for the AJAX activate event.
@param activateEvent
The ITabsAjaxEvent. | [
"Sets",
"the",
"call",
"-",
"back",
"for",
"the",
"AJAX",
"activate",
"event",
"."
] | train | https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/tabs/Tabs.java#L654-L659 |
Kurento/kurento-module-creator | src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java | ExpressionParser.parseTildeExpression | private Expression parseTildeExpression() {
consumeNextToken(TILDE);
int major = intOf(consumeNextToken(NUMERIC).lexeme);
if (!tokens.positiveLookahead(DOT)) {
return new GreaterOrEqual(versionOf(major, 0, 0));
}
consumeNextToken(DOT);
int minor = intOf(consumeNextToken(NUMERIC).lexeme);
... | java | private Expression parseTildeExpression() {
consumeNextToken(TILDE);
int major = intOf(consumeNextToken(NUMERIC).lexeme);
if (!tokens.positiveLookahead(DOT)) {
return new GreaterOrEqual(versionOf(major, 0, 0));
}
consumeNextToken(DOT);
int minor = intOf(consumeNextToken(NUMERIC).lexeme);
... | [
"private",
"Expression",
"parseTildeExpression",
"(",
")",
"{",
"consumeNextToken",
"(",
"TILDE",
")",
";",
"int",
"major",
"=",
"intOf",
"(",
"consumeNextToken",
"(",
"NUMERIC",
")",
".",
"lexeme",
")",
";",
"if",
"(",
"!",
"tokens",
".",
"positiveLookahead... | Parses the {@literal <tilde-expr>} non-terminal.
<pre>
{@literal
<tilde-expr> ::= "~" <version>
}
</pre>
@return the expression AST | [
"Parses",
"the",
"{",
"@literal",
"<tilde",
"-",
"expr",
">",
"}",
"non",
"-",
"terminal",
"."
] | train | https://github.com/Kurento/kurento-module-creator/blob/c371516c665b902b5476433496a5aefcbca86d64/src/main/java/com/github/zafarkhaja/semver/expr/ExpressionParser.java#L247-L263 |
google/closure-compiler | src/com/google/javascript/refactoring/Matchers.java | Matchers.assignmentWithRhs | public static Matcher assignmentWithRhs(final Matcher rhsMatcher) {
return new Matcher() {
@Override public boolean matches(Node node, NodeMetadata metadata) {
return node.isAssign() && rhsMatcher.matches(node.getLastChild(), metadata);
}
};
} | java | public static Matcher assignmentWithRhs(final Matcher rhsMatcher) {
return new Matcher() {
@Override public boolean matches(Node node, NodeMetadata metadata) {
return node.isAssign() && rhsMatcher.matches(node.getLastChild(), metadata);
}
};
} | [
"public",
"static",
"Matcher",
"assignmentWithRhs",
"(",
"final",
"Matcher",
"rhsMatcher",
")",
"{",
"return",
"new",
"Matcher",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"matches",
"(",
"Node",
"node",
",",
"NodeMetadata",
"metadata",
")",
"{",
"... | Returns a Matcher that matches an ASSIGN node where the RHS of the assignment matches the given
rhsMatcher. | [
"Returns",
"a",
"Matcher",
"that",
"matches",
"an",
"ASSIGN",
"node",
"where",
"the",
"RHS",
"of",
"the",
"assignment",
"matches",
"the",
"given",
"rhsMatcher",
"."
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/Matchers.java#L306-L312 |
threerings/narya | core/src/main/java/com/threerings/presents/peer/server/PeerManager.java | PeerManager.performWithLock | public void performWithLock (final NodeObject.Lock lock, final LockedOperation operation)
{
acquireLock(lock, new ResultListener<String>() {
public void requestCompleted (String nodeName) {
if (getNodeObject().nodeName.equals(nodeName)) {
// lock acquired succ... | java | public void performWithLock (final NodeObject.Lock lock, final LockedOperation operation)
{
acquireLock(lock, new ResultListener<String>() {
public void requestCompleted (String nodeName) {
if (getNodeObject().nodeName.equals(nodeName)) {
// lock acquired succ... | [
"public",
"void",
"performWithLock",
"(",
"final",
"NodeObject",
".",
"Lock",
"lock",
",",
"final",
"LockedOperation",
"operation",
")",
"{",
"acquireLock",
"(",
"lock",
",",
"new",
"ResultListener",
"<",
"String",
">",
"(",
")",
"{",
"public",
"void",
"requ... | Tries to acquire the resource lock and, if successful, performs the operation and releases
the lock; if unsuccessful, calls the operation's failure handler. Please note: the lock will
be released immediately after the operation. | [
"Tries",
"to",
"acquire",
"the",
"resource",
"lock",
"and",
"if",
"successful",
"performs",
"the",
"operation",
"and",
"releases",
"the",
"lock",
";",
"if",
"unsuccessful",
"calls",
"the",
"operation",
"s",
"failure",
"handler",
".",
"Please",
"note",
":",
"... | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/peer/server/PeerManager.java#L908-L932 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/StringUtils.java | StringUtils.getJaroWinklerDistance | @Deprecated
public static double getJaroWinklerDistance(final CharSequence first, final CharSequence second) {
final double DEFAULT_SCALING_FACTOR = 0.1;
if (first == null || second == null) {
throw new IllegalArgumentException("Strings must not be null");
}
final int[]... | java | @Deprecated
public static double getJaroWinklerDistance(final CharSequence first, final CharSequence second) {
final double DEFAULT_SCALING_FACTOR = 0.1;
if (first == null || second == null) {
throw new IllegalArgumentException("Strings must not be null");
}
final int[]... | [
"@",
"Deprecated",
"public",
"static",
"double",
"getJaroWinklerDistance",
"(",
"final",
"CharSequence",
"first",
",",
"final",
"CharSequence",
"second",
")",
"{",
"final",
"double",
"DEFAULT_SCALING_FACTOR",
"=",
"0.1",
";",
"if",
"(",
"first",
"==",
"null",
"|... | <p>Find the Jaro Winkler Distance which indicates the similarity score between two Strings.</p>
<p>The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters.
Winkler increased this measure for matching initial characters.</p>
<p>This implementation is based on t... | [
"<p",
">",
"Find",
"the",
"Jaro",
"Winkler",
"Distance",
"which",
"indicates",
"the",
"similarity",
"score",
"between",
"two",
"Strings",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L8303-L8319 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/DerivativeIntegralImage.java | DerivativeIntegralImage.kernelHaarX | public static IntegralKernel kernelHaarX( int r , IntegralKernel ret) {
if( ret == null )
ret = new IntegralKernel(2);
ret.blocks[0].set(-r, -r, 0, r);
ret.blocks[1].set(0,-r,r,r);
ret.scales[0] = -1;
ret.scales[1] = 1;
return ret;
} | java | public static IntegralKernel kernelHaarX( int r , IntegralKernel ret) {
if( ret == null )
ret = new IntegralKernel(2);
ret.blocks[0].set(-r, -r, 0, r);
ret.blocks[1].set(0,-r,r,r);
ret.scales[0] = -1;
ret.scales[1] = 1;
return ret;
} | [
"public",
"static",
"IntegralKernel",
"kernelHaarX",
"(",
"int",
"r",
",",
"IntegralKernel",
"ret",
")",
"{",
"if",
"(",
"ret",
"==",
"null",
")",
"ret",
"=",
"new",
"IntegralKernel",
"(",
"2",
")",
";",
"ret",
".",
"blocks",
"[",
"0",
"]",
".",
"set... | Creates a kernel for the Haar wavelet "centered" around the target pixel.
@param r Radius of the box. width is 2*r
@return Kernel for a Haar x-axis wavelet. | [
"Creates",
"a",
"kernel",
"for",
"the",
"Haar",
"wavelet",
"centered",
"around",
"the",
"target",
"pixel",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/DerivativeIntegralImage.java#L72-L82 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsJmsMessageFactoryImpl.java | JsJmsMessageFactoryImpl.createInboundJmsMessage | final JsJmsMessage createInboundJmsMessage(JsMsgObject jmo, int messageType) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())SibTr.entry(tc, "createInboundJmsMessage " + messageType );
JsJmsMessage jmsMessage = null;
switch (messageType) {
case JmsBodyType.BYTES_INT:
jmsM... | java | final JsJmsMessage createInboundJmsMessage(JsMsgObject jmo, int messageType) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())SibTr.entry(tc, "createInboundJmsMessage " + messageType );
JsJmsMessage jmsMessage = null;
switch (messageType) {
case JmsBodyType.BYTES_INT:
jmsM... | [
"final",
"JsJmsMessage",
"createInboundJmsMessage",
"(",
"JsMsgObject",
"jmo",
",",
"int",
"messageType",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"entry",
"(",... | Create an instance of the appropriate sub-class, e.g. JsJmsTextMessage
if the inbound message is actually a JMS Text Message, for the
given JMO.
@return JsJmsMessage A JsJmsMessage of the appropriate subtype | [
"Create",
"an",
"instance",
"of",
"the",
"appropriate",
"sub",
"-",
"class",
"e",
".",
"g",
".",
"JsJmsTextMessage",
"if",
"the",
"inbound",
"message",
"is",
"actually",
"a",
"JMS",
"Text",
"Message",
"for",
"the",
"given",
"JMO",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsJmsMessageFactoryImpl.java#L180-L214 |
querydsl/querydsl | querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java | PathBuilder.get | public BooleanPath get(BooleanPath path) {
BooleanPath newPath = getBoolean(toString(path));
return addMetadataOf(newPath, path);
} | java | public BooleanPath get(BooleanPath path) {
BooleanPath newPath = getBoolean(toString(path));
return addMetadataOf(newPath, path);
} | [
"public",
"BooleanPath",
"get",
"(",
"BooleanPath",
"path",
")",
"{",
"BooleanPath",
"newPath",
"=",
"getBoolean",
"(",
"toString",
"(",
"path",
")",
")",
";",
"return",
"addMetadataOf",
"(",
"newPath",
",",
"path",
")",
";",
"}"
] | Create a new Boolean typed path
@param path existing path
@return property path | [
"Create",
"a",
"new",
"Boolean",
"typed",
"path"
] | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/PathBuilder.java#L183-L186 |
coursera/courier | generator-api/src/main/java/org/coursera/courier/lang/DocEscaping.java | DocEscaping.stringToDocComment | public static String stringToDocComment(String doc, DocCommentStyle style) {
if (doc == null || doc.trim().isEmpty()) return "";
String commentNewline = (style == DocCommentStyle.ASTRISK_MARGIN) ? "\n * " : "\n";
String schemadoc = wrap(escape(doc)).replaceAll("\\n", commentNewline);
StringBuilder buil... | java | public static String stringToDocComment(String doc, DocCommentStyle style) {
if (doc == null || doc.trim().isEmpty()) return "";
String commentNewline = (style == DocCommentStyle.ASTRISK_MARGIN) ? "\n * " : "\n";
String schemadoc = wrap(escape(doc)).replaceAll("\\n", commentNewline);
StringBuilder buil... | [
"public",
"static",
"String",
"stringToDocComment",
"(",
"String",
"doc",
",",
"DocCommentStyle",
"style",
")",
"{",
"if",
"(",
"doc",
"==",
"null",
"||",
"doc",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"return",
"\"\"",
";",
"String",
"co... | Returns a doc comment, as a string of source, for the given documentation string
and deprecated property.
@param doc provides the schemadoc for the symbol, if any. May be null.
@return an escaped schemadoc string. | [
"Returns",
"a",
"doc",
"comment",
"as",
"a",
"string",
"of",
"source",
"for",
"the",
"given",
"documentation",
"string",
"and",
"deprecated",
"property",
"."
] | train | https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/generator-api/src/main/java/org/coursera/courier/lang/DocEscaping.java#L30-L42 |
Stratio/stratio-connector-commons | connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java | ConnectionHandler.createConnection | public void createConnection(ICredentials credentials, ConnectorClusterConfig config) throws ConnectionException {
logger.info("Creating new connection...");
Connection connection = createNativeConnection(credentials, config);
String connectionName = config.getName().getName();
synchro... | java | public void createConnection(ICredentials credentials, ConnectorClusterConfig config) throws ConnectionException {
logger.info("Creating new connection...");
Connection connection = createNativeConnection(credentials, config);
String connectionName = config.getName().getName();
synchro... | [
"public",
"void",
"createConnection",
"(",
"ICredentials",
"credentials",
",",
"ConnectorClusterConfig",
"config",
")",
"throws",
"ConnectionException",
"{",
"logger",
".",
"info",
"(",
"\"Creating new connection...\"",
")",
";",
"Connection",
"connection",
"=",
"create... | This method create a connection.
@param credentials the cluster configuration.
@param config the connection options.
@throws ConnectionException if the connection already exists. | [
"This",
"method",
"create",
"a",
"connection",
"."
] | train | https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/connection/ConnectionHandler.java#L72-L90 |
alkacon/opencms-core | src/org/opencms/db/CmsDriverManager.java | CmsDriverManager.readGroup | public CmsGroup readGroup(CmsDbContext dbc, String groupname) throws CmsDataAccessException {
CmsGroup group = null;
// try to read group from cache
group = m_monitor.getCachedGroup(groupname);
if (group == null) {
group = getUserDriver(dbc).readGroup(dbc, groupname);
... | java | public CmsGroup readGroup(CmsDbContext dbc, String groupname) throws CmsDataAccessException {
CmsGroup group = null;
// try to read group from cache
group = m_monitor.getCachedGroup(groupname);
if (group == null) {
group = getUserDriver(dbc).readGroup(dbc, groupname);
... | [
"public",
"CmsGroup",
"readGroup",
"(",
"CmsDbContext",
"dbc",
",",
"String",
"groupname",
")",
"throws",
"CmsDataAccessException",
"{",
"CmsGroup",
"group",
"=",
"null",
";",
"// try to read group from cache",
"group",
"=",
"m_monitor",
".",
"getCachedGroup",
"(",
... | Reads a group based on its name.<p>
@param dbc the current database context
@param groupname the name of the group that is to be read
@return the requested group
@throws CmsDataAccessException if operation was not successful | [
"Reads",
"a",
"group",
"based",
"on",
"its",
"name",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L6927-L6937 |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/convert/DoubleConverter.java | DoubleConverter.toDoubleWithDefault | public static double toDoubleWithDefault(Object value, double defaultValue) {
Double result = toNullableDouble(value);
return result != null ? (double) result : defaultValue;
} | java | public static double toDoubleWithDefault(Object value, double defaultValue) {
Double result = toNullableDouble(value);
return result != null ? (double) result : defaultValue;
} | [
"public",
"static",
"double",
"toDoubleWithDefault",
"(",
"Object",
"value",
",",
"double",
"defaultValue",
")",
"{",
"Double",
"result",
"=",
"toNullableDouble",
"(",
"value",
")",
";",
"return",
"result",
"!=",
"null",
"?",
"(",
"double",
")",
"result",
":... | Converts value into doubles or returns default value when conversion is not
possible.
@param value the value to convert.
@param defaultValue the default value.
@return double value or default when conversion is not supported.
@see DoubleConverter#toNullableDouble(Object) | [
"Converts",
"value",
"into",
"doubles",
"or",
"returns",
"default",
"value",
"when",
"conversion",
"is",
"not",
"possible",
"."
] | train | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/convert/DoubleConverter.java#L89-L92 |
netty/netty | common/src/main/java/io/netty/util/internal/ReflectionUtil.java | ReflectionUtil.trySetAccessible | public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible) {
if (checkAccessible && !PlatformDependent0.isExplicitTryReflectionSetAccessible()) {
return new UnsupportedOperationException("Reflective setAccessible(true) disabled");
}
try {
o... | java | public static Throwable trySetAccessible(AccessibleObject object, boolean checkAccessible) {
if (checkAccessible && !PlatformDependent0.isExplicitTryReflectionSetAccessible()) {
return new UnsupportedOperationException("Reflective setAccessible(true) disabled");
}
try {
o... | [
"public",
"static",
"Throwable",
"trySetAccessible",
"(",
"AccessibleObject",
"object",
",",
"boolean",
"checkAccessible",
")",
"{",
"if",
"(",
"checkAccessible",
"&&",
"!",
"PlatformDependent0",
".",
"isExplicitTryReflectionSetAccessible",
"(",
")",
")",
"{",
"return... | Try to call {@link AccessibleObject#setAccessible(boolean)} but will catch any {@link SecurityException} and
{@link java.lang.reflect.InaccessibleObjectException} and return it.
The caller must check if it returns {@code null} and if not handle the returned exception. | [
"Try",
"to",
"call",
"{"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/ReflectionUtil.java#L29-L41 |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java | Parameters.getPositiveDoubleList | public List<Double> getPositiveDoubleList(final String param) {
return getList(param, new StringToDouble(),
new IsPositive<Double>(), "positive double");
} | java | public List<Double> getPositiveDoubleList(final String param) {
return getList(param, new StringToDouble(),
new IsPositive<Double>(), "positive double");
} | [
"public",
"List",
"<",
"Double",
">",
"getPositiveDoubleList",
"(",
"final",
"String",
"param",
")",
"{",
"return",
"getList",
"(",
"param",
",",
"new",
"StringToDouble",
"(",
")",
",",
"new",
"IsPositive",
"<",
"Double",
">",
"(",
")",
",",
"\"positive do... | Gets a parameter whose value is a (possibly empty) list of positive doubles. | [
"Gets",
"a",
"parameter",
"whose",
"value",
"is",
"a",
"(",
"possibly",
"empty",
")",
"list",
"of",
"positive",
"doubles",
"."
] | train | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java#L701-L704 |
aws/aws-sdk-java | aws-java-sdk-budgets/src/main/java/com/amazonaws/services/budgets/model/Budget.java | Budget.withCostFilters | public Budget withCostFilters(java.util.Map<String, java.util.List<String>> costFilters) {
setCostFilters(costFilters);
return this;
} | java | public Budget withCostFilters(java.util.Map<String, java.util.List<String>> costFilters) {
setCostFilters(costFilters);
return this;
} | [
"public",
"Budget",
"withCostFilters",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
">",
"costFilters",
")",
"{",
"setCostFilters",
"(",
"costFilters",
")",
";",
"return",
"this",
";",
... | <p>
The cost filters, such as service or region, that are applied to a budget.
</p>
<p>
AWS Budgets supports the following services as a filter for RI budgets:
</p>
<ul>
<li>
<p>
Amazon Elastic Compute Cloud - Compute
</p>
</li>
<li>
<p>
Amazon Redshift
</p>
</li>
<li>
<p>
Amazon Relational Database Service
</p>
</li>
... | [
"<p",
">",
"The",
"cost",
"filters",
"such",
"as",
"service",
"or",
"region",
"that",
"are",
"applied",
"to",
"a",
"budget",
".",
"<",
"/",
"p",
">",
"<p",
">",
"AWS",
"Budgets",
"supports",
"the",
"following",
"services",
"as",
"a",
"filter",
"for",
... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-budgets/src/main/java/com/amazonaws/services/budgets/model/Budget.java#L474-L477 |
opentelecoms-org/zrtp-java | src/zorg/platform/android/AndroidCryptoUtils.java | AndroidCryptoUtils.aesDecrypt | @Override
public byte[] aesDecrypt(byte[] data, int offset, int length, byte[] key,
byte[] initVector) throws CryptoException {
try {
SecretKeySpec scs = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/CFB/NoPadding", "ZBC");
IvParameterSpec iv = new IvParameterSpec(initVecto... | java | @Override
public byte[] aesDecrypt(byte[] data, int offset, int length, byte[] key,
byte[] initVector) throws CryptoException {
try {
SecretKeySpec scs = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/CFB/NoPadding", "ZBC");
IvParameterSpec iv = new IvParameterSpec(initVecto... | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"aesDecrypt",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
",",
"int",
"length",
",",
"byte",
"[",
"]",
"key",
",",
"byte",
"[",
"]",
"initVector",
")",
"throws",
"CryptoException",
"{",
"try",
"{"... | /* (non-Javadoc)
@see zorg.platform.CryptoUtils#aesDecrypt(byte[], int, int, byte[], byte[]) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | train | https://github.com/opentelecoms-org/zrtp-java/blob/10a0c77866c5d1b1504df161db9a447f5069ed54/src/zorg/platform/android/AndroidCryptoUtils.java#L48-L65 |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java | IgnoredNonAffectedServerGroupsUtil.addCurrentServerGroupsToHostInfoModel | public static ModelNode addCurrentServerGroupsToHostInfoModel(boolean ignoreUnaffectedServerGroups, Resource hostModel, ModelNode model) {
if (!ignoreUnaffectedServerGroups) {
return model;
}
model.get(IGNORE_UNUSED_CONFIG).set(ignoreUnaffectedServerGroups);
addServerGroupsTo... | java | public static ModelNode addCurrentServerGroupsToHostInfoModel(boolean ignoreUnaffectedServerGroups, Resource hostModel, ModelNode model) {
if (!ignoreUnaffectedServerGroups) {
return model;
}
model.get(IGNORE_UNUSED_CONFIG).set(ignoreUnaffectedServerGroups);
addServerGroupsTo... | [
"public",
"static",
"ModelNode",
"addCurrentServerGroupsToHostInfoModel",
"(",
"boolean",
"ignoreUnaffectedServerGroups",
",",
"Resource",
"hostModel",
",",
"ModelNode",
"model",
")",
"{",
"if",
"(",
"!",
"ignoreUnaffectedServerGroups",
")",
"{",
"return",
"model",
";",... | Used by the slave host when creating the host info dmr sent across to the DC during the registration process
@param ignoreUnaffectedServerGroups whether the slave host is set up to ignore config for server groups it does not have servers for
@param hostModel the resource containing the host model
@param model the dmr ... | [
"Used",
"by",
"the",
"slave",
"host",
"when",
"creating",
"the",
"host",
"info",
"dmr",
"sent",
"across",
"to",
"the",
"DC",
"during",
"the",
"registration",
"process"
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/IgnoredNonAffectedServerGroupsUtil.java#L84-L91 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/contextmenu/CmsShowWorkplace.java | CmsShowWorkplace.openWorkplace | public static void openWorkplace(final CmsUUID structureId, final boolean classic) {
CmsRpcAction<String> callback = new CmsRpcAction<String>() {
/**
* @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
*/
@Override
public void execute() {
... | java | public static void openWorkplace(final CmsUUID structureId, final boolean classic) {
CmsRpcAction<String> callback = new CmsRpcAction<String>() {
/**
* @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
*/
@Override
public void execute() {
... | [
"public",
"static",
"void",
"openWorkplace",
"(",
"final",
"CmsUUID",
"structureId",
",",
"final",
"boolean",
"classic",
")",
"{",
"CmsRpcAction",
"<",
"String",
">",
"callback",
"=",
"new",
"CmsRpcAction",
"<",
"String",
">",
"(",
")",
"{",
"/**\n ... | Opens the workplace.<p>
@param structureId the structure id of the resource for which the workplace should be opened
@param classic if true, opens the old workplace, else the new workplace | [
"Opens",
"the",
"workplace",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/contextmenu/CmsShowWorkplace.java#L88-L113 |
jenkinsci/java-client-api | jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java | JenkinsServer.deleteJob | public JenkinsServer deleteJob(FolderJob folder, String jobName) throws IOException {
return deleteJob(folder, jobName, false);
} | java | public JenkinsServer deleteJob(FolderJob folder, String jobName) throws IOException {
return deleteJob(folder, jobName, false);
} | [
"public",
"JenkinsServer",
"deleteJob",
"(",
"FolderJob",
"folder",
",",
"String",
"jobName",
")",
"throws",
"IOException",
"{",
"return",
"deleteJob",
"(",
"folder",
",",
"jobName",
",",
"false",
")",
";",
"}"
] | Delete a job from Jenkins within a folder.
@param folder The folder where the given job is located.
@param jobName The job which should be deleted.
@throws IOException in case of an error. | [
"Delete",
"a",
"job",
"from",
"Jenkins",
"within",
"a",
"folder",
"."
] | train | https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L692-L694 |
grails/grails-core | grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java | GroovyPagesUriSupport.getNoSuffixViewURI | public String getNoSuffixViewURI(GroovyObject controller, String viewName) {
return getNoSuffixViewURI(getLogicalControllerName(controller), viewName);
} | java | public String getNoSuffixViewURI(GroovyObject controller, String viewName) {
return getNoSuffixViewURI(getLogicalControllerName(controller), viewName);
} | [
"public",
"String",
"getNoSuffixViewURI",
"(",
"GroovyObject",
"controller",
",",
"String",
"viewName",
")",
"{",
"return",
"getNoSuffixViewURI",
"(",
"getLogicalControllerName",
"(",
"controller",
")",
",",
"viewName",
")",
";",
"}"
] | Obtains a view URI of the given controller and view name without the suffix
@param controller The name of the controller
@param viewName The name of the view
@return The view URI | [
"Obtains",
"a",
"view",
"URI",
"of",
"the",
"given",
"controller",
"and",
"view",
"name",
"without",
"the",
"suffix"
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java#L79-L81 |
orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_AddZ.java | ST_AddZ.addZ | public static Geometry addZ(Geometry geometry, double z) throws SQLException {
if(geometry == null){
return null;
}
geometry.apply(new AddZCoordinateSequenceFilter(z));
return geometry;
} | java | public static Geometry addZ(Geometry geometry, double z) throws SQLException {
if(geometry == null){
return null;
}
geometry.apply(new AddZCoordinateSequenceFilter(z));
return geometry;
} | [
"public",
"static",
"Geometry",
"addZ",
"(",
"Geometry",
"geometry",
",",
"double",
"z",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"geometry",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"geometry",
".",
"apply",
"(",
"new",
"AddZCoordinateSeq... | Add a z with to the existing value (do the sum). NaN values are not
updated.
@param geometry
@param z
@return
@throws java.sql.SQLException | [
"Add",
"a",
"z",
"with",
"to",
"the",
"existing",
"value",
"(",
"do",
"the",
"sum",
")",
".",
"NaN",
"values",
"are",
"not",
"updated",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_AddZ.java#L58-L64 |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/webapp/WebApp.java | WebApp.addMappingFilter | public void addMappingFilter(IServletConfig sConfig, IFilterConfig config) {
IFilterMapping fmapping = new FilterMapping(null, config, sConfig);
_addMapingFilter(config, fmapping);
} | java | public void addMappingFilter(IServletConfig sConfig, IFilterConfig config) {
IFilterMapping fmapping = new FilterMapping(null, config, sConfig);
_addMapingFilter(config, fmapping);
} | [
"public",
"void",
"addMappingFilter",
"(",
"IServletConfig",
"sConfig",
",",
"IFilterConfig",
"config",
")",
"{",
"IFilterMapping",
"fmapping",
"=",
"new",
"FilterMapping",
"(",
"null",
",",
"config",
",",
"sConfig",
")",
";",
"_addMapingFilter",
"(",
"config",
... | Adds a filter against a specified servlet config into this context
@param sConfig
@param config | [
"Adds",
"a",
"filter",
"against",
"a",
"specified",
"servlet",
"config",
"into",
"this",
"context"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/webapp/WebApp.java#L5554-L5557 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/slim/CompareFixture.java | CompareFixture.differenceBetweenExplicitWhitespaceAnd | public String differenceBetweenExplicitWhitespaceAnd(String first, String second) {
Formatter whitespaceFormatter = new Formatter() {
@Override
public String format(String value) {
return explicitWhitespace(value);
}
};
return getDifferencesHtm... | java | public String differenceBetweenExplicitWhitespaceAnd(String first, String second) {
Formatter whitespaceFormatter = new Formatter() {
@Override
public String format(String value) {
return explicitWhitespace(value);
}
};
return getDifferencesHtm... | [
"public",
"String",
"differenceBetweenExplicitWhitespaceAnd",
"(",
"String",
"first",
",",
"String",
"second",
")",
"{",
"Formatter",
"whitespaceFormatter",
"=",
"new",
"Formatter",
"(",
")",
"{",
"@",
"Override",
"public",
"String",
"format",
"(",
"String",
"valu... | Determines difference between two strings, visualizing various forms of whitespace.
@param first first string to compare.
@param second second string to compare.
@return HTML of difference between the two. | [
"Determines",
"difference",
"between",
"two",
"strings",
"visualizing",
"various",
"forms",
"of",
"whitespace",
"."
] | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/CompareFixture.java#L37-L45 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/parser/PdfContentReaderTool.java | PdfContentReaderTool.getDictionaryDetail | static public String getDictionaryDetail(PdfDictionary dic, int depth){
StringBuffer builder = new StringBuffer();
builder.append('(');
List subDictionaries = new ArrayList();
for (Iterator i = dic.getKeys().iterator(); i.hasNext(); ) {
PdfName key = (PdfName)i.next();
... | java | static public String getDictionaryDetail(PdfDictionary dic, int depth){
StringBuffer builder = new StringBuffer();
builder.append('(');
List subDictionaries = new ArrayList();
for (Iterator i = dic.getKeys().iterator(); i.hasNext(); ) {
PdfName key = (PdfName)i.next();
... | [
"static",
"public",
"String",
"getDictionaryDetail",
"(",
"PdfDictionary",
"dic",
",",
"int",
"depth",
")",
"{",
"StringBuffer",
"builder",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"builder",
".",
"append",
"(",
"'",
"'",
")",
";",
"List",
"subDictionaries... | Shows the detail of a dictionary.
@param dic the dictionary of which you want the detail
@param depth the depth of the current dictionary (for nested dictionaries)
@return a String representation of the dictionary | [
"Shows",
"the",
"detail",
"of",
"a",
"dictionary",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/parser/PdfContentReaderTool.java#L87-L116 |
sailthru/sailthru-java-client | src/main/com/sailthru/client/SailthruClient.java | SailthruClient.getInstance | public static synchronized SailthruClient getInstance(String apiKey, String apiSecret, String apiUrl) {
if (_instance == null) {
_instance = new SailthruClient(apiKey, apiSecret, apiUrl);
}
return _instance;
} | java | public static synchronized SailthruClient getInstance(String apiKey, String apiSecret, String apiUrl) {
if (_instance == null) {
_instance = new SailthruClient(apiKey, apiSecret, apiUrl);
}
return _instance;
} | [
"public",
"static",
"synchronized",
"SailthruClient",
"getInstance",
"(",
"String",
"apiKey",
",",
"String",
"apiSecret",
",",
"String",
"apiUrl",
")",
"{",
"if",
"(",
"_instance",
"==",
"null",
")",
"{",
"_instance",
"=",
"new",
"SailthruClient",
"(",
"apiKey... | Synchronized singleton instance method using default URL string
@param apiKey Sailthru API key string
@param apiSecret Sailthru API secret string
@param apiUrl Sailthru API URL
@return singleton instance of SailthruClient
@deprecated | [
"Synchronized",
"singleton",
"instance",
"method",
"using",
"default",
"URL",
"string"
] | train | https://github.com/sailthru/sailthru-java-client/blob/62b491f6a39b41b836bfc021779200d29b6d2069/src/main/com/sailthru/client/SailthruClient.java#L71-L76 |
Impetus/Kundera | src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/KunderaMetadataManager.java | KunderaMetadataManager.getEntityMetadata | public static EntityMetadata getEntityMetadata(final KunderaMetadata kunderaMetadata, Class entityClass)
{
if (entityClass == null)
{
throw new KunderaException("Invalid class provided " + entityClass);
}
List<String> persistenceUnits = kunderaMetadata.getApplicatio... | java | public static EntityMetadata getEntityMetadata(final KunderaMetadata kunderaMetadata, Class entityClass)
{
if (entityClass == null)
{
throw new KunderaException("Invalid class provided " + entityClass);
}
List<String> persistenceUnits = kunderaMetadata.getApplicatio... | [
"public",
"static",
"EntityMetadata",
"getEntityMetadata",
"(",
"final",
"KunderaMetadata",
"kunderaMetadata",
",",
"Class",
"entityClass",
")",
"{",
"if",
"(",
"entityClass",
"==",
"null",
")",
"{",
"throw",
"new",
"KunderaException",
"(",
"\"Invalid class provided \... | Finds ands returns Entity metadata for a given array of PUs.
@param entityClass
the entity class
@param persistenceUnits
the persistence units
@return the entity metadata | [
"Finds",
"ands",
"returns",
"Entity",
"metadata",
"for",
"a",
"given",
"array",
"of",
"PUs",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/KunderaMetadataManager.java#L126-L158 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/SetDirtyOnChangeHandler.java | SetDirtyOnChangeHandler.fieldChanged | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
int result = DBConstants.NORMAL_RETURN;
Record record = m_fldTarget.getRecord();
boolean bSetDirty = true;
if (m_bIfNewRecord) if (record.getEditMode() == Constants.EDIT_ADD)
bSetDirty = true;
if (m_... | java | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
int result = DBConstants.NORMAL_RETURN;
Record record = m_fldTarget.getRecord();
boolean bSetDirty = true;
if (m_bIfNewRecord) if (record.getEditMode() == Constants.EDIT_ADD)
bSetDirty = true;
if (m_... | [
"public",
"int",
"fieldChanged",
"(",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"int",
"result",
"=",
"DBConstants",
".",
"NORMAL_RETURN",
";",
"Record",
"record",
"=",
"m_fldTarget",
".",
"getRecord",
"(",
")",
";",
"boolean",
"bSetDirty... | The Field has Changed.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay). | [
"The",
"Field",
"has",
"Changed",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/SetDirtyOnChangeHandler.java#L93-L108 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/util/EnumFacingUtils.java | EnumFacingUtils.rotateFacing | public static EnumFacing rotateFacing(EnumFacing facing, int count)
{
if (facing == null)
return null;
while (count-- > 0)
facing = facing.rotateAround(EnumFacing.Axis.Y);
return facing;
} | java | public static EnumFacing rotateFacing(EnumFacing facing, int count)
{
if (facing == null)
return null;
while (count-- > 0)
facing = facing.rotateAround(EnumFacing.Axis.Y);
return facing;
} | [
"public",
"static",
"EnumFacing",
"rotateFacing",
"(",
"EnumFacing",
"facing",
",",
"int",
"count",
")",
"{",
"if",
"(",
"facing",
"==",
"null",
")",
"return",
"null",
";",
"while",
"(",
"count",
"--",
">",
"0",
")",
"facing",
"=",
"facing",
".",
"rota... | Rotates facing {@code count} times.
@param facing the facing
@param count the count
@return the enum facing | [
"Rotates",
"facing",
"{",
"@code",
"count",
"}",
"times",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/EnumFacingUtils.java#L82-L90 |
elki-project/elki | elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java | FormatUtil.format | public static String format(double[][] m, String pre) {
StringBuilder output = new StringBuilder() //
.append(pre).append("[\n").append(pre);
for(int i = 0; i < m.length; i++) {
formatTo(output.append(" ["), m[i], ", ").append("]\n").append(pre);
}
return output.append("]\n").toString();
... | java | public static String format(double[][] m, String pre) {
StringBuilder output = new StringBuilder() //
.append(pre).append("[\n").append(pre);
for(int i = 0; i < m.length; i++) {
formatTo(output.append(" ["), m[i], ", ").append("]\n").append(pre);
}
return output.append("]\n").toString();
... | [
"public",
"static",
"String",
"format",
"(",
"double",
"[",
"]",
"[",
"]",
"m",
",",
"String",
"pre",
")",
"{",
"StringBuilder",
"output",
"=",
"new",
"StringBuilder",
"(",
")",
"//",
".",
"append",
"(",
"pre",
")",
".",
"append",
"(",
"\"[\\n\"",
")... | Returns a string representation of this matrix. In each line the specified
String <code>pre</code> is prefixed.
@param pre the prefix of each line
@return a string representation of this matrix | [
"Returns",
"a",
"string",
"representation",
"of",
"this",
"matrix",
".",
"In",
"each",
"line",
"the",
"specified",
"String",
"<code",
">",
"pre<",
"/",
"code",
">",
"is",
"prefixed",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L677-L684 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java | TmdbPeople.getPersonTaggedImages | public ResultList<ArtworkMedia> getPersonTaggedImages(int personId, Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, personId);
parameters.add(Param.PAGE, page);
parameters.add(Param.LANGUAGE, language);
... | java | public ResultList<ArtworkMedia> getPersonTaggedImages(int personId, Integer page, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, personId);
parameters.add(Param.PAGE, page);
parameters.add(Param.LANGUAGE, language);
... | [
"public",
"ResultList",
"<",
"ArtworkMedia",
">",
"getPersonTaggedImages",
"(",
"int",
"personId",
",",
"Integer",
"page",
",",
"String",
"language",
")",
"throws",
"MovieDbException",
"{",
"TmdbParameters",
"parameters",
"=",
"new",
"TmdbParameters",
"(",
")",
";... | Get the images that have been tagged with a specific person id.
We return all of the image results with a media object mapped for each
image.
@param personId
@param page
@param language
@return
@throws com.omertron.themoviedbapi.MovieDbException | [
"Get",
"the",
"images",
"that",
"have",
"been",
"tagged",
"with",
"a",
"specific",
"person",
"id",
"."
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java#L245-L254 |
jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java | Error.illegalCode | public static void illegalCode(Exception e, String methodName, String className){
throw new IllegalCodeException(MSG.INSTANCE.message(nullPointer,methodName,className,e.getClass().getSimpleName(),""+e.getMessage()));
} | java | public static void illegalCode(Exception e, String methodName, String className){
throw new IllegalCodeException(MSG.INSTANCE.message(nullPointer,methodName,className,e.getClass().getSimpleName(),""+e.getMessage()));
} | [
"public",
"static",
"void",
"illegalCode",
"(",
"Exception",
"e",
",",
"String",
"methodName",
",",
"String",
"className",
")",
"{",
"throw",
"new",
"IllegalCodeException",
"(",
"MSG",
".",
"INSTANCE",
".",
"message",
"(",
"nullPointer",
",",
"methodName",
","... | Thrown when the explicit conversion method defined has a null pointer.<br>
Used in the generated code, in case of dynamic methods defined.
@param e byteCode library exception
@param methodName method name
@param className class name | [
"Thrown",
"when",
"the",
"explicit",
"conversion",
"method",
"defined",
"has",
"a",
"null",
"pointer",
".",
"<br",
">",
"Used",
"in",
"the",
"generated",
"code",
"in",
"case",
"of",
"dynamic",
"methods",
"defined",
"."
] | train | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L145-L147 |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java | StringUtils.replaceAll | public static String replaceAll(final String input, final String regex,
final Function<MatchResult, String> replacementFunction) {
return replaceAll(input, Pattern.compile(regex), replacementFunction);
} | java | public static String replaceAll(final String input, final String regex,
final Function<MatchResult, String> replacementFunction) {
return replaceAll(input, Pattern.compile(regex), replacementFunction);
} | [
"public",
"static",
"String",
"replaceAll",
"(",
"final",
"String",
"input",
",",
"final",
"String",
"regex",
",",
"final",
"Function",
"<",
"MatchResult",
",",
"String",
">",
"replacementFunction",
")",
"{",
"return",
"replaceAll",
"(",
"input",
",",
"Pattern... | Returns a string which is the result of replacing every match of regex in the input string with
the results of applying replacementFunction to the matched string. This is a candidate to be
moved to a more general utility package.
@param replacementFunction May not return null. | [
"Returns",
"a",
"string",
"which",
"is",
"the",
"result",
"of",
"replacing",
"every",
"match",
"of",
"regex",
"in",
"the",
"input",
"string",
"with",
"the",
"results",
"of",
"applying",
"replacementFunction",
"to",
"the",
"matched",
"string",
".",
"This",
"i... | train | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java#L102-L105 |
line/armeria | core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java | ArmeriaHttpUtil.toArmeria | public static HttpHeaders toArmeria(HttpResponse in) {
final io.netty.handler.codec.http.HttpHeaders inHeaders = in.headers();
final HttpHeaders out = new DefaultHttpHeaders(true, inHeaders.size());
out.status(in.status().code());
// Add the HTTP headers which have not been consumed abo... | java | public static HttpHeaders toArmeria(HttpResponse in) {
final io.netty.handler.codec.http.HttpHeaders inHeaders = in.headers();
final HttpHeaders out = new DefaultHttpHeaders(true, inHeaders.size());
out.status(in.status().code());
// Add the HTTP headers which have not been consumed abo... | [
"public",
"static",
"HttpHeaders",
"toArmeria",
"(",
"HttpResponse",
"in",
")",
"{",
"final",
"io",
".",
"netty",
".",
"handler",
".",
"codec",
".",
"http",
".",
"HttpHeaders",
"inHeaders",
"=",
"in",
".",
"headers",
"(",
")",
";",
"final",
"HttpHeaders",
... | Converts the headers of the given Netty HTTP/1.x response into Armeria HTTP/2 headers. | [
"Converts",
"the",
"headers",
"of",
"the",
"given",
"Netty",
"HTTP",
"/",
"1",
".",
"x",
"response",
"into",
"Armeria",
"HTTP",
"/",
"2",
"headers",
"."
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java#L551-L559 |
johnkil/Android-AppMsg | library/src/com/devspark/appmsg/AppMsg.java | AppMsg.setAnimation | public AppMsg setAnimation(Animation inAnimation, Animation outAnimation) {
mInAnimation = inAnimation;
mOutAnimation = outAnimation;
return this;
} | java | public AppMsg setAnimation(Animation inAnimation, Animation outAnimation) {
mInAnimation = inAnimation;
mOutAnimation = outAnimation;
return this;
} | [
"public",
"AppMsg",
"setAnimation",
"(",
"Animation",
"inAnimation",
",",
"Animation",
"outAnimation",
")",
"{",
"mInAnimation",
"=",
"inAnimation",
";",
"mOutAnimation",
"=",
"outAnimation",
";",
"return",
"this",
";",
"}"
] | Sets the Animations to be used when displaying/removing the Crouton.
@param inAnimation the Animation to be used when displaying.
@param outAnimation the Animation to be used when removing. | [
"Sets",
"the",
"Animations",
"to",
"be",
"used",
"when",
"displaying",
"/",
"removing",
"the",
"Crouton",
"."
] | train | https://github.com/johnkil/Android-AppMsg/blob/e7fdd7870530a24e6d825278ee0863be0521e8b8/library/src/com/devspark/appmsg/AppMsg.java#L612-L616 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.