repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 192 | func_name stringlengths 5 108 | whole_func_string stringlengths 75 3.91k | language stringclasses 1
value | func_code_string stringlengths 75 3.91k | func_code_tokens listlengths 21 629 | func_documentation_string stringlengths 61 1.98k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 111 306 |
|---|---|---|---|---|---|---|---|---|---|---|
hamcrest/hamcrest-junit | src/main/java/org/hamcrest/junit/MatcherAssume.java | MatcherAssume.assumeThat | public static <T> void assumeThat(T actual, Matcher<? super T> matcher) {
assumeThat("", actual, matcher);
} | java | public static <T> void assumeThat(T actual, Matcher<? super T> matcher) {
assumeThat("", actual, matcher);
} | [
"public",
"static",
"<",
"T",
">",
"void",
"assumeThat",
"(",
"T",
"actual",
",",
"Matcher",
"<",
"?",
"super",
"T",
">",
"matcher",
")",
"{",
"assumeThat",
"(",
"\"\"",
",",
"actual",
",",
"matcher",
")",
";",
"}"
] | Call to assume that <code>actual</code> satisfies the condition specified by <code>matcher</code>.
If not, the test halts and is ignored.
Example:
<pre>:
assumeThat(1, equalTo(1)); // passes
foo(); // will execute
assumeThat(0, equalTo(1)); // assumption failure! test halts
int x = 1 / 0; // will never execute
</pre>
... | [
"Call",
"to",
"assume",
"that",
"<code",
">",
"actual<",
"/",
"code",
">",
"satisfies",
"the",
"condition",
"specified",
"by",
"<code",
">",
"matcher<",
"/",
"code",
">",
".",
"If",
"not",
"the",
"test",
"halts",
"and",
"is",
"ignored",
".",
"Example",
... | train | https://github.com/hamcrest/hamcrest-junit/blob/5e02d55230b560f255433bcc490afaeda9e1a043/src/main/java/org/hamcrest/junit/MatcherAssume.java#L50-L52 |
CloudSlang/cs-actions | cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java | SendMail.validateRow | protected boolean validateRow(String row, String columnDelimiter, int rowNumber) throws Exception {
if (row.contains(columnDelimiter)) {
if (row.equals(columnDelimiter)) {
throw new Exception(format(ROW_WITH_EMPTY_HEADERS_INPUT, rowNumber + 1));
} else {
S... | java | protected boolean validateRow(String row, String columnDelimiter, int rowNumber) throws Exception {
if (row.contains(columnDelimiter)) {
if (row.equals(columnDelimiter)) {
throw new Exception(format(ROW_WITH_EMPTY_HEADERS_INPUT, rowNumber + 1));
} else {
S... | [
"protected",
"boolean",
"validateRow",
"(",
"String",
"row",
",",
"String",
"columnDelimiter",
",",
"int",
"rowNumber",
")",
"throws",
"Exception",
"{",
"if",
"(",
"row",
".",
"contains",
"(",
"columnDelimiter",
")",
")",
"{",
"if",
"(",
"row",
".",
"equal... | This method validates a row contained in the 'headers' input of the operation.
@param row The value of the row to be validated.
@param columnDelimiter The delimiter that separates the header name from the header value.
@param rowNumber The row number inside the 'headers' input.
@return This method returns true if the r... | [
"This",
"method",
"validates",
"a",
"row",
"contained",
"in",
"the",
"headers",
"input",
"of",
"the",
"operation",
"."
] | train | https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-mail/src/main/java/io/cloudslang/content/mail/services/SendMail.java#L505-L524 |
apache/incubator-heron | heron/schedulers/src/java/org/apache/heron/scheduler/nomad/NomadScheduler.java | NomadScheduler.getFetchCommand | static String getFetchCommand(Config localConfig, Config clusterConfig, Config runtime) {
return String.format("%s -u %s -f . -m local -p %s -d %s",
Context.downloaderBinary(clusterConfig),
Runtime.topologyPackageUri(runtime).toString(), Context.heronConf(localConfig),
Context.heronHome(clus... | java | static String getFetchCommand(Config localConfig, Config clusterConfig, Config runtime) {
return String.format("%s -u %s -f . -m local -p %s -d %s",
Context.downloaderBinary(clusterConfig),
Runtime.topologyPackageUri(runtime).toString(), Context.heronConf(localConfig),
Context.heronHome(clus... | [
"static",
"String",
"getFetchCommand",
"(",
"Config",
"localConfig",
",",
"Config",
"clusterConfig",
",",
"Config",
"runtime",
")",
"{",
"return",
"String",
".",
"format",
"(",
"\"%s -u %s -f . -m local -p %s -d %s\"",
",",
"Context",
".",
"downloaderBinary",
"(",
"... | Get the command that will be used to retrieve the topology JAR | [
"Get",
"the",
"command",
"that",
"will",
"be",
"used",
"to",
"retrieve",
"the",
"topology",
"JAR"
] | train | https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/schedulers/src/java/org/apache/heron/scheduler/nomad/NomadScheduler.java#L554-L559 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE | public void serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE(String serviceName, Long monitoringId, Long alertId) throws IOException {
String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}";
StringBuilder sb = path(qPath, serviceName, monitoringI... | java | public void serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE(String serviceName, Long monitoringId, Long alertId) throws IOException {
String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}";
StringBuilder sb = path(qPath, serviceName, monitoringI... | [
"public",
"void",
"serviceName_serviceMonitoring_monitoringId_alert_email_alertId_DELETE",
"(",
"String",
"serviceName",
",",
"Long",
"monitoringId",
",",
"Long",
"alertId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/server/{serviceName}/serviceMon... | Remove this Email alert monitoring
REST: DELETE /dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}/alert/email/{alertId}
@param serviceName [required] The internal name of your dedicated server
@param monitoringId [required] This monitoring id
@param alertId [required] This monitoring id | [
"Remove",
"this",
"Email",
"alert",
"monitoring"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L2222-L2226 |
indeedeng/util | io/src/main/java/com/indeed/util/io/Files.java | Files.writeObjectIfChangedOrDie | public static boolean writeObjectIfChangedOrDie(@Nonnull final Object obj, @Nonnull final String file) throws IOException {
return writeObjectIfChangedOrDie(obj, file, LOGGER);
} | java | public static boolean writeObjectIfChangedOrDie(@Nonnull final Object obj, @Nonnull final String file) throws IOException {
return writeObjectIfChangedOrDie(obj, file, LOGGER);
} | [
"public",
"static",
"boolean",
"writeObjectIfChangedOrDie",
"(",
"@",
"Nonnull",
"final",
"Object",
"obj",
",",
"@",
"Nonnull",
"final",
"String",
"file",
")",
"throws",
"IOException",
"{",
"return",
"writeObjectIfChangedOrDie",
"(",
"obj",
",",
"file",
",",
"LO... | Writes an object to a file only if it is different from the current
contents of the file, or if the file does not exist. Note that you must
have enough heap to contain the entire contents of the object graph.
@param obj object to write to a file
@param file path to save the object to
@return true if the file was actu... | [
"Writes",
"an",
"object",
"to",
"a",
"file",
"only",
"if",
"it",
"is",
"different",
"from",
"the",
"current",
"contents",
"of",
"the",
"file",
"or",
"if",
"the",
"file",
"does",
"not",
"exist",
".",
"Note",
"that",
"you",
"must",
"have",
"enough",
"hea... | train | https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/io/src/main/java/com/indeed/util/io/Files.java#L252-L254 |
DV8FromTheWorld/JDA | src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java | WebhookMessageBuilder.addFile | public WebhookMessageBuilder addFile(String name, File file)
{
Checks.notNull(file, "File");
Checks.notBlank(name, "Name");
Checks.check(file.exists() && file.canRead(), "File must exist and be readable");
if (fileIndex >= MAX_FILES)
throw new IllegalStateException("Canno... | java | public WebhookMessageBuilder addFile(String name, File file)
{
Checks.notNull(file, "File");
Checks.notBlank(name, "Name");
Checks.check(file.exists() && file.canRead(), "File must exist and be readable");
if (fileIndex >= MAX_FILES)
throw new IllegalStateException("Canno... | [
"public",
"WebhookMessageBuilder",
"addFile",
"(",
"String",
"name",
",",
"File",
"file",
")",
"{",
"Checks",
".",
"notNull",
"(",
"file",
",",
"\"File\"",
")",
";",
"Checks",
".",
"notBlank",
"(",
"name",
",",
"\"Name\"",
")",
";",
"Checks",
".",
"check... | Adds the provided file to the resulting message.
@param name
The name to use for this file
@param file
The file to add
@throws IllegalArgumentException
If the provided file is null, does not exist, or is not readable
@throws IllegalStateException
If the file limit has already been reached
@return The current Webho... | [
"Adds",
"the",
"provided",
"file",
"to",
"the",
"resulting",
"message",
"."
] | train | https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookMessageBuilder.java#L306-L324 |
wuman/orientdb-android | core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerAnyStreamable.java | OStringSerializerAnyStreamable.toStream | public StringBuilder toStream(final StringBuilder iOutput, Object iValue) {
if (iValue != null) {
if (!(iValue instanceof OSerializableStream))
throw new OSerializationException("Cannot serialize the object since it's not implements the OSerializableStream interface");
OSerializableStream ... | java | public StringBuilder toStream(final StringBuilder iOutput, Object iValue) {
if (iValue != null) {
if (!(iValue instanceof OSerializableStream))
throw new OSerializationException("Cannot serialize the object since it's not implements the OSerializableStream interface");
OSerializableStream ... | [
"public",
"StringBuilder",
"toStream",
"(",
"final",
"StringBuilder",
"iOutput",
",",
"Object",
"iValue",
")",
"{",
"if",
"(",
"iValue",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"(",
"iValue",
"instanceof",
"OSerializableStream",
")",
")",
"throw",
"new",
"... | Serialize the class name size + class name + object content
@param iValue | [
"Serialize",
"the",
"class",
"name",
"size",
"+",
"class",
"name",
"+",
"object",
"content"
] | train | https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/string/OStringSerializerAnyStreamable.java#L63-L74 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java | RuntimeExceptionsFactory.newUnsupportedOperationException | public static UnsupportedOperationException newUnsupportedOperationException(String message, Object... args) {
return newUnsupportedOperationException(null, message, args);
} | java | public static UnsupportedOperationException newUnsupportedOperationException(String message, Object... args) {
return newUnsupportedOperationException(null, message, args);
} | [
"public",
"static",
"UnsupportedOperationException",
"newUnsupportedOperationException",
"(",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"newUnsupportedOperationException",
"(",
"null",
",",
"message",
",",
"args",
")",
";",
"}"
] | Constructs and initializes a new {@link UnsupportedOperationException} with the given {@link String message}
formatted with the given {@link Object[] arguments}.
@param message {@link String} describing the {@link UnsupportedOperationException exception}.
@param args {@link Object[] arguments} used to replace format p... | [
"Constructs",
"and",
"initializes",
"a",
"new",
"{",
"@link",
"UnsupportedOperationException",
"}",
"with",
"the",
"given",
"{",
"@link",
"String",
"message",
"}",
"formatted",
"with",
"the",
"given",
"{",
"@link",
"Object",
"[]",
"arguments",
"}",
"."
] | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L253-L255 |
grpc/grpc-java | examples/example-gauth/src/main/java/io/grpc/examples/googleAuth/GoogleAuthClient.java | GoogleAuthClient.main | public static void main(String[] args) throws Exception {
if (args.length < 2) {
logger.severe("Usage: please pass 2 arguments:\n" +
"arg0 = location of the JSON file for the service account you created in the GCP console\n" +
"arg1 = project name in the form \"projects... | java | public static void main(String[] args) throws Exception {
if (args.length < 2) {
logger.severe("Usage: please pass 2 arguments:\n" +
"arg0 = location of the JSON file for the service account you created in the GCP console\n" +
"arg1 = project name in the form \"projects... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"if",
"(",
"args",
".",
"length",
"<",
"2",
")",
"{",
"logger",
".",
"severe",
"(",
"\"Usage: please pass 2 arguments:\\n\"",
"+",
"\"arg0 = location of the J... | The app requires 2 arguments as described in
@see <a href="../../../../../../GOOGLE_AUTH_EXAMPLE.md">Google Auth Example README</a>
arg0 = location of the JSON file for the service account you created in the GCP console
arg1 = project name in the form "projects/balmy-cirrus-225307" where "balmy-cirrus-225307" is
the p... | [
"The",
"app",
"requires",
"2",
"arguments",
"as",
"described",
"in",
"@see",
"<a",
"href",
"=",
"..",
"/",
"..",
"/",
"..",
"/",
"..",
"/",
"..",
"/",
"..",
"/",
"GOOGLE_AUTH_EXAMPLE",
".",
"md",
">",
"Google",
"Auth",
"Example",
"README<",
"/",
"a",... | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/examples/example-gauth/src/main/java/io/grpc/examples/googleAuth/GoogleAuthClient.java#L111-L133 |
apache/groovy | src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java | StaticTypeCheckingVisitor.pushInstanceOfTypeInfo | protected void pushInstanceOfTypeInfo(final Expression objectOfInstanceOf, final Expression typeExpression) {
final Map<Object, List<ClassNode>> tempo = typeCheckingContext.temporaryIfBranchTypeInformation.peek();
Object key = extractTemporaryTypeInfoKey(objectOfInstanceOf);
List<ClassNode> pote... | java | protected void pushInstanceOfTypeInfo(final Expression objectOfInstanceOf, final Expression typeExpression) {
final Map<Object, List<ClassNode>> tempo = typeCheckingContext.temporaryIfBranchTypeInformation.peek();
Object key = extractTemporaryTypeInfoKey(objectOfInstanceOf);
List<ClassNode> pote... | [
"protected",
"void",
"pushInstanceOfTypeInfo",
"(",
"final",
"Expression",
"objectOfInstanceOf",
",",
"final",
"Expression",
"typeExpression",
")",
"{",
"final",
"Map",
"<",
"Object",
",",
"List",
"<",
"ClassNode",
">",
">",
"tempo",
"=",
"typeCheckingContext",
".... | Stores information about types when [objectOfInstanceof instanceof typeExpression] is visited
@param objectOfInstanceOf the expression which must be checked against instanceof
@param typeExpression the expression which represents the target type | [
"Stores",
"information",
"about",
"types",
"when",
"[",
"objectOfInstanceof",
"instanceof",
"typeExpression",
"]",
"is",
"visited"
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java#L1153-L1162 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java | SVGHyperSphere.drawEuclidean | public static Element drawEuclidean(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) {
double[] v_mid = mid.toArray(); // a copy
long[] dims = proj.getVisibleDimensions2D();
SVGPath path = new SVGPath();
for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(di... | java | public static Element drawEuclidean(SVGPlot svgp, Projection2D proj, NumberVector mid, double radius) {
double[] v_mid = mid.toArray(); // a copy
long[] dims = proj.getVisibleDimensions2D();
SVGPath path = new SVGPath();
for(int dim = BitsUtil.nextSetBit(dims, 0); dim >= 0; dim = BitsUtil.nextSetBit(di... | [
"public",
"static",
"Element",
"drawEuclidean",
"(",
"SVGPlot",
"svgp",
",",
"Projection2D",
"proj",
",",
"NumberVector",
"mid",
",",
"double",
"radius",
")",
"{",
"double",
"[",
"]",
"v_mid",
"=",
"mid",
".",
"toArray",
"(",
")",
";",
"// a copy",
"long",... | Wireframe "euclidean" hypersphere
@param svgp SVG Plot
@param proj Visualization projection
@param mid mean vector
@param radius radius
@return path element | [
"Wireframe",
"euclidean",
"hypersphere"
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperSphere.java#L102-L139 |
VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java | JDBC4DatabaseMetaData.getCrossReference | @Override
public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | java | @Override
public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | [
"@",
"Override",
"public",
"ResultSet",
"getCrossReference",
"(",
"String",
"parentCatalog",
",",
"String",
"parentSchema",
",",
"String",
"parentTable",
",",
"String",
"foreignCatalog",
",",
"String",
"foreignSchema",
",",
"String",
"foreignTable",
")",
"throws",
"... | Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). | [
"Retrieves",
"a",
"description",
"of",
"the",
"foreign",
"key",
"columns",
"in",
"the",
"given",
"foreign",
"key",
"table",
"that",
"reference",
"the",
"primary",
"key",
"or",
"the",
"columns",
"representing",
"a",
"unique",
"constraint",
"of",
"the",
"parent"... | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L242-L247 |
apache/incubator-gobblin | gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveCopyEntityHelper.java | HiveCopyEntityHelper.getCopyEntities | Iterator<FileSet<CopyEntity>> getCopyEntities(CopyConfiguration configuration) throws IOException {
return getCopyEntities(configuration, null, null);
} | java | Iterator<FileSet<CopyEntity>> getCopyEntities(CopyConfiguration configuration) throws IOException {
return getCopyEntities(configuration, null, null);
} | [
"Iterator",
"<",
"FileSet",
"<",
"CopyEntity",
">",
">",
"getCopyEntities",
"(",
"CopyConfiguration",
"configuration",
")",
"throws",
"IOException",
"{",
"return",
"getCopyEntities",
"(",
"configuration",
",",
"null",
",",
"null",
")",
";",
"}"
] | See {@link #getCopyEntities(CopyConfiguration, Comparator, PushDownRequestor)}. This method does not pushdown any prioritizer. | [
"See",
"{"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveCopyEntityHelper.java#L392-L394 |
sai-pullabhotla/catatumbo | src/main/java/com/jmethods/catatumbo/EntityManagerFactory.java | EntityManagerFactory.createEntityManager | public EntityManager createEntityManager(String projectId, File jsonCredentialsFile,
String namespace) {
try {
return createEntityManager(projectId, new FileInputStream(jsonCredentialsFile), namespace);
} catch (Exception exp) {
throw new EntityManagerFactoryException(exp);
}
} | java | public EntityManager createEntityManager(String projectId, File jsonCredentialsFile,
String namespace) {
try {
return createEntityManager(projectId, new FileInputStream(jsonCredentialsFile), namespace);
} catch (Exception exp) {
throw new EntityManagerFactoryException(exp);
}
} | [
"public",
"EntityManager",
"createEntityManager",
"(",
"String",
"projectId",
",",
"File",
"jsonCredentialsFile",
",",
"String",
"namespace",
")",
"{",
"try",
"{",
"return",
"createEntityManager",
"(",
"projectId",
",",
"new",
"FileInputStream",
"(",
"jsonCredentialsF... | Creates and return a new {@link EntityManager} using the provided JSON formatted credentials.
@param projectId
the project ID
@param jsonCredentialsFile
the JSON formatted credentials file for the target Cloud project.
@param namespace
the namespace (for multi-tenant datastore) to use. If <code>null</code>, default
n... | [
"Creates",
"and",
"return",
"a",
"new",
"{",
"@link",
"EntityManager",
"}",
"using",
"the",
"provided",
"JSON",
"formatted",
"credentials",
"."
] | train | https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/EntityManagerFactory.java#L151-L158 |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java | ParameterTool.fromMap | public static ParameterTool fromMap(Map<String, String> map) {
Preconditions.checkNotNull(map, "Unable to initialize from empty map");
return new ParameterTool(map);
} | java | public static ParameterTool fromMap(Map<String, String> map) {
Preconditions.checkNotNull(map, "Unable to initialize from empty map");
return new ParameterTool(map);
} | [
"public",
"static",
"ParameterTool",
"fromMap",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"map",
",",
"\"Unable to initialize from empty map\"",
")",
";",
"return",
"new",
"ParameterTool",
"(",
"ma... | Returns {@link ParameterTool} for the given map.
@param map A map of arguments. Both Key and Value have to be Strings
@return A {@link ParameterTool} | [
"Returns",
"{",
"@link",
"ParameterTool",
"}",
"for",
"the",
"given",
"map",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L162-L165 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java | ReadModifyWriteRow.increment | public ReadModifyWriteRow increment(
@Nonnull String familyName, @Nonnull String qualifier, long amount) {
return increment(familyName, ByteString.copyFromUtf8(qualifier), amount);
} | java | public ReadModifyWriteRow increment(
@Nonnull String familyName, @Nonnull String qualifier, long amount) {
return increment(familyName, ByteString.copyFromUtf8(qualifier), amount);
} | [
"public",
"ReadModifyWriteRow",
"increment",
"(",
"@",
"Nonnull",
"String",
"familyName",
",",
"@",
"Nonnull",
"String",
"qualifier",
",",
"long",
"amount",
")",
"{",
"return",
"increment",
"(",
"familyName",
",",
"ByteString",
".",
"copyFromUtf8",
"(",
"qualifi... | Adds `amount` be added to the existing value. If the targeted cell is unset, it will be treated
as containing a zero. Otherwise, the targeted cell must contain an 8-byte value (interpreted as
a 64-bit big-endian signed integer), or the entire request will fail. | [
"Adds",
"amount",
"be",
"added",
"to",
"the",
"existing",
"value",
".",
"If",
"the",
"targeted",
"cell",
"is",
"unset",
"it",
"will",
"be",
"treated",
"as",
"containing",
"a",
"zero",
".",
"Otherwise",
"the",
"targeted",
"cell",
"must",
"contain",
"an",
... | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadModifyWriteRow.java#L103-L106 |
SonarSource/sonarqube | server/sonar-server/src/main/java/org/sonar/server/qualityprofile/BuiltInQProfileRepositoryImpl.java | BuiltInQProfileRepositoryImpl.ensureAtMostOneDeclaredDefault | private static boolean ensureAtMostOneDeclaredDefault(Map.Entry<String, List<BuiltInQProfile.Builder>> entry) {
Set<String> declaredDefaultProfileNames = entry.getValue().stream()
.filter(BuiltInQProfile.Builder::isDeclaredDefault)
.map(BuiltInQProfile.Builder::getName)
.collect(MoreCollectors.toS... | java | private static boolean ensureAtMostOneDeclaredDefault(Map.Entry<String, List<BuiltInQProfile.Builder>> entry) {
Set<String> declaredDefaultProfileNames = entry.getValue().stream()
.filter(BuiltInQProfile.Builder::isDeclaredDefault)
.map(BuiltInQProfile.Builder::getName)
.collect(MoreCollectors.toS... | [
"private",
"static",
"boolean",
"ensureAtMostOneDeclaredDefault",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"BuiltInQProfile",
".",
"Builder",
">",
">",
"entry",
")",
"{",
"Set",
"<",
"String",
">",
"declaredDefaultProfileNames",
"=",
"entry",
... | Fails if more than one {@link BuiltInQProfile.Builder#declaredDefault} is {@code true}, otherwise returns {@code true}. | [
"Fails",
"if",
"more",
"than",
"one",
"{"
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/qualityprofile/BuiltInQProfileRepositoryImpl.java#L172-L179 |
Impetus/Kundera | src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/schemamanager/OracleNoSQLSchemaManager.java | OracleNoSQLSchemaManager.buildAlterDDLQuery | private String buildAlterDDLQuery(TableInfo tableInfo, Map<String, String> newColumns)
{
String statement;
StringBuilder builder = new StringBuilder();
builder.append("ALTER TABLE ");
builder.append(tableInfo.getTableName());
builder.append(Constants.OPEN_ROUND_BRACKET);
... | java | private String buildAlterDDLQuery(TableInfo tableInfo, Map<String, String> newColumns)
{
String statement;
StringBuilder builder = new StringBuilder();
builder.append("ALTER TABLE ");
builder.append(tableInfo.getTableName());
builder.append(Constants.OPEN_ROUND_BRACKET);
... | [
"private",
"String",
"buildAlterDDLQuery",
"(",
"TableInfo",
"tableInfo",
",",
"Map",
"<",
"String",
",",
"String",
">",
"newColumns",
")",
"{",
"String",
"statement",
";",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"builder",
".",... | Builds the alter ddl query.
@param tableInfo
the table info
@param newColumns
the new columns
@return the string | [
"Builds",
"the",
"alter",
"ddl",
"query",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/schemamanager/OracleNoSQLSchemaManager.java#L488-L510 |
E7du/jfinal-ext3 | src/main/java/com/jfinal/ext/kit/Reflect.java | Reflect.similarMethod | private Method similarMethod(String name, Class<?>[] types) throws NoSuchMethodException {
final Class<?> type = type();
// first priority: find a public method with a "similar" signature in class hierarchy
// similar interpreted in when primitive argument types are converted to their wrappers
... | java | private Method similarMethod(String name, Class<?>[] types) throws NoSuchMethodException {
final Class<?> type = type();
// first priority: find a public method with a "similar" signature in class hierarchy
// similar interpreted in when primitive argument types are converted to their wrappers
... | [
"private",
"Method",
"similarMethod",
"(",
"String",
"name",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"types",
")",
"throws",
"NoSuchMethodException",
"{",
"final",
"Class",
"<",
"?",
">",
"type",
"=",
"type",
"(",
")",
";",
"// first priority: find a public m... | Searches a method with a similar signature as desired using
{@link #isSimilarSignature(java.lang.reflect.Method, String, Class[])}.
<p>
First public methods are searched in the class hierarchy, then private methods on the declaring class. If a
method could be found, it is returned, otherwise a {@code NoSuchMethodExcept... | [
"Searches",
"a",
"method",
"with",
"a",
"similar",
"signature",
"as",
"desired",
"using",
"{"
] | train | https://github.com/E7du/jfinal-ext3/blob/8ffcbd150fd50c72852bb778bd427b5eb19254dc/src/main/java/com/jfinal/ext/kit/Reflect.java#L398-L418 |
xcesco/kripton | kripton/src/main/java/com/abubusoft/kripton/map/BindMapHelper.java | BindMapHelper.parseMap | public static Map<String, Object> parseMap(AbstractContext context, ParserWrapper parserWrapper, Map<String, Object> map) {
switch (context.getSupportedFormat()) {
case XML:
throw (new KriptonRuntimeException(context.getSupportedFormat() + " context does not support parse direct map parsing"));
default:
Jac... | java | public static Map<String, Object> parseMap(AbstractContext context, ParserWrapper parserWrapper, Map<String, Object> map) {
switch (context.getSupportedFormat()) {
case XML:
throw (new KriptonRuntimeException(context.getSupportedFormat() + " context does not support parse direct map parsing"));
default:
Jac... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"parseMap",
"(",
"AbstractContext",
"context",
",",
"ParserWrapper",
"parserWrapper",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"{",
"switch",
"(",
"context",
".",
"getSupportedFo... | Parse a map.
@param context the context
@param parserWrapper the parser wrapper
@param map the map
@return map | [
"Parse",
"a",
"map",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/map/BindMapHelper.java#L47-L58 |
ckpoint/CheckPoint | src/main/java/hsim/checkpoint/util/ValidationObjUtil.java | ValidationObjUtil.copyFromTo | public static void copyFromTo(Object from, Object to, String fieldName) {
if (from == null || to == null) {
log.info("object deep copy : from or to is null ");
return;
}
try {
Method getter = getGetterMethod(from.getClass(), fieldName);
if (gett... | java | public static void copyFromTo(Object from, Object to, String fieldName) {
if (from == null || to == null) {
log.info("object deep copy : from or to is null ");
return;
}
try {
Method getter = getGetterMethod(from.getClass(), fieldName);
if (gett... | [
"public",
"static",
"void",
"copyFromTo",
"(",
"Object",
"from",
",",
"Object",
"to",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"from",
"==",
"null",
"||",
"to",
"==",
"null",
")",
"{",
"log",
".",
"info",
"(",
"\"object deep copy : from or to is nu... | Copy from to.
@param from the from
@param to the to
@param fieldName the field name | [
"Copy",
"from",
"to",
"."
] | train | https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L267-L293 |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/ExceptionUtils.java | ExceptionUtils.logReducedStackTrace | public static void logReducedStackTrace(Logger logger, Exception exception) {
Exception here = new Exception();
String[] hereStrings = getStackFrames(here);
String[] throwableStrings = getStackFrames(exception);
int linesToSkip = 1;
while (throwableStrings.length - linesToSkip > 0 && hereStrings.length - l... | java | public static void logReducedStackTrace(Logger logger, Exception exception) {
Exception here = new Exception();
String[] hereStrings = getStackFrames(here);
String[] throwableStrings = getStackFrames(exception);
int linesToSkip = 1;
while (throwableStrings.length - linesToSkip > 0 && hereStrings.length - l... | [
"public",
"static",
"void",
"logReducedStackTrace",
"(",
"Logger",
"logger",
",",
"Exception",
"exception",
")",
"{",
"Exception",
"here",
"=",
"new",
"Exception",
"(",
")",
";",
"String",
"[",
"]",
"hereStrings",
"=",
"getStackFrames",
"(",
"here",
")",
";"... | Logs only the relevant part of the stack trace. For example
if a getter fails it's irrelevant if the getter is called
by a swing class or something else
@param logger the logger where the output should go
@param exception the exception to be printed | [
"Logs",
"only",
"the",
"relevant",
"part",
"of",
"the",
"stack",
"trace",
".",
"For",
"example",
"if",
"a",
"getter",
"fails",
"it",
"s",
"irrelevant",
"if",
"the",
"getter",
"is",
"called",
"by",
"a",
"swing",
"class",
"or",
"something",
"else"
] | train | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/ExceptionUtils.java#L21-L36 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java | SDBaseOps.scalarMin | public SDVariable scalarMin(SDVariable in, Number value) {
return scalarMin(null, in, value);
} | java | public SDVariable scalarMin(SDVariable in, Number value) {
return scalarMin(null, in, value);
} | [
"public",
"SDVariable",
"scalarMin",
"(",
"SDVariable",
"in",
",",
"Number",
"value",
")",
"{",
"return",
"scalarMin",
"(",
"null",
",",
"in",
",",
"value",
")",
";",
"}"
] | Element-wise scalar minimum operation: out = min(in, value)
@param in Input variable
@param value Scalar value to compare
@return Output variable | [
"Element",
"-",
"wise",
"scalar",
"minimum",
"operation",
":",
"out",
"=",
"min",
"(",
"in",
"value",
")"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L1968-L1970 |
sarl/sarl | main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/AbstractSarlMojo.java | AbstractSarlMojo.executeMojo | protected void executeMojo(
String groupId, String artifactId,
String version, String goal,
String configuration,
Dependency... dependencies) throws MojoExecutionException, MojoFailureException {
final Plugin plugin = new Plugin();
plugin.setArtifactId(artifactId);
plugin.setGroupId(groupId);
plugin... | java | protected void executeMojo(
String groupId, String artifactId,
String version, String goal,
String configuration,
Dependency... dependencies) throws MojoExecutionException, MojoFailureException {
final Plugin plugin = new Plugin();
plugin.setArtifactId(artifactId);
plugin.setGroupId(groupId);
plugin... | [
"protected",
"void",
"executeMojo",
"(",
"String",
"groupId",
",",
"String",
"artifactId",
",",
"String",
"version",
",",
"String",
"goal",
",",
"String",
"configuration",
",",
"Dependency",
"...",
"dependencies",
")",
"throws",
"MojoExecutionException",
",",
"Moj... | Execute another MOJO.
@param groupId identifier of the MOJO plugin group.
@param artifactId identifier of the MOJO plugin artifact.
@param version version of the MOJO plugin version.
@param goal the goal to run.
@param configuration the XML code for the configuration.
@param dependencies the dependencies of the plugin... | [
"Execute",
"another",
"MOJO",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/internalmaven/sarl-maven-plugin/src/main/java/io/sarl/maven/compiler/AbstractSarlMojo.java#L231-L273 |
lightblueseas/email-tails | src/main/java/de/alpharogroup/email/utils/EmailExtensions.java | EmailExtensions.newAddress | public static Address newAddress(final String address)
throws AddressException, UnsupportedEncodingException
{
return newAddress(address, null, null);
} | java | public static Address newAddress(final String address)
throws AddressException, UnsupportedEncodingException
{
return newAddress(address, null, null);
} | [
"public",
"static",
"Address",
"newAddress",
"(",
"final",
"String",
"address",
")",
"throws",
"AddressException",
",",
"UnsupportedEncodingException",
"{",
"return",
"newAddress",
"(",
"address",
",",
"null",
",",
"null",
")",
";",
"}"
] | Creates an Address from the given the email address as String object.
@param address
The address in RFC822 format.
@return The created InternetAddress-object from the given address.
@throws UnsupportedEncodingException
is thrown if the encoding not supported
@throws AddressException
is thrown if the parse failed | [
"Creates",
"an",
"Address",
"from",
"the",
"given",
"the",
"email",
"address",
"as",
"String",
"object",
"."
] | train | https://github.com/lightblueseas/email-tails/blob/7be6fee3548e61e697cc8e64e90603cb1f505be2/src/main/java/de/alpharogroup/email/utils/EmailExtensions.java#L175-L179 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/InsertAllRequest.java | InsertAllRequest.newBuilder | public static Builder newBuilder(TableInfo tableInfo, RowToInsert... rows) {
return newBuilder(tableInfo.getTableId(), rows);
} | java | public static Builder newBuilder(TableInfo tableInfo, RowToInsert... rows) {
return newBuilder(tableInfo.getTableId(), rows);
} | [
"public",
"static",
"Builder",
"newBuilder",
"(",
"TableInfo",
"tableInfo",
",",
"RowToInsert",
"...",
"rows",
")",
"{",
"return",
"newBuilder",
"(",
"tableInfo",
".",
"getTableId",
"(",
")",
",",
"rows",
")",
";",
"}"
] | Returns a builder for an {@code InsertAllRequest} object given the destination table and the
rows to insert. | [
"Returns",
"a",
"builder",
"for",
"an",
"{"
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/InsertAllRequest.java#L388-L390 |
arquillian/arquillian-cube | kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/enricher/KuberntesServiceUrlResourceProvider.java | KuberntesServiceUrlResourceProvider.getScheme | private static String getScheme(Service service, Annotation... qualifiers) {
for (Annotation q : qualifiers) {
if (q instanceof Scheme) {
return ((Scheme) q).value();
}
}
if (service.getMetadata() != null && service.getMetadata().getAnnotations() != null)... | java | private static String getScheme(Service service, Annotation... qualifiers) {
for (Annotation q : qualifiers) {
if (q instanceof Scheme) {
return ((Scheme) q).value();
}
}
if (service.getMetadata() != null && service.getMetadata().getAnnotations() != null)... | [
"private",
"static",
"String",
"getScheme",
"(",
"Service",
"service",
",",
"Annotation",
"...",
"qualifiers",
")",
"{",
"for",
"(",
"Annotation",
"q",
":",
"qualifiers",
")",
"{",
"if",
"(",
"q",
"instanceof",
"Scheme",
")",
"{",
"return",
"(",
"(",
"Sc... | Find the scheme to use to connect to the service.
Uses java annotations first and if not found, uses kubernetes annotations on the service object.
@param service
The target service.
@param qualifiers
The set of qualifiers.
@return Returns the resolved scheme of 'http' as a fallback. | [
"Find",
"the",
"scheme",
"to",
"use",
"to",
"connect",
"to",
"the",
"service",
".",
"Uses",
"java",
"annotations",
"first",
"and",
"if",
"not",
"found",
"uses",
"kubernetes",
"annotations",
"on",
"the",
"service",
"object",
"."
] | train | https://github.com/arquillian/arquillian-cube/blob/ce6b08062cc6ba2a68ecc29606bbae9acda5be13/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/enricher/KuberntesServiceUrlResourceProvider.java#L184-L199 |
mapbox/mapbox-events-android | libcore/src/main/java/com/mapbox/android/core/FileUtils.java | FileUtils.writeToFile | public static void writeToFile(@NonNull File file, @NonNull String content) throws IOException {
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
try {
writer.write(content);
writer.flush();
} catch (IOException ioe) {
Log.e(LOG_TAG, ioe.toString());... | java | public static void writeToFile(@NonNull File file, @NonNull String content) throws IOException {
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
try {
writer.write(content);
writer.flush();
} catch (IOException ioe) {
Log.e(LOG_TAG, ioe.toString());... | [
"public",
"static",
"void",
"writeToFile",
"(",
"@",
"NonNull",
"File",
"file",
",",
"@",
"NonNull",
"String",
"content",
")",
"throws",
"IOException",
"{",
"OutputStreamWriter",
"writer",
"=",
"new",
"OutputStreamWriter",
"(",
"new",
"FileOutputStream",
"(",
"f... | Write to file.
@param file valid reference to the file.
@param content content to write to the file. | [
"Write",
"to",
"file",
"."
] | train | https://github.com/mapbox/mapbox-events-android/blob/5b5ca7e04cb8fab31a8dc040b6e7521f930a58a4/libcore/src/main/java/com/mapbox/android/core/FileUtils.java#L77-L91 |
versionone/VersionOne.SDK.Java.ObjectModel | src/main/java/com/versionone/om/BaseAsset.java | BaseAsset.createAttachment | public Attachment createAttachment(String name, String fileName, InputStream stream)
throws AttachmentLengthExceededException, ApplicationUnavailableException {
return getInstance().create().attachment(name, this, fileName, stream);
} | java | public Attachment createAttachment(String name, String fileName, InputStream stream)
throws AttachmentLengthExceededException, ApplicationUnavailableException {
return getInstance().create().attachment(name, this, fileName, stream);
} | [
"public",
"Attachment",
"createAttachment",
"(",
"String",
"name",
",",
"String",
"fileName",
",",
"InputStream",
"stream",
")",
"throws",
"AttachmentLengthExceededException",
",",
"ApplicationUnavailableException",
"{",
"return",
"getInstance",
"(",
")",
".",
"create",... | Create an attachment that belongs to this asset.
@param name The name of the attachment.
@param fileName The name of the original attachment file.
@param stream The read-enabled stream that contains the attachment.
content to upload.
@return {@code Attachment} object with corresponding parameters.
@throws Attach... | [
"Create",
"an",
"attachment",
"that",
"belongs",
"to",
"this",
"asset",
"."
] | train | https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/BaseAsset.java#L272-L275 |
m-m-m/util | value/src/main/java/net/sf/mmm/util/value/api/ValueOutOfRangeException.java | ValueOutOfRangeException.checkRange | @Deprecated
public static void checkRange(Number value, Number minimum, Number maximum, Object valueSource)
throws ValueOutOfRangeException {
double d = value.doubleValue();
if ((d < minimum.doubleValue()) || (d > maximum.doubleValue())) {
if (valueSource == null) {
throw new ValueOutOfRa... | java | @Deprecated
public static void checkRange(Number value, Number minimum, Number maximum, Object valueSource)
throws ValueOutOfRangeException {
double d = value.doubleValue();
if ((d < minimum.doubleValue()) || (d > maximum.doubleValue())) {
if (valueSource == null) {
throw new ValueOutOfRa... | [
"@",
"Deprecated",
"public",
"static",
"void",
"checkRange",
"(",
"Number",
"value",
",",
"Number",
"minimum",
",",
"Number",
"maximum",
",",
"Object",
"valueSource",
")",
"throws",
"ValueOutOfRangeException",
"{",
"double",
"d",
"=",
"value",
".",
"doubleValue"... | This method checks that the given {@code value} is in the inclusive range from {@code minimum} to
{@code maximum}.
@param value is the value to check.
@param minimum is the minimum number allowed.
@param maximum is the maximum number allowed.
@param valueSource describes the source of the value. This may be the filena... | [
"This",
"method",
"checks",
"that",
"the",
"given",
"{",
"@code",
"value",
"}",
"is",
"in",
"the",
"inclusive",
"range",
"from",
"{",
"@code",
"minimum",
"}",
"to",
"{",
"@code",
"maximum",
"}",
"."
] | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/value/src/main/java/net/sf/mmm/util/value/api/ValueOutOfRangeException.java#L243-L255 |
FXMisc/RichTextFX | richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java | MultiChangeBuilder.deleteText | public MultiChangeBuilder<PS, SEG, S> deleteText(int start, int end) {
return replaceText(start, end, "");
} | java | public MultiChangeBuilder<PS, SEG, S> deleteText(int start, int end) {
return replaceText(start, end, "");
} | [
"public",
"MultiChangeBuilder",
"<",
"PS",
",",
"SEG",
",",
"S",
">",
"deleteText",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"replaceText",
"(",
"start",
",",
"end",
",",
"\"\"",
")",
";",
"}"
] | Removes a range of text.
It must hold {@code 0 <= start <= end <= getLength()}.
@param start Start position of the range to remove
@param end End position of the range to remove | [
"Removes",
"a",
"range",
"of",
"text",
"."
] | train | https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java#L262-L264 |
ironjacamar/ironjacamar | deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java | AbstractResourceAdapterDeployer.printFailuresLog | public String printFailuresLog(Validator validator, Collection<Failure> failures, FailureHelper... fhInput)
{
String errorText = "";
FailureHelper fh = null;
if (fhInput.length == 0)
fh = new FailureHelper(failures);
else
fh = fhInput[0];
if (failures != null && failu... | java | public String printFailuresLog(Validator validator, Collection<Failure> failures, FailureHelper... fhInput)
{
String errorText = "";
FailureHelper fh = null;
if (fhInput.length == 0)
fh = new FailureHelper(failures);
else
fh = fhInput[0];
if (failures != null && failu... | [
"public",
"String",
"printFailuresLog",
"(",
"Validator",
"validator",
",",
"Collection",
"<",
"Failure",
">",
"failures",
",",
"FailureHelper",
"...",
"fhInput",
")",
"{",
"String",
"errorText",
"=",
"\"\"",
";",
"FailureHelper",
"fh",
"=",
"null",
";",
"if",... | print Failures into Log files.
@param validator validator validator validator instance used to run validation rules
@param failures failures failures the list of Failures to be printed
@param fhInput fhInput fhInput optional parameter. Normally used only for test or in case of
FailureHelper already present in context
... | [
"print",
"Failures",
"into",
"Log",
"files",
"."
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L1536-L1550 |
code4everything/util | src/main/java/com/zhazhapan/util/FileExecutor.java | FileExecutor.copyFiles | public static void copyFiles(File[] files, String storageFolder) throws IOException {
storageFolder = checkFolder(storageFolder) + ValueConsts.SEPARATOR;
for (File file : files) {
copyFile(file, new File(storageFolder + file.getName()));
}
} | java | public static void copyFiles(File[] files, String storageFolder) throws IOException {
storageFolder = checkFolder(storageFolder) + ValueConsts.SEPARATOR;
for (File file : files) {
copyFile(file, new File(storageFolder + file.getName()));
}
} | [
"public",
"static",
"void",
"copyFiles",
"(",
"File",
"[",
"]",
"files",
",",
"String",
"storageFolder",
")",
"throws",
"IOException",
"{",
"storageFolder",
"=",
"checkFolder",
"(",
"storageFolder",
")",
"+",
"ValueConsts",
".",
"SEPARATOR",
";",
"for",
"(",
... | 批量复制文件,使用原文件名
@param files 文件数组
@param storageFolder 存储目录
@throws IOException 异常 | [
"批量复制文件,使用原文件名"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L498-L503 |
jenkinsci/ssh-slaves-plugin | src/main/java/hudson/plugins/sshslaves/SSHLauncher.java | SSHLauncher.startAgent | private void startAgent(SlaveComputer computer, final TaskListener listener, String java,
String workingDirectory) throws IOException {
session = connection.openSession();
expandChannelBufferSize(session,listener);
String cmd = "cd \"" + workingDirectory + "\" && " + ... | java | private void startAgent(SlaveComputer computer, final TaskListener listener, String java,
String workingDirectory) throws IOException {
session = connection.openSession();
expandChannelBufferSize(session,listener);
String cmd = "cd \"" + workingDirectory + "\" && " + ... | [
"private",
"void",
"startAgent",
"(",
"SlaveComputer",
"computer",
",",
"final",
"TaskListener",
"listener",
",",
"String",
"java",
",",
"String",
"workingDirectory",
")",
"throws",
"IOException",
"{",
"session",
"=",
"connection",
".",
"openSession",
"(",
")",
... | Starts the agent process.
@param computer The computer.
@param listener The listener.
@param java The full path name of the java executable to use.
@param workingDirectory The working directory from which to start the java process.
@throws IOException If something goes wrong. | [
"Starts",
"the",
"agent",
"process",
"."
] | train | https://github.com/jenkinsci/ssh-slaves-plugin/blob/95f528730fc1e01b25983459927b7516ead3ee00/src/main/java/hudson/plugins/sshslaves/SSHLauncher.java#L590-L619 |
onepf/OpenIAB | library/src/main/java/org/onepf/oms/OpenIabHelper.java | OpenIabHelper.queryInventoryAsync | public void queryInventoryAsync(final boolean querySkuDetails,
@Nullable final List<String> moreItemSkus,
@Nullable final List<String> moreSubsSkus,
@NotNull final IabHelper.QueryInventoryFinishedListener listene... | java | public void queryInventoryAsync(final boolean querySkuDetails,
@Nullable final List<String> moreItemSkus,
@Nullable final List<String> moreSubsSkus,
@NotNull final IabHelper.QueryInventoryFinishedListener listene... | [
"public",
"void",
"queryInventoryAsync",
"(",
"final",
"boolean",
"querySkuDetails",
",",
"@",
"Nullable",
"final",
"List",
"<",
"String",
">",
"moreItemSkus",
",",
"@",
"Nullable",
"final",
"List",
"<",
"String",
">",
"moreSubsSkus",
",",
"@",
"NotNull",
"fin... | Queries the inventory. This will query all owned items from the server, as well as
information on additional skus, if specified. This method may block or take long to execute.
@param querySkuDetails if true, SKU details (price, description, etc) will be queried as well
as purchase information.
@param moreItemSkus a... | [
"Queries",
"the",
"inventory",
".",
"This",
"will",
"query",
"all",
"owned",
"items",
"from",
"the",
"server",
"as",
"well",
"as",
"information",
"on",
"additional",
"skus",
"if",
"specified",
".",
"This",
"method",
"may",
"block",
"or",
"take",
"long",
"t... | train | https://github.com/onepf/OpenIAB/blob/90552d53c5303b322940d96a0c4b7cb797d78760/library/src/main/java/org/onepf/oms/OpenIabHelper.java#L1437-L1469 |
eclipse/hawkbit | hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java | RolloutHelper.getOverlappingWithGroupsTargetFilter | public static String getOverlappingWithGroupsTargetFilter(final String baseFilter, final List<RolloutGroup> groups,
final RolloutGroup group) {
final String groupFilter = group.getTargetFilterQuery();
// when any previous group has the same filter as the target group the
// overlap i... | java | public static String getOverlappingWithGroupsTargetFilter(final String baseFilter, final List<RolloutGroup> groups,
final RolloutGroup group) {
final String groupFilter = group.getTargetFilterQuery();
// when any previous group has the same filter as the target group the
// overlap i... | [
"public",
"static",
"String",
"getOverlappingWithGroupsTargetFilter",
"(",
"final",
"String",
"baseFilter",
",",
"final",
"List",
"<",
"RolloutGroup",
">",
"groups",
",",
"final",
"RolloutGroup",
"group",
")",
"{",
"final",
"String",
"groupFilter",
"=",
"group",
"... | Creates an RSQL Filter that matches all targets that are in the provided
group and in the provided groups.
@param baseFilter
the base filter from the rollout
@param groups
the rollout groups
@param group
the target group
@return RSQL string without base filter of the Rollout. Can be an empty
string. | [
"Creates",
"an",
"RSQL",
"Filter",
"that",
"matches",
"all",
"targets",
"that",
"are",
"in",
"the",
"provided",
"group",
"and",
"in",
"the",
"provided",
"groups",
"."
] | train | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L191-L212 |
ManfredTremmel/gwt-bean-validators | gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/Assert.java | Assert.isNull | public static void isNull(@Nullable final Object object, final String message) {
if (object != null) {
throw new IllegalArgumentException(message);
}
} | java | public static void isNull(@Nullable final Object object, final String message) {
if (object != null) {
throw new IllegalArgumentException(message);
}
} | [
"public",
"static",
"void",
"isNull",
"(",
"@",
"Nullable",
"final",
"Object",
"object",
",",
"final",
"String",
"message",
")",
"{",
"if",
"(",
"object",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"message",
")",
";",
"}",
... | Assert that an object is {@code null}.
<pre class="code">
Assert.isNull(value, "The value must be null");
</pre>
@param object the object to check
@param message the exception message to use if the assertion fails
@throws IllegalArgumentException if the object is not {@code null} | [
"Assert",
"that",
"an",
"object",
"is",
"{",
"@code",
"null",
"}",
"."
] | train | https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/Assert.java#L173-L177 |
lucee/Lucee | core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java | HttpServletRequestDummy.setHeader | public void setHeader(String name, String value) {
headers = ReqRspUtil.set(headers, name, value);
} | java | public void setHeader(String name, String value) {
headers = ReqRspUtil.set(headers, name, value);
} | [
"public",
"void",
"setHeader",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"headers",
"=",
"ReqRspUtil",
".",
"set",
"(",
"headers",
",",
"name",
",",
"value",
")",
";",
"}"
] | sets a new header value
@param name name of the new value
@param value header value | [
"sets",
"a",
"new",
"header",
"value"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java#L237-L239 |
joniles/mpxj | src/main/java/net/sf/mpxj/synchro/SynchroReader.java | SynchroReader.processChildTasks | private void processChildTasks(Task task, MapRow row) throws IOException
{
List<MapRow> tasks = row.getRows("TASKS");
if (tasks != null)
{
for (MapRow childTask : tasks)
{
processTask(task, childTask);
}
}
} | java | private void processChildTasks(Task task, MapRow row) throws IOException
{
List<MapRow> tasks = row.getRows("TASKS");
if (tasks != null)
{
for (MapRow childTask : tasks)
{
processTask(task, childTask);
}
}
} | [
"private",
"void",
"processChildTasks",
"(",
"Task",
"task",
",",
"MapRow",
"row",
")",
"throws",
"IOException",
"{",
"List",
"<",
"MapRow",
">",
"tasks",
"=",
"row",
".",
"getRows",
"(",
"\"TASKS\"",
")",
";",
"if",
"(",
"tasks",
"!=",
"null",
")",
"{... | Extract child task data.
@param task MPXJ task
@param row Synchro task data | [
"Extract",
"child",
"task",
"data",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L362-L372 |
apache/groovy | src/main/java/org/codehaus/groovy/transform/stc/TypeCheckingExtension.java | TypeCheckingExtension.isStaticMethodCallOnClass | public boolean isStaticMethodCallOnClass(MethodCall call, ClassNode receiver) {
ClassNode staticReceiver = extractStaticReceiver(call);
return staticReceiver!=null && staticReceiver.equals(receiver);
} | java | public boolean isStaticMethodCallOnClass(MethodCall call, ClassNode receiver) {
ClassNode staticReceiver = extractStaticReceiver(call);
return staticReceiver!=null && staticReceiver.equals(receiver);
} | [
"public",
"boolean",
"isStaticMethodCallOnClass",
"(",
"MethodCall",
"call",
",",
"ClassNode",
"receiver",
")",
"{",
"ClassNode",
"staticReceiver",
"=",
"extractStaticReceiver",
"(",
"call",
")",
";",
"return",
"staticReceiver",
"!=",
"null",
"&&",
"staticReceiver",
... | Given a method call, checks if it's a static method call and if it is, tells if the receiver matches
the one supplied as an argument.
@param call a method call
@param receiver a class node
@return true if the method call is a static method call on the receiver | [
"Given",
"a",
"method",
"call",
"checks",
"if",
"it",
"s",
"a",
"static",
"method",
"call",
"and",
"if",
"it",
"is",
"tells",
"if",
"the",
"receiver",
"matches",
"the",
"one",
"supplied",
"as",
"an",
"argument",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/TypeCheckingExtension.java#L398-L401 |
vdurmont/emoji-java | src/main/java/com/vdurmont/emoji/EmojiParser.java | EmojiParser.removeAllEmojisExcept | public static String removeAllEmojisExcept(
String str,
final Collection<Emoji> emojisToKeep
) {
EmojiTransformer emojiTransformer = new EmojiTransformer() {
public String transform(UnicodeCandidate unicodeCandidate) {
if (emojisToKeep.contains(unicodeCandidate.getEmoji())) {
retur... | java | public static String removeAllEmojisExcept(
String str,
final Collection<Emoji> emojisToKeep
) {
EmojiTransformer emojiTransformer = new EmojiTransformer() {
public String transform(UnicodeCandidate unicodeCandidate) {
if (emojisToKeep.contains(unicodeCandidate.getEmoji())) {
retur... | [
"public",
"static",
"String",
"removeAllEmojisExcept",
"(",
"String",
"str",
",",
"final",
"Collection",
"<",
"Emoji",
">",
"emojisToKeep",
")",
"{",
"EmojiTransformer",
"emojiTransformer",
"=",
"new",
"EmojiTransformer",
"(",
")",
"{",
"public",
"String",
"transf... | Removes all the emojis in a String except a provided set
@param str the string to process
@param emojisToKeep the emojis to keep in this string
@return the string without the emojis that were removed | [
"Removes",
"all",
"the",
"emojis",
"in",
"a",
"String",
"except",
"a",
"provided",
"set"
] | train | https://github.com/vdurmont/emoji-java/blob/8cf5fbe0d7c1020b926791f2b342a263ed07bb0f/src/main/java/com/vdurmont/emoji/EmojiParser.java#L333-L348 |
jqm4gwt/jqm4gwt | library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java | JQMHeader.setRightButton | public JQMButton setRightButton(String text) {
return setRightButton(text, (String) null, (DataIcon) null);
} | java | public JQMButton setRightButton(String text) {
return setRightButton(text, (String) null, (DataIcon) null);
} | [
"public",
"JQMButton",
"setRightButton",
"(",
"String",
"text",
")",
"{",
"return",
"setRightButton",
"(",
"text",
",",
"(",
"String",
")",
"null",
",",
"(",
"DataIcon",
")",
"null",
")",
";",
"}"
] | Creates a new {@link JQMButton} with the given text and then sets that
button in the right slot. Any existing right button will be replaced.
This button will not link to a page by default and therefore will only
react if a click handler is registered. This is useful if you want the
button to do something other than na... | [
"Creates",
"a",
"new",
"{",
"@link",
"JQMButton",
"}",
"with",
"the",
"given",
"text",
"and",
"then",
"sets",
"that",
"button",
"in",
"the",
"right",
"slot",
".",
"Any",
"existing",
"right",
"button",
"will",
"be",
"replaced",
"."
] | train | https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java#L273-L275 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/jackson/GeometrySerializer.java | GeometrySerializer.writeBbox | protected void writeBbox(JsonGenerator jgen, T shape, SerializerProvider provider)
throws IOException {
double[] coordinates = getBboxCoordinates(jgen, shape, provider);
if (coordinates != null) {
jgen.writeFieldName("bbox");
jgen.writeObject(coordinates);
}
... | java | protected void writeBbox(JsonGenerator jgen, T shape, SerializerProvider provider)
throws IOException {
double[] coordinates = getBboxCoordinates(jgen, shape, provider);
if (coordinates != null) {
jgen.writeFieldName("bbox");
jgen.writeObject(coordinates);
}
... | [
"protected",
"void",
"writeBbox",
"(",
"JsonGenerator",
"jgen",
",",
"T",
"shape",
",",
"SerializerProvider",
"provider",
")",
"throws",
"IOException",
"{",
"double",
"[",
"]",
"coordinates",
"=",
"getBboxCoordinates",
"(",
"jgen",
",",
"shape",
",",
"provider",... | Adds the bbox parameter to the geojson string, as defined by the <a href="http://geojson.org/geojson-spec.html">
GeoJSON specification</a>
@param jgen the jsongenerator used for the geojson construction
@param shape the geometry for which the contents is to be retrieved
@param provider provider to retrieve other seri... | [
"Adds",
"the",
"bbox",
"parameter",
"to",
"the",
"geojson",
"string",
"as",
"defined",
"by",
"the",
"<a",
"href",
"=",
"http",
":",
"//",
"geojson",
".",
"org",
"/",
"geojson",
"-",
"spec",
".",
"html",
">",
"GeoJSON",
"specification<",
"/",
"a",
">"
] | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/GeometrySerializer.java#L156-L163 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java | DescriptorRepository.put | public void put(String classname, ClassDescriptor cld)
{
cld.setRepository(this); // BRJ
synchronized (descriptorTable)
{
descriptorTable.put(classname, cld);
List extentClasses = cld.getExtentClasses();
for (int i = 0; i < extentClasses.size(); ++i... | java | public void put(String classname, ClassDescriptor cld)
{
cld.setRepository(this); // BRJ
synchronized (descriptorTable)
{
descriptorTable.put(classname, cld);
List extentClasses = cld.getExtentClasses();
for (int i = 0; i < extentClasses.size(); ++i... | [
"public",
"void",
"put",
"(",
"String",
"classname",
",",
"ClassDescriptor",
"cld",
")",
"{",
"cld",
".",
"setRepository",
"(",
"this",
")",
";",
"// BRJ\r",
"synchronized",
"(",
"descriptorTable",
")",
"{",
"descriptorTable",
".",
"put",
"(",
"classname",
"... | Add a ClassDescriptor to the internal Hashtable<br>
Set the Repository for ClassDescriptor | [
"Add",
"a",
"ClassDescriptor",
"to",
"the",
"internal",
"Hashtable<br",
">",
"Set",
"the",
"Repository",
"for",
"ClassDescriptor"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/metadata/DescriptorRepository.java#L446-L459 |
voldemort/voldemort | src/java/voldemort/client/ClientConfig.java | ClientConfig.setThreadIdleTime | @Deprecated
public ClientConfig setThreadIdleTime(long threadIdleTime, TimeUnit unit) {
this.threadIdleMs = unit.toMillis(threadIdleTime);
return this;
} | java | @Deprecated
public ClientConfig setThreadIdleTime(long threadIdleTime, TimeUnit unit) {
this.threadIdleMs = unit.toMillis(threadIdleTime);
return this;
} | [
"@",
"Deprecated",
"public",
"ClientConfig",
"setThreadIdleTime",
"(",
"long",
"threadIdleTime",
",",
"TimeUnit",
"unit",
")",
"{",
"this",
".",
"threadIdleMs",
"=",
"unit",
".",
"toMillis",
"(",
"threadIdleTime",
")",
";",
"return",
"this",
";",
"}"
] | The amount of time to keep an idle client thread alive
@param threadIdleTime | [
"The",
"amount",
"of",
"time",
"to",
"keep",
"an",
"idle",
"client",
"thread",
"alive"
] | train | https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/ClientConfig.java#L862-L866 |
playn/playn | scene/src/playn/scene/LayerUtil.java | LayerUtil.parentToLayer | public static Point parentToLayer(Layer layer, XY point, Point into) {
layer.transform().inverseTransform(into.set(point), into);
into.x += layer.originX();
into.y += layer.originY();
return into;
} | java | public static Point parentToLayer(Layer layer, XY point, Point into) {
layer.transform().inverseTransform(into.set(point), into);
into.x += layer.originX();
into.y += layer.originY();
return into;
} | [
"public",
"static",
"Point",
"parentToLayer",
"(",
"Layer",
"layer",
",",
"XY",
"point",
",",
"Point",
"into",
")",
"{",
"layer",
".",
"transform",
"(",
")",
".",
"inverseTransform",
"(",
"into",
".",
"set",
"(",
"point",
")",
",",
"into",
")",
";",
... | Converts the supplied point from coordinates relative to its parent
to coordinates relative to the specified layer. The results are stored
into {@code into}, which is returned for convenience. | [
"Converts",
"the",
"supplied",
"point",
"from",
"coordinates",
"relative",
"to",
"its",
"parent",
"to",
"coordinates",
"relative",
"to",
"the",
"specified",
"layer",
".",
"The",
"results",
"are",
"stored",
"into",
"{"
] | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/scene/src/playn/scene/LayerUtil.java#L104-L109 |
aoindustries/semanticcms-openfile-servlet | src/main/java/com/semanticcms/openfile/servlet/OpenFile.java | OpenFile.removeFileOpener | public static void removeFileOpener(ServletContext servletContext, String ... extensions) {
synchronized(fileOpenersLock) {
@SuppressWarnings("unchecked")
Map<String,FileOpener> fileOpeners = (Map<String,FileOpener>)servletContext.getAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME);
if(fileOpeners != null) {
... | java | public static void removeFileOpener(ServletContext servletContext, String ... extensions) {
synchronized(fileOpenersLock) {
@SuppressWarnings("unchecked")
Map<String,FileOpener> fileOpeners = (Map<String,FileOpener>)servletContext.getAttribute(FILE_OPENERS_REQUEST_ATTRIBUTE_NAME);
if(fileOpeners != null) {
... | [
"public",
"static",
"void",
"removeFileOpener",
"(",
"ServletContext",
"servletContext",
",",
"String",
"...",
"extensions",
")",
"{",
"synchronized",
"(",
"fileOpenersLock",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
... | Removes file openers.
@param extensions The simple extensions, in lowercase, not including the dot, such as "dia" | [
"Removes",
"file",
"openers",
"."
] | train | https://github.com/aoindustries/semanticcms-openfile-servlet/blob/d22b2580b57708311949ac1088e3275355774921/src/main/java/com/semanticcms/openfile/servlet/OpenFile.java#L135-L148 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/fs/HarFileSystem.java | HarFileSystem.makeQualified | @Override
public Path makeQualified(Path path) {
// make sure that we just get the
// path component
Path fsPath = path;
if (!path.isAbsolute()) {
fsPath = new Path(archivePath, path);
}
URI tmpURI = fsPath.toUri();
//change this to Har uri
return new Path(uri.getScheme(), harAu... | java | @Override
public Path makeQualified(Path path) {
// make sure that we just get the
// path component
Path fsPath = path;
if (!path.isAbsolute()) {
fsPath = new Path(archivePath, path);
}
URI tmpURI = fsPath.toUri();
//change this to Har uri
return new Path(uri.getScheme(), harAu... | [
"@",
"Override",
"public",
"Path",
"makeQualified",
"(",
"Path",
"path",
")",
"{",
"// make sure that we just get the",
"// path component",
"Path",
"fsPath",
"=",
"path",
";",
"if",
"(",
"!",
"path",
".",
"isAbsolute",
"(",
")",
")",
"{",
"fsPath",
"=",
"ne... | /* this makes a path qualified in the har filesystem
(non-Javadoc)
@see org.apache.hadoop.fs.FilterFileSystem#makeQualified(
org.apache.hadoop.fs.Path) | [
"/",
"*",
"this",
"makes",
"a",
"path",
"qualified",
"in",
"the",
"har",
"filesystem",
"(",
"non",
"-",
"Javadoc",
")"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/HarFileSystem.java#L374-L386 |
pwheel/spring-security-oauth2-client | src/main/java/com/racquettrack/security/oauth/OAuth2AuthenticationFilter.java | OAuth2AuthenticationFilter.setDetails | protected void setDetails(HttpServletRequest request, OAuth2AuthenticationToken authRequest) {
authRequest.setDetails(authenticationDetailsSource.buildDetails(request));
} | java | protected void setDetails(HttpServletRequest request, OAuth2AuthenticationToken authRequest) {
authRequest.setDetails(authenticationDetailsSource.buildDetails(request));
} | [
"protected",
"void",
"setDetails",
"(",
"HttpServletRequest",
"request",
",",
"OAuth2AuthenticationToken",
"authRequest",
")",
"{",
"authRequest",
".",
"setDetails",
"(",
"authenticationDetailsSource",
".",
"buildDetails",
"(",
"request",
")",
")",
";",
"}"
] | Provided so that subclasses may configure what is put into the authentication request's details
property.
@param request that an authentication request is being created for
@param authRequest the authentication request object that should have its details set | [
"Provided",
"so",
"that",
"subclasses",
"may",
"configure",
"what",
"is",
"put",
"into",
"the",
"authentication",
"request",
"s",
"details",
"property",
"."
] | train | https://github.com/pwheel/spring-security-oauth2-client/blob/c0258823493e268495c9752c5d752f74c6809c6b/src/main/java/com/racquettrack/security/oauth/OAuth2AuthenticationFilter.java#L154-L156 |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java | Transform1D.setTranslation | public void setTranslation(List<? extends S> path, Direction1D direction, double curvilineCoord, double shiftCoord) {
this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path);
this.firstSegmentDirection = detectFirstSegmentDirection(direction);
this.curvilineTranslation = curvilineCoord;
this.s... | java | public void setTranslation(List<? extends S> path, Direction1D direction, double curvilineCoord, double shiftCoord) {
this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path);
this.firstSegmentDirection = detectFirstSegmentDirection(direction);
this.curvilineTranslation = curvilineCoord;
this.s... | [
"public",
"void",
"setTranslation",
"(",
"List",
"<",
"?",
"extends",
"S",
">",
"path",
",",
"Direction1D",
"direction",
",",
"double",
"curvilineCoord",
",",
"double",
"shiftCoord",
")",
"{",
"this",
".",
"path",
"=",
"path",
"==",
"null",
"||",
"path",
... | Set the position.
@param path the path to follow.
@param direction is the direction to follow on the path if the path contains only one segment.
@param curvilineCoord the curviline translation.
@param shiftCoord the shifting translation. | [
"Set",
"the",
"position",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java#L314-L320 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java | DiagnosticsInner.getSiteDetectorResponseAsync | public Observable<DetectorResponseInner> getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName) {
return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName).map(new Func1<ServiceResponse<DetectorResponseInner>, DetectorResponseInner>()... | java | public Observable<DetectorResponseInner> getSiteDetectorResponseAsync(String resourceGroupName, String siteName, String detectorName) {
return getSiteDetectorResponseWithServiceResponseAsync(resourceGroupName, siteName, detectorName).map(new Func1<ServiceResponse<DetectorResponseInner>, DetectorResponseInner>()... | [
"public",
"Observable",
"<",
"DetectorResponseInner",
">",
"getSiteDetectorResponseAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"siteName",
",",
"String",
"detectorName",
")",
"{",
"return",
"getSiteDetectorResponseWithServiceResponseAsync",
"(",
"resourceGroupN... | Get site detector response.
Get site detector response.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param siteName Site Name
@param detectorName Detector Resource Name
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the Detecto... | [
"Get",
"site",
"detector",
"response",
".",
"Get",
"site",
"detector",
"response",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L695-L702 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/util/BlockPosUtils.java | BlockPosUtils.getAllInBox | public static Iterable<BlockPos> getAllInBox(AxisAlignedBB aabb)
{
return BlockPos.getAllInBox(new BlockPos(aabb.minX, aabb.minY, aabb.minZ),
new BlockPos(Math.ceil(aabb.maxX) - 1, Math.ceil(aabb.maxY) - 1, Math.ceil(aabb.maxZ) - 1));
} | java | public static Iterable<BlockPos> getAllInBox(AxisAlignedBB aabb)
{
return BlockPos.getAllInBox(new BlockPos(aabb.minX, aabb.minY, aabb.minZ),
new BlockPos(Math.ceil(aabb.maxX) - 1, Math.ceil(aabb.maxY) - 1, Math.ceil(aabb.maxZ) - 1));
} | [
"public",
"static",
"Iterable",
"<",
"BlockPos",
">",
"getAllInBox",
"(",
"AxisAlignedBB",
"aabb",
")",
"{",
"return",
"BlockPos",
".",
"getAllInBox",
"(",
"new",
"BlockPos",
"(",
"aabb",
".",
"minX",
",",
"aabb",
".",
"minY",
",",
"aabb",
".",
"minZ",
"... | Gets an iterable iterating through all the {@link BlockPos} intersecting the passed {@link AxisAlignedBB}.
@param aabb the aabb
@return the all in box | [
"Gets",
"an",
"iterable",
"iterating",
"through",
"all",
"the",
"{",
"@link",
"BlockPos",
"}",
"intersecting",
"the",
"passed",
"{",
"@link",
"AxisAlignedBB",
"}",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/BlockPosUtils.java#L77-L81 |
TheHortonMachine/hortonmachine | gears/src/main/java/org/hortonmachine/gears/utils/DynamicDoubleArray.java | DynamicDoubleArray.setValue | public void setValue( int position, double value ) {
if (position >= internalArray.length) {
double[] newArray = new double[position + growingSize];
System.arraycopy(internalArray, 0, newArray, 0, internalArray.length);
internalArray = newArray;
}
internalArra... | java | public void setValue( int position, double value ) {
if (position >= internalArray.length) {
double[] newArray = new double[position + growingSize];
System.arraycopy(internalArray, 0, newArray, 0, internalArray.length);
internalArray = newArray;
}
internalArra... | [
"public",
"void",
"setValue",
"(",
"int",
"position",
",",
"double",
"value",
")",
"{",
"if",
"(",
"position",
">=",
"internalArray",
".",
"length",
")",
"{",
"double",
"[",
"]",
"newArray",
"=",
"new",
"double",
"[",
"position",
"+",
"growingSize",
"]",... | Safe set the value in a certain position.
<p>If the array is smaller than the position, the array is extended and substituted.</p>
@param position the index in which to set the value.
@param value the value to set. | [
"Safe",
"set",
"the",
"value",
"in",
"a",
"certain",
"position",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/DynamicDoubleArray.java#L61-L69 |
mike10004/common-helper | ormlite-helper/src/main/java/com/github/mike10004/common/dbhelp/ConnectionParams.java | ConnectionParams.copy | public ConnectionParams copy() {
ConnectionParams copy = new ConnectionParams(host, username, password, schema);
return copy;
} | java | public ConnectionParams copy() {
ConnectionParams copy = new ConnectionParams(host, username, password, schema);
return copy;
} | [
"public",
"ConnectionParams",
"copy",
"(",
")",
"{",
"ConnectionParams",
"copy",
"=",
"new",
"ConnectionParams",
"(",
"host",
",",
"username",
",",
"password",
",",
"schema",
")",
";",
"return",
"copy",
";",
"}"
] | Constructs a new object that copies the fields from this instance.
@return the new object | [
"Constructs",
"a",
"new",
"object",
"that",
"copies",
"the",
"fields",
"from",
"this",
"instance",
"."
] | train | https://github.com/mike10004/common-helper/blob/744f82d9b0768a9ad9c63a57a37ab2c93bf408f4/ormlite-helper/src/main/java/com/github/mike10004/common/dbhelp/ConnectionParams.java#L111-L114 |
xwiki/xwiki-commons | xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin/src/main/java/org/xwiki/tool/xar/XARMojo.java | XARMojo.generatePackageXml | private void generatePackageXml(File packageFile, Collection<ArchiveEntry> files) throws Exception
{
getLog().info(String.format("Generating package.xml descriptor at [%s]", packageFile.getPath()));
OutputFormat outputFormat = new OutputFormat("", true);
outputFormat.setEncoding(this.encodi... | java | private void generatePackageXml(File packageFile, Collection<ArchiveEntry> files) throws Exception
{
getLog().info(String.format("Generating package.xml descriptor at [%s]", packageFile.getPath()));
OutputFormat outputFormat = new OutputFormat("", true);
outputFormat.setEncoding(this.encodi... | [
"private",
"void",
"generatePackageXml",
"(",
"File",
"packageFile",
",",
"Collection",
"<",
"ArchiveEntry",
">",
"files",
")",
"throws",
"Exception",
"{",
"getLog",
"(",
")",
".",
"info",
"(",
"String",
".",
"format",
"(",
"\"Generating package.xml descriptor at ... | Create and add package configuration file to the package.
@param packageFile the package when to add configuration file.
@param files the files in the package.
@throws Exception error when writing the configuration file. | [
"Create",
"and",
"add",
"package",
"configuration",
"file",
"to",
"the",
"package",
"."
] | train | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin/src/main/java/org/xwiki/tool/xar/XARMojo.java#L281-L292 |
jhunters/jprotobuf | android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/StringUtils.java | StringUtils.removeStartIgnoreCase | public static String removeStartIgnoreCase(String str, String remove) {
if (isEmpty(str) || isEmpty(remove)) {
return str;
}
if (startsWithIgnoreCase(str, remove)) {
return str.substring(remove.length());
}
return str;
} | java | public static String removeStartIgnoreCase(String str, String remove) {
if (isEmpty(str) || isEmpty(remove)) {
return str;
}
if (startsWithIgnoreCase(str, remove)) {
return str.substring(remove.length());
}
return str;
} | [
"public",
"static",
"String",
"removeStartIgnoreCase",
"(",
"String",
"str",
",",
"String",
"remove",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"str",
")",
"||",
"isEmpty",
"(",
"remove",
")",
")",
"{",
"return",
"str",
";",
"}",
"if",
"(",
"startsWithIgnoreC... | <p>
Case insensitive removal of a substring if it is at the begining of a
source string, otherwise returns the source string.
</p>
<p>
A <code>null</code> source string will return <code>null</code>. An empty
("") source string will return the empty string. A <code>null</code>
search string will return the source stri... | [
"<p",
">",
"Case",
"insensitive",
"removal",
"of",
"a",
"substring",
"if",
"it",
"is",
"at",
"the",
"begining",
"of",
"a",
"source",
"string",
"otherwise",
"returns",
"the",
"source",
"string",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/StringUtils.java#L307-L315 |
grails/gorm-hibernate5 | grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateVersionSupport.java | HibernateVersionSupport.createQuery | @Deprecated
public static Query createQuery(Session session, String query) {
return session.createQuery(query);
} | java | @Deprecated
public static Query createQuery(Session session, String query) {
return session.createQuery(query);
} | [
"@",
"Deprecated",
"public",
"static",
"Query",
"createQuery",
"(",
"Session",
"session",
",",
"String",
"query",
")",
"{",
"return",
"session",
".",
"createQuery",
"(",
"query",
")",
";",
"}"
] | Creates a query
@param session The session
@param query The query
@return The created query
@deprecated Previously used for Hibernate backwards, will be removed in a future release. | [
"Creates",
"a",
"query"
] | train | https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/HibernateVersionSupport.java#L85-L88 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java | PersistenceBrokerFactoryDefaultImpl.createPersistenceBroker | public PersistenceBrokerInternal createPersistenceBroker(PBKey pbKey) throws PBFactoryException
{
if (log.isDebugEnabled()) log.debug("Obtain broker from pool, used PBKey is " + pbKey);
PersistenceBrokerInternal broker = null;
/*
try to find a valid PBKey, if given key does no... | java | public PersistenceBrokerInternal createPersistenceBroker(PBKey pbKey) throws PBFactoryException
{
if (log.isDebugEnabled()) log.debug("Obtain broker from pool, used PBKey is " + pbKey);
PersistenceBrokerInternal broker = null;
/*
try to find a valid PBKey, if given key does no... | [
"public",
"PersistenceBrokerInternal",
"createPersistenceBroker",
"(",
"PBKey",
"pbKey",
")",
"throws",
"PBFactoryException",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"Obtain broker from pool, used PBKey is \"",
"+",
"pb... | Return broker instance from pool. If given {@link PBKey} was not found in pool
a new pool for given
@param pbKey
@return
@throws PBFactoryException | [
"Return",
"broker",
"instance",
"from",
"pool",
".",
"If",
"given",
"{"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerFactoryDefaultImpl.java#L85-L123 |
morimekta/providence | providence-core/src/main/java-gen/net/morimekta/providence/util/Any.java | Any.wrapMessage | public static <M extends net.morimekta.providence.PMessage<M, F>, F extends net.morimekta.providence.descriptor.PField>
Any wrapMessage(@javax.annotation.Nonnull M message, @javax.annotation.Nonnull net.morimekta.providence.serializer.Serializer serializer) {
try {
_Builder builder = builder();
... | java | public static <M extends net.morimekta.providence.PMessage<M, F>, F extends net.morimekta.providence.descriptor.PField>
Any wrapMessage(@javax.annotation.Nonnull M message, @javax.annotation.Nonnull net.morimekta.providence.serializer.Serializer serializer) {
try {
_Builder builder = builder();
... | [
"public",
"static",
"<",
"M",
"extends",
"net",
".",
"morimekta",
".",
"providence",
".",
"PMessage",
"<",
"M",
",",
"F",
">",
",",
"F",
"extends",
"net",
".",
"morimekta",
".",
"providence",
".",
"descriptor",
".",
"PField",
">",
"Any",
"wrapMessage",
... | Wrap a message into an <code>Any</code> wrapper message. This
will serialize the message using the provided serializer.
@param message Wrap this message.
@param serializer Use this serializer.
@param <M> The message type
@param <F> The message field type
@return The wrapped message. | [
"Wrap",
"a",
"message",
"into",
"an",
"<code",
">",
"Any<",
"/",
"code",
">",
"wrapper",
"message",
".",
"This",
"will",
"serialize",
"the",
"message",
"using",
"the",
"provided",
"serializer",
"."
] | train | https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/providence-core/src/main/java-gen/net/morimekta/providence/util/Any.java#L545-L562 |
aws/aws-sdk-java | aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/Layer.java | Layer.withAttributes | public Layer withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | java | public Layer withAttributes(java.util.Map<String, String> attributes) {
setAttributes(attributes);
return this;
} | [
"public",
"Layer",
"withAttributes",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"setAttributes",
"(",
"attributes",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The layer attributes.
</p>
<p>
For the <code>HaproxyStatsPassword</code>, <code>MysqlRootPassword</code>, and <code>GangliaPassword</code>
attributes, AWS OpsWorks Stacks returns <code>*****FILTERED*****</code> instead of the actual value
</p>
<p>
For an ECS Cluster layer, AWS OpsWorks Stacks the <code>EcsClusterAr... | [
"<p",
">",
"The",
"layer",
"attributes",
".",
"<",
"/",
"p",
">",
"<p",
">",
"For",
"the",
"<code",
">",
"HaproxyStatsPassword<",
"/",
"code",
">",
"<code",
">",
"MysqlRootPassword<",
"/",
"code",
">",
"and",
"<code",
">",
"GangliaPassword<",
"/",
"code"... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/Layer.java#L550-L553 |
alkacon/opencms-core | src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthlyWeeks.java | CmsSerialDateBeanMonthlyWeeks.toCorrectDateWithDay | private void toCorrectDateWithDay(Calendar date, WeekOfMonth week) {
date.set(Calendar.DAY_OF_MONTH, 1);
int daysToFirstWeekDayMatch = ((m_weekDay.toInt() + I_CmsSerialDateValue.NUM_OF_WEEKDAYS)
- (date.get(Calendar.DAY_OF_WEEK))) % I_CmsSerialDateValue.NUM_OF_WEEKDAYS;
date.add(Cal... | java | private void toCorrectDateWithDay(Calendar date, WeekOfMonth week) {
date.set(Calendar.DAY_OF_MONTH, 1);
int daysToFirstWeekDayMatch = ((m_weekDay.toInt() + I_CmsSerialDateValue.NUM_OF_WEEKDAYS)
- (date.get(Calendar.DAY_OF_WEEK))) % I_CmsSerialDateValue.NUM_OF_WEEKDAYS;
date.add(Cal... | [
"private",
"void",
"toCorrectDateWithDay",
"(",
"Calendar",
"date",
",",
"WeekOfMonth",
"week",
")",
"{",
"date",
".",
"set",
"(",
"Calendar",
".",
"DAY_OF_MONTH",
",",
"1",
")",
";",
"int",
"daysToFirstWeekDayMatch",
"=",
"(",
"(",
"m_weekDay",
".",
"toInt"... | Sets the day of the month that matches the condition, i.e., the day of month of the 2nd Saturday.
If the day does not exist in the current month, the last possible date is set, i.e.,
instead of the fifth Saturday, the fourth is chosen.
@param date date that has the correct year and month already set.
@param week the n... | [
"Sets",
"the",
"day",
"of",
"the",
"month",
"that",
"matches",
"the",
"condition",
"i",
".",
"e",
".",
"the",
"day",
"of",
"month",
"of",
"the",
"2nd",
"Saturday",
".",
"If",
"the",
"day",
"does",
"not",
"exist",
"in",
"the",
"current",
"month",
"the... | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/serialdate/CmsSerialDateBeanMonthlyWeeks.java#L128-L142 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/PatternElement.java | PatternElement.addOrCheckDefinition | protected static BindingSet addOrCheckDefinition(String varName, Variable variable, BindingSet bindingSet) {
Variable existingVariable = lookup(varName, bindingSet);
if (existingVariable == null) {
bindingSet = new BindingSet(new Binding(varName, variable), bindingSet);
} else {
... | java | protected static BindingSet addOrCheckDefinition(String varName, Variable variable, BindingSet bindingSet) {
Variable existingVariable = lookup(varName, bindingSet);
if (existingVariable == null) {
bindingSet = new BindingSet(new Binding(varName, variable), bindingSet);
} else {
... | [
"protected",
"static",
"BindingSet",
"addOrCheckDefinition",
"(",
"String",
"varName",
",",
"Variable",
"variable",
",",
"BindingSet",
"bindingSet",
")",
"{",
"Variable",
"existingVariable",
"=",
"lookup",
"(",
"varName",
",",
"bindingSet",
")",
";",
"if",
"(",
... | Add a variable definition to the given BindingSet, or if there is an
existing definition, make sure it is consistent with the new definition.
@param varName
the name of the variable
@param variable
the Variable which should be added or checked for consistency
@param bindingSet
the existing set of bindings
@return the ... | [
"Add",
"a",
"variable",
"definition",
"to",
"the",
"given",
"BindingSet",
"or",
"if",
"there",
"is",
"an",
"existing",
"definition",
"make",
"sure",
"it",
"is",
"consistent",
"with",
"the",
"new",
"definition",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/bcp/PatternElement.java#L209-L221 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/services/lss/LssClient.java | LssClient.updateSecurityPolicy | public UpdateSecurityPolicyResponse updateSecurityPolicy(UpdateSecurityPolicyRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string.");
UpdateSecurityPolicyInnerRequest i... | java | public UpdateSecurityPolicyResponse updateSecurityPolicy(UpdateSecurityPolicyRequest request) {
checkNotNull(request, "The parameter request should NOT be null.");
checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string.");
UpdateSecurityPolicyInnerRequest i... | [
"public",
"UpdateSecurityPolicyResponse",
"updateSecurityPolicy",
"(",
"UpdateSecurityPolicyRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
",",
"\"The parameter request should NOT be null.\"",
")",
";",
"checkStringNotEmpty",
"(",
"request",
".",
"getName",
"(... | Update your live security policy by live security policy name.
@param request The request object containing all parameters for updating live security policy.
@return the response | [
"Update",
"your",
"live",
"security",
"policy",
"by",
"live",
"security",
"policy",
"name",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1300-L1310 |
facebookarchive/hive-dwrf | hive-dwrf/src/main/java/com/facebook/hive/orc/InStream.java | InStream.create | public static InStream create(String name, FSDataInputStream file, long streamOffset,
int streamLength, CompressionCodec codec, int bufferSize) throws IOException {
return create(name, file, streamOffset, streamLength, codec, bufferSize, true, 1);
} | java | public static InStream create(String name, FSDataInputStream file, long streamOffset,
int streamLength, CompressionCodec codec, int bufferSize) throws IOException {
return create(name, file, streamOffset, streamLength, codec, bufferSize, true, 1);
} | [
"public",
"static",
"InStream",
"create",
"(",
"String",
"name",
",",
"FSDataInputStream",
"file",
",",
"long",
"streamOffset",
",",
"int",
"streamLength",
",",
"CompressionCodec",
"codec",
",",
"int",
"bufferSize",
")",
"throws",
"IOException",
"{",
"return",
"... | This should be used for creating streams to read file metadata, e.g. the footer, not for
data in columns. | [
"This",
"should",
"be",
"used",
"for",
"creating",
"streams",
"to",
"read",
"file",
"metadata",
"e",
".",
"g",
".",
"the",
"footer",
"not",
"for",
"data",
"in",
"columns",
"."
] | train | https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf/src/main/java/com/facebook/hive/orc/InStream.java#L462-L466 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.dedicated_server_serviceName_traffic_GET | public ArrayList<String> dedicated_server_serviceName_traffic_GET(String serviceName, OvhTrafficOrderEnum traffic) throws IOException {
String qPath = "/order/dedicated/server/{serviceName}/traffic";
StringBuilder sb = path(qPath, serviceName);
query(sb, "traffic", traffic);
String resp = exec(qPath, "GET", sb.... | java | public ArrayList<String> dedicated_server_serviceName_traffic_GET(String serviceName, OvhTrafficOrderEnum traffic) throws IOException {
String qPath = "/order/dedicated/server/{serviceName}/traffic";
StringBuilder sb = path(qPath, serviceName);
query(sb, "traffic", traffic);
String resp = exec(qPath, "GET", sb.... | [
"public",
"ArrayList",
"<",
"String",
">",
"dedicated_server_serviceName_traffic_GET",
"(",
"String",
"serviceName",
",",
"OvhTrafficOrderEnum",
"traffic",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/dedicated/server/{serviceName}/traffic\"",
";",
"... | Get allowed durations for 'traffic' option
REST: GET /order/dedicated/server/{serviceName}/traffic
@param traffic [required] amount of traffic to allocate
@param serviceName [required] The internal name of your dedicated server | [
"Get",
"allowed",
"durations",
"for",
"traffic",
"option"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2241-L2247 |
korpling/ANNIS | annis-service/src/main/java/annis/administration/AdministrationDao.java | AdministrationDao.listIndexesOnTables | private List<String> listIndexesOnTables(List<String> tables)
{
String sql
= ""
+ "SELECT indexname "
+ "FROM pg_indexes "
+ "WHERE tablename IN (" + StringUtils.repeat("?", ",", tables.size())
+ ") "
+ "AND lower(indexname) NOT IN "
+ " (SELECT lower(conname) FROM pg_con... | java | private List<String> listIndexesOnTables(List<String> tables)
{
String sql
= ""
+ "SELECT indexname "
+ "FROM pg_indexes "
+ "WHERE tablename IN (" + StringUtils.repeat("?", ",", tables.size())
+ ") "
+ "AND lower(indexname) NOT IN "
+ " (SELECT lower(conname) FROM pg_con... | [
"private",
"List",
"<",
"String",
">",
"listIndexesOnTables",
"(",
"List",
"<",
"String",
">",
"tables",
")",
"{",
"String",
"sql",
"=",
"\"\"",
"+",
"\"SELECT indexname \"",
"+",
"\"FROM pg_indexes \"",
"+",
"\"WHERE tablename IN (\"",
"+",
"StringUtils",
".",
... | exploits the fact that the index has the same name as the constraint | [
"exploits",
"the",
"fact",
"that",
"the",
"index",
"has",
"the",
"same",
"name",
"as",
"the",
"constraint"
] | train | https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/administration/AdministrationDao.java#L1781-L1793 |
apptentive/apptentive-android | apptentive/src/main/java/com/apptentive/android/sdk/util/threading/DispatchQueue.java | DispatchQueue.dispatchAsyncOnce | public boolean dispatchAsyncOnce(DispatchTask task, long delayMillis) {
if (!task.isScheduled()) {
dispatchAsync(task, delayMillis);
return true;
}
return false;
} | java | public boolean dispatchAsyncOnce(DispatchTask task, long delayMillis) {
if (!task.isScheduled()) {
dispatchAsync(task, delayMillis);
return true;
}
return false;
} | [
"public",
"boolean",
"dispatchAsyncOnce",
"(",
"DispatchTask",
"task",
",",
"long",
"delayMillis",
")",
"{",
"if",
"(",
"!",
"task",
".",
"isScheduled",
"(",
")",
")",
"{",
"dispatchAsync",
"(",
"task",
",",
"delayMillis",
")",
";",
"return",
"true",
";",
... | Add <code>{@link DispatchTask}</code> to the queue if it's not already on the queue (this
way you can ensure only one instance of the task is scheduled at a time). After the task is
executed you can schedule it again.
@return true if task was scheduled | [
"Add",
"<code",
">",
"{",
"@link",
"DispatchTask",
"}",
"<",
"/",
"code",
">",
"to",
"the",
"queue",
"if",
"it",
"s",
"not",
"already",
"on",
"the",
"queue",
"(",
"this",
"way",
"you",
"can",
"ensure",
"only",
"one",
"instance",
"of",
"the",
"task",
... | train | https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/threading/DispatchQueue.java#L83-L89 |
m-m-m/util | reflect/src/main/java/net/sf/mmm/util/reflect/base/AbstractGenericType.java | AbstractGenericType.resolveTypeVariable | protected Type resolveTypeVariable(TypeVariable<?> typeVariable, GenericType<?> declaringType) {
GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration();
if (genericDeclaration instanceof Class<?>) {
Class<?> declaringClass = (Class<?>) genericDeclaration;
return resolveTy... | java | protected Type resolveTypeVariable(TypeVariable<?> typeVariable, GenericType<?> declaringType) {
GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration();
if (genericDeclaration instanceof Class<?>) {
Class<?> declaringClass = (Class<?>) genericDeclaration;
return resolveTy... | [
"protected",
"Type",
"resolveTypeVariable",
"(",
"TypeVariable",
"<",
"?",
">",
"typeVariable",
",",
"GenericType",
"<",
"?",
">",
"declaringType",
")",
"{",
"GenericDeclaration",
"genericDeclaration",
"=",
"typeVariable",
".",
"getGenericDeclaration",
"(",
")",
";"... | This method resolves the given {@code typeVariable} in the context of the given {@code declaringType}.
@param typeVariable the {@link TypeVariable} to resolve.
@param declaringType the {@link GenericType} where the given {@code typeVariable} occurs or is replaced.
@return the resolved {@link Type} or {@code null} if t... | [
"This",
"method",
"resolves",
"the",
"given",
"{",
"@code",
"typeVariable",
"}",
"in",
"the",
"context",
"of",
"the",
"given",
"{",
"@code",
"declaringType",
"}",
"."
] | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/reflect/src/main/java/net/sf/mmm/util/reflect/base/AbstractGenericType.java#L255-L263 |
talsma-ict/umldoclet | src/main/java/nl/talsmasoftware/umldoclet/rendering/indent/IndentingWriter.java | IndentingWriter.withIndentation | public IndentingWriter withIndentation(Indentation newIndentation) {
return newIndentation == null || this.indentation.equals(newIndentation) ? this
: new IndentingWriter(delegate, newIndentation, lastWritten, addWhitespace.get());
} | java | public IndentingWriter withIndentation(Indentation newIndentation) {
return newIndentation == null || this.indentation.equals(newIndentation) ? this
: new IndentingWriter(delegate, newIndentation, lastWritten, addWhitespace.get());
} | [
"public",
"IndentingWriter",
"withIndentation",
"(",
"Indentation",
"newIndentation",
")",
"{",
"return",
"newIndentation",
"==",
"null",
"||",
"this",
".",
"indentation",
".",
"equals",
"(",
"newIndentation",
")",
"?",
"this",
":",
"new",
"IndentingWriter",
"(",
... | Returns an indenting writer with the new indentation.
<p>
Please note: Already written lines will not be modified to accomodate the new indentation.
@param newIndentation The new indentation to apply to this writer (optional).
@return Either this writer if the indentation is already correct,
or a new IndentingWriter w... | [
"Returns",
"an",
"indenting",
"writer",
"with",
"the",
"new",
"indentation",
".",
"<p",
">",
"Please",
"note",
":",
"Already",
"written",
"lines",
"will",
"not",
"be",
"modified",
"to",
"accomodate",
"the",
"new",
"indentation",
"."
] | train | https://github.com/talsma-ict/umldoclet/blob/373b23f2646603fddca4a495e9eccbb4a4491fdf/src/main/java/nl/talsmasoftware/umldoclet/rendering/indent/IndentingWriter.java#L82-L85 |
facebook/fresco | imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ThumbnailSizeChecker.java | ThumbnailSizeChecker.isImageBigEnough | public static boolean isImageBigEnough(int width, int height, ResizeOptions resizeOptions) {
if (resizeOptions == null) {
return getAcceptableSize(width) >= BitmapUtil.MAX_BITMAP_SIZE
&& getAcceptableSize(height) >= (int) BitmapUtil.MAX_BITMAP_SIZE;
} else {
return getAcceptableSize(width)... | java | public static boolean isImageBigEnough(int width, int height, ResizeOptions resizeOptions) {
if (resizeOptions == null) {
return getAcceptableSize(width) >= BitmapUtil.MAX_BITMAP_SIZE
&& getAcceptableSize(height) >= (int) BitmapUtil.MAX_BITMAP_SIZE;
} else {
return getAcceptableSize(width)... | [
"public",
"static",
"boolean",
"isImageBigEnough",
"(",
"int",
"width",
",",
"int",
"height",
",",
"ResizeOptions",
"resizeOptions",
")",
"{",
"if",
"(",
"resizeOptions",
"==",
"null",
")",
"{",
"return",
"getAcceptableSize",
"(",
"width",
")",
">=",
"BitmapUt... | Checks whether the producer may be able to produce images of the specified size. This makes no
promise about being able to produce images for a particular source, only generally being able
to produce output of the desired resolution.
@param width the desired width
@param height the desired height
@return true if the p... | [
"Checks",
"whether",
"the",
"producer",
"may",
"be",
"able",
"to",
"produce",
"images",
"of",
"the",
"specified",
"size",
".",
"This",
"makes",
"no",
"promise",
"about",
"being",
"able",
"to",
"produce",
"images",
"for",
"a",
"particular",
"source",
"only",
... | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ThumbnailSizeChecker.java#L39-L47 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EthiopicCalendar.java | EthiopicCalendar.handleGetLimit | @Deprecated
protected int handleGetLimit(int field, int limitType) {
if (isAmeteAlemEra() && field == ERA) {
return 0; // Only one era in this mode, era is always 0
}
return super.handleGetLimit(field, limitType);
} | java | @Deprecated
protected int handleGetLimit(int field, int limitType) {
if (isAmeteAlemEra() && field == ERA) {
return 0; // Only one era in this mode, era is always 0
}
return super.handleGetLimit(field, limitType);
} | [
"@",
"Deprecated",
"protected",
"int",
"handleGetLimit",
"(",
"int",
"field",
",",
"int",
"limitType",
")",
"{",
"if",
"(",
"isAmeteAlemEra",
"(",
")",
"&&",
"field",
"==",
"ERA",
")",
"{",
"return",
"0",
";",
"// Only one era in this mode, era is always 0",
"... | {@inheritDoc}
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"{"
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EthiopicCalendar.java#L337-L343 |
aws/aws-sdk-java | aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java | ValidationContext.assertNotNull | public void assertNotNull(Object propertyValue, String propertyName) {
if (propertyValue == null) {
problemReporter.report(new Problem(this, String.format("%s is a required property.", propertyName)));
}
} | java | public void assertNotNull(Object propertyValue, String propertyName) {
if (propertyValue == null) {
problemReporter.report(new Problem(this, String.format("%s is a required property.", propertyName)));
}
} | [
"public",
"void",
"assertNotNull",
"(",
"Object",
"propertyValue",
",",
"String",
"propertyName",
")",
"{",
"if",
"(",
"propertyValue",
"==",
"null",
")",
"{",
"problemReporter",
".",
"report",
"(",
"new",
"Problem",
"(",
"this",
",",
"String",
".",
"format"... | Asserts the value is not null, reporting to {@link ProblemReporter} with this context if it is.
@param propertyValue Value to assert on.
@param propertyName Name of property. | [
"Asserts",
"the",
"value",
"is",
"not",
"null",
"reporting",
"to",
"{",
"@link",
"ProblemReporter",
"}",
"with",
"this",
"context",
"if",
"it",
"is",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java#L66-L70 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java | ComputerVisionImpl.analyzeImageByDomainInStreamWithServiceResponseAsync | public Observable<ServiceResponse<DomainModelResults>> analyzeImageByDomainInStreamWithServiceResponseAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentExcept... | java | public Observable<ServiceResponse<DomainModelResults>> analyzeImageByDomainInStreamWithServiceResponseAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentExcept... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"DomainModelResults",
">",
">",
"analyzeImageByDomainInStreamWithServiceResponseAsync",
"(",
"String",
"model",
",",
"byte",
"[",
"]",
"image",
",",
"AnalyzeImageByDomainInStreamOptionalParameter",
"analyzeImageByDomainInStre... | This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API only provides a single domain-specific model: celebrities. Two input methods are su... | [
"This",
"operation",
"recognizes",
"content",
"within",
"an",
"image",
"by",
"applying",
"a",
"domain",
"-",
"specific",
"model",
".",
"The",
"list",
"of",
"domain",
"-",
"specific",
"models",
"that",
"are",
"supported",
"by",
"the",
"Computer",
"Vision",
"A... | 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#L302-L315 |
spring-projects/spring-mobile | spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/StandardSiteSwitcherHandlerFactory.java | StandardSiteSwitcherHandlerFactory.dotMobi | public static SiteSwitcherHandler dotMobi(String serverName, Boolean tabletIsMobile) {
int lastDot = serverName.lastIndexOf('.');
return standard(serverName, serverName.substring(0, lastDot) + ".mobi", "." + serverName, tabletIsMobile);
} | java | public static SiteSwitcherHandler dotMobi(String serverName, Boolean tabletIsMobile) {
int lastDot = serverName.lastIndexOf('.');
return standard(serverName, serverName.substring(0, lastDot) + ".mobi", "." + serverName, tabletIsMobile);
} | [
"public",
"static",
"SiteSwitcherHandler",
"dotMobi",
"(",
"String",
"serverName",
",",
"Boolean",
"tabletIsMobile",
")",
"{",
"int",
"lastDot",
"=",
"serverName",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"return",
"standard",
"(",
"serverName",
",",
"serv... | Creates a site switcher that redirects to a <code>.mobi</code> domain for normal site requests that either
originate from a mobile device or indicate a mobile site preference.
Will strip off the trailing domain name when building the mobile domain
e.g. "app.com" will become "app.mobi" (the .com will be stripped).
Uses ... | [
"Creates",
"a",
"site",
"switcher",
"that",
"redirects",
"to",
"a",
"<code",
">",
".",
"mobi<",
"/",
"code",
">",
"domain",
"for",
"normal",
"site",
"requests",
"that",
"either",
"originate",
"from",
"a",
"mobile",
"device",
"or",
"indicate",
"a",
"mobile"... | train | https://github.com/spring-projects/spring-mobile/blob/a402cbcaf208e24288b957f44c9984bd6e8bf064/spring-mobile-device/src/main/java/org/springframework/mobile/device/switcher/StandardSiteSwitcherHandlerFactory.java#L64-L67 |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.getFilteredXml | @SuppressWarnings("unchecked")
private String getFilteredXml(Document document, String xpathExpression) {
logger.entering(new Object[] { document, xpathExpression });
List<Node> nodes = (List<Node>) document.selectNodes(xpathExpression);
StringBuilder newDocument = new StringBuilder(documen... | java | @SuppressWarnings("unchecked")
private String getFilteredXml(Document document, String xpathExpression) {
logger.entering(new Object[] { document, xpathExpression });
List<Node> nodes = (List<Node>) document.selectNodes(xpathExpression);
StringBuilder newDocument = new StringBuilder(documen... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"String",
"getFilteredXml",
"(",
"Document",
"document",
",",
"String",
"xpathExpression",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"document",
",",
"xpathExpression"... | Generates an XML string containing only the nodes filtered by the XPath expression.
@param document
An XML {@link org.dom4j.Document}
@param xpathExpression
A string indicating the XPath expression to be evaluated.
@return A string of XML data with root node named "root". | [
"Generates",
"an",
"XML",
"string",
"containing",
"only",
"the",
"nodes",
"filtered",
"by",
"the",
"XPath",
"expression",
"."
] | train | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L424-L438 |
loldevs/riotapi | rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java | ThrottledApiHandler.getChampion | public Future<Champion> getChampion(int id, ChampData champData, String version, String locale) {
return new DummyFuture<>(handler.getChampion(id, champData, version, locale));
} | java | public Future<Champion> getChampion(int id, ChampData champData, String version, String locale) {
return new DummyFuture<>(handler.getChampion(id, champData, version, locale));
} | [
"public",
"Future",
"<",
"Champion",
">",
"getChampion",
"(",
"int",
"id",
",",
"ChampData",
"champData",
",",
"String",
"version",
",",
"String",
"locale",
")",
"{",
"return",
"new",
"DummyFuture",
"<>",
"(",
"handler",
".",
"getChampion",
"(",
"id",
",",... | <p>
Get information about the specified champion
</p>
This method does not count towards the rate limit and is not affected by the throttle
@param locale Locale code for returned data
@param version Data dragon version for returned data
@param id The id of the champion
@param champData Additional information to retriev... | [
"<p",
">",
"Get",
"information",
"about",
"the",
"specified",
"champion",
"<",
"/",
"p",
">",
"This",
"method",
"does",
"not",
"count",
"towards",
"the",
"rate",
"limit",
"and",
"is",
"not",
"affected",
"by",
"the",
"throttle"
] | train | https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L439-L441 |
baidubce/bce-sdk-java | src/main/java/com/baidubce/http/BceHttpClient.java | BceHttpClient.createHttpClientConnectionManager | private HttpClientConnectionManager createHttpClientConnectionManager() {
ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory.getSocketFactory();
LayeredConnectionSocketFactory sslSocketFactory;
try {
sslSocketFactory = new SSLConnectionSocketFactory(SSLContext.getDe... | java | private HttpClientConnectionManager createHttpClientConnectionManager() {
ConnectionSocketFactory socketFactory = PlainConnectionSocketFactory.getSocketFactory();
LayeredConnectionSocketFactory sslSocketFactory;
try {
sslSocketFactory = new SSLConnectionSocketFactory(SSLContext.getDe... | [
"private",
"HttpClientConnectionManager",
"createHttpClientConnectionManager",
"(",
")",
"{",
"ConnectionSocketFactory",
"socketFactory",
"=",
"PlainConnectionSocketFactory",
".",
"getSocketFactory",
"(",
")",
";",
"LayeredConnectionSocketFactory",
"sslSocketFactory",
";",
"try",... | Create connection manager for http client.
@return The connection manager for http client. | [
"Create",
"connection",
"manager",
"for",
"http",
"client",
"."
] | train | https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/http/BceHttpClient.java#L342-L361 |
alkacon/opencms-core | src/org/opencms/gwt/CmsGwtServiceContext.java | CmsGwtServiceContext.getSerializationPolicyPath | protected String getSerializationPolicyPath(String moduleBaseURL, String strongName) {
// locate the serialization policy file in OpenCms
String modulePath = null;
try {
modulePath = new URL(moduleBaseURL).getPath();
} catch (MalformedURLException ex) {
// module... | java | protected String getSerializationPolicyPath(String moduleBaseURL, String strongName) {
// locate the serialization policy file in OpenCms
String modulePath = null;
try {
modulePath = new URL(moduleBaseURL).getPath();
} catch (MalformedURLException ex) {
// module... | [
"protected",
"String",
"getSerializationPolicyPath",
"(",
"String",
"moduleBaseURL",
",",
"String",
"strongName",
")",
"{",
"// locate the serialization policy file in OpenCms",
"String",
"modulePath",
"=",
"null",
";",
"try",
"{",
"modulePath",
"=",
"new",
"URL",
"(",
... | Finds the path of the serialization policy file.<p>
@param moduleBaseURL the GWT module's base url
@param strongName the strong name of the service
@return the serialization policy path | [
"Finds",
"the",
"path",
"of",
"the",
"serialization",
"policy",
"file",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsGwtServiceContext.java#L199-L215 |
samskivert/samskivert | src/main/java/com/samskivert/swing/util/SwingUtil.java | SwingUtil.applyToHierarchy | public static void applyToHierarchy (Component comp, int depth, ComponentOp op)
{
if (comp == null) {
return;
}
op.apply(comp);
if (comp instanceof Container && --depth >= 0) {
Container c = (Container) comp;
int ccount = c.getComponentCount();
... | java | public static void applyToHierarchy (Component comp, int depth, ComponentOp op)
{
if (comp == null) {
return;
}
op.apply(comp);
if (comp instanceof Container && --depth >= 0) {
Container c = (Container) comp;
int ccount = c.getComponentCount();
... | [
"public",
"static",
"void",
"applyToHierarchy",
"(",
"Component",
"comp",
",",
"int",
"depth",
",",
"ComponentOp",
"op",
")",
"{",
"if",
"(",
"comp",
"==",
"null",
")",
"{",
"return",
";",
"}",
"op",
".",
"apply",
"(",
"comp",
")",
";",
"if",
"(",
... | Apply the specified ComponentOp to the supplied component and then all its descendants, up
to the specified maximum depth. | [
"Apply",
"the",
"specified",
"ComponentOp",
"to",
"the",
"supplied",
"component",
"and",
"then",
"all",
"its",
"descendants",
"up",
"to",
"the",
"specified",
"maximum",
"depth",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/SwingUtil.java#L285-L299 |
requery/requery | requery/src/main/java/io/requery/sql/SchemaModifier.java | SchemaModifier.addColumn | public <T> void addColumn(Connection connection, Attribute<T, ?> attribute) {
addColumn(connection, attribute, true);
} | java | public <T> void addColumn(Connection connection, Attribute<T, ?> attribute) {
addColumn(connection, attribute, true);
} | [
"public",
"<",
"T",
">",
"void",
"addColumn",
"(",
"Connection",
"connection",
",",
"Attribute",
"<",
"T",
",",
"?",
">",
"attribute",
")",
"{",
"addColumn",
"(",
"connection",
",",
"attribute",
",",
"true",
")",
";",
"}"
] | Alters the attribute's table and add's the column representing the given {@link Attribute}.
@param connection to use
@param attribute being added
@param <T> parent type of the attribute | [
"Alters",
"the",
"attribute",
"s",
"table",
"and",
"add",
"s",
"the",
"column",
"representing",
"the",
"given",
"{",
"@link",
"Attribute",
"}",
"."
] | train | https://github.com/requery/requery/blob/3070590c2ef76bb7062570bf9df03cd482db024a/requery/src/main/java/io/requery/sql/SchemaModifier.java#L267-L269 |
jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PKeyArea.java | PKeyArea.compareKeys | public int compareKeys(int iAreaDesc, String strSeekSign, FieldTable table, KeyAreaInfo keyArea)
{
int iCompareValue = keyArea.compareKeys(iAreaDesc);
return iCompareValue;
} | java | public int compareKeys(int iAreaDesc, String strSeekSign, FieldTable table, KeyAreaInfo keyArea)
{
int iCompareValue = keyArea.compareKeys(iAreaDesc);
return iCompareValue;
} | [
"public",
"int",
"compareKeys",
"(",
"int",
"iAreaDesc",
",",
"String",
"strSeekSign",
",",
"FieldTable",
"table",
",",
"KeyAreaInfo",
"keyArea",
")",
"{",
"int",
"iCompareValue",
"=",
"keyArea",
".",
"compareKeys",
"(",
"iAreaDesc",
")",
";",
"return",
"iComp... | Compare these two keys and return the compare result.
@param areaDesc The area that the key to compare is in.
@param strSeekSign The seek sign.
@param table The table.
@param keyArea The table's key area.
@return The compare result (-1, 0, or 1). | [
"Compare",
"these",
"two",
"keys",
"and",
"return",
"the",
"compare",
"result",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PKeyArea.java#L80-L84 |
looly/hutool | hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java | VelocityUtil.toWriter | public static void toWriter(VelocityEngine ve, String templateFileName, VelocityContext context, Writer writer) {
final Template template = ve.getTemplate(templateFileName);
merge(template, context, writer);
} | java | public static void toWriter(VelocityEngine ve, String templateFileName, VelocityContext context, Writer writer) {
final Template template = ve.getTemplate(templateFileName);
merge(template, context, writer);
} | [
"public",
"static",
"void",
"toWriter",
"(",
"VelocityEngine",
"ve",
",",
"String",
"templateFileName",
",",
"VelocityContext",
"context",
",",
"Writer",
"writer",
")",
"{",
"final",
"Template",
"template",
"=",
"ve",
".",
"getTemplate",
"(",
"templateFileName",
... | 生成内容写入流<br>
会自动关闭Writer
@param ve 引擎
@param templateFileName 模板文件名
@param context 上下文
@param writer 流 | [
"生成内容写入流<br",
">",
"会自动关闭Writer"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java#L186-L189 |
lessthanoptimal/BoofCV | main/boofcv-learning/src/main/java/boofcv/alg/bow/LearnSceneFromFiles.java | LearnSceneFromFiles.evaluate | protected Confusion evaluate( Map<String,List<String>> set ) {
ClassificationHistogram histogram = new ClassificationHistogram(scenes.size());
int total = 0;
for (int i = 0; i < scenes.size(); i++) {
total += set.get(scenes.get(i)).size();
}
System.out.println("total images "+total);
for (int i = 0; i ... | java | protected Confusion evaluate( Map<String,List<String>> set ) {
ClassificationHistogram histogram = new ClassificationHistogram(scenes.size());
int total = 0;
for (int i = 0; i < scenes.size(); i++) {
total += set.get(scenes.get(i)).size();
}
System.out.println("total images "+total);
for (int i = 0; i ... | [
"protected",
"Confusion",
"evaluate",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"set",
")",
"{",
"ClassificationHistogram",
"histogram",
"=",
"new",
"ClassificationHistogram",
"(",
"scenes",
".",
"size",
"(",
")",
")",
";",
"int",
"t... | Given a set of images with known classification, predict which scene each one belongs in and compute
a confusion matrix for the results.
@param set Set of classified images
@return Confusion matrix | [
"Given",
"a",
"set",
"of",
"images",
"with",
"known",
"classification",
"predict",
"which",
"scene",
"each",
"one",
"belongs",
"in",
"and",
"compute",
"a",
"confusion",
"matrix",
"for",
"the",
"results",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-learning/src/main/java/boofcv/alg/bow/LearnSceneFromFiles.java#L65-L86 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/OneStepIterator.java | OneStepIterator.setRoot | public void setRoot(int context, Object environment)
{
super.setRoot(context, environment);
if(m_axis > -1)
m_iterator = m_cdtm.getAxisIterator(m_axis);
m_iterator.setStartNode(m_context);
} | java | public void setRoot(int context, Object environment)
{
super.setRoot(context, environment);
if(m_axis > -1)
m_iterator = m_cdtm.getAxisIterator(m_axis);
m_iterator.setStartNode(m_context);
} | [
"public",
"void",
"setRoot",
"(",
"int",
"context",
",",
"Object",
"environment",
")",
"{",
"super",
".",
"setRoot",
"(",
"context",
",",
"environment",
")",
";",
"if",
"(",
"m_axis",
">",
"-",
"1",
")",
"m_iterator",
"=",
"m_cdtm",
".",
"getAxisIterator... | Initialize the context values for this expression
after it is cloned.
@param context The XPath runtime context for this
transformation. | [
"Initialize",
"the",
"context",
"values",
"for",
"this",
"expression",
"after",
"it",
"is",
"cloned",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/OneStepIterator.java#L93-L99 |
undertow-io/undertow | core/src/main/java/io/undertow/util/ETagUtils.java | ETagUtils.handleIfNoneMatch | public static boolean handleIfNoneMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) {
return handleIfNoneMatch(exchange.getRequestHeaders().getFirst(Headers.IF_NONE_MATCH), etags, allowWeak);
} | java | public static boolean handleIfNoneMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) {
return handleIfNoneMatch(exchange.getRequestHeaders().getFirst(Headers.IF_NONE_MATCH), etags, allowWeak);
} | [
"public",
"static",
"boolean",
"handleIfNoneMatch",
"(",
"final",
"HttpServerExchange",
"exchange",
",",
"final",
"List",
"<",
"ETag",
">",
"etags",
",",
"boolean",
"allowWeak",
")",
"{",
"return",
"handleIfNoneMatch",
"(",
"exchange",
".",
"getRequestHeaders",
"(... | Handles the if-none-match header. returns true if the request should proceed, false otherwise
@param exchange the exchange
@param etags The etags
@return | [
"Handles",
"the",
"if",
"-",
"none",
"-",
"match",
"header",
".",
"returns",
"true",
"if",
"the",
"request",
"should",
"proceed",
"false",
"otherwise"
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/ETagUtils.java#L122-L124 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/query/Criteria.java | Criteria.addNotIn | public void addNotIn(String attribute, Query subQuery)
{
// PAW
// addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getAlias()));
addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getUserAlias(attribute)));
} | java | public void addNotIn(String attribute, Query subQuery)
{
// PAW
// addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getAlias()));
addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getUserAlias(attribute)));
} | [
"public",
"void",
"addNotIn",
"(",
"String",
"attribute",
",",
"Query",
"subQuery",
")",
"{",
"// PAW\r",
"// addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getAlias()));\r",
"addSelectionCriteria",
"(",
"ValueCriteria",
".",
"buildNotInCriteria",
"(",... | NOT IN Criteria with SubQuery
@param attribute The field name to be used
@param subQuery The subQuery | [
"NOT",
"IN",
"Criteria",
"with",
"SubQuery"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L853-L858 |
TheHortonMachine/hortonmachine | gears/src/main/java/oms3/io/DataIO.java | DataIO.getDate | public static Date getDate(CSProperties p, String key) throws ParseException {
String val = p.get(key).toString();
if (val == null) {
throw new IllegalArgumentException(key);
}
String f = p.getInfo(key).get(KEY_FORMAT);
DateFormat fmt = new SimpleDateFormat(f == null ... | java | public static Date getDate(CSProperties p, String key) throws ParseException {
String val = p.get(key).toString();
if (val == null) {
throw new IllegalArgumentException(key);
}
String f = p.getInfo(key).get(KEY_FORMAT);
DateFormat fmt = new SimpleDateFormat(f == null ... | [
"public",
"static",
"Date",
"getDate",
"(",
"CSProperties",
"p",
",",
"String",
"key",
")",
"throws",
"ParseException",
"{",
"String",
"val",
"=",
"p",
".",
"get",
"(",
"key",
")",
".",
"toString",
"(",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
... | Get a value as date.
@param p
@param key
@return a property as Date
@throws java.text.ParseException | [
"Get",
"a",
"value",
"as",
"date",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/io/DataIO.java#L961-L969 |
xhsun/gw2wrapper | src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java | SynchronousRequest.getAllEmblemIDs | public List<Integer> getAllEmblemIDs(Emblem.Type type) throws GuildWars2Exception {
try {
Response<List<Integer>> response = gw2API.getAllEmblemIDs(type.name()).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
t... | java | public List<Integer> getAllEmblemIDs(Emblem.Type type) throws GuildWars2Exception {
try {
Response<List<Integer>> response = gw2API.getAllEmblemIDs(type.name()).execute();
if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
return response.body();
} catch (IOException e) {
t... | [
"public",
"List",
"<",
"Integer",
">",
"getAllEmblemIDs",
"(",
"Emblem",
".",
"Type",
"type",
")",
"throws",
"GuildWars2Exception",
"{",
"try",
"{",
"Response",
"<",
"List",
"<",
"Integer",
">>",
"response",
"=",
"gw2API",
".",
"getAllEmblemIDs",
"(",
"type"... | For more info on emblem API go <a href="https://wiki.guildwars2.com/wiki/API:2/emblem">here</a><br/>
@param type foregrounds/backgrounds
@return list of emblem id(s)
@throws GuildWars2Exception see {@link ErrorCode} for detail
@see Emblem Emblem info | [
"For",
"more",
"info",
"on",
"emblem",
"API",
"go",
"<a",
"href",
"=",
"https",
":",
"//",
"wiki",
".",
"guildwars2",
".",
"com",
"/",
"wiki",
"/",
"API",
":",
"2",
"/",
"emblem",
">",
"here<",
"/",
"a",
">",
"<br",
"/",
">"
] | train | https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L1764-L1772 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java | ISPNIndexChangesFilter.createIndexInfos | private IndexInfos createIndexInfos(Boolean system, IndexerIoModeHandler modeHandler, QueryHandlerEntry config,
QueryHandler handler) throws RepositoryConfigurationException
{
try
{
// read RSYNC configuration
RSyncConfiguration rSyncConfiguration = new RSyncConfiguration(config);... | java | private IndexInfos createIndexInfos(Boolean system, IndexerIoModeHandler modeHandler, QueryHandlerEntry config,
QueryHandler handler) throws RepositoryConfigurationException
{
try
{
// read RSYNC configuration
RSyncConfiguration rSyncConfiguration = new RSyncConfiguration(config);... | [
"private",
"IndexInfos",
"createIndexInfos",
"(",
"Boolean",
"system",
",",
"IndexerIoModeHandler",
"modeHandler",
",",
"QueryHandlerEntry",
"config",
",",
"QueryHandler",
"handler",
")",
"throws",
"RepositoryConfigurationException",
"{",
"try",
"{",
"// read RSYNC configur... | Factory method for creating corresponding IndexInfos class. RSyncIndexInfos created if RSync configured
and ISPNIndexInfos otherwise
@param system
@param modeHandler
@param config
@param handler
@return
@throws RepositoryConfigurationException | [
"Factory",
"method",
"for",
"creating",
"corresponding",
"IndexInfos",
"class",
".",
"RSyncIndexInfos",
"created",
"if",
"RSync",
"configured",
"and",
"ISPNIndexInfos",
"otherwise"
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java#L125-L148 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_easyHunting_serviceName_records_id_GET | public OvhOvhPabxRecord billingAccount_easyHunting_serviceName_records_id_GET(String billingAccount, String serviceName, Long id) throws IOException {
String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/records/{id}";
StringBuilder sb = path(qPath, billingAccount, serviceName, id);
String resp =... | java | public OvhOvhPabxRecord billingAccount_easyHunting_serviceName_records_id_GET(String billingAccount, String serviceName, Long id) throws IOException {
String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/records/{id}";
StringBuilder sb = path(qPath, billingAccount, serviceName, id);
String resp =... | [
"public",
"OvhOvhPabxRecord",
"billingAccount_easyHunting_serviceName_records_id_GET",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/easyHunting/{servic... | Get this object properties
REST: GET /telephony/{billingAccount}/easyHunting/{serviceName}/records/{id}
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param id [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#L2256-L2261 |
haraldk/TwelveMonkeys | sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java | DebugUtil.printTimeDifference | public static void printTimeDifference(final Calendar pStartCalendar, final PrintStream pPrintStream) {
GregorianCalendar endCalendar = new GregorianCalendar();
printTimeDifference(pStartCalendar, endCalendar, pPrintStream);
} | java | public static void printTimeDifference(final Calendar pStartCalendar, final PrintStream pPrintStream) {
GregorianCalendar endCalendar = new GregorianCalendar();
printTimeDifference(pStartCalendar, endCalendar, pPrintStream);
} | [
"public",
"static",
"void",
"printTimeDifference",
"(",
"final",
"Calendar",
"pStartCalendar",
",",
"final",
"PrintStream",
"pPrintStream",
")",
"{",
"GregorianCalendar",
"endCalendar",
"=",
"new",
"GregorianCalendar",
"(",
")",
";",
"printTimeDifference",
"(",
"pStar... | Prints out the difference between the given calendar time and present time.
<p>
@param pStartCalendar the {@code java.util.Calendar} to compare with present time.
@param pPrintStream the {@code java.io.PrintStream} for flushing the results.
@see <a href="http://java.sun.com/products/jdk/1.3/docs/api/java/util/Calendar.... | [
"Prints",
"out",
"the",
"difference",
"between",
"the",
"given",
"calendar",
"time",
"and",
"present",
"time",
".",
"<p",
">"
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L1057-L1062 |
apereo/cas | support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationRequestBuilder.java | WsFederationRequestBuilder.getRelativeRedirectUrlFor | @SneakyThrows
private static String getRelativeRedirectUrlFor(final WsFederationConfiguration config, final Service service, final HttpServletRequest request) {
val builder = new URIBuilder(WsFederationNavigationController.ENDPOINT_REDIRECT);
builder.addParameter(WsFederationNavigationController.PAR... | java | @SneakyThrows
private static String getRelativeRedirectUrlFor(final WsFederationConfiguration config, final Service service, final HttpServletRequest request) {
val builder = new URIBuilder(WsFederationNavigationController.ENDPOINT_REDIRECT);
builder.addParameter(WsFederationNavigationController.PAR... | [
"@",
"SneakyThrows",
"private",
"static",
"String",
"getRelativeRedirectUrlFor",
"(",
"final",
"WsFederationConfiguration",
"config",
",",
"final",
"Service",
"service",
",",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"builder",
"=",
"new",
"URIBuilder... | Gets redirect url for.
@param config the config
@param service the service
@param request the request
@return the redirect url for | [
"Gets",
"redirect",
"url",
"for",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationRequestBuilder.java#L48-L60 |
weld/core | impl/src/main/java/org/jboss/weld/bean/proxy/InterceptedSubclassFactory.java | InterceptedSubclassFactory.createInterceptorBody | protected void createInterceptorBody(ClassMethod method, MethodInformation methodInfo, boolean delegateToSuper, ClassMethod staticConstructor) {
invokeMethodHandler(method, methodInfo, true, DEFAULT_METHOD_RESOLVER, delegateToSuper, staticConstructor);
} | java | protected void createInterceptorBody(ClassMethod method, MethodInformation methodInfo, boolean delegateToSuper, ClassMethod staticConstructor) {
invokeMethodHandler(method, methodInfo, true, DEFAULT_METHOD_RESOLVER, delegateToSuper, staticConstructor);
} | [
"protected",
"void",
"createInterceptorBody",
"(",
"ClassMethod",
"method",
",",
"MethodInformation",
"methodInfo",
",",
"boolean",
"delegateToSuper",
",",
"ClassMethod",
"staticConstructor",
")",
"{",
"invokeMethodHandler",
"(",
"method",
",",
"methodInfo",
",",
"true"... | Creates the given method on the proxy class where the implementation
forwards the call directly to the method handler.
<p/>
the generated bytecode is equivalent to:
<p/>
return (RetType) methodHandler.invoke(this,param1,param2);
@param methodInfo any JLR method
@param delegateToSuper
@return the method byte code | [
"Creates",
"the",
"given",
"method",
"on",
"the",
"proxy",
"class",
"where",
"the",
"implementation",
"forwards",
"the",
"call",
"directly",
"to",
"the",
"method",
"handler",
".",
"<p",
"/",
">",
"the",
"generated",
"bytecode",
"is",
"equivalent",
"to",
":",... | train | https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/bean/proxy/InterceptedSubclassFactory.java#L335-L338 |
VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.rateLimitedLog | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | java | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | [
"@",
"Override",
"public",
"void",
"rateLimitedLog",
"(",
"Level",
"level",
",",
"Throwable",
"cause",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"rateLimitedLog",
"(",
"LOG_SUPPRESSION_INTERVAL_SECONDS",
",",
"level",
",",... | This rate limited log must be used by the importers to log messages that may
happen frequently and must be rate limited.
@param level the log level
@param cause cause exception, if there is one
@param format error message format
@param args arguments to format the error message | [
"This",
"rate",
"limited",
"log",
"must",
"be",
"used",
"by",
"the",
"importers",
"to",
"log",
"messages",
"that",
"may",
"happen",
"frequently",
"and",
"must",
"be",
"rate",
"limited",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L157-L161 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel.java | dnspolicylabel.get | public static dnspolicylabel get(nitro_service service, String labelname) throws Exception{
dnspolicylabel obj = new dnspolicylabel();
obj.set_labelname(labelname);
dnspolicylabel response = (dnspolicylabel) obj.get_resource(service);
return response;
} | java | public static dnspolicylabel get(nitro_service service, String labelname) throws Exception{
dnspolicylabel obj = new dnspolicylabel();
obj.set_labelname(labelname);
dnspolicylabel response = (dnspolicylabel) obj.get_resource(service);
return response;
} | [
"public",
"static",
"dnspolicylabel",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"labelname",
")",
"throws",
"Exception",
"{",
"dnspolicylabel",
"obj",
"=",
"new",
"dnspolicylabel",
"(",
")",
";",
"obj",
".",
"set_labelname",
"(",
"labelname",
")",
... | Use this API to fetch dnspolicylabel resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"dnspolicylabel",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel.java#L335-L340 |
wisdom-framework/wisdom | core/wisdom-api/src/main/java/org/wisdom/api/http/Result.java | Result.addToFlash | public Result addToFlash(String key, String value) {
current(true).flash().put(key, value);
return this;
} | java | public Result addToFlash(String key, String value) {
current(true).flash().put(key, value);
return this;
} | [
"public",
"Result",
"addToFlash",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"current",
"(",
"true",
")",
".",
"flash",
"(",
")",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Adds the given key-value pair to the current flash. This method requires a current HTTP context. If none, a
{@link java.lang.IllegalStateException} is thrown.
@param key the key
@param value the value
@return the current result | [
"Adds",
"the",
"given",
"key",
"-",
"value",
"pair",
"to",
"the",
"current",
"flash",
".",
"This",
"method",
"requires",
"a",
"current",
"HTTP",
"context",
".",
"If",
"none",
"a",
"{",
"@link",
"java",
".",
"lang",
".",
"IllegalStateException",
"}",
"is"... | train | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-api/src/main/java/org/wisdom/api/http/Result.java#L565-L568 |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.incidents_id_GET | public OvhIncident incidents_id_GET(Long id) throws IOException {
String qPath = "/xdsl/incidents/{id}";
StringBuilder sb = path(qPath, id);
String resp = execN(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhIncident.class);
} | java | public OvhIncident incidents_id_GET(Long id) throws IOException {
String qPath = "/xdsl/incidents/{id}";
StringBuilder sb = path(qPath, id);
String resp = execN(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhIncident.class);
} | [
"public",
"OvhIncident",
"incidents_id_GET",
"(",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/incidents/{id}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"id",
")",
";",
"String",
"resp",
"=",
"execN",
... | Get this object properties
REST: GET /xdsl/incidents/{id}
@param id [required] ID of the incident | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1992-L1997 |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/ProvisionerImpl.java | ProvisionerImpl.initialProvisioning | @Override
public void initialProvisioning(BundleContext systemBundleCtx, BootstrapConfig config) throws InvalidBundleContextException {
BundleInstallStatus installStatus;
BundleStartStatus startStatus;
// Obtain/initialize provisioner-related services and resources
getServices(syste... | java | @Override
public void initialProvisioning(BundleContext systemBundleCtx, BootstrapConfig config) throws InvalidBundleContextException {
BundleInstallStatus installStatus;
BundleStartStatus startStatus;
// Obtain/initialize provisioner-related services and resources
getServices(syste... | [
"@",
"Override",
"public",
"void",
"initialProvisioning",
"(",
"BundleContext",
"systemBundleCtx",
",",
"BootstrapConfig",
"config",
")",
"throws",
"InvalidBundleContextException",
"{",
"BundleInstallStatus",
"installStatus",
";",
"BundleStartStatus",
"startStatus",
";",
"/... | Install the platform bundles, and check the returned install status for
exceptions, and issue appropriate diagnostics. Specifically, look for
pre-install exceptions, install
exceptions, or flat-out missing bundles (things listed in the bundle list
that didn't match any of the jars in the install dir).
@param provision... | [
"Install",
"the",
"platform",
"bundles",
"and",
"check",
"the",
"returned",
"install",
"status",
"for",
"exceptions",
"and",
"issue",
"appropriate",
"diagnostics",
".",
"Specifically",
"look",
"for",
"pre",
"-",
"install",
"exceptions",
"install",
"exceptions",
"o... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/ProvisionerImpl.java#L74-L110 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkInterfaceIPConfigurationsInner.java | NetworkInterfaceIPConfigurationsInner.listAsync | public Observable<Page<NetworkInterfaceIPConfigurationInner>> listAsync(final String resourceGroupName, final String networkInterfaceName) {
return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Page<N... | java | public Observable<Page<NetworkInterfaceIPConfigurationInner>> listAsync(final String resourceGroupName, final String networkInterfaceName) {
return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Page<N... | [
"public",
"Observable",
"<",
"Page",
"<",
"NetworkInterfaceIPConfigurationInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"networkInterfaceName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupNam... | Get all ip configurations in a network interface.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<NetworkInterfaceIPConfigurationI... | [
"Get",
"all",
"ip",
"configurations",
"in",
"a",
"network",
"interface",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkInterfaceIPConfigurationsInner.java#L123-L131 |
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.listEntitiesAsync | public Observable<List<EntityExtractor>> listEntitiesAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) {
return listEntitiesWithServiceResponseAsync(appId, versionId, listEntitiesOptionalParameter).map(new Func1<ServiceResponse<List<EntityExtractor>>, List<EntityEx... | java | public Observable<List<EntityExtractor>> listEntitiesAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) {
return listEntitiesWithServiceResponseAsync(appId, versionId, listEntitiesOptionalParameter).map(new Func1<ServiceResponse<List<EntityExtractor>>, List<EntityEx... | [
"public",
"Observable",
"<",
"List",
"<",
"EntityExtractor",
">",
">",
"listEntitiesAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"ListEntitiesOptionalParameter",
"listEntitiesOptionalParameter",
")",
"{",
"return",
"listEntitiesWithServiceResponseAsync",
... | Gets information about the entity models.
@param appId The application ID.
@param versionId The version ID.
@param listEntitiesOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observ... | [
"Gets",
"information",
"about",
"the",
"entity",
"models",
"."
] | 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#L1130-L1137 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.