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 |
|---|---|---|---|---|---|---|---|---|---|---|
ironjacamar/ironjacamar | web/src/main/java/org/ironjacamar/web/SecurityActions.java | SecurityActions.createWARClassLoader | static WARClassLoader createWARClassLoader(final Kernel kernel, final ClassLoader parent)
{
return AccessController.doPrivileged(new PrivilegedAction<WARClassLoader>()
{
public WARClassLoader run()
{
return new WARClassLoader(kernel, parent);
}
});
} | java | static WARClassLoader createWARClassLoader(final Kernel kernel, final ClassLoader parent)
{
return AccessController.doPrivileged(new PrivilegedAction<WARClassLoader>()
{
public WARClassLoader run()
{
return new WARClassLoader(kernel, parent);
}
});
} | [
"static",
"WARClassLoader",
"createWARClassLoader",
"(",
"final",
"Kernel",
"kernel",
",",
"final",
"ClassLoader",
"parent",
")",
"{",
"return",
"AccessController",
".",
"doPrivileged",
"(",
"new",
"PrivilegedAction",
"<",
"WARClassLoader",
">",
"(",
")",
"{",
"pu... | Create a WARClassLoader
@param kernel The kernel
@param parent The parent class loader
@return The class loader | [
"Create",
"a",
"WARClassLoader"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/web/src/main/java/org/ironjacamar/web/SecurityActions.java#L135-L144 |
gresrun/jesque | src/main/java/net/greghaines/jesque/utils/PoolUtils.java | PoolUtils.createJedisPool | public static Pool<Jedis> createJedisPool(final Config jesqueConfig, final GenericObjectPoolConfig poolConfig) {
if (jesqueConfig == null) {
throw new IllegalArgumentException("jesqueConfig must not be null");
}
if (poolConfig == null) {
throw new IllegalArgumentException... | java | public static Pool<Jedis> createJedisPool(final Config jesqueConfig, final GenericObjectPoolConfig poolConfig) {
if (jesqueConfig == null) {
throw new IllegalArgumentException("jesqueConfig must not be null");
}
if (poolConfig == null) {
throw new IllegalArgumentException... | [
"public",
"static",
"Pool",
"<",
"Jedis",
">",
"createJedisPool",
"(",
"final",
"Config",
"jesqueConfig",
",",
"final",
"GenericObjectPoolConfig",
"poolConfig",
")",
"{",
"if",
"(",
"jesqueConfig",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException"... | A simple helper method that creates a pool of connections to Redis using
the supplied configurations.
@param jesqueConfig the config used to create the pooled Jedis connections
@param poolConfig the config used to create the pool
@return a configured Pool of Jedis connections | [
"A",
"simple",
"helper",
"method",
"that",
"creates",
"a",
"pool",
"of",
"connections",
"to",
"Redis",
"using",
"the",
"supplied",
"configurations",
"."
] | train | https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/utils/PoolUtils.java#L114-L129 |
infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java | BaseAsyncInterceptor.asyncInvokeNext | public final Object asyncInvokeNext(InvocationContext ctx, VisitableCommand command,
Collection<? extends CompletionStage<?>> delays) {
if (delays == null || delays.isEmpty()) {
return invokeNext(ctx, command);
} else if (delays.size() == 1) {
return ... | java | public final Object asyncInvokeNext(InvocationContext ctx, VisitableCommand command,
Collection<? extends CompletionStage<?>> delays) {
if (delays == null || delays.isEmpty()) {
return invokeNext(ctx, command);
} else if (delays.size() == 1) {
return ... | [
"public",
"final",
"Object",
"asyncInvokeNext",
"(",
"InvocationContext",
"ctx",
",",
"VisitableCommand",
"command",
",",
"Collection",
"<",
"?",
"extends",
"CompletionStage",
"<",
"?",
">",
">",
"delays",
")",
"{",
"if",
"(",
"delays",
"==",
"null",
"||",
"... | Suspend invocation until all {@code delays} complete, then if successful invoke the next interceptor.
If the list is empty or null, invoke the next interceptor immediately.
<p>If any of {@code delays} completes exceptionally, skip the next interceptor and continue with the exception.</p>
<p>You need to wrap the resul... | [
"Suspend",
"invocation",
"until",
"all",
"{",
"@code",
"delays",
"}",
"complete",
"then",
"if",
"successful",
"invoke",
"the",
"next",
"interceptor",
".",
"If",
"the",
"list",
"is",
"empty",
"or",
"null",
"invoke",
"the",
"next",
"interceptor",
"immediately",
... | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java#L254-L266 |
validator/validator | src/nu/validator/xml/PrudentHttpEntityResolver.java | PrudentHttpEntityResolver.setParams | public static void setParams(int connectionTimeout, int socketTimeout,
int maxRequests) {
PrudentHttpEntityResolver.maxRequests = maxRequests;
PoolingHttpClientConnectionManager phcConnMgr;
Registry<ConnectionSocketFactory> registry = //
RegistryBuilder.<ConnectionSocketFacto... | java | public static void setParams(int connectionTimeout, int socketTimeout,
int maxRequests) {
PrudentHttpEntityResolver.maxRequests = maxRequests;
PoolingHttpClientConnectionManager phcConnMgr;
Registry<ConnectionSocketFactory> registry = //
RegistryBuilder.<ConnectionSocketFacto... | [
"public",
"static",
"void",
"setParams",
"(",
"int",
"connectionTimeout",
",",
"int",
"socketTimeout",
",",
"int",
"maxRequests",
")",
"{",
"PrudentHttpEntityResolver",
".",
"maxRequests",
"=",
"maxRequests",
";",
"PoolingHttpClientConnectionManager",
"phcConnMgr",
";",... | Sets the timeouts of the HTTP client.
@param connectionTimeout
timeout until connection established in milliseconds. Zero
means no timeout.
@param socketTimeout
timeout for waiting for data in milliseconds. Zero means no
timeout.
@param maxRequests
maximum number of connections to a particular host | [
"Sets",
"the",
"timeouts",
"of",
"the",
"HTTP",
"client",
"."
] | train | https://github.com/validator/validator/blob/c7b7f85b3a364df7d9944753fb5b2cd0ce642889/src/nu/validator/xml/PrudentHttpEntityResolver.java#L128-L181 |
couchbase/couchbase-lite-java-core | src/main/java/com/couchbase/lite/util/Utils.java | Utils.isEqual | public static boolean isEqual(Object obj1, Object obj2) {
if (obj1 != null) {
return (obj2 != null) && obj1.equals(obj2);
} else {
return obj2 == null;
}
} | java | public static boolean isEqual(Object obj1, Object obj2) {
if (obj1 != null) {
return (obj2 != null) && obj1.equals(obj2);
} else {
return obj2 == null;
}
} | [
"public",
"static",
"boolean",
"isEqual",
"(",
"Object",
"obj1",
",",
"Object",
"obj2",
")",
"{",
"if",
"(",
"obj1",
"!=",
"null",
")",
"{",
"return",
"(",
"obj2",
"!=",
"null",
")",
"&&",
"obj1",
".",
"equals",
"(",
"obj2",
")",
";",
"}",
"else",
... | Like equals, but works even if either/both are null
@param obj1 object1 being compared
@param obj2 object2 being compared
@return true if both are non-null and obj1.equals(obj2), or true if both are null.
otherwise return false. | [
"Like",
"equals",
"but",
"works",
"even",
"if",
"either",
"/",
"both",
"are",
"null"
] | train | https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/util/Utils.java#L50-L56 |
defei/codelogger-utils | src/main/java/org/codelogger/utils/RangeUtils.java | RangeUtils.getLongRanges | public static List<Range<Long>> getLongRanges(final Long from, final Long to, final int step)
throws InvalidRangeException {
if (from > to) {
throw buildInvalidRangeException(from, to);
}
ArrayList<Range<Long>> list = newArrayList();
if (step >= to - from) {
list.add(Range.getInstance... | java | public static List<Range<Long>> getLongRanges(final Long from, final Long to, final int step)
throws InvalidRangeException {
if (from > to) {
throw buildInvalidRangeException(from, to);
}
ArrayList<Range<Long>> list = newArrayList();
if (step >= to - from) {
list.add(Range.getInstance... | [
"public",
"static",
"List",
"<",
"Range",
"<",
"Long",
">",
">",
"getLongRanges",
"(",
"final",
"Long",
"from",
",",
"final",
"Long",
"to",
",",
"final",
"int",
"step",
")",
"throws",
"InvalidRangeException",
"{",
"if",
"(",
"from",
">",
"to",
")",
"{"... | Returns Range<Long> list between given from and to by step.The
minimum step is 1.<br/>
e.g:<br/>
[from:0,to:3,step:1] => [[0-0],[1-1],[2-2],[3-3]]<br/>
[from:0,to:7,step:2] => [[0-1],[2-3],[4-5],[6-7]]<br/>
[from:0,to:7,step:3] => [[0-2],[3-5... | [
"Returns",
"Range<",
";",
"Long>",
";",
"list",
"between",
"given",
"from",
"and",
"to",
"by",
"step",
".",
"The",
"minimum",
"step",
"is",
"1",
".",
"<br",
"/",
">",
"e",
".",
"g",
":",
"<br",
"/",
">",
" ",
";",
" ",
";",
" ",
"... | train | https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/RangeUtils.java#L122-L141 |
calimero-project/calimero-core | src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java | TunnelingFeature.newSet | public static TunnelingFeature newSet(final int channelId, final int seq, final InterfaceFeature featureId,
final byte... featureValue) {
return new TunnelingFeature(KNXnetIPHeader.TunnelingFeatureSet, channelId, seq, featureId, Success, featureValue);
} | java | public static TunnelingFeature newSet(final int channelId, final int seq, final InterfaceFeature featureId,
final byte... featureValue) {
return new TunnelingFeature(KNXnetIPHeader.TunnelingFeatureSet, channelId, seq, featureId, Success, featureValue);
} | [
"public",
"static",
"TunnelingFeature",
"newSet",
"(",
"final",
"int",
"channelId",
",",
"final",
"int",
"seq",
",",
"final",
"InterfaceFeature",
"featureId",
",",
"final",
"byte",
"...",
"featureValue",
")",
"{",
"return",
"new",
"TunnelingFeature",
"(",
"KNXne... | Creates a new tunneling feature-set service.
@param channelId tunneling connection channel identifier
@param seq tunneling connection send sequence number
@param featureId interface feature which value should be set
@param featureValue feature value to set
@return new tunneling feature-set service | [
"Creates",
"a",
"new",
"tunneling",
"feature",
"-",
"set",
"service",
"."
] | train | https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java#L110-L113 |
jblas-project/jblas | src/main/java/org/jblas/Singular.java | Singular.SVDValues | public static DoubleMatrix SVDValues(DoubleMatrix A) {
int m = A.rows;
int n = A.columns;
DoubleMatrix S = new DoubleMatrix(min(m, n));
int info = NativeBlas.dgesvd('N', 'N', m, n, A.dup().data, 0, m, S.data, 0, null, 0, 1, null, 0, 1);
if (info > 0) {
throw new Lapac... | java | public static DoubleMatrix SVDValues(DoubleMatrix A) {
int m = A.rows;
int n = A.columns;
DoubleMatrix S = new DoubleMatrix(min(m, n));
int info = NativeBlas.dgesvd('N', 'N', m, n, A.dup().data, 0, m, S.data, 0, null, 0, 1, null, 0, 1);
if (info > 0) {
throw new Lapac... | [
"public",
"static",
"DoubleMatrix",
"SVDValues",
"(",
"DoubleMatrix",
"A",
")",
"{",
"int",
"m",
"=",
"A",
".",
"rows",
";",
"int",
"n",
"=",
"A",
".",
"columns",
";",
"DoubleMatrix",
"S",
"=",
"new",
"DoubleMatrix",
"(",
"min",
"(",
"m",
",",
"n",
... | Compute the singular values of a matrix.
@param A DoubleMatrix of dimension m * n
@return A min(m, n) vector of singular values. | [
"Compute",
"the",
"singular",
"values",
"of",
"a",
"matrix",
"."
] | train | https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/Singular.java#L120-L132 |
infinispan/infinispan | core/src/main/java/org/infinispan/partitionhandling/impl/PreferAvailabilityStrategy.java | PreferAvailabilityStrategy.computePreferredTopology | public CacheTopology computePreferredTopology(Map<Address, CacheStatusResponse> statusResponseMap) {
List<Partition> partitions = computePartitions(statusResponseMap, "");
return partitions.size() != 0 ? selectPreferredPartition(partitions).topology : null;
} | java | public CacheTopology computePreferredTopology(Map<Address, CacheStatusResponse> statusResponseMap) {
List<Partition> partitions = computePartitions(statusResponseMap, "");
return partitions.size() != 0 ? selectPreferredPartition(partitions).topology : null;
} | [
"public",
"CacheTopology",
"computePreferredTopology",
"(",
"Map",
"<",
"Address",
",",
"CacheStatusResponse",
">",
"statusResponseMap",
")",
"{",
"List",
"<",
"Partition",
">",
"partitions",
"=",
"computePartitions",
"(",
"statusResponseMap",
",",
"\"\"",
")",
";",... | Ignore the AvailabilityStrategyContext and only compute the preferred topology for testing.
@return The preferred topology, or {@code null} if there is no preferred topology. | [
"Ignore",
"the",
"AvailabilityStrategyContext",
"and",
"only",
"compute",
"the",
"preferred",
"topology",
"for",
"testing",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/partitionhandling/impl/PreferAvailabilityStrategy.java#L246-L250 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksInner.java | BuildTasksInner.beginDeleteAsync | public Observable<Void> beginDeleteAsync(String resourceGroupName, String registryName, String buildTaskName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, buildTaskName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResp... | java | public Observable<Void> beginDeleteAsync(String resourceGroupName, String registryName, String buildTaskName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, registryName, buildTaskName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResp... | [
"public",
"Observable",
"<",
"Void",
">",
"beginDeleteAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
",",
"String",
"buildTaskName",
")",
"{",
"return",
"beginDeleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"registryName",
","... | Deletes a specified build task.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@param buildTaskName The name of the container registry build task.
@throws IllegalArgumentException thrown if parameters fail the val... | [
"Deletes",
"a",
"specified",
"build",
"task",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildTasksInner.java#L739-L746 |
lucee/Lucee | core/src/main/java/lucee/runtime/functions/decision/IsValid.java | IsValid.call | public static boolean call(PageContext pc, String type, Object value, Object objPattern) throws PageException {
type = type.trim();
if (!"regex".equalsIgnoreCase(type) && !"regular_expression".equalsIgnoreCase(type))
throw new FunctionException(pc, "isValid", 1, "type", "wrong attribute count for type [" + type... | java | public static boolean call(PageContext pc, String type, Object value, Object objPattern) throws PageException {
type = type.trim();
if (!"regex".equalsIgnoreCase(type) && !"regular_expression".equalsIgnoreCase(type))
throw new FunctionException(pc, "isValid", 1, "type", "wrong attribute count for type [" + type... | [
"public",
"static",
"boolean",
"call",
"(",
"PageContext",
"pc",
",",
"String",
"type",
",",
"Object",
"value",
",",
"Object",
"objPattern",
")",
"throws",
"PageException",
"{",
"type",
"=",
"type",
".",
"trim",
"(",
")",
";",
"if",
"(",
"!",
"\"regex\""... | regex check
@param pc
@param type
@param value
@param objPattern
@return
@throws PageException | [
"regex",
"check"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/functions/decision/IsValid.java#L67-L74 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET | public OvhCallDiagnostics billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException {
String qPath = "/telephony/{billingAccount}/service/{serviceName}/voiceConsumption/{consumptionId}/callDiagnostics";
Str... | java | public OvhCallDiagnostics billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException {
String qPath = "/telephony/{billingAccount}/service/{serviceName}/voiceConsumption/{consumptionId}/callDiagnostics";
Str... | [
"public",
"OvhCallDiagnostics",
"billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"consumptionId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/t... | Get this object properties
REST: GET /telephony/{billingAccount}/service/{serviceName}/voiceConsumption/{consumptionId}/callDiagnostics
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param consumptionId [required] | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3760-L3765 |
springfox/springfox | springfox-core/src/main/java/springfox/documentation/schema/AlternateTypeRule.java | AlternateTypeRule.alternateFor | public ResolvedType alternateFor(ResolvedType type) {
if (appliesTo(type)) {
if (hasWildcards(original)) {
return replaceWildcardsFrom(WildcardType.collectReplaceables(type, original), alternate);
} else {
return alternate;
}
}
return type;
} | java | public ResolvedType alternateFor(ResolvedType type) {
if (appliesTo(type)) {
if (hasWildcards(original)) {
return replaceWildcardsFrom(WildcardType.collectReplaceables(type, original), alternate);
} else {
return alternate;
}
}
return type;
} | [
"public",
"ResolvedType",
"alternateFor",
"(",
"ResolvedType",
"type",
")",
"{",
"if",
"(",
"appliesTo",
"(",
"type",
")",
")",
"{",
"if",
"(",
"hasWildcards",
"(",
"original",
")",
")",
"{",
"return",
"replaceWildcardsFrom",
"(",
"WildcardType",
".",
"colle... | Provides alternate for supplier type.
@param type the type
@return the alternate for the type | [
"Provides",
"alternate",
"for",
"supplier",
"type",
"."
] | train | https://github.com/springfox/springfox/blob/e40e2d6f4b345ffa35cd5c0ca7a12589036acaf7/springfox-core/src/main/java/springfox/documentation/schema/AlternateTypeRule.java#L61-L70 |
aws/aws-sdk-java | aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/App.java | App.withAttributes | public App withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | java | public App withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | [
"public",
"App",
"withAttributes",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"setAttributes",
"(",
"attributes",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The stack attributes.
</p>
@param attributes
The stack attributes.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"The",
"stack",
"attributes",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/App.java#L725-L728 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java | TypeQualifierDatabase.setParameter | public void setParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa) {
Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param);
if (map == null) {
map = new HashMap<>();
parameterMap.put(met... | java | public void setParameter(MethodDescriptor methodDesc, int param, TypeQualifierValue<?> tqv, TypeQualifierAnnotation tqa) {
Map<TypeQualifierValue<?>, TypeQualifierAnnotation> map = parameterMap.get(methodDesc, param);
if (map == null) {
map = new HashMap<>();
parameterMap.put(met... | [
"public",
"void",
"setParameter",
"(",
"MethodDescriptor",
"methodDesc",
",",
"int",
"param",
",",
"TypeQualifierValue",
"<",
"?",
">",
"tqv",
",",
"TypeQualifierAnnotation",
"tqa",
")",
"{",
"Map",
"<",
"TypeQualifierValue",
"<",
"?",
">",
",",
"TypeQualifierAn... | Set a TypeQualifierAnnotation on a method parameter.
@param methodDesc
the method
@param param
the parameter (0 == first parameter)
@param tqv
the type qualifier
@param tqa
the type qualifier annotation | [
"Set",
"a",
"TypeQualifierAnnotation",
"on",
"a",
"method",
"parameter",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierDatabase.java#L112-L123 |
jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XImageView.java | XImageView.printData | public boolean printData(PrintWriter out, int iPrintOptions)
{
boolean bFieldsFound = false;
String strFieldName = this.getScreenField().getSFieldParam();
String strFieldData = this.getZmlImagePath();
if (strFieldData == null)
strFieldData = HtmlConstants.ICON_DIR + "Noim... | java | public boolean printData(PrintWriter out, int iPrintOptions)
{
boolean bFieldsFound = false;
String strFieldName = this.getScreenField().getSFieldParam();
String strFieldData = this.getZmlImagePath();
if (strFieldData == null)
strFieldData = HtmlConstants.ICON_DIR + "Noim... | [
"public",
"boolean",
"printData",
"(",
"PrintWriter",
"out",
",",
"int",
"iPrintOptions",
")",
"{",
"boolean",
"bFieldsFound",
"=",
"false",
";",
"String",
"strFieldName",
"=",
"this",
".",
"getScreenField",
"(",
")",
".",
"getSFieldParam",
"(",
")",
";",
"S... | Print this field's data in XML format.
@return true if default params were found for this form.
@param out The http output stream.
@exception DBException File exception. | [
"Print",
"this",
"field",
"s",
"data",
"in",
"XML",
"format",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XImageView.java#L74-L84 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java | DefaultGroovyStaticMethods.getBundle | public static ResourceBundle getBundle(ResourceBundle self, String bundleName, Locale locale) {
Class c = ReflectionUtils.getCallingClass();
ClassLoader targetCL = c != null ? c.getClassLoader() : null;
if (targetCL == null) targetCL = ClassLoader.getSystemClassLoader();
return ResourceB... | java | public static ResourceBundle getBundle(ResourceBundle self, String bundleName, Locale locale) {
Class c = ReflectionUtils.getCallingClass();
ClassLoader targetCL = c != null ? c.getClassLoader() : null;
if (targetCL == null) targetCL = ClassLoader.getSystemClassLoader();
return ResourceB... | [
"public",
"static",
"ResourceBundle",
"getBundle",
"(",
"ResourceBundle",
"self",
",",
"String",
"bundleName",
",",
"Locale",
"locale",
")",
"{",
"Class",
"c",
"=",
"ReflectionUtils",
".",
"getCallingClass",
"(",
")",
";",
"ClassLoader",
"targetCL",
"=",
"c",
... | Works exactly like ResourceBundle.getBundle(String, Locale). This is needed
because the java method depends on a particular stack configuration that
is not guaranteed in Groovy when calling the Java method.
@param self placeholder variable used by Groovy categories; ignored for default static methods
@param bun... | [
"Works",
"exactly",
"like",
"ResourceBundle",
".",
"getBundle",
"(",
"String",
"Locale",
")",
".",
"This",
"is",
"needed",
"because",
"the",
"java",
"method",
"depends",
"on",
"a",
"particular",
"stack",
"configuration",
"that",
"is",
"not",
"guaranteed",
"in"... | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java#L208-L213 |
jcuda/jcusparse | JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java | JCusparse.cusparseSgpsvInterleavedBatch_bufferSizeExt | public static int cusparseSgpsvInterleavedBatch_bufferSizeExt(
cusparseHandle handle,
int algo,
int m,
Pointer ds,
Pointer dl,
Pointer d,
Pointer du,
Pointer dw,
Pointer x,
int batchCount,
long[] pBufferSizeInBy... | java | public static int cusparseSgpsvInterleavedBatch_bufferSizeExt(
cusparseHandle handle,
int algo,
int m,
Pointer ds,
Pointer dl,
Pointer d,
Pointer du,
Pointer dw,
Pointer x,
int batchCount,
long[] pBufferSizeInBy... | [
"public",
"static",
"int",
"cusparseSgpsvInterleavedBatch_bufferSizeExt",
"(",
"cusparseHandle",
"handle",
",",
"int",
"algo",
",",
"int",
"m",
",",
"Pointer",
"ds",
",",
"Pointer",
"dl",
",",
"Pointer",
"d",
",",
"Pointer",
"du",
",",
"Pointer",
"dw",
",",
... | <pre>
Description: Solution of pentadiagonal linear system A * X = B,
with multiple right-hand-sides. The coefficient matrix A is
composed of lower (ds, dl), main (d) and upper (du, dw) diagonals, and
the right-hand-sides B are overwritten with the solution X.
</pre> | [
"<pre",
">",
"Description",
":",
"Solution",
"of",
"pentadiagonal",
"linear",
"system",
"A",
"*",
"X",
"=",
"B",
"with",
"multiple",
"right",
"-",
"hand",
"-",
"sides",
".",
"The",
"coefficient",
"matrix",
"A",
"is",
"composed",
"of",
"lower",
"(",
"ds",... | train | https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L9119-L9133 |
PuyallupFoursquare/ccb-api-client-java | src/main/java/com/p4square/ccbapi/model/GetIndividualProfilesRequest.java | GetIndividualProfilesRequest.withMICR | public GetIndividualProfilesRequest withMICR(final String routingNumber, final String accountNumber) {
this.routingNumber = routingNumber;
this.accountNumber = accountNumber;
return this;
} | java | public GetIndividualProfilesRequest withMICR(final String routingNumber, final String accountNumber) {
this.routingNumber = routingNumber;
this.accountNumber = accountNumber;
return this;
} | [
"public",
"GetIndividualProfilesRequest",
"withMICR",
"(",
"final",
"String",
"routingNumber",
",",
"final",
"String",
"accountNumber",
")",
"{",
"this",
".",
"routingNumber",
"=",
"routingNumber",
";",
"this",
".",
"accountNumber",
"=",
"accountNumber",
";",
"retur... | Request the IndividualProfile for the given bank account information.
This option is mutually exclusive with {@link #withIndividualId(int)}
and {@link #withLoginPassword(String, char[])}.
@param routingNumber The individual's bank routing number.
@param accountNumber The individual's bank account number.
@return this... | [
"Request",
"the",
"IndividualProfile",
"for",
"the",
"given",
"bank",
"account",
"information",
"."
] | train | https://github.com/PuyallupFoursquare/ccb-api-client-java/blob/54a7a3184dc565fe513aa520e1344b2303ea6834/src/main/java/com/p4square/ccbapi/model/GetIndividualProfilesRequest.java#L92-L96 |
cdk/cdk | tool/charges/src/main/java/org/openscience/cdk/charges/GasteigerPEPEPartialCharges.java | GasteigerPEPEPartialCharges.getElectrostaticPotentialN | private double getElectrostaticPotentialN(IAtomContainer ac, int atom1, double[] ds) {
// double CoulombForceConstant = 1/(4*Math.PI*8.81/*Math.pow(10, -12)*/);
double CoulombForceConstant = 0.048;
double sum = 0.0;
try {
if (factory == null)
factory = AtomT... | java | private double getElectrostaticPotentialN(IAtomContainer ac, int atom1, double[] ds) {
// double CoulombForceConstant = 1/(4*Math.PI*8.81/*Math.pow(10, -12)*/);
double CoulombForceConstant = 0.048;
double sum = 0.0;
try {
if (factory == null)
factory = AtomT... | [
"private",
"double",
"getElectrostaticPotentialN",
"(",
"IAtomContainer",
"ac",
",",
"int",
"atom1",
",",
"double",
"[",
"]",
"ds",
")",
"{",
"//\t\tdouble CoulombForceConstant = 1/(4*Math.PI*8.81/*Math.pow(10, -12)*/);",
"double",
"CoulombForceConstant",
"=",
"0.048",
";",... | get the electrostatic potential of the neighbours of a atom.
@param ac The IAtomContainer to study
@param ds
@param atom1 The position of the IAtom to study
@return The sum of electrostatic potential of the neighbours | [
"get",
"the",
"electrostatic",
"potential",
"of",
"the",
"neighbours",
"of",
"a",
"atom",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/GasteigerPEPEPartialCharges.java#L594-L621 |
super-csv/super-csv | super-csv/src/main/java/org/supercsv/cellprocessor/constraint/StrNotNullOrEmpty.java | StrNotNullOrEmpty.execute | public Object execute(final Object value, final CsvContext context) {
if (value == null){
throw new SuperCsvConstraintViolationException("the String should not be null", context, this);
}
if( value instanceof String ) {
final String stringValue = (String) value;
if( stringValue.length() == 0 ) {
t... | java | public Object execute(final Object value, final CsvContext context) {
if (value == null){
throw new SuperCsvConstraintViolationException("the String should not be null", context, this);
}
if( value instanceof String ) {
final String stringValue = (String) value;
if( stringValue.length() == 0 ) {
t... | [
"public",
"Object",
"execute",
"(",
"final",
"Object",
"value",
",",
"final",
"CsvContext",
"context",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"throw",
"new",
"SuperCsvConstraintViolationException",
"(",
"\"the String should not be null\"",
",",
"con... | {@inheritDoc}
@throws SuperCsvCellProcessorException
if value is null or isn't a String
@throws SuperCsvConstraintViolationException
if value is an empty String | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/constraint/StrNotNullOrEmpty.java#L68-L83 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java | VirtualMachinesInner.beginRunCommand | public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) {
return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body();
} | java | public RunCommandResultInner beginRunCommand(String resourceGroupName, String vmName, RunCommandInput parameters) {
return beginRunCommandWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().body();
} | [
"public",
"RunCommandResultInner",
"beginRunCommand",
"(",
"String",
"resourceGroupName",
",",
"String",
"vmName",
",",
"RunCommandInput",
"parameters",
")",
"{",
"return",
"beginRunCommandWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"vmName",
",",
"parameters"... | Run command on the VM.
@param resourceGroupName The name of the resource group.
@param vmName The name of the virtual machine.
@param parameters Parameters supplied to the Run command operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is re... | [
"Run",
"command",
"on",
"the",
"VM",
"."
] | 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/VirtualMachinesInner.java#L2703-L2705 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/log/InMemoryLogger.java | InMemoryLogger.createLogMessage | @Nullable
@OverrideOnDemand
protected LogMessage createLogMessage (@Nonnull final IErrorLevel eErrorLevel,
@Nonnull final Serializable aMsg,
@Nullable final Throwable t)
{
return new LogMessage (eErrorLevel, aMsg, t);
} | java | @Nullable
@OverrideOnDemand
protected LogMessage createLogMessage (@Nonnull final IErrorLevel eErrorLevel,
@Nonnull final Serializable aMsg,
@Nullable final Throwable t)
{
return new LogMessage (eErrorLevel, aMsg, t);
} | [
"@",
"Nullable",
"@",
"OverrideOnDemand",
"protected",
"LogMessage",
"createLogMessage",
"(",
"@",
"Nonnull",
"final",
"IErrorLevel",
"eErrorLevel",
",",
"@",
"Nonnull",
"final",
"Serializable",
"aMsg",
",",
"@",
"Nullable",
"final",
"Throwable",
"t",
")",
"{",
... | Override this method to create a different LogMessage object or to filter
certain log messages.
@param eErrorLevel
Error level. Never <code>null</code>.
@param aMsg
The message object. Never <code>null</code>.
@param t
An optional exception. May be <code>null</code>.
@return The returned value. May be <code>null</code... | [
"Override",
"this",
"method",
"to",
"create",
"a",
"different",
"LogMessage",
"object",
"or",
"to",
"filter",
"certain",
"log",
"messages",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/log/InMemoryLogger.java#L63-L70 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/convert/Convert.java | Convert.convertByClassName | @SuppressWarnings("unchecked")
public static <T> T convertByClassName(String className, Object value) throws ConvertException{
return (T) convert(ClassUtil.loadClass(className), value);
} | java | @SuppressWarnings("unchecked")
public static <T> T convertByClassName(String className, Object value) throws ConvertException{
return (T) convert(ClassUtil.loadClass(className), value);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"convertByClassName",
"(",
"String",
"className",
",",
"Object",
"value",
")",
"throws",
"ConvertException",
"{",
"return",
"(",
"T",
")",
"convert",
"(",
"ClassUtil",
... | 转换值为指定类型,类型采用字符串表示
@param <T> 目标类型
@param className 类的字符串表示
@param value 值
@return 转换后的值
@since 4.0.7
@throws ConvertException 转换器不存在 | [
"转换值为指定类型,类型采用字符串表示"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/Convert.java#L539-L542 |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/PriceListUrl.java | PriceListUrl.getResolvedPriceListUrl | public static MozuUrl getResolvedPriceListUrl(Integer customerAccountId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={customerAccountId}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", cust... | java | public static MozuUrl getResolvedPriceListUrl(Integer customerAccountId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={customerAccountId}&responseFields={responseFields}");
formatter.formatUrl("customerAccountId", cust... | [
"public",
"static",
"MozuUrl",
"getResolvedPriceListUrl",
"(",
"Integer",
"customerAccountId",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/catalog/storefront/pricelists/resolved?customerAccountId={custo... | Get Resource Url for GetResolvedPriceList
@param customerAccountId The unique identifier of the customer account for which to retrieve wish lists.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used t... | [
"Get",
"Resource",
"Url",
"for",
"GetResolvedPriceList"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/PriceListUrl.java#L36-L42 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java | ComputerVisionImpl.describeImageAsync | public Observable<ImageDescription> describeImageAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter) {
return describeImageWithServiceResponseAsync(url, describeImageOptionalParameter).map(new Func1<ServiceResponse<ImageDescription>, ImageDescription>() {
@Override
... | java | public Observable<ImageDescription> describeImageAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter) {
return describeImageWithServiceResponseAsync(url, describeImageOptionalParameter).map(new Func1<ServiceResponse<ImageDescription>, ImageDescription>() {
@Override
... | [
"public",
"Observable",
"<",
"ImageDescription",
">",
"describeImageAsync",
"(",
"String",
"url",
",",
"DescribeImageOptionalParameter",
"describeImageOptionalParameter",
")",
"{",
"return",
"describeImageWithServiceResponseAsync",
"(",
"url",
",",
"describeImageOptionalParamet... | This operation generates a description of an image in human readable language with complete sentences. The description is based on a collection of content tags, which are also returned by the operation. More than one description can be generated for each image. Descriptions are ordered by their confidence score. All ... | [
"This",
"operation",
"generates",
"a",
"description",
"of",
"an",
"image",
"in",
"human",
"readable",
"language",
"with",
"complete",
"sentences",
".",
"The",
"description",
"is",
"based",
"on",
"a",
"collection",
"of",
"content",
"tags",
"which",
"are",
"also... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1762-L1769 |
Comcast/jrugged | jrugged-spring/src/main/java/org/fishwife/jrugged/spring/jmx/MBeanOperationInvoker.java | MBeanOperationInvoker.invokeOperation | public Object invokeOperation(Map<String, String[]> parameterMap) throws JMException {
MBeanParameterInfo[] parameterInfoArray = operationInfo.getSignature();
Object[] values = new Object[parameterInfoArray.length];
String[] types = new String[parameterInfoArray.length];
MBeanValueConv... | java | public Object invokeOperation(Map<String, String[]> parameterMap) throws JMException {
MBeanParameterInfo[] parameterInfoArray = operationInfo.getSignature();
Object[] values = new Object[parameterInfoArray.length];
String[] types = new String[parameterInfoArray.length];
MBeanValueConv... | [
"public",
"Object",
"invokeOperation",
"(",
"Map",
"<",
"String",
",",
"String",
"[",
"]",
">",
"parameterMap",
")",
"throws",
"JMException",
"{",
"MBeanParameterInfo",
"[",
"]",
"parameterInfoArray",
"=",
"operationInfo",
".",
"getSignature",
"(",
")",
";",
"... | Invoke the operation.
@param parameterMap the {@link Map} of parameter names to value arrays.
@return the {@link Object} return value from the operation.
@throws JMException Java Management Exception | [
"Invoke",
"the",
"operation",
"."
] | train | https://github.com/Comcast/jrugged/blob/b6a5147c68ee733faf5616d49800abcbba67afe9/jrugged-spring/src/main/java/org/fishwife/jrugged/spring/jmx/MBeanOperationInvoker.java#L52-L68 |
Mozu/mozu-java | mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java | OrderNoteUrl.getReturnNoteUrl | public static MozuUrl getReturnNoteUrl(String noteId, String responseFields, String returnId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}?responseFields={responseFields}");
formatter.formatUrl("noteId", noteId);
formatter.formatUrl("responseFields", responseFi... | java | public static MozuUrl getReturnNoteUrl(String noteId, String responseFields, String returnId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/notes/{noteId}?responseFields={responseFields}");
formatter.formatUrl("noteId", noteId);
formatter.formatUrl("responseFields", responseFi... | [
"public",
"static",
"MozuUrl",
"getReturnNoteUrl",
"(",
"String",
"noteId",
",",
"String",
"responseFields",
",",
"String",
"returnId",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/api/commerce/returns/{returnId}/notes/{noteId}?responseFields=... | Get Resource Url for GetReturnNote
@param noteId Unique identifier of a particular note to retrieve.
@param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data usi... | [
"Get",
"Resource",
"Url",
"for",
"GetReturnNote"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/returns/OrderNoteUrl.java#L35-L42 |
vlingo/vlingo-http | src/main/java/io/vlingo/http/Body.java | Body.from | public static Body from(final ByteBuffer body, final Encoding encoding) {
switch (encoding) {
case Base64:
return new Body(bytesToBase64(bufferToArray(body)));
case UTF8:
return new Body(bytesToUTF8(bufferToArray(body)));
}
throw new IllegalArgumentException("Unmapped encoding: " + encod... | java | public static Body from(final ByteBuffer body, final Encoding encoding) {
switch (encoding) {
case Base64:
return new Body(bytesToBase64(bufferToArray(body)));
case UTF8:
return new Body(bytesToUTF8(bufferToArray(body)));
}
throw new IllegalArgumentException("Unmapped encoding: " + encod... | [
"public",
"static",
"Body",
"from",
"(",
"final",
"ByteBuffer",
"body",
",",
"final",
"Encoding",
"encoding",
")",
"{",
"switch",
"(",
"encoding",
")",
"{",
"case",
"Base64",
":",
"return",
"new",
"Body",
"(",
"bytesToBase64",
"(",
"bufferToArray",
"(",
"b... | Answer a new {@code Body} with binary content using {@code encoding}.
@param body the ByteBuffer content
@param encoding the Encoding to use
@return Body | [
"Answer",
"a",
"new",
"{"
] | train | https://github.com/vlingo/vlingo-http/blob/746065fb1eaf1609c550ae45e96e3dbb9bfa37a2/src/main/java/io/vlingo/http/Body.java#L56-L64 |
geomajas/geomajas-project-server | common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java | CacheFilter.checkSuffixes | public boolean checkSuffixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.endsWith(pattern)) {
return true;
}
}
}
return false;
} | java | public boolean checkSuffixes(String uri, String[] patterns) {
for (String pattern : patterns) {
if (pattern.length() > 0) {
if (uri.endsWith(pattern)) {
return true;
}
}
}
return false;
} | [
"public",
"boolean",
"checkSuffixes",
"(",
"String",
"uri",
",",
"String",
"[",
"]",
"patterns",
")",
"{",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"pattern",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"ur... | Check whether the URL end with one of the given suffixes.
@param uri URI
@param patterns possible suffixes
@return true when URL ends with one of the suffixes | [
"Check",
"whether",
"the",
"URL",
"end",
"with",
"one",
"of",
"the",
"given",
"suffixes",
"."
] | train | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/common-servlet/src/main/java/org/geomajas/servlet/CacheFilter.java#L263-L272 |
PinaeOS/nala | src/main/java/org/pinae/nala/xb/util/ResourceWriter.java | ResourceWriter.writeToFile | public void writeToFile(StringBuffer content, String filename) throws NoSuchPathException, IOException{
try {
FileWriter input = new FileWriter(filename);
input.write(content.toString(), 0, content.length());
input.flush();
input.close();
} catch (FileNotFoundException e) {
throw new NoSuchPathExcept... | java | public void writeToFile(StringBuffer content, String filename) throws NoSuchPathException, IOException{
try {
FileWriter input = new FileWriter(filename);
input.write(content.toString(), 0, content.length());
input.flush();
input.close();
} catch (FileNotFoundException e) {
throw new NoSuchPathExcept... | [
"public",
"void",
"writeToFile",
"(",
"StringBuffer",
"content",
",",
"String",
"filename",
")",
"throws",
"NoSuchPathException",
",",
"IOException",
"{",
"try",
"{",
"FileWriter",
"input",
"=",
"new",
"FileWriter",
"(",
"filename",
")",
";",
"input",
".",
"wr... | 将XML内容写入文件
@param content XML内容
@param filename 需要写入的文件
@throws NoSuchPathException 写入文件时, 无法发现路径引发的异常
@throws IOException 文件写入异常 | [
"将XML内容写入文件"
] | train | https://github.com/PinaeOS/nala/blob/2047ade4af197cec938278d300d111ea94af6fbf/src/main/java/org/pinae/nala/xb/util/ResourceWriter.java#L29-L38 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/CharSequences.java | CharSequences.compare | @Deprecated
public static int compare(CharSequence a, CharSequence b) {
int alength = a.length();
int blength = b.length();
int min = alength <= blength ? alength : blength;
for (int i = 0; i < min; ++i) {
int diff = a.charAt(i) - b.charAt(i);
if (diff != 0) {... | java | @Deprecated
public static int compare(CharSequence a, CharSequence b) {
int alength = a.length();
int blength = b.length();
int min = alength <= blength ? alength : blength;
for (int i = 0; i < min; ++i) {
int diff = a.charAt(i) - b.charAt(i);
if (diff != 0) {... | [
"@",
"Deprecated",
"public",
"static",
"int",
"compare",
"(",
"CharSequence",
"a",
",",
"CharSequence",
"b",
")",
"{",
"int",
"alength",
"=",
"a",
".",
"length",
"(",
")",
";",
"int",
"blength",
"=",
"b",
".",
"length",
"(",
")",
";",
"int",
"min",
... | Utility for comparing the contents of CharSequences
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Utility",
"for",
"comparing",
"the",
"contents",
"of",
"CharSequences"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/CharSequences.java#L219-L231 |
Whiley/WhileyCompiler | src/main/java/wyil/transform/VerificationConditionGenerator.java | VerificationConditionGenerator.or | private WyalFile.Stmt or(WyalFile.Stmt lhs, WyalFile.Stmt rhs) {
if (lhs == null) {
return rhs;
} else if (rhs == null) {
return rhs;
} else {
WyalFile.Stmt.Block lhsBlock = new WyalFile.Stmt.Block(lhs);
WyalFile.Stmt.Block rhsBlock = new WyalFile.Stmt.Block(rhs);
return new WyalFile.Stmt.CaseOf(lh... | java | private WyalFile.Stmt or(WyalFile.Stmt lhs, WyalFile.Stmt rhs) {
if (lhs == null) {
return rhs;
} else if (rhs == null) {
return rhs;
} else {
WyalFile.Stmt.Block lhsBlock = new WyalFile.Stmt.Block(lhs);
WyalFile.Stmt.Block rhsBlock = new WyalFile.Stmt.Block(rhs);
return new WyalFile.Stmt.CaseOf(lh... | [
"private",
"WyalFile",
".",
"Stmt",
"or",
"(",
"WyalFile",
".",
"Stmt",
"lhs",
",",
"WyalFile",
".",
"Stmt",
"rhs",
")",
"{",
"if",
"(",
"lhs",
"==",
"null",
")",
"{",
"return",
"rhs",
";",
"}",
"else",
"if",
"(",
"rhs",
"==",
"null",
")",
"{",
... | Construct a disjunct of two expressions
@param lhs
@param rhs
@return | [
"Construct",
"a",
"disjunct",
"of",
"two",
"expressions"
] | train | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L1765-L1775 |
samskivert/pythagoras | src/main/java/pythagoras/d/Arc.java | Arc.setArc | public void setArc (IRectangle rect, double start, double extent, int type) {
setArc(rect.x(), rect.y(), rect.width(), rect.height(), start, extent, type);
} | java | public void setArc (IRectangle rect, double start, double extent, int type) {
setArc(rect.x(), rect.y(), rect.width(), rect.height(), start, extent, type);
} | [
"public",
"void",
"setArc",
"(",
"IRectangle",
"rect",
",",
"double",
"start",
",",
"double",
"extent",
",",
"int",
"type",
")",
"{",
"setArc",
"(",
"rect",
".",
"x",
"(",
")",
",",
"rect",
".",
"y",
"(",
")",
",",
"rect",
".",
"width",
"(",
")",... | Sets the location, size, angular extents, and closure type of this arc to the specified
values. | [
"Sets",
"the",
"location",
"size",
"angular",
"extents",
"and",
"closure",
"type",
"of",
"this",
"arc",
"to",
"the",
"specified",
"values",
"."
] | train | https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Arc.java#L151-L153 |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java | ManyToOneAttribute.setImageUrlAttribute | public void setImageUrlAttribute(String name, String value) {
ensureValue();
Attribute attribute = new ImageUrlAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | java | public void setImageUrlAttribute(String name, String value) {
ensureValue();
Attribute attribute = new ImageUrlAttribute(value);
attribute.setEditable(isEditable(name));
getValue().getAllAttributes().put(name, attribute);
} | [
"public",
"void",
"setImageUrlAttribute",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"ensureValue",
"(",
")",
";",
"Attribute",
"attribute",
"=",
"new",
"ImageUrlAttribute",
"(",
"value",
")",
";",
"attribute",
".",
"setEditable",
"(",
"isEditabl... | Sets the specified image URL attribute to the specified value.
@param name name of the attribute
@param value value of the attribute
@since 1.9.0 | [
"Sets",
"the",
"specified",
"image",
"URL",
"attribute",
"to",
"the",
"specified",
"value",
"."
] | train | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L188-L193 |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/util/cache/Cache.java | Cache.findDontPinNAdjustPinCount | @Override
public Object findDontPinNAdjustPinCount(Object key, int adjustPinCount)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "findDontPinNAdjustPinCount", key +
", adujust pin count=" + adjustPinCoun... | java | @Override
public Object findDontPinNAdjustPinCount(Object key, int adjustPinCount)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "findDontPinNAdjustPinCount", key +
", adujust pin count=" + adjustPinCoun... | [
"@",
"Override",
"public",
"Object",
"findDontPinNAdjustPinCount",
"(",
"Object",
"key",
",",
"int",
"adjustPinCount",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"... | Return element for the given key but do not pin the element. In addition,
if object is found, add adjustPinCount to the pinned state. <p>
Note: This method is added to support the scenario in the activation
strategy classes that multiple cache.unpin() are called immediately
after the find() operation to negate the pin... | [
"Return",
"element",
"for",
"the",
"given",
"key",
"but",
"do",
"not",
"pin",
"the",
"element",
".",
"In",
"addition",
"if",
"object",
"is",
"found",
"add",
"adjustPinCount",
"to",
"the",
"pinned",
"state",
".",
"<p",
">"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/util/cache/Cache.java#L339-L371 |
paymill/paymill-java | src/main/java/com/paymill/services/SubscriptionService.java | SubscriptionService.endTrialAt | public Subscription endTrialAt( Subscription subscription, Date date ) {
ParameterMap<String, String> params = new ParameterMap<String, String>();
params.add( "trial_end", String.valueOf( date.getTime() / 1000 ) );
return RestfulUtils.update( SubscriptionService.PATH, subscription, params, false, Subscripti... | java | public Subscription endTrialAt( Subscription subscription, Date date ) {
ParameterMap<String, String> params = new ParameterMap<String, String>();
params.add( "trial_end", String.valueOf( date.getTime() / 1000 ) );
return RestfulUtils.update( SubscriptionService.PATH, subscription, params, false, Subscripti... | [
"public",
"Subscription",
"endTrialAt",
"(",
"Subscription",
"subscription",
",",
"Date",
"date",
")",
"{",
"ParameterMap",
"<",
"String",
",",
"String",
">",
"params",
"=",
"new",
"ParameterMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"params",
... | Stop the trial period of a subscription on a specific date.
@param subscription the subscription.
@param date the date, on which the subscription should end.
@return the updated subscription. | [
"Stop",
"the",
"trial",
"period",
"of",
"a",
"subscription",
"on",
"a",
"specific",
"date",
"."
] | train | https://github.com/paymill/paymill-java/blob/17281a0d4376c76f1711af9f09bfc138c90ba65a/src/main/java/com/paymill/services/SubscriptionService.java#L527-L531 |
ButterFaces/ButterFaces | components/src/main/java/org/butterfaces/model/table/json/JsonToModelConverter.java | JsonToModelConverter.convertTableColumnVisibility | public TableColumnVisibility convertTableColumnVisibility(final String tableIdentifier, final String json) {
final String[] split = this.splitColumns(json);
final List<String> visibleColumns = new ArrayList<>();
final List<String> invisibleColumns = new ArrayList<>();
for (String colum... | java | public TableColumnVisibility convertTableColumnVisibility(final String tableIdentifier, final String json) {
final String[] split = this.splitColumns(json);
final List<String> visibleColumns = new ArrayList<>();
final List<String> invisibleColumns = new ArrayList<>();
for (String colum... | [
"public",
"TableColumnVisibility",
"convertTableColumnVisibility",
"(",
"final",
"String",
"tableIdentifier",
",",
"final",
"String",
"json",
")",
"{",
"final",
"String",
"[",
"]",
"split",
"=",
"this",
".",
"splitColumns",
"(",
"json",
")",
";",
"final",
"List"... | Converts given json string to {@link TableColumnVisibility} used by {@link TableColumnVisibilityModel}.
@param tableIdentifier an application unique table identifier.
@param json string to convert to {@link TableColumnVisibility}.
@return the converted {@link TableColumnVisibility}. | [
"Converts",
"given",
"json",
"string",
"to",
"{",
"@link",
"TableColumnVisibility",
"}",
"used",
"by",
"{",
"@link",
"TableColumnVisibilityModel",
"}",
"."
] | train | https://github.com/ButterFaces/ButterFaces/blob/e8c2bb340c89dcdbac409fcfc7a2a0e07f2462fc/components/src/main/java/org/butterfaces/model/table/json/JsonToModelConverter.java#L25-L44 |
googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/StringUtils.java | StringUtils.newStringUtf8 | public static String newStringUtf8(byte[] bytes) {
if (bytes == null) {
return null;
}
return new String(bytes, StandardCharsets.UTF_8);
} | java | public static String newStringUtf8(byte[] bytes) {
if (bytes == null) {
return null;
}
return new String(bytes, StandardCharsets.UTF_8);
} | [
"public",
"static",
"String",
"newStringUtf8",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"String",
"(",
"bytes",
",",
"StandardCharsets",
".",
"UTF_8",
")",
";",
... | Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-8
charset.
@param bytes The bytes to be decoded into characters
@return A new <code>String</code> decoded from the specified array of bytes using the UTF-8
charset, or <code>null</code> if the input byte array was <code>null</c... | [
"Constructs",
"a",
"new",
"<code",
">",
"String<",
"/",
"code",
">",
"by",
"decoding",
"the",
"specified",
"array",
"of",
"bytes",
"using",
"the",
"UTF",
"-",
"8",
"charset",
"."
] | train | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java#L65-L70 |
lucee/Lucee | core/src/main/java/lucee/runtime/op/Caster.java | Caster.toFloat | public static Float toFloat(Object o, Float defaultValue) {
if (o instanceof Float) return (Float) o;
if (defaultValue != null) return new Float(toFloatValue(o, defaultValue.floatValue()));
float res = toFloatValue(o, Float.MIN_VALUE);
if (res == Float.MIN_VALUE) return defaultValue;
return new Float(res);
} | java | public static Float toFloat(Object o, Float defaultValue) {
if (o instanceof Float) return (Float) o;
if (defaultValue != null) return new Float(toFloatValue(o, defaultValue.floatValue()));
float res = toFloatValue(o, Float.MIN_VALUE);
if (res == Float.MIN_VALUE) return defaultValue;
return new Float(res);
} | [
"public",
"static",
"Float",
"toFloat",
"(",
"Object",
"o",
",",
"Float",
"defaultValue",
")",
"{",
"if",
"(",
"o",
"instanceof",
"Float",
")",
"return",
"(",
"Float",
")",
"o",
";",
"if",
"(",
"defaultValue",
"!=",
"null",
")",
"return",
"new",
"Float... | cast a Object to a Float Object(reference type)
@param o Object to cast
@param defaultValue
@return casted Float Object | [
"cast",
"a",
"Object",
"to",
"a",
"Float",
"Object",
"(",
"reference",
"type",
")"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L1615-L1622 |
google/error-prone | check_api/src/main/java/com/google/errorprone/matchers/Matchers.java | Matchers.inSynchronized | public static final <T extends Tree> Matcher<T> inSynchronized() {
return new Matcher<T>() {
@Override
public boolean matches(T tree, VisitorState state) {
SynchronizedTree synchronizedTree =
ASTHelpers.findEnclosingNode(state.getPath(), SynchronizedTree.class);
if (synchroni... | java | public static final <T extends Tree> Matcher<T> inSynchronized() {
return new Matcher<T>() {
@Override
public boolean matches(T tree, VisitorState state) {
SynchronizedTree synchronizedTree =
ASTHelpers.findEnclosingNode(state.getPath(), SynchronizedTree.class);
if (synchroni... | [
"public",
"static",
"final",
"<",
"T",
"extends",
"Tree",
">",
"Matcher",
"<",
"T",
">",
"inSynchronized",
"(",
")",
"{",
"return",
"new",
"Matcher",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"matches",
"(",
"T",
"tree",
","... | Matches if this Tree is enclosed by either a synchronized block or a synchronized method. | [
"Matches",
"if",
"this",
"Tree",
"is",
"enclosed",
"by",
"either",
"a",
"synchronized",
"block",
"or",
"a",
"synchronized",
"method",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L1255-L1270 |
lessthanoptimal/ejml | examples/src/org/ejml/example/LevenbergMarquardt.java | LevenbergMarquardt.configure | protected void configure(ResidualFunction function , int numParam )
{
this.function = function;
int numFunctions = function.numFunctions();
// reshaping a matrix means that new memory is only declared when needed
candidateParameters.reshape(numParam,1);
g.reshape(numParam,1)... | java | protected void configure(ResidualFunction function , int numParam )
{
this.function = function;
int numFunctions = function.numFunctions();
// reshaping a matrix means that new memory is only declared when needed
candidateParameters.reshape(numParam,1);
g.reshape(numParam,1)... | [
"protected",
"void",
"configure",
"(",
"ResidualFunction",
"function",
",",
"int",
"numParam",
")",
"{",
"this",
".",
"function",
"=",
"function",
";",
"int",
"numFunctions",
"=",
"function",
".",
"numFunctions",
"(",
")",
";",
"// reshaping a matrix means that ne... | Performs sanity checks on the input data and reshapes internal matrices. By reshaping
a matrix it will only declare new memory when needed. | [
"Performs",
"sanity",
"checks",
"on",
"the",
"input",
"data",
"and",
"reshapes",
"internal",
"matrices",
".",
"By",
"reshaping",
"a",
"matrix",
"it",
"will",
"only",
"declare",
"new",
"memory",
"when",
"needed",
"."
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/examples/src/org/ejml/example/LevenbergMarquardt.java#L193-L209 |
motown-io/motown | ocpp/view-model/src/main/java/io/motown/ocpp/viewmodel/domain/DomainService.java | DomainService.startTransactionNoAuthorize | public void startTransactionNoAuthorize(ChargingStationId chargingStationId, TransactionId transactionId,
StartTransactionInfo startTransactionInfo, AddOnIdentity addOnIdentity) {
IdentityContext identityContext = new IdentityContext(addOnIdentity, new NullUserIdentit... | java | public void startTransactionNoAuthorize(ChargingStationId chargingStationId, TransactionId transactionId,
StartTransactionInfo startTransactionInfo, AddOnIdentity addOnIdentity) {
IdentityContext identityContext = new IdentityContext(addOnIdentity, new NullUserIdentit... | [
"public",
"void",
"startTransactionNoAuthorize",
"(",
"ChargingStationId",
"chargingStationId",
",",
"TransactionId",
"transactionId",
",",
"StartTransactionInfo",
"startTransactionInfo",
",",
"AddOnIdentity",
"addOnIdentity",
")",
"{",
"IdentityContext",
"identityContext",
"="... | Initiates a StartTransactionCommand without authorizing the identification. Normally this method is called by the
futureEventCallback of {@link #startTransaction}.
@param chargingStationId charging station identifier.
@param transactionId transaction identifier.
@param startTransactionInfo information about the st... | [
"Initiates",
"a",
"StartTransactionCommand",
"without",
"authorizing",
"the",
"identification",
".",
"Normally",
"this",
"method",
"is",
"called",
"by",
"the",
"futureEventCallback",
"of",
"{",
"@link",
"#startTransaction",
"}",
"."
] | train | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/ocpp/view-model/src/main/java/io/motown/ocpp/viewmodel/domain/DomainService.java#L199-L205 |
mozilla/rhino | src/org/mozilla/javascript/ScriptableObject.java | ScriptableObject.associateValue | public synchronized final Object associateValue(Object key, Object value)
{
if (value == null) throw new IllegalArgumentException();
Map<Object,Object> h = associatedValues;
if (h == null) {
h = new HashMap<Object,Object>();
associatedValues = h;
}
ret... | java | public synchronized final Object associateValue(Object key, Object value)
{
if (value == null) throw new IllegalArgumentException();
Map<Object,Object> h = associatedValues;
if (h == null) {
h = new HashMap<Object,Object>();
associatedValues = h;
}
ret... | [
"public",
"synchronized",
"final",
"Object",
"associateValue",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"Map",
"<",
"Object",
",",
"Object",
">... | Associate arbitrary application-specific value with this object.
Value can only be associated with the given object and key only once.
The method ignores any subsequent attempts to change the already
associated value.
<p> The associated values are not serialized.
@param key key object to select particular value.
@param... | [
"Associate",
"arbitrary",
"application",
"-",
"specific",
"value",
"with",
"this",
"object",
".",
"Value",
"can",
"only",
"be",
"associated",
"with",
"the",
"given",
"object",
"and",
"key",
"only",
"once",
".",
"The",
"method",
"ignores",
"any",
"subsequent",
... | train | https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L2782-L2791 |
liferay/com-liferay-commerce | commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java | CommercePriceListPersistenceImpl.removeByLtD_S | @Override
public void removeByLtD_S(Date displayDate, int status) {
for (CommercePriceList commercePriceList : findByLtD_S(displayDate,
status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commercePriceList);
}
} | java | @Override
public void removeByLtD_S(Date displayDate, int status) {
for (CommercePriceList commercePriceList : findByLtD_S(displayDate,
status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commercePriceList);
}
} | [
"@",
"Override",
"public",
"void",
"removeByLtD_S",
"(",
"Date",
"displayDate",
",",
"int",
"status",
")",
"{",
"for",
"(",
"CommercePriceList",
"commercePriceList",
":",
"findByLtD_S",
"(",
"displayDate",
",",
"status",
",",
"QueryUtil",
".",
"ALL_POS",
",",
... | Removes all the commerce price lists where displayDate < ? and status = ? from the database.
@param displayDate the display date
@param status the status | [
"Removes",
"all",
"the",
"commerce",
"price",
"lists",
"where",
"displayDate",
"<",
";",
"?",
";",
"and",
"status",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L4821-L4827 |
gosu-lang/gosu-lang | gosu-core-api/src/main/java/gw/util/GosuStringUtil.java | GosuStringUtil.containsAny | public static boolean containsAny(String str, String searchChars) {
if (searchChars == null) {
return false;
}
return containsAny(str, searchChars.toCharArray());
} | java | public static boolean containsAny(String str, String searchChars) {
if (searchChars == null) {
return false;
}
return containsAny(str, searchChars.toCharArray());
} | [
"public",
"static",
"boolean",
"containsAny",
"(",
"String",
"str",
",",
"String",
"searchChars",
")",
"{",
"if",
"(",
"searchChars",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"containsAny",
"(",
"str",
",",
"searchChars",
".",
"toChar... | <p>
Checks if the String contains any character in the given set of characters.
</p>
<p>
A <code>null</code> String will return <code>false</code>. A <code>null</code> search string will return
<code>false</code>.
</p>
<pre>
GosuStringUtil.containsAny(null, *) = false
GosuStringUtil.containsAny("", *) ... | [
"<p",
">",
"Checks",
"if",
"the",
"String",
"contains",
"any",
"character",
"in",
"the",
"given",
"set",
"of",
"characters",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L1178-L1183 |
marvinlabs/android-intents | library/src/main/java/com/marvinlabs/intents/EmailIntents.java | EmailIntents.newEmailIntent | public static Intent newEmailIntent(String[] addresses, String subject, String body, Uri attachment) {
Intent intent = new Intent(Intent.ACTION_SEND);
if (addresses != null) intent.putExtra(Intent.EXTRA_EMAIL, addresses);
if (body != null) intent.putExtra(Intent.EXTRA_TEXT, body);
if (su... | java | public static Intent newEmailIntent(String[] addresses, String subject, String body, Uri attachment) {
Intent intent = new Intent(Intent.ACTION_SEND);
if (addresses != null) intent.putExtra(Intent.EXTRA_EMAIL, addresses);
if (body != null) intent.putExtra(Intent.EXTRA_TEXT, body);
if (su... | [
"public",
"static",
"Intent",
"newEmailIntent",
"(",
"String",
"[",
"]",
"addresses",
",",
"String",
"subject",
",",
"String",
"body",
",",
"Uri",
"attachment",
")",
"{",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"Intent",
".",
"ACTION_SEND",
")",
";"... | Create an intent to send an email with an attachment
@param addresses The recipients addresses (or null if not specified)
@param subject The subject of the email (or null if not specified)
@param body The body of the email (or null if not specified)
@param attachment The URI of a file to attach to the email.... | [
"Create",
"an",
"intent",
"to",
"send",
"an",
"email",
"with",
"an",
"attachment"
] | train | https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/EmailIntents.java#L65-L74 |
rundeck/rundeck | core/src/main/java/com/dtolabs/utils/Mapper.java | Mapper.beanMap | public static Collection beanMap(String property, Collection c, boolean includeNull) {
return beanMap(property, c.iterator(), includeNull);
} | java | public static Collection beanMap(String property, Collection c, boolean includeNull) {
return beanMap(property, c.iterator(), includeNull);
} | [
"public",
"static",
"Collection",
"beanMap",
"(",
"String",
"property",
",",
"Collection",
"c",
",",
"boolean",
"includeNull",
")",
"{",
"return",
"beanMap",
"(",
"property",
",",
"c",
".",
"iterator",
"(",
")",
",",
"includeNull",
")",
";",
"}"
] | Map dynamically using a bean property name.
@param property the name of a bean property
@param c an Collection of objects
@param includeNull true to include null results in the response
@return collection
@throws ClassCastException if there is an error invoking the method on any object. | [
"Map",
"dynamically",
"using",
"a",
"bean",
"property",
"name",
"."
] | train | https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L687-L689 |
jclawson/hazeltask | hazeltask-core/src/main/java/com/hazeltask/hazelcast/MemberTasks.java | MemberTasks.executeOptimistic | public static <T> Collection<MemberResponse<T>> executeOptimistic(IExecutorService execSvc, Set<Member> members, Callable<T> callable) {
return executeOptimistic(execSvc, members, callable, 60, TimeUnit.SECONDS);
} | java | public static <T> Collection<MemberResponse<T>> executeOptimistic(IExecutorService execSvc, Set<Member> members, Callable<T> callable) {
return executeOptimistic(execSvc, members, callable, 60, TimeUnit.SECONDS);
} | [
"public",
"static",
"<",
"T",
">",
"Collection",
"<",
"MemberResponse",
"<",
"T",
">",
">",
"executeOptimistic",
"(",
"IExecutorService",
"execSvc",
",",
"Set",
"<",
"Member",
">",
"members",
",",
"Callable",
"<",
"T",
">",
"callable",
")",
"{",
"return",
... | Will wait a maximum of 1 minute for each node to response with their result. If an error occurs on any
member, we will always attempt to continue execution and collect as many results as possible.
@param execSvc
@param members
@param callable
@return | [
"Will",
"wait",
"a",
"maximum",
"of",
"1",
"minute",
"for",
"each",
"node",
"to",
"response",
"with",
"their",
"result",
".",
"If",
"an",
"error",
"occurs",
"on",
"any",
"member",
"we",
"will",
"always",
"attempt",
"to",
"continue",
"execution",
"and",
"... | train | https://github.com/jclawson/hazeltask/blob/801162bc54c5f1d5744a28a2844b24289d9495d7/hazeltask-core/src/main/java/com/hazeltask/hazelcast/MemberTasks.java#L53-L55 |
killbilling/recurly-java-library | src/main/java/com/ning/billing/recurly/RecurlyClient.java | RecurlyClient.markInvoiceFailed | public InvoiceCollection markInvoiceFailed(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_failed", null, InvoiceCollection.class);
} | java | public InvoiceCollection markInvoiceFailed(final String invoiceId) {
return doPUT(Invoices.INVOICES_RESOURCE + "/" + invoiceId + "/mark_failed", null, InvoiceCollection.class);
} | [
"public",
"InvoiceCollection",
"markInvoiceFailed",
"(",
"final",
"String",
"invoiceId",
")",
"{",
"return",
"doPUT",
"(",
"Invoices",
".",
"INVOICES_RESOURCE",
"+",
"\"/\"",
"+",
"invoiceId",
"+",
"\"/mark_failed\"",
",",
"null",
",",
"InvoiceCollection",
".",
"c... | Mark an invoice as failed collection
@param invoiceId String Recurly Invoice ID | [
"Mark",
"an",
"invoice",
"as",
"failed",
"collection"
] | train | https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1301-L1303 |
mongodb/stitch-android-sdk | core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java | CoreRemoteMongoCollectionImpl.findOne | public DocumentT findOne(final Bson filter, final RemoteFindOptions options) {
return executeFindOne(filter, options, documentClass);
} | java | public DocumentT findOne(final Bson filter, final RemoteFindOptions options) {
return executeFindOne(filter, options, documentClass);
} | [
"public",
"DocumentT",
"findOne",
"(",
"final",
"Bson",
"filter",
",",
"final",
"RemoteFindOptions",
"options",
")",
"{",
"return",
"executeFindOne",
"(",
"filter",
",",
"options",
",",
"documentClass",
")",
";",
"}"
] | Finds a document in the collection.
@param filter the query filter
@param options A RemoteFindOptions struct
@return the resulting document | [
"Finds",
"a",
"document",
"in",
"the",
"collection",
"."
] | train | https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java#L217-L219 |
jglobus/JGlobus | axis/src/main/java/org/globus/axis/transport/HTTPUtils.java | HTTPUtils.setDisableChunking | public static void setDisableChunking(Stub stub, boolean disable) {
stub._setProperty(DISABLE_CHUNKING,
(disable)
? Boolean.TRUE
: Boolean.FALSE);
Hashtable headers = getRequestHeaders(stub);
headers.put(HTTPConstants.... | java | public static void setDisableChunking(Stub stub, boolean disable) {
stub._setProperty(DISABLE_CHUNKING,
(disable)
? Boolean.TRUE
: Boolean.FALSE);
Hashtable headers = getRequestHeaders(stub);
headers.put(HTTPConstants.... | [
"public",
"static",
"void",
"setDisableChunking",
"(",
"Stub",
"stub",
",",
"boolean",
"disable",
")",
"{",
"stub",
".",
"_setProperty",
"(",
"DISABLE_CHUNKING",
",",
"(",
"disable",
")",
"?",
"Boolean",
".",
"TRUE",
":",
"Boolean",
".",
"FALSE",
")",
";",... | Sets on option on the stub to use to disable chunking
(only if used with HTTP 1.1).
@param stub The stub to set the property on
@param disable If true, chunking will be disabled. Otherwise chunking
will be performed (if HTTP 1.1 will be used). | [
"Sets",
"on",
"option",
"on",
"the",
"stub",
"to",
"use",
"to",
"disable",
"chunking",
"(",
"only",
"if",
"used",
"with",
"HTTP",
"1",
".",
"1",
")",
"."
] | train | https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/axis/src/main/java/org/globus/axis/transport/HTTPUtils.java#L108-L116 |
javamelody/javamelody | javamelody-core/src/main/java/net/bull/javamelody/Main.java | Main.extractFromJar | private static File extractFromJar(String resource, String fileName, String suffix)
throws IOException {
final URL res = Main.class.getResource(resource);
// put this jar in a file system so that we can load jars from there
final File tmp;
try {
tmp = File.createTempFile(fileName, suffix);
} ca... | java | private static File extractFromJar(String resource, String fileName, String suffix)
throws IOException {
final URL res = Main.class.getResource(resource);
// put this jar in a file system so that we can load jars from there
final File tmp;
try {
tmp = File.createTempFile(fileName, suffix);
} ca... | [
"private",
"static",
"File",
"extractFromJar",
"(",
"String",
"resource",
",",
"String",
"fileName",
",",
"String",
"suffix",
")",
"throws",
"IOException",
"{",
"final",
"URL",
"res",
"=",
"Main",
".",
"class",
".",
"getResource",
"(",
"resource",
")",
";",
... | Extract a resource from jar, mark it for deletion upon exit, and return its location. | [
"Extract",
"a",
"resource",
"from",
"jar",
"mark",
"it",
"for",
"deletion",
"upon",
"exit",
"and",
"return",
"its",
"location",
"."
] | train | https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-core/src/main/java/net/bull/javamelody/Main.java#L256-L282 |
google/flogger | api/src/main/java/com/google/common/flogger/util/FastStackGetter.java | FastStackGetter.getStackTraceElement | public StackTraceElement getStackTraceElement(Throwable throwable, int n) {
try {
return (StackTraceElement) getElementMethod.invoke(javaLangAccess, throwable, n);
} catch (InvocationTargetException e) {
// The only case we should expect to see here normally is a wrapped IndexOutOfBoundsException.
... | java | public StackTraceElement getStackTraceElement(Throwable throwable, int n) {
try {
return (StackTraceElement) getElementMethod.invoke(javaLangAccess, throwable, n);
} catch (InvocationTargetException e) {
// The only case we should expect to see here normally is a wrapped IndexOutOfBoundsException.
... | [
"public",
"StackTraceElement",
"getStackTraceElement",
"(",
"Throwable",
"throwable",
",",
"int",
"n",
")",
"{",
"try",
"{",
"return",
"(",
"StackTraceElement",
")",
"getElementMethod",
".",
"invoke",
"(",
"javaLangAccess",
",",
"throwable",
",",
"n",
")",
";",
... | Mimics a direct call to {@code getStackTraceElement()} on the JavaLangAccess interface without
requiring the Java runtime to directly reference the method (which may not exist on some
JVMs). | [
"Mimics",
"a",
"direct",
"call",
"to",
"{"
] | train | https://github.com/google/flogger/blob/a164967a93a9f4ce92f34319fc0cc7c91a57321c/api/src/main/java/com/google/common/flogger/util/FastStackGetter.java#L84-L101 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java | Util.getNonGeometricData | static NonGeometricData getNonGeometricData(Element element) {
String meta = getMetaData(element);
NonGeometricData data = new InkscapeNonGeometricData(meta, element);
data.addAttribute(NonGeometricData.ID, element.getAttribute("id"));
data.addAttribute(NonGeometricData.FILL, getStyle(element, NonGeomet... | java | static NonGeometricData getNonGeometricData(Element element) {
String meta = getMetaData(element);
NonGeometricData data = new InkscapeNonGeometricData(meta, element);
data.addAttribute(NonGeometricData.ID, element.getAttribute("id"));
data.addAttribute(NonGeometricData.FILL, getStyle(element, NonGeomet... | [
"static",
"NonGeometricData",
"getNonGeometricData",
"(",
"Element",
"element",
")",
"{",
"String",
"meta",
"=",
"getMetaData",
"(",
"element",
")",
";",
"NonGeometricData",
"data",
"=",
"new",
"InkscapeNonGeometricData",
"(",
"meta",
",",
"element",
")",
";",
"... | Get the non-geometric data information from an XML element
@param element The element to be processed
@return The non-geometric data (i.e. stroke, fill, etc) | [
"Get",
"the",
"non",
"-",
"geometric",
"data",
"information",
"from",
"an",
"XML",
"element"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java#L29-L44 |
OpenLiberty/open-liberty | dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ExecutorServiceImpl.java | ExecutorServiceImpl.createExecutor | private synchronized void createExecutor() {
if (componentConfig == null) {
// this is a completely normal occurrence and can happen if a ThreadFactory is bound prior to
// component activation... the proper thing to do is to do nothing and wait for activation
return;
... | java | private synchronized void createExecutor() {
if (componentConfig == null) {
// this is a completely normal occurrence and can happen if a ThreadFactory is bound prior to
// component activation... the proper thing to do is to do nothing and wait for activation
return;
... | [
"private",
"synchronized",
"void",
"createExecutor",
"(",
")",
"{",
"if",
"(",
"componentConfig",
"==",
"null",
")",
"{",
"// this is a completely normal occurrence and can happen if a ThreadFactory is bound prior to",
"// component activation... the proper thing to do is to do nothin... | Create a thread pool executor with the configured attributes from this
component config. | [
"Create",
"a",
"thread",
"pool",
"executor",
"with",
"the",
"configured",
"attributes",
"from",
"this",
"component",
"config",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ExecutorServiceImpl.java#L177-L219 |
aws/aws-sdk-java | aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java | XmlResponsesSaxParser.parseListObjectsV2Response | public ListObjectsV2Handler parseListObjectsV2Response(InputStream inputStream, final boolean shouldSDKDecodeResponse)
throws IOException {
ListObjectsV2Handler handler = new ListObjectsV2Handler(shouldSDKDecodeResponse);
parseXmlInputStream(handler, sanitizeXmlDocument(handler, inputStream)... | java | public ListObjectsV2Handler parseListObjectsV2Response(InputStream inputStream, final boolean shouldSDKDecodeResponse)
throws IOException {
ListObjectsV2Handler handler = new ListObjectsV2Handler(shouldSDKDecodeResponse);
parseXmlInputStream(handler, sanitizeXmlDocument(handler, inputStream)... | [
"public",
"ListObjectsV2Handler",
"parseListObjectsV2Response",
"(",
"InputStream",
"inputStream",
",",
"final",
"boolean",
"shouldSDKDecodeResponse",
")",
"throws",
"IOException",
"{",
"ListObjectsV2Handler",
"handler",
"=",
"new",
"ListObjectsV2Handler",
"(",
"shouldSDKDeco... | Parses a ListBucketV2 response XML document from an input stream.
@param inputStream
XML data input stream.
@return the XML handler object populated with data parsed from the XML
stream.
@throws SdkClientException | [
"Parses",
"a",
"ListBucketV2",
"response",
"XML",
"document",
"from",
"an",
"input",
"stream",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java#L336-L342 |
jalkanen/speed4j | src/main/java/com/ecyrd/speed4j/util/Percentile.java | Percentile.evaluate | public double evaluate(final double[] values, final int begin,
final int length, final double p) {
test(values, begin, length);
if ((p > 100) || (p <= 0)) {
throw new IllegalArgumentException("invalid quantile value: " + p);
}
if (length == 0) {
ret... | java | public double evaluate(final double[] values, final int begin,
final int length, final double p) {
test(values, begin, length);
if ((p > 100) || (p <= 0)) {
throw new IllegalArgumentException("invalid quantile value: " + p);
}
if (length == 0) {
ret... | [
"public",
"double",
"evaluate",
"(",
"final",
"double",
"[",
"]",
"values",
",",
"final",
"int",
"begin",
",",
"final",
"int",
"length",
",",
"final",
"double",
"p",
")",
"{",
"test",
"(",
"values",
",",
"begin",
",",
"length",
")",
";",
"if",
"(",
... | Returns an estimate of the <code>p</code>th percentile of the values
in the <code>values</code> array, starting with the element in (0-based)
position <code>begin</code> in the array and including <code>length</code>
values.
<p>
Calls to this method do not modify the internal <code>quantile</code>
state of this statist... | [
"Returns",
"an",
"estimate",
"of",
"the",
"<code",
">",
"p<",
"/",
"code",
">",
"th",
"percentile",
"of",
"the",
"values",
"in",
"the",
"<code",
">",
"values<",
"/",
"code",
">",
"array",
"starting",
"with",
"the",
"element",
"in",
"(",
"0",
"-",
"ba... | train | https://github.com/jalkanen/speed4j/blob/1d2db9c9b9def869c25fedb9bbd7cf95c39023bd/src/main/java/com/ecyrd/speed4j/util/Percentile.java#L189-L210 |
threerings/nenya | core/src/main/java/com/threerings/chat/ComicChatOverlay.java | ComicChatOverlay.positionRectIdeally | protected void positionRectIdeally (Rectangle r, int type, Point speaker)
{
if (speaker != null) {
// center it on top of the speaker (it'll be moved..)
r.setLocation(speaker.x - (r.width / 2),
speaker.y - (r.height / 2));
return;
}
... | java | protected void positionRectIdeally (Rectangle r, int type, Point speaker)
{
if (speaker != null) {
// center it on top of the speaker (it'll be moved..)
r.setLocation(speaker.x - (r.width / 2),
speaker.y - (r.height / 2));
return;
}
... | [
"protected",
"void",
"positionRectIdeally",
"(",
"Rectangle",
"r",
",",
"int",
"type",
",",
"Point",
"speaker",
")",
"{",
"if",
"(",
"speaker",
"!=",
"null",
")",
"{",
"// center it on top of the speaker (it'll be moved..)",
"r",
".",
"setLocation",
"(",
"speaker"... | Position the rectangle in its ideal location given the type and speaker positon (which may
be null). | [
"Position",
"the",
"rectangle",
"in",
"its",
"ideal",
"location",
"given",
"the",
"type",
"and",
"speaker",
"positon",
"(",
"which",
"may",
"be",
"null",
")",
"."
] | train | https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/chat/ComicChatOverlay.java#L406-L434 |
cdk/cdk | display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java | HighlightGenerator.createAtomHighlight | private static Shape createAtomHighlight(IAtom atom, double radius) {
double x = atom.getPoint2d().x;
double y = atom.getPoint2d().y;
return new RoundRectangle2D.Double(x - radius, y - radius, 2 * radius, 2 * radius, 2 * radius, 2 * radius);
} | java | private static Shape createAtomHighlight(IAtom atom, double radius) {
double x = atom.getPoint2d().x;
double y = atom.getPoint2d().y;
return new RoundRectangle2D.Double(x - radius, y - radius, 2 * radius, 2 * radius, 2 * radius, 2 * radius);
} | [
"private",
"static",
"Shape",
"createAtomHighlight",
"(",
"IAtom",
"atom",
",",
"double",
"radius",
")",
"{",
"double",
"x",
"=",
"atom",
".",
"getPoint2d",
"(",
")",
".",
"x",
";",
"double",
"y",
"=",
"atom",
".",
"getPoint2d",
"(",
")",
".",
"y",
"... | Create the shape which will highlight the provided atom.
@param atom the atom to highlight
@param radius the specified radius
@return the shape which will highlight the atom | [
"Create",
"the",
"shape",
"which",
"will",
"highlight",
"the",
"provided",
"atom",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderextra/src/main/java/org/openscience/cdk/renderer/generators/HighlightGenerator.java#L190-L195 |
DDTH/ddth-commons | ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java | SerializationUtils.fromByteArrayKryo | @SuppressWarnings("unchecked")
public static <T> T fromByteArrayKryo(byte[] data, Class<T> clazz, ClassLoader classLoader) {
if (data == null) {
return null;
}
Kryo kryo = kryoPool.obtain();
try {
ClassLoader oldClassLoader = Thread.currentThread().getContextC... | java | @SuppressWarnings("unchecked")
public static <T> T fromByteArrayKryo(byte[] data, Class<T> clazz, ClassLoader classLoader) {
if (data == null) {
return null;
}
Kryo kryo = kryoPool.obtain();
try {
ClassLoader oldClassLoader = Thread.currentThread().getContextC... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"fromByteArrayKryo",
"(",
"byte",
"[",
"]",
"data",
",",
"Class",
"<",
"T",
">",
"clazz",
",",
"ClassLoader",
"classLoader",
")",
"{",
"if",
"(",
"data",
"==",
... | Deserialize a byte array back to an object, with custom class loader.
<p>
This method uses Kryo lib.
</p>
@param data
@param clazz
@param classLoader
@return | [
"Deserialize",
"a",
"byte",
"array",
"back",
"to",
"an",
"object",
"with",
"custom",
"class",
"loader",
"."
] | train | https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java#L299-L327 |
motown-io/motown | chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java | DomainService.updateChargingStationType | public ChargingStationType updateChargingStationType(Long id, ChargingStationType chargingStationType) {
chargingStationType.setId(id);
return chargingStationTypeRepository.createOrUpdate(chargingStationType);
} | java | public ChargingStationType updateChargingStationType(Long id, ChargingStationType chargingStationType) {
chargingStationType.setId(id);
return chargingStationTypeRepository.createOrUpdate(chargingStationType);
} | [
"public",
"ChargingStationType",
"updateChargingStationType",
"(",
"Long",
"id",
",",
"ChargingStationType",
"chargingStationType",
")",
"{",
"chargingStationType",
".",
"setId",
"(",
"id",
")",
";",
"return",
"chargingStationTypeRepository",
".",
"createOrUpdate",
"(",
... | Update a charging station type.
@param id the id of the entity to find.
@param chargingStationType the payload from the request. | [
"Update",
"a",
"charging",
"station",
"type",
"."
] | train | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L131-L134 |
j256/ormlite-core | src/main/java/com/j256/ormlite/stmt/mapped/MappedQueryForFieldEq.java | MappedQueryForFieldEq.execute | public T execute(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException {
if (objectCache != null) {
T result = objectCache.get(clazz, id);
if (result != null) {
return result;
}
}
Object[] args = new Object[] { convertIdToFieldObject(id) };
// @SuppressWarnings(... | java | public T execute(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException {
if (objectCache != null) {
T result = objectCache.get(clazz, id);
if (result != null) {
return result;
}
}
Object[] args = new Object[] { convertIdToFieldObject(id) };
// @SuppressWarnings(... | [
"public",
"T",
"execute",
"(",
"DatabaseConnection",
"databaseConnection",
",",
"ID",
"id",
",",
"ObjectCache",
"objectCache",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"objectCache",
"!=",
"null",
")",
"{",
"T",
"result",
"=",
"objectCache",
".",
"get",
... | Query for an object in the database which matches the id argument. | [
"Query",
"for",
"an",
"object",
"in",
"the",
"database",
"which",
"matches",
"the",
"id",
"argument",
"."
] | train | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/MappedQueryForFieldEq.java#L30-L53 |
sarxos/v4l4j | src/main/java/au/edu/jcu/v4l4j/DeviceInfo.java | DeviceInfo.listIntervals | public synchronized FrameInterval listIntervals(ImageFormat imf,
int width, int height){
checkRelease();
return doListIntervals(object, imf.getIndex(), width, height);
} | java | public synchronized FrameInterval listIntervals(ImageFormat imf,
int width, int height){
checkRelease();
return doListIntervals(object, imf.getIndex(), width, height);
} | [
"public",
"synchronized",
"FrameInterval",
"listIntervals",
"(",
"ImageFormat",
"imf",
",",
"int",
"width",
",",
"int",
"height",
")",
"{",
"checkRelease",
"(",
")",
";",
"return",
"doListIntervals",
"(",
"object",
",",
"imf",
".",
"getIndex",
"(",
")",
",",... | This method returns a {@link FrameInterval} object containing information
about the supported frame intervals for capture at the given resolution
and image format. <b>Note that the returned {@link FrameInterval} object
could have its type set to {@link FrameInterval.Type#UNSUPPORTED} if the
driver does not support fram... | [
"This",
"method",
"returns",
"a",
"{"
] | train | https://github.com/sarxos/v4l4j/blob/4fc0eec2c3a1a4260593f6ac03b7a8013e3804c9/src/main/java/au/edu/jcu/v4l4j/DeviceInfo.java#L237-L241 |
xwiki/xwiki-rendering | xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java | XMLWikiPrinter.printXMLElement | public void printXMLElement(String name, Map<String, String> attributes)
{
Element element = new DefaultElement(name);
if (attributes != null && !attributes.isEmpty()) {
for (Map.Entry<String, String> entry : attributes.entrySet()) {
element.addAttribute(entry.getKey(), ... | java | public void printXMLElement(String name, Map<String, String> attributes)
{
Element element = new DefaultElement(name);
if (attributes != null && !attributes.isEmpty()) {
for (Map.Entry<String, String> entry : attributes.entrySet()) {
element.addAttribute(entry.getKey(), ... | [
"public",
"void",
"printXMLElement",
"(",
"String",
"name",
",",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"Element",
"element",
"=",
"new",
"DefaultElement",
"(",
"name",
")",
";",
"if",
"(",
"attributes",
"!=",
"null",
"&&",
"!"... | Print the xml element. In the form {@code <name att1="value1" att2="value2"/>}.
@param name the xml element to print
@param attributes the xml attributes of the element to print | [
"Print",
"the",
"xml",
"element",
".",
"In",
"the",
"form",
"{",
"@code",
"<name",
"att1",
"=",
"value1",
"att2",
"=",
"value2",
"/",
">",
"}",
"."
] | train | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java#L122-L137 |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java | PrepareRequestInterceptor.addEntitySelector | private void addEntitySelector(Map<String, String> requestParameters, StringBuilder uri) {
if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))) {
uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR));
}
} | java | private void addEntitySelector(Map<String, String> requestParameters, StringBuilder uri) {
if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))) {
uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR));
}
} | [
"private",
"void",
"addEntitySelector",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"requestParameters",
",",
"StringBuilder",
"uri",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"requestParameters",
".",
"get",
"(",
"RequestElements",
".",
"REQ... | adding additional selector in the URI, which is required for READ operation
Main purpose is to select or modify requested resource with well-defined keyword
@param requestParameters
@param uri | [
"adding",
"additional",
"selector",
"in",
"the",
"URI",
"which",
"is",
"required",
"for",
"READ",
"operation",
"Main",
"purpose",
"is",
"to",
"select",
"or",
"modify",
"requested",
"resource",
"with",
"well",
"-",
"defined",
"keyword"
] | train | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L348-L352 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/GIntegralImageOps.java | GIntegralImageOps.block_zero | public static <T extends ImageGray<T>>
double block_zero( T integral , int x0 , int y0 , int x1 , int y1 )
{
if( integral instanceof GrayF32) {
return IntegralImageOps.block_zero((GrayF32)integral,x0,y0,x1,y1);
} else if( integral instanceof GrayF64) {
return IntegralImageOps.block_zero((GrayF64)integral,x0... | java | public static <T extends ImageGray<T>>
double block_zero( T integral , int x0 , int y0 , int x1 , int y1 )
{
if( integral instanceof GrayF32) {
return IntegralImageOps.block_zero((GrayF32)integral,x0,y0,x1,y1);
} else if( integral instanceof GrayF64) {
return IntegralImageOps.block_zero((GrayF64)integral,x0... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"double",
"block_zero",
"(",
"T",
"integral",
",",
"int",
"x0",
",",
"int",
"y0",
",",
"int",
"x1",
",",
"int",
"y1",
")",
"{",
"if",
"(",
"integral",
"instanceof",
"GrayF32",
... | <p>
Computes the value of a block inside an integral image and treats pixels outside of the
image as zero. The block is defined as follows: x0 < x ≤ x1 and y0 < y ≤ y1.
</p>
@param integral Integral image.
@param x0 Lower bound of the block. Exclusive.
@param y0 Lower bound of the block. Exclusive.
@par... | [
"<p",
">",
"Computes",
"the",
"value",
"of",
"a",
"block",
"inside",
"an",
"integral",
"image",
"and",
"treats",
"pixels",
"outside",
"of",
"the",
"image",
"as",
"zero",
".",
"The",
"block",
"is",
"defined",
"as",
"follows",
":",
"x0",
"<",
";",
"x",... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/GIntegralImageOps.java#L162-L176 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/asm/AsmUtils.java | AsmUtils.ldcInsnEqual | public static boolean ldcInsnEqual(LdcInsnNode insn1, LdcInsnNode insn2)
{
if (insn1.cst.equals("~") || insn2.cst.equals("~"))
return true;
return insn1.cst.equals(insn2.cst);
} | java | public static boolean ldcInsnEqual(LdcInsnNode insn1, LdcInsnNode insn2)
{
if (insn1.cst.equals("~") || insn2.cst.equals("~"))
return true;
return insn1.cst.equals(insn2.cst);
} | [
"public",
"static",
"boolean",
"ldcInsnEqual",
"(",
"LdcInsnNode",
"insn1",
",",
"LdcInsnNode",
"insn2",
")",
"{",
"if",
"(",
"insn1",
".",
"cst",
".",
"equals",
"(",
"\"~\"",
")",
"||",
"insn2",
".",
"cst",
".",
"equals",
"(",
"\"~\"",
")",
")",
"retu... | Checks if two {@link LdcInsnNode} are equals.
@param insn1 the insn1
@param insn2 the insn2
@return true, if successful | [
"Checks",
"if",
"two",
"{",
"@link",
"LdcInsnNode",
"}",
"are",
"equals",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/asm/AsmUtils.java#L219-L225 |
joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setDuration | public void setDuration(int index, Duration value)
{
set(selectField(TaskFieldLists.CUSTOM_DURATION, index), value);
} | java | public void setDuration(int index, Duration value)
{
set(selectField(TaskFieldLists.CUSTOM_DURATION, index), value);
} | [
"public",
"void",
"setDuration",
"(",
"int",
"index",
",",
"Duration",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"CUSTOM_DURATION",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set a duration value.
@param index duration index (1-10)
@param value duration value | [
"Set",
"a",
"duration",
"value",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1954-L1957 |
mapsforge/mapsforge | mapsforge-map/src/main/java/org/mapsforge/map/datastore/MapDataStore.java | MapDataStore.readPoiData | public MapReadResult readPoiData(Tile upperLeft, Tile lowerRight) {
if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) {
new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile");
}
MapReadResult result = new MapReadResult();
... | java | public MapReadResult readPoiData(Tile upperLeft, Tile lowerRight) {
if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) {
new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile");
}
MapReadResult result = new MapReadResult();
... | [
"public",
"MapReadResult",
"readPoiData",
"(",
"Tile",
"upperLeft",
",",
"Tile",
"lowerRight",
")",
"{",
"if",
"(",
"upperLeft",
".",
"tileX",
">",
"lowerRight",
".",
"tileX",
"||",
"upperLeft",
".",
"tileY",
">",
"lowerRight",
".",
"tileY",
")",
"{",
"new... | Reads POI data for an area defined by the tile in the upper left and the tile in
the lower right corner. The default implementation combines the results from
all tiles, a possibly inefficient solution.
Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY
@param upperLeft tile that ... | [
"Reads",
"POI",
"data",
"for",
"an",
"area",
"defined",
"by",
"the",
"tile",
"in",
"the",
"upper",
"left",
"and",
"the",
"tile",
"in",
"the",
"lower",
"right",
"corner",
".",
"The",
"default",
"implementation",
"combines",
"the",
"results",
"from",
"all",
... | train | https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/datastore/MapDataStore.java#L206-L218 |
aragozin/jvm-tools | mxdump/src/main/java/org/gridkit/jvmtool/jackson/JsonGenerator.java | JsonGenerator.writeBooleanField | public final void writeBooleanField(String fieldName, boolean value)
throws IOException, JsonGenerationException
{
writeFieldName(fieldName);
writeBoolean(value);
} | java | public final void writeBooleanField(String fieldName, boolean value)
throws IOException, JsonGenerationException
{
writeFieldName(fieldName);
writeBoolean(value);
} | [
"public",
"final",
"void",
"writeBooleanField",
"(",
"String",
"fieldName",
",",
"boolean",
"value",
")",
"throws",
"IOException",
",",
"JsonGenerationException",
"{",
"writeFieldName",
"(",
"fieldName",
")",
";",
"writeBoolean",
"(",
"value",
")",
";",
"}"
] | Convenience method for outputting a field entry ("member")
that has a boolean value. Equivalent to:
<pre>
writeFieldName(fieldName);
writeBoolean(value);
</pre> | [
"Convenience",
"method",
"for",
"outputting",
"a",
"field",
"entry",
"(",
"member",
")",
"that",
"has",
"a",
"boolean",
"value",
".",
"Equivalent",
"to",
":",
"<pre",
">",
"writeFieldName",
"(",
"fieldName",
")",
";",
"writeBoolean",
"(",
"value",
")",
";"... | train | https://github.com/aragozin/jvm-tools/blob/d3a4d0c6a47fb9317f274988569655f30dcd2f76/mxdump/src/main/java/org/gridkit/jvmtool/jackson/JsonGenerator.java#L706-L711 |
jbundle/jbundle | main/db/src/main/java/org/jbundle/main/db/FolderField.java | FolderField.setupDefaultView | public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
{
Record record = this.getReferenceRecord(); // Get/make the record that describes the referenced class.
if (record != null)
... | java | public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
{
Record record = this.getReferenceRecord(); // Get/make the record that describes the referenced class.
if (record != null)
... | [
"public",
"ScreenComponent",
"setupDefaultView",
"(",
"ScreenLoc",
"itsLocation",
",",
"ComponentParent",
"targetScreen",
",",
"Convert",
"converter",
",",
"int",
"iDisplayFieldDesc",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"Record",
... | Set up the default screen control for this field.
@param itsLocation Location of this component on screen (ie., GridBagConstraint).
@param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
@param converter The converter to set the screenfield to.
@param iDisplayFieldDesc Display the labe... | [
"Set",
"up",
"the",
"default",
"screen",
"control",
"for",
"this",
"field",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/FolderField.java#L72-L79 |
WolfgangFahl/Mediawiki-Japi | src/main/java/com/bitplan/mediawiki/japi/Mediawiki.java | Mediawiki.getActionResult | public Api getActionResult(String action, String params) throws Exception {
Api result = this.getActionResult(action, params, null, null);
return result;
} | java | public Api getActionResult(String action, String params) throws Exception {
Api result = this.getActionResult(action, params, null, null);
return result;
} | [
"public",
"Api",
"getActionResult",
"(",
"String",
"action",
",",
"String",
"params",
")",
"throws",
"Exception",
"{",
"Api",
"result",
"=",
"this",
".",
"getActionResult",
"(",
"action",
",",
"params",
",",
"null",
",",
"null",
")",
";",
"return",
"result... | get the result for the given action and query
@param action
@param params
@return the API result for the action
@throws Exception | [
"get",
"the",
"result",
"for",
"the",
"given",
"action",
"and",
"query"
] | train | https://github.com/WolfgangFahl/Mediawiki-Japi/blob/78d0177ebfe02eb05da5550839727861f1e888a5/src/main/java/com/bitplan/mediawiki/japi/Mediawiki.java#L481-L484 |
landawn/AbacusUtil | src/com/landawn/abacus/util/Matth.java | Matth.saturatedMultiply | public static long saturatedMultiply(long a, long b) {
// see checkedMultiply for explanation
int leadingZeros = Long.numberOfLeadingZeros(a) + Long.numberOfLeadingZeros(~a) + Long.numberOfLeadingZeros(b) + Long.numberOfLeadingZeros(~b);
if (leadingZeros > Long.SIZE + 1) {
return... | java | public static long saturatedMultiply(long a, long b) {
// see checkedMultiply for explanation
int leadingZeros = Long.numberOfLeadingZeros(a) + Long.numberOfLeadingZeros(~a) + Long.numberOfLeadingZeros(b) + Long.numberOfLeadingZeros(~b);
if (leadingZeros > Long.SIZE + 1) {
return... | [
"public",
"static",
"long",
"saturatedMultiply",
"(",
"long",
"a",
",",
"long",
"b",
")",
"{",
"// see checkedMultiply for explanation\r",
"int",
"leadingZeros",
"=",
"Long",
".",
"numberOfLeadingZeros",
"(",
"a",
")",
"+",
"Long",
".",
"numberOfLeadingZeros",
"("... | Returns the product of {@code a} and {@code b} unless it would overflow or underflow in which
case {@code Long.MAX_VALUE} or {@code Long.MIN_VALUE} is returned, respectively.
@since 20.0 | [
"Returns",
"the",
"product",
"of",
"{",
"@code",
"a",
"}",
"and",
"{",
"@code",
"b",
"}",
"unless",
"it",
"would",
"overflow",
"or",
"underflow",
"in",
"which",
"case",
"{",
"@code",
"Long",
".",
"MAX_VALUE",
"}",
"or",
"{",
"@code",
"Long",
".",
"MI... | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Matth.java#L1628-L1645 |
cdk/cdk | base/data/src/main/java/org/openscience/cdk/AtomContainerSet.java | AtomContainerSet.sortAtomContainers | @Override
public void sortAtomContainers(final Comparator<IAtomContainer> comparator) {
// need to use boxed primitives as we can't customise sorting of int primitives
Integer[] indexes = new Integer[atomContainerCount];
for (int i = 0; i < indexes.length; i++)
indexes[i] = i;
... | java | @Override
public void sortAtomContainers(final Comparator<IAtomContainer> comparator) {
// need to use boxed primitives as we can't customise sorting of int primitives
Integer[] indexes = new Integer[atomContainerCount];
for (int i = 0; i < indexes.length; i++)
indexes[i] = i;
... | [
"@",
"Override",
"public",
"void",
"sortAtomContainers",
"(",
"final",
"Comparator",
"<",
"IAtomContainer",
">",
"comparator",
")",
"{",
"// need to use boxed primitives as we can't customise sorting of int primitives",
"Integer",
"[",
"]",
"indexes",
"=",
"new",
"Integer",... | Sort the AtomContainers and multipliers using a provided Comparator.
@param comparator defines the sorting method | [
"Sort",
"the",
"AtomContainers",
"and",
"multipliers",
"using",
"a",
"provided",
"Comparator",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/data/src/main/java/org/openscience/cdk/AtomContainerSet.java#L412-L439 |
JakeWharton/ActionBarSherlock | actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAdapterView.java | IcsAdapterView.performItemClick | public boolean performItemClick(View view, int position, long id) {
if (mOnItemClickListener != null) {
playSoundEffect(SoundEffectConstants.CLICK);
if (view != null) {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
mOnItemCli... | java | public boolean performItemClick(View view, int position, long id) {
if (mOnItemClickListener != null) {
playSoundEffect(SoundEffectConstants.CLICK);
if (view != null) {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
mOnItemCli... | [
"public",
"boolean",
"performItemClick",
"(",
"View",
"view",
",",
"int",
"position",
",",
"long",
"id",
")",
"{",
"if",
"(",
"mOnItemClickListener",
"!=",
"null",
")",
"{",
"playSoundEffect",
"(",
"SoundEffectConstants",
".",
"CLICK",
")",
";",
"if",
"(",
... | Call the OnItemClickListener, if it is defined.
@param view The view within the AdapterView that was clicked.
@param position The position of the view in the adapter.
@param id The row id of the item that was clicked.
@return True if there was an assigned OnItemClickListener that was
called, false otherwise is returne... | [
"Call",
"the",
"OnItemClickListener",
"if",
"it",
"is",
"defined",
"."
] | train | https://github.com/JakeWharton/ActionBarSherlock/blob/2c71339e756bcc0b1424c4525680549ba3a2dc97/actionbarsherlock/src/com/actionbarsherlock/internal/widget/IcsAdapterView.java#L266-L277 |
influxdata/influxdb-java | src/main/java/org/influxdb/impl/InfluxDBResultMapper.java | InfluxDBResultMapper.setFieldValue | <T> void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision)
throws IllegalArgumentException, IllegalAccessException {
if (value == null) {
return;
}
Class<?> fieldType = field.getType();
try {
if (!field.isAccessible()) {
field.setAcces... | java | <T> void setFieldValue(final T object, final Field field, final Object value, final TimeUnit precision)
throws IllegalArgumentException, IllegalAccessException {
if (value == null) {
return;
}
Class<?> fieldType = field.getType();
try {
if (!field.isAccessible()) {
field.setAcces... | [
"<",
"T",
">",
"void",
"setFieldValue",
"(",
"final",
"T",
"object",
",",
"final",
"Field",
"field",
",",
"final",
"Object",
"value",
",",
"final",
"TimeUnit",
"precision",
")",
"throws",
"IllegalArgumentException",
",",
"IllegalAccessException",
"{",
"if",
"(... | InfluxDB client returns any number as Double.
See https://github.com/influxdata/influxdb-java/issues/153#issuecomment-259681987
for more information.
@param object
@param field
@param value
@param precision
@throws IllegalArgumentException
@throws IllegalAccessException | [
"InfluxDB",
"client",
"returns",
"any",
"number",
"as",
"Double",
".",
"See",
"https",
":",
"//",
"github",
".",
"com",
"/",
"influxdata",
"/",
"influxdb",
"-",
"java",
"/",
"issues",
"/",
"153#issuecomment",
"-",
"259681987",
"for",
"more",
"information",
... | train | https://github.com/influxdata/influxdb-java/blob/8ae777f34aa2e598f609208cf4fa12d4642f83f5/src/main/java/org/influxdb/impl/InfluxDBResultMapper.java#L305-L329 |
kopihao/peasy-recyclerview | peasy-recyclerview/src/main/java/com/kopirealm/peasyrecyclerview/PeasyRecyclerView.java | PeasyRecyclerView.onBindViewHolder | private void onBindViewHolder(Context context, PeasyViewHolder holder, int position) {
if (holder == null) return;
try {
if (headerContent != null && holder.isHeaderView()) {
headerContent.onBindViewHolder(context, holder.asIs(PeasyHeaderViewHolder.class), position, getItem(p... | java | private void onBindViewHolder(Context context, PeasyViewHolder holder, int position) {
if (holder == null) return;
try {
if (headerContent != null && holder.isHeaderView()) {
headerContent.onBindViewHolder(context, holder.asIs(PeasyHeaderViewHolder.class), position, getItem(p... | [
"private",
"void",
"onBindViewHolder",
"(",
"Context",
"context",
",",
"PeasyViewHolder",
"holder",
",",
"int",
"position",
")",
"{",
"if",
"(",
"holder",
"==",
"null",
")",
"return",
";",
"try",
"{",
"if",
"(",
"headerContent",
"!=",
"null",
"&&",
"holder... | Enhanced Implementation Layer of {@link RecyclerView.Adapter#onBindViewHolder(RecyclerView.ViewHolder, int)}
@param holder PeasyViewHolder
@param position position | [
"Enhanced",
"Implementation",
"Layer",
"of",
"{",
"@link",
"RecyclerView",
".",
"Adapter#onBindViewHolder",
"(",
"RecyclerView",
".",
"ViewHolder",
"int",
")",
"}"
] | train | https://github.com/kopihao/peasy-recyclerview/blob/a26071849e5d5b5b1febe685f205558b49908f87/peasy-recyclerview/src/main/java/com/kopirealm/peasyrecyclerview/PeasyRecyclerView.java#L632-L647 |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/MapPrinter.java | MapPrinter.setConfiguration | public final void setConfiguration(final URI newConfigFile, final byte[] configFileData)
throws IOException {
this.configFile = new File(newConfigFile);
this.configuration = this.configurationFactory
.getConfig(this.configFile, new ByteArrayInputStream(configFileData));
} | java | public final void setConfiguration(final URI newConfigFile, final byte[] configFileData)
throws IOException {
this.configFile = new File(newConfigFile);
this.configuration = this.configurationFactory
.getConfig(this.configFile, new ByteArrayInputStream(configFileData));
} | [
"public",
"final",
"void",
"setConfiguration",
"(",
"final",
"URI",
"newConfigFile",
",",
"final",
"byte",
"[",
"]",
"configFileData",
")",
"throws",
"IOException",
"{",
"this",
".",
"configFile",
"=",
"new",
"File",
"(",
"newConfigFile",
")",
";",
"this",
"... | Set the configuration file and update the configuration for this printer.
@param newConfigFile the file containing the new configuration.
@param configFileData the config file data. | [
"Set",
"the",
"configuration",
"file",
"and",
"update",
"the",
"configuration",
"for",
"this",
"printer",
"."
] | train | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/MapPrinter.java#L70-L75 |
tempodb/tempodb-java | src/main/java/com/tempodb/Filter.java | Filter.addAttribute | public synchronized Filter addAttribute(String key, String value) {
attributes.put(key, value);
return this;
} | java | public synchronized Filter addAttribute(String key, String value) {
attributes.put(key, value);
return this;
} | [
"public",
"synchronized",
"Filter",
"addAttribute",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"attributes",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Adds an attribute to the filter.
@param key The attribute key.
@param value The attribute value.
@return This filter
@since 1.0.0 | [
"Adds",
"an",
"attribute",
"to",
"the",
"filter",
"."
] | train | https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Filter.java#L139-L142 |
robocup-atan/atan | src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java | CommandFactory.addChangeViewCommand | public void addChangeViewCommand(ViewAngle angle, ViewQuality quality) {
StringBuilder buf = new StringBuilder();
buf.append("(change_view ");
switch (angle) {
case NARROW :
switch (quality) {
case HIGH :
buf.append("narrow ... | java | public void addChangeViewCommand(ViewAngle angle, ViewQuality quality) {
StringBuilder buf = new StringBuilder();
buf.append("(change_view ");
switch (angle) {
case NARROW :
switch (quality) {
case HIGH :
buf.append("narrow ... | [
"public",
"void",
"addChangeViewCommand",
"(",
"ViewAngle",
"angle",
",",
"ViewQuality",
"quality",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buf",
".",
"append",
"(",
"\"(change_view \"",
")",
";",
"switch",
"(",
"angle",
... | Changes the view parameters of the player. The amount and detail returned
by the visual sensor depends on the width of view and the quality. But
note that the frequency of sending information also depends on these
parameters. (eg. If you change the quality from high to low, the
frequency doubles, and the time between t... | [
"Changes",
"the",
"view",
"parameters",
"of",
"the",
"player",
".",
"The",
"amount",
"and",
"detail",
"returned",
"by",
"the",
"visual",
"sensor",
"depends",
"on",
"the",
"width",
"of",
"view",
"and",
"the",
"quality",
".",
"But",
"note",
"that",
"the",
... | train | https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L144-L180 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java | SVGPath.relativeEllipticalArc | public SVGPath relativeEllipticalArc(double rx, double ry, double ar, double la, double sp, double x, double y) {
return append(PATH_ARC_RELATIVE).append(rx).append(ry).append(ar).append(la).append(sp).append(x).append(y);
} | java | public SVGPath relativeEllipticalArc(double rx, double ry, double ar, double la, double sp, double x, double y) {
return append(PATH_ARC_RELATIVE).append(rx).append(ry).append(ar).append(la).append(sp).append(x).append(y);
} | [
"public",
"SVGPath",
"relativeEllipticalArc",
"(",
"double",
"rx",
",",
"double",
"ry",
",",
"double",
"ar",
",",
"double",
"la",
",",
"double",
"sp",
",",
"double",
"x",
",",
"double",
"y",
")",
"{",
"return",
"append",
"(",
"PATH_ARC_RELATIVE",
")",
".... | Elliptical arc curve to the given relative coordinates.
@param rx x radius
@param ry y radius
@param ar x-axis-rotation
@param la large arc flag, if angle >= 180 deg
@param sp sweep flag, if arc will be drawn in positive-angle direction
@param x new coordinates
@param y new coordinates | [
"Elliptical",
"arc",
"curve",
"to",
"the",
"given",
"relative",
"coordinates",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L591-L593 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PnPLepetitEPnP.java | PnPLepetitEPnP.adjustBetaSign | private double adjustBetaSign( double beta , List<Point3D_F64> nullPts ) {
if( beta == 0 )
return 0;
int N = alphas.numRows;
int positiveCount = 0;
for( int i = 0; i < N; i++ ) {
double z = 0;
for( int j = 0; j < numControl; j++ ) {
Point3D_F64 c = nullPts.get(j);
z += alphas.get(i,j)*c.z;
... | java | private double adjustBetaSign( double beta , List<Point3D_F64> nullPts ) {
if( beta == 0 )
return 0;
int N = alphas.numRows;
int positiveCount = 0;
for( int i = 0; i < N; i++ ) {
double z = 0;
for( int j = 0; j < numControl; j++ ) {
Point3D_F64 c = nullPts.get(j);
z += alphas.get(i,j)*c.z;
... | [
"private",
"double",
"adjustBetaSign",
"(",
"double",
"beta",
",",
"List",
"<",
"Point3D_F64",
">",
"nullPts",
")",
"{",
"if",
"(",
"beta",
"==",
"0",
")",
"return",
"0",
";",
"int",
"N",
"=",
"alphas",
".",
"numRows",
";",
"int",
"positiveCount",
"=",... | Use the positive depth constraint to determine the sign of beta | [
"Use",
"the",
"positive",
"depth",
"constraint",
"to",
"determine",
"the",
"sign",
"of",
"beta"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PnPLepetitEPnP.java#L519-L542 |
ysc/word | src/main/java/org/apdplat/word/vector/Word2Vector.java | Word2Vector.contextWord | private static void contextWord(String[] words, int index, int distance, String word, Map<String, List<ContextWord>> map){
String _word = null;
if(index > -1 && index < words.length){
_word = words[index];
}
if(_word != null && Utils.isChineseCharAndLength... | java | private static void contextWord(String[] words, int index, int distance, String word, Map<String, List<ContextWord>> map){
String _word = null;
if(index > -1 && index < words.length){
_word = words[index];
}
if(_word != null && Utils.isChineseCharAndLength... | [
"private",
"static",
"void",
"contextWord",
"(",
"String",
"[",
"]",
"words",
",",
"int",
"index",
",",
"int",
"distance",
",",
"String",
"word",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"ContextWord",
">",
">",
"map",
")",
"{",
"String",
"_word",
... | 计算词的相关词
@param words 词数组
@param index 相关词索引
@param distance 词距
@param word 核心词
@param map | [
"计算词的相关词"
] | train | https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/vector/Word2Vector.java#L164-L172 |
GoogleCloudPlatform/bigdata-interop | gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java | GoogleCloudStorageImpl.getBucket | private Bucket getBucket(String bucketName)
throws IOException {
logger.atFine().log("getBucket(%s)", bucketName);
checkArgument(!Strings.isNullOrEmpty(bucketName), "bucketName must not be null or empty");
Storage.Buckets.Get getBucket = configureRequest(gcs.buckets().get(bucketName), bucketName);
... | java | private Bucket getBucket(String bucketName)
throws IOException {
logger.atFine().log("getBucket(%s)", bucketName);
checkArgument(!Strings.isNullOrEmpty(bucketName), "bucketName must not be null or empty");
Storage.Buckets.Get getBucket = configureRequest(gcs.buckets().get(bucketName), bucketName);
... | [
"private",
"Bucket",
"getBucket",
"(",
"String",
"bucketName",
")",
"throws",
"IOException",
"{",
"logger",
".",
"atFine",
"(",
")",
".",
"log",
"(",
"\"getBucket(%s)\"",
",",
"bucketName",
")",
";",
"checkArgument",
"(",
"!",
"Strings",
".",
"isNullOrEmpty",
... | Gets the bucket with the given name.
@param bucketName name of the bucket to get
@return the bucket with the given name or null if bucket not found
@throws IOException if the bucket exists but cannot be accessed | [
"Gets",
"the",
"bucket",
"with",
"the",
"given",
"name",
"."
] | train | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java#L1789-L1803 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java | ThreadUtil.newExecutorByBlockingCoefficient | public static ThreadPoolExecutor newExecutorByBlockingCoefficient(float blockingCoefficient) {
if (blockingCoefficient >= 1 || blockingCoefficient < 0) {
throw new IllegalArgumentException("[blockingCoefficient] must between 0 and 1, or equals 0.");
}
// 最佳的线程数 = CPU可用核心数 / (1 - 阻塞系数)
int poolSize = (... | java | public static ThreadPoolExecutor newExecutorByBlockingCoefficient(float blockingCoefficient) {
if (blockingCoefficient >= 1 || blockingCoefficient < 0) {
throw new IllegalArgumentException("[blockingCoefficient] must between 0 and 1, or equals 0.");
}
// 最佳的线程数 = CPU可用核心数 / (1 - 阻塞系数)
int poolSize = (... | [
"public",
"static",
"ThreadPoolExecutor",
"newExecutorByBlockingCoefficient",
"(",
"float",
"blockingCoefficient",
")",
"{",
"if",
"(",
"blockingCoefficient",
">=",
"1",
"||",
"blockingCoefficient",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
... | 获得一个新的线程池<br>
传入阻塞系数,线程池的大小计算公式为:CPU可用核心数 / (1 - 阻塞因子)<br>
Blocking Coefficient(阻塞系数) = 阻塞时间/(阻塞时间+使用CPU的时间)<br>
计算密集型任务的阻塞系数为0,而IO密集型任务的阻塞系数则接近于1。
see: http://blog.csdn.net/partner4java/article/details/9417663
@param blockingCoefficient 阻塞系数,阻塞因子介于0~1之间的数,阻塞因子越大,线程池中的线程数越多。
@return {@link ThreadPoolExecutor}
@since ... | [
"获得一个新的线程池<br",
">",
"传入阻塞系数,线程池的大小计算公式为:CPU可用核心数",
"/",
"(",
"1",
"-",
"阻塞因子",
")",
"<br",
">",
"Blocking",
"Coefficient",
"(",
"阻塞系数",
")",
"=",
"阻塞时间/(阻塞时间",
"+",
"使用CPU的时间)<br",
">",
"计算密集型任务的阻塞系数为0,而IO密集型任务的阻塞系数则接近于1。"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L75-L83 |
talenguyen/PrettySharedPreferences | prettysharedpreferences/src/main/java/com/tale/prettysharedpreferences/PrettySharedPreferences.java | PrettySharedPreferences.getFloatEditor | protected FloatEditor getFloatEditor(String key) {
TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key);
if (typeEditor == null) {
typeEditor = new FloatEditor(this, sharedPreferences, key);
TYPE_EDITOR_MAP.put(key, typeEditor);
} else if (!(typeEditor instanceof FloatEditor)... | java | protected FloatEditor getFloatEditor(String key) {
TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key);
if (typeEditor == null) {
typeEditor = new FloatEditor(this, sharedPreferences, key);
TYPE_EDITOR_MAP.put(key, typeEditor);
} else if (!(typeEditor instanceof FloatEditor)... | [
"protected",
"FloatEditor",
"getFloatEditor",
"(",
"String",
"key",
")",
"{",
"TypeEditor",
"typeEditor",
"=",
"TYPE_EDITOR_MAP",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"typeEditor",
"==",
"null",
")",
"{",
"typeEditor",
"=",
"new",
"FloatEditor",
"(",... | Call to get a {@link com.tale.prettysharedpreferences.FloatEditor} object for the specific
key. <code>NOTE:</code> There is a unique {@link com.tale.prettysharedpreferences.TypeEditor}
object for a unique key.
@param key The name of the preference.
@return {@link com.tale.prettysharedpreferences.FloatEditor} object to ... | [
"Call",
"to",
"get",
"a",
"{"
] | train | https://github.com/talenguyen/PrettySharedPreferences/blob/b97edf86c8fa65be2165f2cd790545c78c971c22/prettysharedpreferences/src/main/java/com/tale/prettysharedpreferences/PrettySharedPreferences.java#L110-L119 |
jeremylong/DependencyCheck | core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java | RubyBundleAuditAnalyzer.createVulnerability | private Vulnerability createVulnerability(String parentName, Dependency dependency, String gem, String nextLine) throws CpeValidationException {
Vulnerability vulnerability = null;
if (null != dependency) {
final String version = nextLine.substring(VERSION.length());
dependency.a... | java | private Vulnerability createVulnerability(String parentName, Dependency dependency, String gem, String nextLine) throws CpeValidationException {
Vulnerability vulnerability = null;
if (null != dependency) {
final String version = nextLine.substring(VERSION.length());
dependency.a... | [
"private",
"Vulnerability",
"createVulnerability",
"(",
"String",
"parentName",
",",
"Dependency",
"dependency",
",",
"String",
"gem",
",",
"String",
"nextLine",
")",
"throws",
"CpeValidationException",
"{",
"Vulnerability",
"vulnerability",
"=",
"null",
";",
"if",
... | Creates a vulnerability.
@param parentName the parent name
@param dependency the dependency
@param gem the gem name
@param nextLine the line to parse
@return the vulnerability
@throws CpeValidationException thrown if there is an error building the
CPE vulnerability object | [
"Creates",
"a",
"vulnerability",
"."
] | train | https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java#L461-L495 |
stevespringett/Alpine | alpine/src/main/java/alpine/auth/LdapConnectionWrapper.java | LdapConnectionWrapper.getAttribute | public String getAttribute(final Attributes attributes, final String attributeName) throws NamingException {
if (attributes == null || attributes.size() == 0) {
return null;
} else {
final Attribute attribute = attributes.get(attributeName);
if (attribute != null) {
... | java | public String getAttribute(final Attributes attributes, final String attributeName) throws NamingException {
if (attributes == null || attributes.size() == 0) {
return null;
} else {
final Attribute attribute = attributes.get(attributeName);
if (attribute != null) {
... | [
"public",
"String",
"getAttribute",
"(",
"final",
"Attributes",
"attributes",
",",
"final",
"String",
"attributeName",
")",
"throws",
"NamingException",
"{",
"if",
"(",
"attributes",
"==",
"null",
"||",
"attributes",
".",
"size",
"(",
")",
"==",
"0",
")",
"{... | Retrieves an attribute by its name.
@param attributes the list of attributes to query on
@param attributeName the name of the attribute to return
@return the value of the attribute, or null if not found
@throws NamingException if an exception is thrown
@since 1.4.0 | [
"Retrieves",
"an",
"attribute",
"by",
"its",
"name",
"."
] | train | https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/auth/LdapConnectionWrapper.java#L250-L263 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java | AbstractJsonDeserializer.getStringParam | protected String getStringParam(String paramName, String errorMessage, Map<String, Object> mapToUse)
throws IOException {
return getTypedParam(paramName, errorMessage, String.class, mapToUse);
} | java | protected String getStringParam(String paramName, String errorMessage, Map<String, Object> mapToUse)
throws IOException {
return getTypedParam(paramName, errorMessage, String.class, mapToUse);
} | [
"protected",
"String",
"getStringParam",
"(",
"String",
"paramName",
",",
"String",
"errorMessage",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"mapToUse",
")",
"throws",
"IOException",
"{",
"return",
"getTypedParam",
"(",
"paramName",
",",
"errorMessage",
",... | Convenience method for subclasses.
@param paramName the name of the parameter
@param errorMessage the errormessage to add to the exception if the param does not exist.
@param mapToUse the map to use as input parametersource
@return a stringparameter with given name. If it does not exist and the errormessage is ... | [
"Convenience",
"method",
"for",
"subclasses",
"."
] | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java#L96-L99 |
petergeneric/stdlib | guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/TransactionMethodInterceptor.java | TransactionMethodInterceptor.makeReadOnly | private void makeReadOnly(final Session session, final String tracingId)
{
Tracing.logOngoing(tracingId, "TX:makeReadonly Set Default ReadOnly");
session.setDefaultReadOnly(true);
Tracing.logOngoing(tracingId, "TX:makeReadonly Set Hibernate Flush Mode to MANUAL");
session.setHibernateFlushMode(FlushMode.MAN... | java | private void makeReadOnly(final Session session, final String tracingId)
{
Tracing.logOngoing(tracingId, "TX:makeReadonly Set Default ReadOnly");
session.setDefaultReadOnly(true);
Tracing.logOngoing(tracingId, "TX:makeReadonly Set Hibernate Flush Mode to MANUAL");
session.setHibernateFlushMode(FlushMode.MAN... | [
"private",
"void",
"makeReadOnly",
"(",
"final",
"Session",
"session",
",",
"final",
"String",
"tracingId",
")",
"{",
"Tracing",
".",
"logOngoing",
"(",
"tracingId",
",",
"\"TX:makeReadonly Set Default ReadOnly\"",
")",
";",
"session",
".",
"setDefaultReadOnly",
"("... | Make the session (and the underlying {@link java.sql.Connection} read only
@param session
@param tracingId | [
"Make",
"the",
"session",
"(",
"and",
"the",
"underlying",
"{",
"@link",
"java",
".",
"sql",
".",
"Connection",
"}",
"read",
"only"
] | train | https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/hibernate/src/main/java/com/peterphi/std/guice/hibernate/module/TransactionMethodInterceptor.java#L341-L357 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java | AppsImpl.updateAsync | public Observable<OperationStatus> updateAsync(UUID appId, ApplicationUpdateObject applicationUpdateObject) {
return updateWithServiceResponseAsync(appId, applicationUpdateObject).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() {
@Override
public OperationStatus call(S... | java | public Observable<OperationStatus> updateAsync(UUID appId, ApplicationUpdateObject applicationUpdateObject) {
return updateWithServiceResponseAsync(appId, applicationUpdateObject).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() {
@Override
public OperationStatus call(S... | [
"public",
"Observable",
"<",
"OperationStatus",
">",
"updateAsync",
"(",
"UUID",
"appId",
",",
"ApplicationUpdateObject",
"applicationUpdateObject",
")",
"{",
"return",
"updateWithServiceResponseAsync",
"(",
"appId",
",",
"applicationUpdateObject",
")",
".",
"map",
"(",... | Updates the name or description of the application.
@param appId The application ID.
@param applicationUpdateObject A model containing Name and Description of the application.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the OperationStatus object | [
"Updates",
"the",
"name",
"or",
"description",
"of",
"the",
"application",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java#L1010-L1017 |
Wolfgang-Schuetzelhofer/jcypher | src/main/java/iot/jcypher/domainquery/DomainQueryResult.java | DomainQueryResult.resultOf | public <T> List<T> resultOf(DomainObjectMatch<T> match) {
return resultOf(match, false);
} | java | public <T> List<T> resultOf(DomainObjectMatch<T> match) {
return resultOf(match, false);
} | [
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"resultOf",
"(",
"DomainObjectMatch",
"<",
"T",
">",
"match",
")",
"{",
"return",
"resultOf",
"(",
"match",
",",
"false",
")",
";",
"}"
] | Answer the matching domain objects
@param match
@return a list of matching domain objects | [
"Answer",
"the",
"matching",
"domain",
"objects"
] | train | https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/DomainQueryResult.java#L39-L41 |
arakelian/docker-junit-rule | src/main/java/com/arakelian/docker/junit/Container.java | Container.stopContainerQuietly | private void stopContainerQuietly(final String image, final String idOrName) {
final long startTime = System.currentTimeMillis();
try {
LOGGER.info("Killing docker container {} with id {}", image, idOrName);
final int secondsToWaitBeforeKilling = 10;
client.stopContai... | java | private void stopContainerQuietly(final String image, final String idOrName) {
final long startTime = System.currentTimeMillis();
try {
LOGGER.info("Killing docker container {} with id {}", image, idOrName);
final int secondsToWaitBeforeKilling = 10;
client.stopContai... | [
"private",
"void",
"stopContainerQuietly",
"(",
"final",
"String",
"image",
",",
"final",
"String",
"idOrName",
")",
"{",
"final",
"long",
"startTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"try",
"{",
"LOGGER",
".",
"info",
"(",
"\"Killing... | Utility method to stop a container with the given image name and id/name.
@param image
image name
@param idOrName
container id or name | [
"Utility",
"method",
"to",
"stop",
"a",
"container",
"with",
"the",
"given",
"image",
"name",
"and",
"id",
"/",
"name",
"."
] | train | https://github.com/arakelian/docker-junit-rule/blob/cc99d63896a07df398b53fd5f0f6e4777e3b23cf/src/main/java/com/arakelian/docker/junit/Container.java#L613-L626 |
citiususc/hipster | hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java | Maze2D.getMazePoints | public List<Point> getMazePoints() {
List<Point> points = new ArrayList<Point>();
for (int row = 0; row < this.rows; row++) {
for (int column = 0; column < this.columns; column++) {
points.add(new Point(column, row));
}
}
return points;
} | java | public List<Point> getMazePoints() {
List<Point> points = new ArrayList<Point>();
for (int row = 0; row < this.rows; row++) {
for (int column = 0; column < this.columns; column++) {
points.add(new Point(column, row));
}
}
return points;
} | [
"public",
"List",
"<",
"Point",
">",
"getMazePoints",
"(",
")",
"{",
"List",
"<",
"Point",
">",
"points",
"=",
"new",
"ArrayList",
"<",
"Point",
">",
"(",
")",
";",
"for",
"(",
"int",
"row",
"=",
"0",
";",
"row",
"<",
"this",
".",
"rows",
";",
... | Return all tiles (i,j) of the maze
@return List of points, from (0,0) to (m,n). | [
"Return",
"all",
"tiles",
"(",
"i",
"j",
")",
"of",
"the",
"maze"
] | train | https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/Maze2D.java#L235-L243 |
apache/incubator-shardingsphere | sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/SQLLogger.java | SQLLogger.logSQL | public static void logSQL(final String logicSQL, final Collection<String> dataSourceNames) {
log("Rule Type: master-slave");
log("SQL: {} ::: DataSources: {}", logicSQL, Joiner.on(",").join(dataSourceNames));
} | java | public static void logSQL(final String logicSQL, final Collection<String> dataSourceNames) {
log("Rule Type: master-slave");
log("SQL: {} ::: DataSources: {}", logicSQL, Joiner.on(",").join(dataSourceNames));
} | [
"public",
"static",
"void",
"logSQL",
"(",
"final",
"String",
"logicSQL",
",",
"final",
"Collection",
"<",
"String",
">",
"dataSourceNames",
")",
"{",
"log",
"(",
"\"Rule Type: master-slave\"",
")",
";",
"log",
"(",
"\"SQL: {} ::: DataSources: {}\"",
",",
"logicSQ... | Print SQL log for master slave rule.
@param logicSQL logic SQL
@param dataSourceNames data source names | [
"Print",
"SQL",
"log",
"for",
"master",
"slave",
"rule",
"."
] | train | https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/SQLLogger.java#L46-L49 |
taskadapter/redmine-java-api | src/main/java/com/taskadapter/redmineapi/internal/Transport.java | Transport.deleteChildId | public <T> void deleteChildId(Class<?> parentClass, String parentId, T object, Integer value) throws RedmineException {
URI uri = getURIConfigurator().getChildIdURI(parentClass, parentId, object.getClass(), value);
HttpDelete httpDelete = new HttpDelete(uri);
String response = send(httpDelete);
... | java | public <T> void deleteChildId(Class<?> parentClass, String parentId, T object, Integer value) throws RedmineException {
URI uri = getURIConfigurator().getChildIdURI(parentClass, parentId, object.getClass(), value);
HttpDelete httpDelete = new HttpDelete(uri);
String response = send(httpDelete);
... | [
"public",
"<",
"T",
">",
"void",
"deleteChildId",
"(",
"Class",
"<",
"?",
">",
"parentClass",
",",
"String",
"parentId",
",",
"T",
"object",
",",
"Integer",
"value",
")",
"throws",
"RedmineException",
"{",
"URI",
"uri",
"=",
"getURIConfigurator",
"(",
")",... | Performs "delete child Id" request.
@param parentClass
parent object id.
@param object
object to use.
@param value
child object id.
@throws RedmineException
if something goes wrong. | [
"Performs",
"delete",
"child",
"Id",
"request",
"."
] | train | https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/internal/Transport.java#L311-L316 |
smartsheet-platform/smartsheet-java-sdk | src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java | RowColumnResourcesImpl.addImageToCell | public void addImageToCell(long sheetId, long rowId, long columnId, String file, String fileType) throws FileNotFoundException, SmartsheetException {
addImage("sheets/" + sheetId + "/rows/" + rowId + "/columns/" + columnId + "/cellimages", file, fileType, false, null);
} | java | public void addImageToCell(long sheetId, long rowId, long columnId, String file, String fileType) throws FileNotFoundException, SmartsheetException {
addImage("sheets/" + sheetId + "/rows/" + rowId + "/columns/" + columnId + "/cellimages", file, fileType, false, null);
} | [
"public",
"void",
"addImageToCell",
"(",
"long",
"sheetId",
",",
"long",
"rowId",
",",
"long",
"columnId",
",",
"String",
"file",
",",
"String",
"fileType",
")",
"throws",
"FileNotFoundException",
",",
"SmartsheetException",
"{",
"addImage",
"(",
"\"sheets/\"",
... | Add an image to a cell.
It mirrors the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/cellimages
Exceptions:
InvalidRequestException : if there is any problem with the REST API request
AuthorizationException : if there is any problem with the REST API authorization(access... | [
"Add",
"an",
"image",
"to",
"a",
"cell",
"."
] | train | https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java#L151-L153 |
biezhi/anima | src/main/java/io/github/biezhi/anima/core/AnimaQuery.java | AnimaQuery.buildInsertSQL | private <S extends Model> String buildInsertSQL(S model, List<Object> columnValues) {
SQLParams sqlParams = SQLParams.builder()
.model(model)
.columnValues(columnValues)
.modelClass(this.modelClass)
.tableName(this.tableName)
.pkNam... | java | private <S extends Model> String buildInsertSQL(S model, List<Object> columnValues) {
SQLParams sqlParams = SQLParams.builder()
.model(model)
.columnValues(columnValues)
.modelClass(this.modelClass)
.tableName(this.tableName)
.pkNam... | [
"private",
"<",
"S",
"extends",
"Model",
">",
"String",
"buildInsertSQL",
"(",
"S",
"model",
",",
"List",
"<",
"Object",
">",
"columnValues",
")",
"{",
"SQLParams",
"sqlParams",
"=",
"SQLParams",
".",
"builder",
"(",
")",
".",
"model",
"(",
"model",
")",... | Build a insert statement.
@param model model instance
@param <S>
@return insert sql | [
"Build",
"a",
"insert",
"statement",
"."
] | train | https://github.com/biezhi/anima/blob/d6655e47ac4c08d9d7f961ac0569062bead8b1ed/src/main/java/io/github/biezhi/anima/core/AnimaQuery.java#L1426-L1436 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.updateHierarchicalEntityChild | public OperationStatus updateHierarchicalEntityChild(UUID appId, String versionId, UUID hEntityId, UUID hChildId, UpdateHierarchicalEntityChildOptionalParameter updateHierarchicalEntityChildOptionalParameter) {
return updateHierarchicalEntityChildWithServiceResponseAsync(appId, versionId, hEntityId, hChildId, u... | java | public OperationStatus updateHierarchicalEntityChild(UUID appId, String versionId, UUID hEntityId, UUID hChildId, UpdateHierarchicalEntityChildOptionalParameter updateHierarchicalEntityChildOptionalParameter) {
return updateHierarchicalEntityChildWithServiceResponseAsync(appId, versionId, hEntityId, hChildId, u... | [
"public",
"OperationStatus",
"updateHierarchicalEntityChild",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"hEntityId",
",",
"UUID",
"hChildId",
",",
"UpdateHierarchicalEntityChildOptionalParameter",
"updateHierarchicalEntityChildOptionalParameter",
")",
"{",
... | Renames a single child in an existing hierarchical entity model.
@param appId The application ID.
@param versionId The version ID.
@param hEntityId The hierarchical entity extractor ID.
@param hChildId The hierarchical entity extractor child ID.
@param updateHierarchicalEntityChildOptionalParameter the object represen... | [
"Renames",
"a",
"single",
"child",
"in",
"an",
"existing",
"hierarchical",
"entity",
"model",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L6341-L6343 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.