repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
contentful/contentful.java | src/main/java/com/contentful/java/cda/rich/RichTextFactory.java | RichTextFactory.resolveRichDocument | private static void resolveRichDocument(CDAEntry entry, CDAField field) {
"""
Resolve all children of the top most document block.
@param entry the entry to contain the field to be walked
@param field the id of the field to be walked.
"""
final Map<String, Object> rawValue = (Map<String, Object>) entry... | java | private static void resolveRichDocument(CDAEntry entry, CDAField field) {
final Map<String, Object> rawValue = (Map<String, Object>) entry.rawFields().get(field.id());
if (rawValue == null) {
return;
}
for (final String locale : rawValue.keySet()) {
final Object raw = rawValue.get(locale);
... | [
"private",
"static",
"void",
"resolveRichDocument",
"(",
"CDAEntry",
"entry",
",",
"CDAField",
"field",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"rawValue",
"=",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
")",
"entry",
".",
"rawFi... | Resolve all children of the top most document block.
@param entry the entry to contain the field to be walked
@param field the id of the field to be walked. | [
"Resolve",
"all",
"children",
"of",
"the",
"top",
"most",
"document",
"block",
"."
] | train | https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/rich/RichTextFactory.java#L285-L301 |
CleverTap/clevertap-android-sdk | clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java | CleverTapAPI.getDefaultInstance | @SuppressWarnings("WeakerAccess")
public static @Nullable CleverTapAPI getDefaultInstance(Context context) {
"""
Returns the default shared instance of the CleverTap SDK.
@param context The Android context
@return The {@link CleverTapAPI} object
"""
// For Google Play Store/Android Studio track... | java | @SuppressWarnings("WeakerAccess")
public static @Nullable CleverTapAPI getDefaultInstance(Context context) {
// For Google Play Store/Android Studio tracking
sdkVersion = BuildConfig.SDK_VERSION_STRING;
if (defaultConfig == null) {
ManifestInfo manifest = ManifestInfo.getInstance... | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"public",
"static",
"@",
"Nullable",
"CleverTapAPI",
"getDefaultInstance",
"(",
"Context",
"context",
")",
"{",
"// For Google Play Store/Android Studio tracking",
"sdkVersion",
"=",
"BuildConfig",
".",
"SDK_VERSION_STR... | Returns the default shared instance of the CleverTap SDK.
@param context The Android context
@return The {@link CleverTapAPI} object | [
"Returns",
"the",
"default",
"shared",
"instance",
"of",
"the",
"CleverTap",
"SDK",
"."
] | train | https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L485-L505 |
facebookarchive/hadoop-20 | src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java | DFSAdmin.metaSave | public int metaSave(String[] argv, int idx) throws IOException {
"""
Dumps DFS data structures into specified file.
Usage: java DFSAdmin -metasave filename
@param argv List of of command line parameters.
@param idx The index of the command that is being processed.
@exception IOException if an error accoured wi... | java | public int metaSave(String[] argv, int idx) throws IOException {
String pathname = argv[idx];
DistributedFileSystem dfs = getDFS();
if (dfs == null) {
System.out.println("FileSystem is " + getFS().getUri());
return -1;
}
dfs.metaSave(pathname);
System.out.println("Created file " + pa... | [
"public",
"int",
"metaSave",
"(",
"String",
"[",
"]",
"argv",
",",
"int",
"idx",
")",
"throws",
"IOException",
"{",
"String",
"pathname",
"=",
"argv",
"[",
"idx",
"]",
";",
"DistributedFileSystem",
"dfs",
"=",
"getDFS",
"(",
")",
";",
"if",
"(",
"dfs",... | Dumps DFS data structures into specified file.
Usage: java DFSAdmin -metasave filename
@param argv List of of command line parameters.
@param idx The index of the command that is being processed.
@exception IOException if an error accoured wile accessing
the file or path. | [
"Dumps",
"DFS",
"data",
"structures",
"into",
"specified",
"file",
".",
"Usage",
":",
"java",
"DFSAdmin",
"-",
"metasave",
"filename"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L774-L785 |
foundation-runtime/service-directory | 2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/query/ServiceInstanceQuery.java | ServiceInstanceQuery.getEqualQueryCriterion | public ServiceInstanceQuery getEqualQueryCriterion(String key, String value) {
"""
Get a metadata value equal QueryCriterion.
Add a QueryCriterion to check ServiceInstance has metadata value
equal to target.
@param key
the metadata key.
@param value
the metadata value should equal to.
@return
the Servi... | java | public ServiceInstanceQuery getEqualQueryCriterion(String key, String value){
QueryCriterion c = new EqualQueryCriterion(key, value);
addQueryCriterion(c);
return this;
} | [
"public",
"ServiceInstanceQuery",
"getEqualQueryCriterion",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"QueryCriterion",
"c",
"=",
"new",
"EqualQueryCriterion",
"(",
"key",
",",
"value",
")",
";",
"addQueryCriterion",
"(",
"c",
")",
";",
"return",
... | Get a metadata value equal QueryCriterion.
Add a QueryCriterion to check ServiceInstance has metadata value
equal to target.
@param key
the metadata key.
@param value
the metadata value should equal to.
@return
the ServiceInstanceQuery. | [
"Get",
"a",
"metadata",
"value",
"equal",
"QueryCriterion",
"."
] | train | https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/query/ServiceInstanceQuery.java#L61-L65 |
NessComputing/components-ness-jdbi | src/main/java/com/nesscomputing/jdbi/JdbiMappers.java | JdbiMappers.getDateTime | public static DateTime getDateTime(final ResultSet rs, final String columnName) throws SQLException {
"""
Returns a DateTime object representing the date or null if the input is null.
"""
final Timestamp ts = rs.getTimestamp(columnName);
return (ts == null) ? null : new DateTime(ts);
} | java | public static DateTime getDateTime(final ResultSet rs, final String columnName) throws SQLException
{
final Timestamp ts = rs.getTimestamp(columnName);
return (ts == null) ? null : new DateTime(ts);
} | [
"public",
"static",
"DateTime",
"getDateTime",
"(",
"final",
"ResultSet",
"rs",
",",
"final",
"String",
"columnName",
")",
"throws",
"SQLException",
"{",
"final",
"Timestamp",
"ts",
"=",
"rs",
".",
"getTimestamp",
"(",
"columnName",
")",
";",
"return",
"(",
... | Returns a DateTime object representing the date or null if the input is null. | [
"Returns",
"a",
"DateTime",
"object",
"representing",
"the",
"date",
"or",
"null",
"if",
"the",
"input",
"is",
"null",
"."
] | train | https://github.com/NessComputing/components-ness-jdbi/blob/d446217b6f29b5409e55c5e72172cf0dbeacfec3/src/main/java/com/nesscomputing/jdbi/JdbiMappers.java#L73-L78 |
jankotek/mapdb | src/main/java/org/mapdb/io/DataIO.java | DataIO.packLong | static public void packLong(DataOutput out, long value) throws IOException {
"""
Pack long into output.
It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
@param out DataOutput to put value into
@param value to be serialized, must be non-negative
@throws java.io.IOException in... | java | static public void packLong(DataOutput out, long value) throws IOException {
//$DELAY$
int shift = 63-Long.numberOfLeadingZeros(value);
shift -= shift%7; // round down to nearest multiple of 7
while(shift!=0){
out.writeByte((byte) ((value>>>shift) & 0x7F) );
//$DE... | [
"static",
"public",
"void",
"packLong",
"(",
"DataOutput",
"out",
",",
"long",
"value",
")",
"throws",
"IOException",
"{",
"//$DELAY$",
"int",
"shift",
"=",
"63",
"-",
"Long",
".",
"numberOfLeadingZeros",
"(",
"value",
")",
";",
"shift",
"-=",
"shift",
"%"... | Pack long into output.
It will occupy 1-10 bytes depending on value (lower values occupy smaller space)
@param out DataOutput to put value into
@param value to be serialized, must be non-negative
@throws java.io.IOException in case of IO error | [
"Pack",
"long",
"into",
"output",
".",
"It",
"will",
"occupy",
"1",
"-",
"10",
"bytes",
"depending",
"on",
"value",
"(",
"lower",
"values",
"occupy",
"smaller",
"space",
")"
] | train | https://github.com/jankotek/mapdb/blob/dfd873b2b9cc4e299228839c100adf93a98f1903/src/main/java/org/mapdb/io/DataIO.java#L111-L121 |
mfornos/humanize | humanize-slim/src/main/java/humanize/Humanize.java | Humanize.naturalTime | @Expose
public static String naturalTime(final Date duration, final Locale locale) {
"""
Same as {@link #naturalTime(Date)} for the specified locale.
@param duration
The duration
@param locale
The locale
@return String representing the relative date
"""
return naturalTime(new Date(), duratio... | java | @Expose
public static String naturalTime(final Date duration, final Locale locale)
{
return naturalTime(new Date(), duration, locale);
} | [
"@",
"Expose",
"public",
"static",
"String",
"naturalTime",
"(",
"final",
"Date",
"duration",
",",
"final",
"Locale",
"locale",
")",
"{",
"return",
"naturalTime",
"(",
"new",
"Date",
"(",
")",
",",
"duration",
",",
"locale",
")",
";",
"}"
] | Same as {@link #naturalTime(Date)} for the specified locale.
@param duration
The duration
@param locale
The locale
@return String representing the relative date | [
"Same",
"as",
"{",
"@link",
"#naturalTime",
"(",
"Date",
")",
"}",
"for",
"the",
"specified",
"locale",
"."
] | train | https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L1666-L1670 |
Karumi/Dexter | dexter/src/main/java/com/karumi/dexter/DexterInstance.java | DexterInstance.checkSelfPermission | private int checkSelfPermission(Activity activity, String permission) {
"""
/*
Workaround for RuntimeException of Parcel#readException.
For additional details:
https://github.com/Karumi/Dexter/issues/86
"""
try {
return androidPermissionService.checkSelfPermission(activity, permission);
} ca... | java | private int checkSelfPermission(Activity activity, String permission) {
try {
return androidPermissionService.checkSelfPermission(activity, permission);
} catch (RuntimeException ignored) {
return PackageManager.PERMISSION_DENIED;
}
} | [
"private",
"int",
"checkSelfPermission",
"(",
"Activity",
"activity",
",",
"String",
"permission",
")",
"{",
"try",
"{",
"return",
"androidPermissionService",
".",
"checkSelfPermission",
"(",
"activity",
",",
"permission",
")",
";",
"}",
"catch",
"(",
"RuntimeExce... | /*
Workaround for RuntimeException of Parcel#readException.
For additional details:
https://github.com/Karumi/Dexter/issues/86 | [
"/",
"*",
"Workaround",
"for",
"RuntimeException",
"of",
"Parcel#readException",
"."
] | train | https://github.com/Karumi/Dexter/blob/11cfa35a2eaa51f01f6678adb69bed0382a867e7/dexter/src/main/java/com/karumi/dexter/DexterInstance.java#L203-L209 |
groovy/groovy-core | subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java | Sql.eachRow | public void eachRow(String sql, Map params, Closure metaClosure, Closure rowClosure) throws SQLException {
"""
A variant of {@link #eachRow(String, java.util.List, groovy.lang.Closure, groovy.lang.Closure)}
useful when providing the named parameters as a map.
@param sql the sql statement
@param params... | java | public void eachRow(String sql, Map params, Closure metaClosure, Closure rowClosure) throws SQLException {
eachRow(sql, singletonList(params), metaClosure, rowClosure);
} | [
"public",
"void",
"eachRow",
"(",
"String",
"sql",
",",
"Map",
"params",
",",
"Closure",
"metaClosure",
",",
"Closure",
"rowClosure",
")",
"throws",
"SQLException",
"{",
"eachRow",
"(",
"sql",
",",
"singletonList",
"(",
"params",
")",
",",
"metaClosure",
","... | A variant of {@link #eachRow(String, java.util.List, groovy.lang.Closure, groovy.lang.Closure)}
useful when providing the named parameters as a map.
@param sql the sql statement
@param params a map of named parameters
@param metaClosure called for meta data (only once after sql execution)
@param rowClosur... | [
"A",
"variant",
"of",
"{",
"@link",
"#eachRow",
"(",
"String",
"java",
".",
"util",
".",
"List",
"groovy",
".",
"lang",
".",
"Closure",
"groovy",
".",
"lang",
".",
"Closure",
")",
"}",
"useful",
"when",
"providing",
"the",
"named",
"parameters",
"as",
... | train | https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L1351-L1353 |
jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/ThinTableModel.java | ThinTableModel.bumpTableSize | public void bumpTableSize(int iBumpIncrement, boolean bInsertRowsInModel) {
"""
The underlying table has increased in size, change the model to access these extra record(s).
Note: This is not implemented correctly.
@param iNewSize The new table size.
"""
int iRowCount = this.setRowCount(this.getRowCo... | java | public void bumpTableSize(int iBumpIncrement, boolean bInsertRowsInModel)
{
int iRowCount = this.setRowCount(this.getRowCount(false) + iBumpIncrement); // Theoretical EOF value for table scroller (Actual when known).
if (m_iLastRecord != RECORD_UNKNOWN)
m_iLastRecord = iRowCount... | [
"public",
"void",
"bumpTableSize",
"(",
"int",
"iBumpIncrement",
",",
"boolean",
"bInsertRowsInModel",
")",
"{",
"int",
"iRowCount",
"=",
"this",
".",
"setRowCount",
"(",
"this",
".",
"getRowCount",
"(",
"false",
")",
"+",
"iBumpIncrement",
")",
";",
"// Theor... | The underlying table has increased in size, change the model to access these extra record(s).
Note: This is not implemented correctly.
@param iNewSize The new table size. | [
"The",
"underlying",
"table",
"has",
"increased",
"in",
"size",
"change",
"the",
"model",
"to",
"access",
"these",
"extra",
"record",
"(",
"s",
")",
".",
"Note",
":",
"This",
"is",
"not",
"implemented",
"correctly",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/ThinTableModel.java#L780-L787 |
sahan/IckleBot | icklebot/src/main/java/com/lonepulse/icklebot/injector/IllegalContextException.java | IllegalContextException.createMessage | private static final String createMessage(Object illegalContext, Set<Class<?>> applicableContexts) {
"""
<p>Creates the message to be used in {@link #IllegalContextException(Object, Set)}.
@since 1.0.0
"""
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("The given context "... | java | private static final String createMessage(Object illegalContext, Set<Class<?>> applicableContexts) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("The given context ");
stringBuilder.append(illegalContext.getClass().getName());
stringBuilder.append(" is illegal");
if(applic... | [
"private",
"static",
"final",
"String",
"createMessage",
"(",
"Object",
"illegalContext",
",",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"applicableContexts",
")",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"stringBuilder",... | <p>Creates the message to be used in {@link #IllegalContextException(Object, Set)}.
@since 1.0.0 | [
"<p",
">",
"Creates",
"the",
"message",
"to",
"be",
"used",
"in",
"{",
"@link",
"#IllegalContextException",
"(",
"Object",
"Set",
")",
"}",
"."
] | train | https://github.com/sahan/IckleBot/blob/a19003ceb3ad7c7ee508dc23a8cb31b5676aa499/icklebot/src/main/java/com/lonepulse/icklebot/injector/IllegalContextException.java#L48-L70 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java | AbstractSequenceClassifier.classifyDocumentStdin | public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException {
"""
Classify stdin by documents seperated by 3 blank line
@param readerWriter
@return boolean reached end of IO
@throws IOException
"""
BufferedReader is = new BufferedReader(new InputStreamReader(S... | java | public boolean classifyDocumentStdin(DocumentReaderAndWriter<IN> readerWriter)
throws IOException
{
BufferedReader is = new BufferedReader(new InputStreamReader(System.in, flags.inputEncoding));
String line;
String text = "";
String eol = "\n";
String sentence = "<s>";
int blankLin... | [
"public",
"boolean",
"classifyDocumentStdin",
"(",
"DocumentReaderAndWriter",
"<",
"IN",
">",
"readerWriter",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"is",
"=",
"new",
"BufferedReader",
"(",
"new",
"InputStreamReader",
"(",
"System",
".",
"in",
",",
"... | Classify stdin by documents seperated by 3 blank line
@param readerWriter
@return boolean reached end of IO
@throws IOException | [
"Classify",
"stdin",
"by",
"documents",
"seperated",
"by",
"3",
"blank",
"line"
] | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L973-L1005 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/datavec/iterator/IteratorUtils.java | IteratorUtils.mapRRMDSI | public static JavaRDD<MultiDataSet> mapRRMDSI(JavaRDD<List<Writable>> rdd, RecordReaderMultiDataSetIterator iterator) {
"""
Apply a single reader {@link RecordReaderMultiDataSetIterator} to a {@code JavaRDD<List<Writable>>}.
<b>NOTE</b>: The RecordReaderMultiDataSetIterator <it>must</it> use {@link SparkSourceDum... | java | public static JavaRDD<MultiDataSet> mapRRMDSI(JavaRDD<List<Writable>> rdd, RecordReaderMultiDataSetIterator iterator){
checkIterator(iterator, 1, 0);
return mapRRMDSIRecords(rdd.map(new Function<List<Writable>,DataVecRecords>(){
@Override
public DataVecRecords call(List<Writable>... | [
"public",
"static",
"JavaRDD",
"<",
"MultiDataSet",
">",
"mapRRMDSI",
"(",
"JavaRDD",
"<",
"List",
"<",
"Writable",
">",
">",
"rdd",
",",
"RecordReaderMultiDataSetIterator",
"iterator",
")",
"{",
"checkIterator",
"(",
"iterator",
",",
"1",
",",
"0",
")",
";"... | Apply a single reader {@link RecordReaderMultiDataSetIterator} to a {@code JavaRDD<List<Writable>>}.
<b>NOTE</b>: The RecordReaderMultiDataSetIterator <it>must</it> use {@link SparkSourceDummyReader} in place of
"real" RecordReader instances
@param rdd RDD with writables
@param iterator RecordReaderMultiDataSetIt... | [
"Apply",
"a",
"single",
"reader",
"{",
"@link",
"RecordReaderMultiDataSetIterator",
"}",
"to",
"a",
"{",
"@code",
"JavaRDD<List<Writable",
">>",
"}",
".",
"<b",
">",
"NOTE<",
"/",
"b",
">",
":",
"The",
"RecordReaderMultiDataSetIterator",
"<it",
">",
"must<",
"... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/datavec/iterator/IteratorUtils.java#L48-L56 |
messagebird/java-rest-api | api/src/main/java/com/messagebird/MessageBirdClient.java | MessageBirdClient.updateContact | public Contact updateContact(final String id, ContactRequest contactRequest) throws UnauthorizedException, GeneralException {
"""
Updates an existing contact. You only need to supply the unique id that
was returned upon creation.
"""
if (id == null) {
throw new IllegalArgumentException("Co... | java | public Contact updateContact(final String id, ContactRequest contactRequest) throws UnauthorizedException, GeneralException {
if (id == null) {
throw new IllegalArgumentException("Contact ID must be specified.");
}
String request = CONTACTPATH + "/" + id;
return messageBirdSe... | [
"public",
"Contact",
"updateContact",
"(",
"final",
"String",
"id",
",",
"ContactRequest",
"contactRequest",
")",
"throws",
"UnauthorizedException",
",",
"GeneralException",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Updates an existing contact. You only need to supply the unique id that
was returned upon creation. | [
"Updates",
"an",
"existing",
"contact",
".",
"You",
"only",
"need",
"to",
"supply",
"the",
"unique",
"id",
"that",
"was",
"returned",
"upon",
"creation",
"."
] | train | https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L579-L585 |
perwendel/spark | src/main/java/spark/http/matching/Halt.java | Halt.modify | public static void modify(HttpServletResponse httpResponse, Body body, HaltException halt) {
"""
Modifies the HTTP response and body based on the provided HaltException.
@param httpResponse The HTTP servlet response
@param body The body content
@param halt The halt exception object
"""
... | java | public static void modify(HttpServletResponse httpResponse, Body body, HaltException halt) {
httpResponse.setStatus(halt.statusCode());
if (halt.body() != null) {
body.set(halt.body());
} else {
body.set("");
}
} | [
"public",
"static",
"void",
"modify",
"(",
"HttpServletResponse",
"httpResponse",
",",
"Body",
"body",
",",
"HaltException",
"halt",
")",
"{",
"httpResponse",
".",
"setStatus",
"(",
"halt",
".",
"statusCode",
"(",
")",
")",
";",
"if",
"(",
"halt",
".",
"bo... | Modifies the HTTP response and body based on the provided HaltException.
@param httpResponse The HTTP servlet response
@param body The body content
@param halt The halt exception object | [
"Modifies",
"the",
"HTTP",
"response",
"and",
"body",
"based",
"on",
"the",
"provided",
"HaltException",
"."
] | train | https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/http/matching/Halt.java#L35-L44 |
sagiegurari/fax4j | src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java | ProcessFaxClientSpi.executeProcess | protected ProcessOutput executeProcess(FaxJob faxJob,String command,FaxActionType faxActionType) {
"""
Executes the process and returns the output.
@param faxJob
The fax job object
@param command
The command to execute
@param faxActionType
The fax action type
@return The process output
"""
... | java | protected ProcessOutput executeProcess(FaxJob faxJob,String command,FaxActionType faxActionType)
{
if(command==null)
{
this.throwUnsupportedException();
}
//update command
String updatedCommand=command;
if(this.useWindowsCommandPrefix)
{
... | [
"protected",
"ProcessOutput",
"executeProcess",
"(",
"FaxJob",
"faxJob",
",",
"String",
"command",
",",
"FaxActionType",
"faxActionType",
")",
"{",
"if",
"(",
"command",
"==",
"null",
")",
"{",
"this",
".",
"throwUnsupportedException",
"(",
")",
";",
"}",
"//u... | Executes the process and returns the output.
@param faxJob
The fax job object
@param command
The command to execute
@param faxActionType
The fax action type
@return The process output | [
"Executes",
"the",
"process",
"and",
"returns",
"the",
"output",
"."
] | train | https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java#L467-L498 |
haifengl/smile | core/src/main/java/smile/association/TotalSupportTree.java | TotalSupportTree.getSupport | private int getSupport(int[] itemset, int index, Node node) {
"""
Returns the support value for the given item set if found in the T-tree
and 0 otherwise.
@param itemset the given item set.
@param index the current index in the given item set.
@param nodes the nodes of the current T-tree level.
@return the su... | java | private int getSupport(int[] itemset, int index, Node node) {
int item = order[itemset[index]];
Node child = node.children[item];
if (child != null) {
// If the index is 0, then this is the last element (i.e the
// input is a 1 itemset) and therefore item set found
... | [
"private",
"int",
"getSupport",
"(",
"int",
"[",
"]",
"itemset",
",",
"int",
"index",
",",
"Node",
"node",
")",
"{",
"int",
"item",
"=",
"order",
"[",
"itemset",
"[",
"index",
"]",
"]",
";",
"Node",
"child",
"=",
"node",
".",
"children",
"[",
"item... | Returns the support value for the given item set if found in the T-tree
and 0 otherwise.
@param itemset the given item set.
@param index the current index in the given item set.
@param nodes the nodes of the current T-tree level.
@return the support value (0 if not found) | [
"Returns",
"the",
"support",
"value",
"for",
"the",
"given",
"item",
"set",
"if",
"found",
"in",
"the",
"T",
"-",
"tree",
"and",
"0",
"otherwise",
"."
] | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/association/TotalSupportTree.java#L147-L163 |
IBM/ibm-cos-sdk-java | ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/TransferManager.java | TransferManager.uploadDirectory | public MultipleFileUpload uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory, boolean includeSubdirectories, ObjectMetadataProvider metadataProvider, ObjectTaggingProvider taggingProvider) {
"""
Uploads all files in the directory given to the bucket named, optionally
recursing for... | java | public MultipleFileUpload uploadDirectory(String bucketName, String virtualDirectoryKeyPrefix, File directory, boolean includeSubdirectories, ObjectMetadataProvider metadataProvider, ObjectTaggingProvider taggingProvider) {
if ( directory == null || !directory.exists() || !directory.isDirectory() ) {
... | [
"public",
"MultipleFileUpload",
"uploadDirectory",
"(",
"String",
"bucketName",
",",
"String",
"virtualDirectoryKeyPrefix",
",",
"File",
"directory",
",",
"boolean",
"includeSubdirectories",
",",
"ObjectMetadataProvider",
"metadataProvider",
",",
"ObjectTaggingProvider",
"tag... | Uploads all files in the directory given to the bucket named, optionally
recursing for all subdirectories.
<p>
S3 will overwrite any existing objects that happen to have the same key,
just as when uploading individual files, so use with caution.
</p>
<p>
If you are uploading <a href="http://aws.amazon.com/kms/">AWS
KMS... | [
"Uploads",
"all",
"files",
"in",
"the",
"directory",
"given",
"to",
"the",
"bucket",
"named",
"optionally",
"recursing",
"for",
"all",
"subdirectories",
".",
"<p",
">",
"S3",
"will",
"overwrite",
"any",
"existing",
"objects",
"that",
"happen",
"to",
"have",
... | train | https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/transfer/TransferManager.java#L1419-L1428 |
spring-projects/spring-flex | spring-flex-core/src/main/java/org/springframework/flex/core/io/AbstractAmfConversionServiceConfigProcessor.java | AbstractAmfConversionServiceConfigProcessor.registerAmfProxies | protected void registerAmfProxies(ConversionService conversionService, boolean useDirectFieldAccess) {
"""
Called during initialization, the default implementation configures and registers a {@link SpringPropertyProxy} instance
for each type returned by {@link AbstractAmfConversionServiceConfigProcessor#findTypes... | java | protected void registerAmfProxies(ConversionService conversionService, boolean useDirectFieldAccess) {
Set<Class<?>> typesToRegister = findTypesToRegister();
if (log.isInfoEnabled()) {
log.info("Types detected for AMF serialization support: "+typesToRegister.toString());
}
fo... | [
"protected",
"void",
"registerAmfProxies",
"(",
"ConversionService",
"conversionService",
",",
"boolean",
"useDirectFieldAccess",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"typesToRegister",
"=",
"findTypesToRegister",
"(",
")",
";",
"if",
"(",
"log",
"... | Called during initialization, the default implementation configures and registers a {@link SpringPropertyProxy} instance
for each type returned by {@link AbstractAmfConversionServiceConfigProcessor#findTypesToRegister() findTypesToRegister}.
@param conversionService the conversion service to be used for property conver... | [
"Called",
"during",
"initialization",
"the",
"default",
"implementation",
"configures",
"and",
"registers",
"a",
"{"
] | train | https://github.com/spring-projects/spring-flex/blob/85f2bff300d74e2d77d565f97a09d12d18e19adc/spring-flex-core/src/main/java/org/springframework/flex/core/io/AbstractAmfConversionServiceConfigProcessor.java#L109-L117 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/cluster/clusterinstance_stats.java | clusterinstance_stats.get | public static clusterinstance_stats get(nitro_service service, Long clid) throws Exception {
"""
Use this API to fetch statistics of clusterinstance_stats resource of given name .
"""
clusterinstance_stats obj = new clusterinstance_stats();
obj.set_clid(clid);
clusterinstance_stats response = (clusterins... | java | public static clusterinstance_stats get(nitro_service service, Long clid) throws Exception{
clusterinstance_stats obj = new clusterinstance_stats();
obj.set_clid(clid);
clusterinstance_stats response = (clusterinstance_stats) obj.stat_resource(service);
return response;
} | [
"public",
"static",
"clusterinstance_stats",
"get",
"(",
"nitro_service",
"service",
",",
"Long",
"clid",
")",
"throws",
"Exception",
"{",
"clusterinstance_stats",
"obj",
"=",
"new",
"clusterinstance_stats",
"(",
")",
";",
"obj",
".",
"set_clid",
"(",
"clid",
")... | Use this API to fetch statistics of clusterinstance_stats resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"statistics",
"of",
"clusterinstance_stats",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/cluster/clusterinstance_stats.java#L241-L246 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java | TaskManagerService.updateTaskStatus | void updateTaskStatus(Tenant tenant, TaskRecord taskRecord, boolean bDeleteClaimRecord) {
"""
Add or update a task status record and optionally delete the task's claim record at
the same time.
@param tenant {@link Tenant} that owns the task's application.
@param taskRecord {@link Tas... | java | void updateTaskStatus(Tenant tenant, TaskRecord taskRecord, boolean bDeleteClaimRecord) {
String taskID = taskRecord.getTaskID();
DBTransaction dbTran = DBService.instance(tenant).startTransaction();
Map<String, String> propMap = taskRecord.getProperties();
for (String name : propMap.key... | [
"void",
"updateTaskStatus",
"(",
"Tenant",
"tenant",
",",
"TaskRecord",
"taskRecord",
",",
"boolean",
"bDeleteClaimRecord",
")",
"{",
"String",
"taskID",
"=",
"taskRecord",
".",
"getTaskID",
"(",
")",
";",
"DBTransaction",
"dbTran",
"=",
"DBService",
".",
"insta... | Add or update a task status record and optionally delete the task's claim record at
the same time.
@param tenant {@link Tenant} that owns the task's application.
@param taskRecord {@link TaskRecord} containing task properties to be
written to the database. A null/empty property value
causes t... | [
"Add",
"or",
"update",
"a",
"task",
"status",
"record",
"and",
"optionally",
"delete",
"the",
"task",
"s",
"claim",
"record",
"at",
"the",
"same",
"time",
"."
] | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java#L263-L279 |
BranchMetrics/android-branch-deep-linking | Branch-SDK/src/io/branch/referral/PrefHelper.java | PrefHelper.setCreditCount | public void setCreditCount(String bucket, int count) {
"""
<p>Sets the credit count for the default bucket to the specified {@link Integer}, in preferences.</p>
<p>
<p><b>Note:</b> This does not set the actual value of the bucket itself on the Branch server,
but only the cached value as stored in preferences fo... | java | public void setCreditCount(String bucket, int count) {
ArrayList<String> buckets = getBuckets();
if (!buckets.contains(bucket)) {
buckets.add(bucket);
setBuckets(buckets);
}
setInteger(KEY_CREDIT_BASE + bucket, count);
} | [
"public",
"void",
"setCreditCount",
"(",
"String",
"bucket",
",",
"int",
"count",
")",
"{",
"ArrayList",
"<",
"String",
">",
"buckets",
"=",
"getBuckets",
"(",
")",
";",
"if",
"(",
"!",
"buckets",
".",
"contains",
"(",
"bucket",
")",
")",
"{",
"buckets... | <p>Sets the credit count for the default bucket to the specified {@link Integer}, in preferences.</p>
<p>
<p><b>Note:</b> This does not set the actual value of the bucket itself on the Branch server,
but only the cached value as stored in preferences for the current app. The age of that value
should be checked before b... | [
"<p",
">",
"Sets",
"the",
"credit",
"count",
"for",
"the",
"default",
"bucket",
"to",
"the",
"specified",
"{",
"@link",
"Integer",
"}",
"in",
"preferences",
".",
"<",
"/",
"p",
">",
"<p",
">",
"<p",
">",
"<b",
">",
"Note",
":",
"<",
"/",
"b",
">"... | train | https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/PrefHelper.java#L774-L781 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/lang/Assert.java | Assert.notContain | public static String notContain(String textToSearch, String substring) throws IllegalArgumentException {
"""
断言给定字符串是否不被另一个字符串包含(既是否为子串)
<pre class="code">
Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");
</pre>
@param textToSearch 被搜索的字符串
@param substring 被检查的子串
@return 被检查的子串
@throws... | java | public static String notContain(String textToSearch, String substring) throws IllegalArgumentException {
return notContain(textToSearch, substring, "[Assertion failed] - this String argument must not contain the substring [{}]", substring);
} | [
"public",
"static",
"String",
"notContain",
"(",
"String",
"textToSearch",
",",
"String",
"substring",
")",
"throws",
"IllegalArgumentException",
"{",
"return",
"notContain",
"(",
"textToSearch",
",",
"substring",
",",
"\"[Assertion failed] - this String argument must not c... | 断言给定字符串是否不被另一个字符串包含(既是否为子串)
<pre class="code">
Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");
</pre>
@param textToSearch 被搜索的字符串
@param substring 被检查的子串
@return 被检查的子串
@throws IllegalArgumentException 非子串抛出异常 | [
"断言给定字符串是否不被另一个字符串包含(既是否为子串)"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L261-L263 |
alipay/sofa-rpc | core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterChain.java | FilterChain.onAsyncResponse | public void onAsyncResponse(ConsumerConfig config, SofaRequest request, SofaResponse response, Throwable throwable)
throws SofaRpcException {
"""
Do filtering when async respond from server
@param config Consumer config
@param request SofaRequest
@param response SofaResponse
@param throwable Th... | java | public void onAsyncResponse(ConsumerConfig config, SofaRequest request, SofaResponse response, Throwable throwable)
throws SofaRpcException {
try {
for (Filter loadedFilter : loadedFilters) {
loadedFilter.onAsyncResponse(config, request, response, throwable);
}
... | [
"public",
"void",
"onAsyncResponse",
"(",
"ConsumerConfig",
"config",
",",
"SofaRequest",
"request",
",",
"SofaResponse",
"response",
",",
"Throwable",
"throwable",
")",
"throws",
"SofaRpcException",
"{",
"try",
"{",
"for",
"(",
"Filter",
"loadedFilter",
":",
"loa... | Do filtering when async respond from server
@param config Consumer config
@param request SofaRequest
@param response SofaResponse
@param throwable Throwable when invoke
@throws SofaRpcException occur error | [
"Do",
"filtering",
"when",
"async",
"respond",
"from",
"server"
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterChain.java#L274-L284 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/report/JUnitReporter.java | JUnitReporter.createReportFile | private void createReportFile(String reportFileName, String content, File targetDirectory) {
"""
Creates the JUnit report file
@param reportFileName The report file to write
@param content The String content of the report file
"""
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdi... | java | private void createReportFile(String reportFileName, String content, File targetDirectory) {
if (!targetDirectory.exists()) {
if (!targetDirectory.mkdirs()) {
throw new CitrusRuntimeException("Unable to create report output directory: " + getReportDirectory() + (StringUtils.hasText(o... | [
"private",
"void",
"createReportFile",
"(",
"String",
"reportFileName",
",",
"String",
"content",
",",
"File",
"targetDirectory",
")",
"{",
"if",
"(",
"!",
"targetDirectory",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"!",
"targetDirectory",
".",
"mkdirs"... | Creates the JUnit report file
@param reportFileName The report file to write
@param content The String content of the report file | [
"Creates",
"the",
"JUnit",
"report",
"file"
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/report/JUnitReporter.java#L156-L169 |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/connections/RestRepositoryConnectionProxy.java | RestRepositoryConnectionProxy.setURL | private URL setURL(URL url) throws RepositoryIllegalArgumentException {
"""
Rather than setting the port directly, verify that the proxy URL did contain a port
and throw an exception if it did not. This avoids problems later.
@param url
@return
"""
int port = url.getPort();
if (port == -1)... | java | private URL setURL(URL url) throws RepositoryIllegalArgumentException {
int port = url.getPort();
if (port == -1) {
throw new RepositoryIllegalArgumentException("Bad proxy URL", new IllegalArgumentException("Proxy URL does not contain a port"));
}
String host = url.getHost();... | [
"private",
"URL",
"setURL",
"(",
"URL",
"url",
")",
"throws",
"RepositoryIllegalArgumentException",
"{",
"int",
"port",
"=",
"url",
".",
"getPort",
"(",
")",
";",
"if",
"(",
"port",
"==",
"-",
"1",
")",
"{",
"throw",
"new",
"RepositoryIllegalArgumentExceptio... | Rather than setting the port directly, verify that the proxy URL did contain a port
and throw an exception if it did not. This avoids problems later.
@param url
@return | [
"Rather",
"than",
"setting",
"the",
"port",
"directly",
"verify",
"that",
"the",
"proxy",
"URL",
"did",
"contain",
"a",
"port",
"and",
"throw",
"an",
"exception",
"if",
"it",
"did",
"not",
".",
"This",
"avoids",
"problems",
"later",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/connections/RestRepositoryConnectionProxy.java#L60-L70 |
openengsb/openengsb | components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/EntryFactory.java | EntryFactory.addDescription | private static void addDescription(Entry entry, String description) {
"""
3 possibilities:<br>
1) description is null -> emptyFlag = false, no description attribute <br>
2) description is empty -> emptyFlag = true, no description attribute <br>
3) description exists -> no emptyFlag, description attribute exists... | java | private static void addDescription(Entry entry, String description) {
try {
entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.DESCRIPTIVE_OBJECT_OC);
if (description == null) {
entry.add(SchemaConstants.EMPTY_FLAG_ATTRIBUTE, String.valueOf(false)); // case... | [
"private",
"static",
"void",
"addDescription",
"(",
"Entry",
"entry",
",",
"String",
"description",
")",
"{",
"try",
"{",
"entry",
".",
"add",
"(",
"SchemaConstants",
".",
"OBJECT_CLASS_ATTRIBUTE",
",",
"SchemaConstants",
".",
"DESCRIPTIVE_OBJECT_OC",
")",
";",
... | 3 possibilities:<br>
1) description is null -> emptyFlag = false, no description attribute <br>
2) description is empty -> emptyFlag = true, no description attribute <br>
3) description exists -> no emptyFlag, description attribute exists and has a value | [
"3",
"possibilities",
":",
"<br",
">",
"1",
")",
"description",
"is",
"null",
"-",
">",
"emptyFlag",
"=",
"false",
"no",
"description",
"attribute",
"<br",
">",
"2",
")",
"description",
"is",
"empty",
"-",
">",
"emptyFlag",
"=",
"true",
"no",
"descriptio... | train | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/services/src/main/java/org/openengsb/core/services/internal/security/ldap/EntryFactory.java#L160-L173 |
DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseBo.java | BaseBo.tryLockForWrite | protected Lock tryLockForWrite(long time, TimeUnit unit) throws InterruptedException {
"""
Try to lock the BO for write.
@param time
@param unit
@return the "write"-lock in "lock" state if successful, {@code null} otherwise
@throws InterruptedException
@since 0.10.0
"""
if (time < 0 || unit == n... | java | protected Lock tryLockForWrite(long time, TimeUnit unit) throws InterruptedException {
if (time < 0 || unit == null) {
return tryLockForWrite();
}
Lock lock = writeLock();
return lock.tryLock(time, unit) ? lock : null;
} | [
"protected",
"Lock",
"tryLockForWrite",
"(",
"long",
"time",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"time",
"<",
"0",
"||",
"unit",
"==",
"null",
")",
"{",
"return",
"tryLockForWrite",
"(",
")",
";",
"}",
"Lock",
... | Try to lock the BO for write.
@param time
@param unit
@return the "write"-lock in "lock" state if successful, {@code null} otherwise
@throws InterruptedException
@since 0.10.0 | [
"Try",
"to",
"lock",
"the",
"BO",
"for",
"write",
"."
] | train | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseBo.java#L536-L542 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistriesInner.java | RegistriesInner.queueBuildAsync | public Observable<BuildInner> queueBuildAsync(String resourceGroupName, String registryName, QueueBuildRequest buildRequest) {
"""
Creates a new build based on the request parameters and add it to the build queue.
@param resourceGroupName The name of the resource group to which the container registry belongs.
... | java | public Observable<BuildInner> queueBuildAsync(String resourceGroupName, String registryName, QueueBuildRequest buildRequest) {
return queueBuildWithServiceResponseAsync(resourceGroupName, registryName, buildRequest).map(new Func1<ServiceResponse<BuildInner>, BuildInner>() {
@Override
pub... | [
"public",
"Observable",
"<",
"BuildInner",
">",
"queueBuildAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
",",
"QueueBuildRequest",
"buildRequest",
")",
"{",
"return",
"queueBuildWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"regist... | Creates a new build based on the request parameters and add it to the build queue.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@param buildRequest The parameters of a build that needs to queued.
@throws Illegal... | [
"Creates",
"a",
"new",
"build",
"based",
"on",
"the",
"request",
"parameters",
"and",
"add",
"it",
"to",
"the",
"build",
"queue",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/RegistriesInner.java#L1754-L1761 |
rey5137/material | material/src/main/java/com/rey/material/app/SimpleDialog.java | SimpleDialog.multiChoiceItems | public SimpleDialog multiChoiceItems(CharSequence[] items, int... selectedIndexes) {
"""
Set the list of items in multi-choice mode.
@param items The list of items.
@param selectedIndexes The indexes of selected items.
@return The SimpleDialog for chaining methods.
"""
if(mListView == null)
... | java | public SimpleDialog multiChoiceItems(CharSequence[] items, int... selectedIndexes){
if(mListView == null)
initListView();
mMode = MODE_MULTI_ITEMS;
mAdapter.setItems(items, selectedIndexes);
super.contentView(mListView);
return this;
} | [
"public",
"SimpleDialog",
"multiChoiceItems",
"(",
"CharSequence",
"[",
"]",
"items",
",",
"int",
"...",
"selectedIndexes",
")",
"{",
"if",
"(",
"mListView",
"==",
"null",
")",
"initListView",
"(",
")",
";",
"mMode",
"=",
"MODE_MULTI_ITEMS",
";",
"mAdapter",
... | Set the list of items in multi-choice mode.
@param items The list of items.
@param selectedIndexes The indexes of selected items.
@return The SimpleDialog for chaining methods. | [
"Set",
"the",
"list",
"of",
"items",
"in",
"multi",
"-",
"choice",
"mode",
"."
] | train | https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/app/SimpleDialog.java#L322-L330 |
google/error-prone | core/src/main/java/com/google/errorprone/bugpatterns/JUnit3FloatingPointComparisonWithoutDelta.java | JUnit3FloatingPointComparisonWithoutDelta.isDouble | private boolean isDouble(VisitorState state, Type type) {
"""
Determines if the type is a double, including reference types.
"""
Type trueType = unboxedTypeOrType(state, type);
return trueType.getKind() == TypeKind.DOUBLE;
} | java | private boolean isDouble(VisitorState state, Type type) {
Type trueType = unboxedTypeOrType(state, type);
return trueType.getKind() == TypeKind.DOUBLE;
} | [
"private",
"boolean",
"isDouble",
"(",
"VisitorState",
"state",
",",
"Type",
"type",
")",
"{",
"Type",
"trueType",
"=",
"unboxedTypeOrType",
"(",
"state",
",",
"type",
")",
";",
"return",
"trueType",
".",
"getKind",
"(",
")",
"==",
"TypeKind",
".",
"DOUBLE... | Determines if the type is a double, including reference types. | [
"Determines",
"if",
"the",
"type",
"is",
"a",
"double",
"including",
"reference",
"types",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/JUnit3FloatingPointComparisonWithoutDelta.java#L170-L173 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/db/RangeTombstoneList.java | RangeTombstoneList.searchDeletionTime | public DeletionTime searchDeletionTime(Composite name) {
"""
Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one),
or null if {@code name} is not covered by any tombstone.
"""
int idx = searchInternal(name, 0);
return idx < 0 ? null : new DeletionT... | java | public DeletionTime searchDeletionTime(Composite name)
{
int idx = searchInternal(name, 0);
return idx < 0 ? null : new DeletionTime(markedAts[idx], delTimes[idx]);
} | [
"public",
"DeletionTime",
"searchDeletionTime",
"(",
"Composite",
"name",
")",
"{",
"int",
"idx",
"=",
"searchInternal",
"(",
"name",
",",
"0",
")",
";",
"return",
"idx",
"<",
"0",
"?",
"null",
":",
"new",
"DeletionTime",
"(",
"markedAts",
"[",
"idx",
"]... | Returns the DeletionTime for the tombstone overlapping {@code name} (there can't be more than one),
or null if {@code name} is not covered by any tombstone. | [
"Returns",
"the",
"DeletionTime",
"for",
"the",
"tombstone",
"overlapping",
"{"
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/RangeTombstoneList.java#L258-L262 |
Azure/azure-sdk-for-java | containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/WebhooksInner.java | WebhooksInner.beginCreate | public WebhookInner beginCreate(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) {
"""
Creates a webhook for a container registry with the specified parameters.
@param resourceGroupName The name of the resource group to which the container regis... | java | public WebhookInner beginCreate(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) {
return beginCreateWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).toBlocking().single().body();
} | [
"public",
"WebhookInner",
"beginCreate",
"(",
"String",
"resourceGroupName",
",",
"String",
"registryName",
",",
"String",
"webhookName",
",",
"WebhookCreateParameters",
"webhookCreateParameters",
")",
"{",
"return",
"beginCreateWithServiceResponseAsync",
"(",
"resourceGroupN... | Creates a webhook for a container registry with the specified parameters.
@param resourceGroupName The name of the resource group to which the container registry belongs.
@param registryName The name of the container registry.
@param webhookName The name of the webhook.
@param webhookCreateParameters The parameters fo... | [
"Creates",
"a",
"webhook",
"for",
"a",
"container",
"registry",
"with",
"the",
"specified",
"parameters",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/WebhooksInner.java#L307-L309 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Base64.java | Base64.getMimeEncoder | public static Encoder getMimeEncoder(int lineLength, byte[] lineSeparator) {
"""
Returns a {@link Encoder} that encodes using the
<a href="#mime">MIME</a> type base64 encoding scheme
with specified line length and line separators.
@param lineLength
the length of each output line (rounded down to nearest mu... | java | public static Encoder getMimeEncoder(int lineLength, byte[] lineSeparator) {
Objects.requireNonNull(lineSeparator);
int[] base64 = Decoder.fromBase64;
for (byte b : lineSeparator) {
if (base64[b & 0xff] != -1)
throw new IllegalArgumentException(
... | [
"public",
"static",
"Encoder",
"getMimeEncoder",
"(",
"int",
"lineLength",
",",
"byte",
"[",
"]",
"lineSeparator",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"lineSeparator",
")",
";",
"int",
"[",
"]",
"base64",
"=",
"Decoder",
".",
"fromBase64",
";",
... | Returns a {@link Encoder} that encodes using the
<a href="#mime">MIME</a> type base64 encoding scheme
with specified line length and line separators.
@param lineLength
the length of each output line (rounded down to nearest multiple
of 4). If {@code lineLength <= 0} the output will not be separated
in lines
@param ... | [
"Returns",
"a",
"{",
"@link",
"Encoder",
"}",
"that",
"encodes",
"using",
"the",
"<a",
"href",
"=",
"#mime",
">",
"MIME<",
"/",
"a",
">",
"type",
"base64",
"encoding",
"scheme",
"with",
"specified",
"line",
"length",
"and",
"line",
"separators",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Base64.java#L130-L142 |
javalite/activejdbc | activejdbc/src/main/java/org/javalite/activejdbc/Model.java | Model.findWith | public static void findWith(final ModelListener listener, String query, Object ... params) {
"""
This method is for processing really large result sets. Results found by this method are never cached.
@param listener this is a call back implementation which will receive instances of models found.
@param query s... | java | public static void findWith(final ModelListener listener, String query, Object ... params) {
ModelDelegate.findWith(modelClass(), listener, query, params);
} | [
"public",
"static",
"void",
"findWith",
"(",
"final",
"ModelListener",
"listener",
",",
"String",
"query",
",",
"Object",
"...",
"params",
")",
"{",
"ModelDelegate",
".",
"findWith",
"(",
"modelClass",
"(",
")",
",",
"listener",
",",
"query",
",",
"params",
... | This method is for processing really large result sets. Results found by this method are never cached.
@param listener this is a call back implementation which will receive instances of models found.
@param query sub-query (content after "WHERE" clause)
@param params optional parameters for a query. | [
"This",
"method",
"is",
"for",
"processing",
"really",
"large",
"result",
"sets",
".",
"Results",
"found",
"by",
"this",
"method",
"are",
"never",
"cached",
"."
] | train | https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2513-L2515 |
centic9/commons-dost | src/main/java/org/dstadler/commons/svn/SVNCommands.java | SVNCommands.copyBranch | public static void copyBranch(String base, String branch, long revision, String baseUrl) throws IOException {
"""
Make a branch by calling the "svn cp" operation.
@param base The source of the SVN copy operation
@param branch The name and location of the new branch
@param revision The revision to base the bra... | java | public static void copyBranch(String base, String branch, long revision, String baseUrl) throws IOException {
log.info("Copying branch " + base + AT_REVISION + revision + " to branch " + branch);
CommandLine cmdLine = new CommandLine(SVN_CMD);
cmdLine.addArgument("cp");
addDefaultArgume... | [
"public",
"static",
"void",
"copyBranch",
"(",
"String",
"base",
",",
"String",
"branch",
",",
"long",
"revision",
",",
"String",
"baseUrl",
")",
"throws",
"IOException",
"{",
"log",
".",
"info",
"(",
"\"Copying branch \"",
"+",
"base",
"+",
"AT_REVISION",
"... | Make a branch by calling the "svn cp" operation.
@param base The source of the SVN copy operation
@param branch The name and location of the new branch
@param revision The revision to base the branch off
@param baseUrl The SVN url to connect to
@throws IOException Execution of the SVN sub-process failed or the
s... | [
"Make",
"a",
"branch",
"by",
"calling",
"the",
"svn",
"cp",
"operation",
"."
] | train | https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/svn/SVNCommands.java#L756-L778 |
carewebframework/carewebframework-core | org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/Message.java | Message.setMetadata | public void setMetadata(String key, Object value) {
"""
Sets a metadata value.
@param key The key.
@param value The value.
"""
if (value != null) {
getMetadata().put(key, value);
}
} | java | public void setMetadata(String key, Object value) {
if (value != null) {
getMetadata().put(key, value);
}
} | [
"public",
"void",
"setMetadata",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"getMetadata",
"(",
")",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}",
"}"
] | Sets a metadata value.
@param key The key.
@param value The value. | [
"Sets",
"a",
"metadata",
"value",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/Message.java#L146-L150 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/config/xml/GlobalVariablesParser.java | GlobalVariablesParser.parseVariableDefinitions | private void parseVariableDefinitions(BeanDefinitionBuilder builder, Element element) {
"""
Parses all variable definitions and adds those to the bean definition
builder as property value.
@param builder the target bean definition builder.
@param element the source element.
"""
Map<String, String> t... | java | private void parseVariableDefinitions(BeanDefinitionBuilder builder, Element element) {
Map<String, String> testVariables = new LinkedHashMap<String, String>();
List<Element> variableElements = DomUtils.getChildElementsByTagName(element, "variable");
for (Element variableDefinition : variableEle... | [
"private",
"void",
"parseVariableDefinitions",
"(",
"BeanDefinitionBuilder",
"builder",
",",
"Element",
"element",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"testVariables",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";... | Parses all variable definitions and adds those to the bean definition
builder as property value.
@param builder the target bean definition builder.
@param element the source element. | [
"Parses",
"all",
"variable",
"definitions",
"and",
"adds",
"those",
"to",
"the",
"bean",
"definition",
"builder",
"as",
"property",
"value",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/config/xml/GlobalVariablesParser.java#L64-L74 |
Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ScopeUtil.java | ScopeUtil.throwCompensationEvent | public static void throwCompensationEvent(List<CompensateEventSubscriptionEntity> eventSubscriptions, DelegateExecution execution, boolean async) {
"""
we create a separate execution for each compensation handler invocation.
"""
ExecutionEntityManager executionEntityManager = Context.getCommandContext()... | java | public static void throwCompensationEvent(List<CompensateEventSubscriptionEntity> eventSubscriptions, DelegateExecution execution, boolean async) {
ExecutionEntityManager executionEntityManager = Context.getCommandContext().getExecutionEntityManager();
// first spawn the compensating executions
f... | [
"public",
"static",
"void",
"throwCompensationEvent",
"(",
"List",
"<",
"CompensateEventSubscriptionEntity",
">",
"eventSubscriptions",
",",
"DelegateExecution",
"execution",
",",
"boolean",
"async",
")",
"{",
"ExecutionEntityManager",
"executionEntityManager",
"=",
"Contex... | we create a separate execution for each compensation handler invocation. | [
"we",
"create",
"a",
"separate",
"execution",
"for",
"each",
"compensation",
"handler",
"invocation",
"."
] | train | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ScopeUtil.java#L39-L70 |
mojohaus/webstart | webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/sign/DefaultSignTool.java | DefaultSignTool.infoOrDebug | private void infoOrDebug( boolean info, String msg ) {
"""
Log a message as info or debug.
@param info if set to true, log as info(), otherwise as debug()
@param msg message to log
"""
if ( info )
{
getLogger().info( msg );
}
else
{
getLogger... | java | private void infoOrDebug( boolean info, String msg )
{
if ( info )
{
getLogger().info( msg );
}
else
{
getLogger().debug( msg );
}
} | [
"private",
"void",
"infoOrDebug",
"(",
"boolean",
"info",
",",
"String",
"msg",
")",
"{",
"if",
"(",
"info",
")",
"{",
"getLogger",
"(",
")",
".",
"info",
"(",
"msg",
")",
";",
"}",
"else",
"{",
"getLogger",
"(",
")",
".",
"debug",
"(",
"msg",
")... | Log a message as info or debug.
@param info if set to true, log as info(), otherwise as debug()
@param msg message to log | [
"Log",
"a",
"message",
"as",
"info",
"or",
"debug",
"."
] | train | https://github.com/mojohaus/webstart/blob/38fdd1d21f063f21716cfcd61ebeabd963487576/webstart-maven-plugin/src/main/java/org/codehaus/mojo/webstart/sign/DefaultSignTool.java#L288-L298 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiViewRobust.java | FactoryMultiViewRobust.trifocalRansac | public static Ransac<TrifocalTensor, AssociatedTriple>
trifocalRansac( @Nullable ConfigTrifocal trifocal ,
@Nullable ConfigTrifocalError error,
@Nonnull ConfigRansac ransac ) {
"""
Robust RANSAC based estimator for
@see FactoryMultiView#trifocal_1
@param trifocal Configuration for trifocal tensor ... | java | public static Ransac<TrifocalTensor, AssociatedTriple>
trifocalRansac( @Nullable ConfigTrifocal trifocal ,
@Nullable ConfigTrifocalError error,
@Nonnull ConfigRansac ransac ) {
if( trifocal == null )
trifocal = new ConfigTrifocal();
if( error == null )
error = new ConfigTrifocalError();
trifocal... | [
"public",
"static",
"Ransac",
"<",
"TrifocalTensor",
",",
"AssociatedTriple",
">",
"trifocalRansac",
"(",
"@",
"Nullable",
"ConfigTrifocal",
"trifocal",
",",
"@",
"Nullable",
"ConfigTrifocalError",
"error",
",",
"@",
"Nonnull",
"ConfigRansac",
"ransac",
")",
"{",
... | Robust RANSAC based estimator for
@see FactoryMultiView#trifocal_1
@param trifocal Configuration for trifocal tensor calculation
@param error Configuration for how trifocal error is computed
@param ransac Configuration for RANSAC
@return RANSAC | [
"Robust",
"RANSAC",
"based",
"estimator",
"for"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiViewRobust.java#L399-L435 |
OpenLiberty/open-liberty | dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java | FaultToleranceStateFactory.createAsyncBulkheadState | public AsyncBulkheadState createAsyncBulkheadState(ScheduledExecutorService executorService, BulkheadPolicy policy, MetricRecorder metricRecorder) {
"""
Create an object implementing an asynchronous Bulkhead
<p>
If {@code null} is passed for the policy, the returned object will still run submitted tasks asynchro... | java | public AsyncBulkheadState createAsyncBulkheadState(ScheduledExecutorService executorService, BulkheadPolicy policy, MetricRecorder metricRecorder) {
if (policy == null) {
return new AsyncBulkheadStateNullImpl(executorService);
} else {
return new AsyncBulkheadStateImpl(executorSe... | [
"public",
"AsyncBulkheadState",
"createAsyncBulkheadState",
"(",
"ScheduledExecutorService",
"executorService",
",",
"BulkheadPolicy",
"policy",
",",
"MetricRecorder",
"metricRecorder",
")",
"{",
"if",
"(",
"policy",
"==",
"null",
")",
"{",
"return",
"new",
"AsyncBulkhe... | Create an object implementing an asynchronous Bulkhead
<p>
If {@code null} is passed for the policy, the returned object will still run submitted tasks asynchronously, but will not apply any bulkhead logic.
@param executorProvider the policy executor provider
@param executorService the executor to use to asynchronous... | [
"Create",
"an",
"object",
"implementing",
"an",
"asynchronous",
"Bulkhead",
"<p",
">",
"If",
"{",
"@code",
"null",
"}",
"is",
"passed",
"for",
"the",
"policy",
"the",
"returned",
"object",
"will",
"still",
"run",
"submitted",
"tasks",
"asynchronously",
"but",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.2.0/src/com/ibm/ws/microprofile/faulttolerance20/state/FaultToleranceStateFactory.java#L114-L120 |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java | AbstractAsymmetricCrypto.encryptBcd | public String encryptBcd(String data, KeyType keyType, Charset charset) {
"""
分组加密
@param data 数据
@param keyType 密钥类型
@param charset 加密前编码
@return 加密后的密文
@throws CryptoException 加密异常
@since 4.1.0
"""
return BCD.bcdToStr(encrypt(data, charset, keyType));
} | java | public String encryptBcd(String data, KeyType keyType, Charset charset) {
return BCD.bcdToStr(encrypt(data, charset, keyType));
} | [
"public",
"String",
"encryptBcd",
"(",
"String",
"data",
",",
"KeyType",
"keyType",
",",
"Charset",
"charset",
")",
"{",
"return",
"BCD",
".",
"bcdToStr",
"(",
"encrypt",
"(",
"data",
",",
"charset",
",",
"keyType",
")",
")",
";",
"}"
] | 分组加密
@param data 数据
@param keyType 密钥类型
@param charset 加密前编码
@return 加密后的密文
@throws CryptoException 加密异常
@since 4.1.0 | [
"分组加密"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L212-L214 |
astrapi69/mystic-crypt | crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyStoreFactory.java | KeyStoreFactory.newKeyStore | public static KeyStore newKeyStore(final String type, final String password,
final File keystoreFile) throws NoSuchAlgorithmException, CertificateException,
FileNotFoundException, IOException, KeyStoreException {
"""
Factory method for load the {@link KeyStore} object from the given file.
@param type
the t... | java | public static KeyStore newKeyStore(final String type, final String password,
final File keystoreFile) throws NoSuchAlgorithmException, CertificateException,
FileNotFoundException, IOException, KeyStoreException
{
return newKeyStore(type, password, keystoreFile, false);
} | [
"public",
"static",
"KeyStore",
"newKeyStore",
"(",
"final",
"String",
"type",
",",
"final",
"String",
"password",
",",
"final",
"File",
"keystoreFile",
")",
"throws",
"NoSuchAlgorithmException",
",",
"CertificateException",
",",
"FileNotFoundException",
",",
"IOExcep... | Factory method for load the {@link KeyStore} object from the given file.
@param type
the type of the keystore
@param password
the password of the keystore
@param keystoreFile
the keystore file
@return the loaded {@link KeyStore} object
@throws NoSuchAlgorithmException
the no such algorithm exception
@throws Certificat... | [
"Factory",
"method",
"for",
"load",
"the",
"{",
"@link",
"KeyStore",
"}",
"object",
"from",
"the",
"given",
"file",
"."
] | train | https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyStoreFactory.java#L68-L73 |
mikepenz/Android-Iconics | library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java | IconicsDrawable.contourWidthDp | @NonNull
public IconicsDrawable contourWidthDp(@Dimension(unit = DP) int sizeDp) {
"""
Set contour width from dp for the icon
@return The current IconicsDrawable for chaining.
"""
return contourWidthPx(Utils.convertDpToPx(mContext, sizeDp));
} | java | @NonNull
public IconicsDrawable contourWidthDp(@Dimension(unit = DP) int sizeDp) {
return contourWidthPx(Utils.convertDpToPx(mContext, sizeDp));
} | [
"@",
"NonNull",
"public",
"IconicsDrawable",
"contourWidthDp",
"(",
"@",
"Dimension",
"(",
"unit",
"=",
"DP",
")",
"int",
"sizeDp",
")",
"{",
"return",
"contourWidthPx",
"(",
"Utils",
".",
"convertDpToPx",
"(",
"mContext",
",",
"sizeDp",
")",
")",
";",
"}"... | Set contour width from dp for the icon
@return The current IconicsDrawable for chaining. | [
"Set",
"contour",
"width",
"from",
"dp",
"for",
"the",
"icon"
] | train | https://github.com/mikepenz/Android-Iconics/blob/0b2c8f7d07b6d2715a417563c66311e7e1fcc7d8/library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java#L1011-L1014 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/util/ProcfsBasedProcessTree.java | ProcfsBasedProcessTree.constructProcessInfo | private static ProcessInfo constructProcessInfo(ProcessInfo pinfo,
String procfsDir) {
"""
Construct the ProcessInfo using the process' PID and procfs rooted at the
specified directory and return the same. It is provided mainly to assist
testing purposes.
R... | java | private static ProcessInfo constructProcessInfo(ProcessInfo pinfo,
String procfsDir) {
ProcessInfo ret = null;
// Read "procfsDir/<pid>/stat" file - typically /proc/<pid>/stat
BufferedReader in = null;
FileReader fReader = null;
try {
File p... | [
"private",
"static",
"ProcessInfo",
"constructProcessInfo",
"(",
"ProcessInfo",
"pinfo",
",",
"String",
"procfsDir",
")",
"{",
"ProcessInfo",
"ret",
"=",
"null",
";",
"// Read \"procfsDir/<pid>/stat\" file - typically /proc/<pid>/stat",
"BufferedReader",
"in",
"=",
"null",
... | Construct the ProcessInfo using the process' PID and procfs rooted at the
specified directory and return the same. It is provided mainly to assist
testing purposes.
Returns null on failing to read from procfs,
@param pinfo ProcessInfo that needs to be updated
@param procfsDir root of the proc file system
@return upda... | [
"Construct",
"the",
"ProcessInfo",
"using",
"the",
"process",
"PID",
"and",
"procfs",
"rooted",
"at",
"the",
"specified",
"directory",
"and",
"return",
"the",
"same",
".",
"It",
"is",
"provided",
"mainly",
"to",
"assist",
"testing",
"purposes",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/ProcfsBasedProcessTree.java#L540-L591 |
Azure/azure-sdk-for-java | compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetVMsInner.java | VirtualMachineScaleSetVMsInner.getInstanceViewAsync | public Observable<VirtualMachineScaleSetVMInstanceViewInner> getInstanceViewAsync(String resourceGroupName, String vmScaleSetName, String instanceId) {
"""
Gets the status of a virtual machine from a VM scale set.
@param resourceGroupName The name of the resource group.
@param vmScaleSetName The name of the VM... | java | public Observable<VirtualMachineScaleSetVMInstanceViewInner> getInstanceViewAsync(String resourceGroupName, String vmScaleSetName, String instanceId) {
return getInstanceViewWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).map(new Func1<ServiceResponse<VirtualMachineScaleSetVMInstanceView... | [
"public",
"Observable",
"<",
"VirtualMachineScaleSetVMInstanceViewInner",
">",
"getInstanceViewAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"vmScaleSetName",
",",
"String",
"instanceId",
")",
"{",
"return",
"getInstanceViewWithServiceResponseAsync",
"(",
"resour... | Gets the status of a virtual machine from a VM scale set.
@param resourceGroupName The name of the resource group.
@param vmScaleSetName The name of the VM scale set.
@param instanceId The instance ID of the virtual machine.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observab... | [
"Gets",
"the",
"status",
"of",
"a",
"virtual",
"machine",
"from",
"a",
"VM",
"scale",
"set",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetVMsInner.java#L1161-L1168 |
kiswanij/jk-util | src/main/java/com/jk/util/model/table/JKTableRecord.java | JKTableRecord.getColumnValueAsDouble | public Double getColumnValueAsDouble(final int col, final double defaultValue) {
"""
Gets the column value as double.
@param col the col
@param defaultValue the default value
@return the column value as double
"""
Double value = getColumnValueAsDouble(col);
if (value == null) {
value = ... | java | public Double getColumnValueAsDouble(final int col, final double defaultValue) {
Double value = getColumnValueAsDouble(col);
if (value == null) {
value = defaultValue;
}
return value;
} | [
"public",
"Double",
"getColumnValueAsDouble",
"(",
"final",
"int",
"col",
",",
"final",
"double",
"defaultValue",
")",
"{",
"Double",
"value",
"=",
"getColumnValueAsDouble",
"(",
"col",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"value",
"=",
"d... | Gets the column value as double.
@param col the col
@param defaultValue the default value
@return the column value as double | [
"Gets",
"the",
"column",
"value",
"as",
"double",
"."
] | train | https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/model/table/JKTableRecord.java#L184-L190 |
intendia-oss/rxjava-gwt | src/main/modified/io/reactivex/super/io/reactivex/Flowable.java | Flowable.onErrorReturn | @CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> onErrorReturn(Function<? super Throwable, ? extends T> valueSupplier) {
"""
Instructs a Publisher to emit an item (returned by a specified function) rather than invoking
{@li... | java | @CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final Flowable<T> onErrorReturn(Function<? super Throwable, ? extends T> valueSupplier) {
ObjectHelper.requireNonNull(valueSupplier, "valueSupplier is null");
return RxJavaPlugins.on... | [
"@",
"CheckReturnValue",
"@",
"BackpressureSupport",
"(",
"BackpressureKind",
".",
"FULL",
")",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"final",
"Flowable",
"<",
"T",
">",
"onErrorReturn",
"(",
"Function",
"<",
"?",
"super",... | Instructs a Publisher to emit an item (returned by a specified function) rather than invoking
{@link Subscriber#onError onError} if it encounters an error.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/onErrorReturn.png" alt="">
<p>
By default, when a Publisher ... | [
"Instructs",
"a",
"Publisher",
"to",
"emit",
"an",
"item",
"(",
"returned",
"by",
"a",
"specified",
"function",
")",
"rather",
"than",
"invoking",
"{",
"@link",
"Subscriber#onError",
"onError",
"}",
"if",
"it",
"encounters",
"an",
"error",
".",
"<p",
">",
... | train | https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L11780-L11786 |
michel-kraemer/citeproc-java | citeproc-java-tool/src/main/java/de/undercouch/citeproc/tool/BibliographyCommand.java | BibliographyCommand.doGenerateCSL | protected void doGenerateCSL(CSL citeproc, String[] citationIds, PrintWriter out) {
"""
Performs CSL conversion and generates a bibliography
@param citeproc the CSL processor
@param citationIds the citation IDs for which the bibliography
should be generated (the CSL processor should already be prepared)
@param... | java | protected void doGenerateCSL(CSL citeproc, String[] citationIds, PrintWriter out) {
Bibliography bibl = citeproc.makeBibliography();
out.println(bibl.makeString());
} | [
"protected",
"void",
"doGenerateCSL",
"(",
"CSL",
"citeproc",
",",
"String",
"[",
"]",
"citationIds",
",",
"PrintWriter",
"out",
")",
"{",
"Bibliography",
"bibl",
"=",
"citeproc",
".",
"makeBibliography",
"(",
")",
";",
"out",
".",
"println",
"(",
"bibl",
... | Performs CSL conversion and generates a bibliography
@param citeproc the CSL processor
@param citationIds the citation IDs for which the bibliography
should be generated (the CSL processor should already be prepared)
@param out the stream to write the result to | [
"Performs",
"CSL",
"conversion",
"and",
"generates",
"a",
"bibliography"
] | train | https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java-tool/src/main/java/de/undercouch/citeproc/tool/BibliographyCommand.java#L189-L192 |
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.createCompositeEntityRoleWithServiceResponseAsync | public Observable<ServiceResponse<UUID>> createCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, CreateCompositeEntityRoleOptionalParameter createCompositeEntityRoleOptionalParameter) {
"""
Create an entity role for an entity in the application.
@param appId The applicati... | java | public Observable<ServiceResponse<UUID>> createCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, CreateCompositeEntityRoleOptionalParameter createCompositeEntityRoleOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"UUID",
">",
">",
"createCompositeEntityRoleWithServiceResponseAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"cEntityId",
",",
"CreateCompositeEntityRoleOptionalParameter",
"createCompositeEntityRol... | Create an entity role for an entity in the application.
@param appId The application ID.
@param versionId The version ID.
@param cEntityId The composite entity extractor ID.
@param createCompositeEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API
@throws Illeg... | [
"Create",
"an",
"entity",
"role",
"for",
"an",
"entity",
"in",
"the",
"application",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L8920-L8936 |
aspectran/aspectran | core/src/main/java/com/aspectran/core/util/StringUtils.java | StringUtils.search | public static int search(String str, String keyw) {
"""
Returns the number of times the specified string was found
in the target string, or 0 if there is no specified string.
@param str the target string
@param keyw the string to find
@return the number of times the specified string was found
"""
... | java | public static int search(String str, String keyw) {
int strLen = str.length();
int keywLen = keyw.length();
int pos = 0;
int cnt = 0;
if (keywLen == 0) {
return 0;
}
while ((pos = str.indexOf(keyw, pos)) != -1) {
pos += keywLen;
... | [
"public",
"static",
"int",
"search",
"(",
"String",
"str",
",",
"String",
"keyw",
")",
"{",
"int",
"strLen",
"=",
"str",
".",
"length",
"(",
")",
";",
"int",
"keywLen",
"=",
"keyw",
".",
"length",
"(",
")",
";",
"int",
"pos",
"=",
"0",
";",
"int"... | Returns the number of times the specified string was found
in the target string, or 0 if there is no specified string.
@param str the target string
@param keyw the string to find
@return the number of times the specified string was found | [
"Returns",
"the",
"number",
"of",
"times",
"the",
"specified",
"string",
"was",
"found",
"in",
"the",
"target",
"string",
"or",
"0",
"if",
"there",
"is",
"no",
"specified",
"string",
"."
] | train | https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/StringUtils.java#L533-L549 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/TrueTypeFontUnicode.java | TrueTypeFontUnicode.setCharAdvance | public boolean setCharAdvance(int c, int advance) {
"""
Sets the character advance.
@param c the character
@param advance the character advance normalized to 1000 units
@return <CODE>true</CODE> if the advance was set,
<CODE>false</CODE> otherwise
"""
int[] m = getMetricsTT(c);
if (m == nul... | java | public boolean setCharAdvance(int c, int advance) {
int[] m = getMetricsTT(c);
if (m == null)
return false;
m[1] = advance;
return true;
} | [
"public",
"boolean",
"setCharAdvance",
"(",
"int",
"c",
",",
"int",
"advance",
")",
"{",
"int",
"[",
"]",
"m",
"=",
"getMetricsTT",
"(",
"c",
")",
";",
"if",
"(",
"m",
"==",
"null",
")",
"return",
"false",
";",
"m",
"[",
"1",
"]",
"=",
"advance",... | Sets the character advance.
@param c the character
@param advance the character advance normalized to 1000 units
@return <CODE>true</CODE> if the advance was set,
<CODE>false</CODE> otherwise | [
"Sets",
"the",
"character",
"advance",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/TrueTypeFontUnicode.java#L535-L541 |
graphhopper/graphhopper | core/src/main/java/com/graphhopper/routing/ch/PrepareEncoder.java | PrepareEncoder.getScMergeStatus | public static final int getScMergeStatus(int existingScFlags, int newScFlags) {
"""
Returns 1 if existingScFlags of an existing shortcut can be overwritten with a new shortcut by
newScFlags without limiting or changing the directions of the existing shortcut.
The method returns 2 for the same condition but only ... | java | public static final int getScMergeStatus(int existingScFlags, int newScFlags) {
if ((existingScFlags & scDirMask) == (newScFlags & scDirMask))
return 1;
else if ((newScFlags & scDirMask) == scDirMask)
return 2;
return 0;
} | [
"public",
"static",
"final",
"int",
"getScMergeStatus",
"(",
"int",
"existingScFlags",
",",
"int",
"newScFlags",
")",
"{",
"if",
"(",
"(",
"existingScFlags",
"&",
"scDirMask",
")",
"==",
"(",
"newScFlags",
"&",
"scDirMask",
")",
")",
"return",
"1",
";",
"e... | Returns 1 if existingScFlags of an existing shortcut can be overwritten with a new shortcut by
newScFlags without limiting or changing the directions of the existing shortcut.
The method returns 2 for the same condition but only if the new shortcut has to be added
even if weight is higher than existing shortcut weight.... | [
"Returns",
"1",
"if",
"existingScFlags",
"of",
"an",
"existing",
"shortcut",
"can",
"be",
"overwritten",
"with",
"a",
"new",
"shortcut",
"by",
"newScFlags",
"without",
"limiting",
"or",
"changing",
"the",
"directions",
"of",
"the",
"existing",
"shortcut",
".",
... | train | https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/ch/PrepareEncoder.java#L69-L76 |
Azure/azure-sdk-for-java | policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyAssignmentsInner.java | PolicyAssignmentsInner.getAsync | public Observable<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName) {
"""
Gets a policy assignment.
@param scope The scope of the policy assignment.
@param policyAssignmentName The name of the policy assignment to get.
@throws IllegalArgumentException thrown if parameters fail the val... | java | public Observable<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName) {
return getWithServiceResponseAsync(scope, policyAssignmentName).map(new Func1<ServiceResponse<PolicyAssignmentInner>, PolicyAssignmentInner>() {
@Override
public PolicyAssignmentInner call(Serv... | [
"public",
"Observable",
"<",
"PolicyAssignmentInner",
">",
"getAsync",
"(",
"String",
"scope",
",",
"String",
"policyAssignmentName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"scope",
",",
"policyAssignmentName",
")",
".",
"map",
"(",
"new",
"Func1",
... | Gets a policy assignment.
@param scope The scope of the policy assignment.
@param policyAssignmentName The name of the policy assignment to get.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PolicyAssignmentInner object | [
"Gets",
"a",
"policy",
"assignment",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyAssignmentsInner.java#L330-L337 |
Impetus/Kundera | src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESQuery.java | ESQuery.buildAggregation | public AggregationBuilder buildAggregation(KunderaQuery query, EntityMetadata entityMetadata, QueryBuilder filter) {
"""
Use aggregation.
@param query
the query
@param entityMetadata
the entity metadata
@param filter
the filter
@return the filter aggregation builder
"""
SelectStatement selectS... | java | public AggregationBuilder buildAggregation(KunderaQuery query, EntityMetadata entityMetadata, QueryBuilder filter)
{
SelectStatement selectStatement = query.getSelectStatement();
// To apply filter for where clause
AggregationBuilder aggregationBuilder = buildWhereAggregations(entityMetadat... | [
"public",
"AggregationBuilder",
"buildAggregation",
"(",
"KunderaQuery",
"query",
",",
"EntityMetadata",
"entityMetadata",
",",
"QueryBuilder",
"filter",
")",
"{",
"SelectStatement",
"selectStatement",
"=",
"query",
".",
"getSelectStatement",
"(",
")",
";",
"// To apply... | Use aggregation.
@param query
the query
@param entityMetadata
the entity metadata
@param filter
the filter
@return the filter aggregation builder | [
"Use",
"aggregation",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESQuery.java#L218-L245 |
JodaOrg/joda-time | src/main/java/org/joda/time/Days.java | Days.daysBetween | public static Days daysBetween(ReadableInstant start, ReadableInstant end) {
"""
Creates a <code>Days</code> representing the number of whole days
between the two specified datetimes. This method correctly handles
any daylight savings time changes that may occur during the interval.
@param start the start in... | java | public static Days daysBetween(ReadableInstant start, ReadableInstant end) {
int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.days());
return Days.days(amount);
} | [
"public",
"static",
"Days",
"daysBetween",
"(",
"ReadableInstant",
"start",
",",
"ReadableInstant",
"end",
")",
"{",
"int",
"amount",
"=",
"BaseSingleFieldPeriod",
".",
"between",
"(",
"start",
",",
"end",
",",
"DurationFieldType",
".",
"days",
"(",
")",
")",
... | Creates a <code>Days</code> representing the number of whole days
between the two specified datetimes. This method correctly handles
any daylight savings time changes that may occur during the interval.
@param start the start instant, must not be null
@param end the end instant, must not be null
@return the period i... | [
"Creates",
"a",
"<code",
">",
"Days<",
"/",
"code",
">",
"representing",
"the",
"number",
"of",
"whole",
"days",
"between",
"the",
"two",
"specified",
"datetimes",
".",
"This",
"method",
"correctly",
"handles",
"any",
"daylight",
"savings",
"time",
"changes",
... | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Days.java#L117-L120 |
GII/broccoli | broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/serviceBuilder/OWLSServiceBuilder.java | OWLSServiceBuilder.buildOWLSServiceFromLocalOrRemoteURI | private OWLSAtomicService buildOWLSServiceFromLocalOrRemoteURI(URI serviceURI, List<URI> modelURIs) throws ModelException {
"""
Builds an OWLSAtomicService, from a given URI that has to be a local file
or an http URL
@param serviceURI the URI for the service location
@param modelURIs a List of URIs for ontolo... | java | private OWLSAtomicService buildOWLSServiceFromLocalOrRemoteURI(URI serviceURI, List<URI> modelURIs) throws ModelException
{
BSDFLogger.getLogger().info("Builds OWL service (BSDF functionality) from: " + serviceURI.toString());
OWLContainer owlSyntaxTranslator = new OWLContainer();
OWLKnowled... | [
"private",
"OWLSAtomicService",
"buildOWLSServiceFromLocalOrRemoteURI",
"(",
"URI",
"serviceURI",
",",
"List",
"<",
"URI",
">",
"modelURIs",
")",
"throws",
"ModelException",
"{",
"BSDFLogger",
".",
"getLogger",
"(",
")",
".",
"info",
"(",
"\"Builds OWL service (BSDF f... | Builds an OWLSAtomicService, from a given URI that has to be a local file
or an http URL
@param serviceURI the URI for the service location
@param modelURIs a List of URIs for ontologies that may be used by the
service to be loaded (currently needed when the service is written in
functional or turtle syntax)
@return
@... | [
"Builds",
"an",
"OWLSAtomicService",
"from",
"a",
"given",
"URI",
"that",
"has",
"to",
"be",
"a",
"local",
"file",
"or",
"an",
"http",
"URL"
] | train | https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owls/serviceBuilder/OWLSServiceBuilder.java#L129-L145 |
alkacon/opencms-core | src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java | CmsCheckableDatePanel.addCheckBox | private void addCheckBox(Date date, boolean checkState) {
"""
Add a new check box.
@param date the date for the check box
@param checkState the initial check state.
"""
CmsCheckBox cb = generateCheckBox(date, checkState);
m_checkBoxes.add(cb);
reInitLayoutElements();
} | java | private void addCheckBox(Date date, boolean checkState) {
CmsCheckBox cb = generateCheckBox(date, checkState);
m_checkBoxes.add(cb);
reInitLayoutElements();
} | [
"private",
"void",
"addCheckBox",
"(",
"Date",
"date",
",",
"boolean",
"checkState",
")",
"{",
"CmsCheckBox",
"cb",
"=",
"generateCheckBox",
"(",
"date",
",",
"checkState",
")",
";",
"m_checkBoxes",
".",
"add",
"(",
"cb",
")",
";",
"reInitLayoutElements",
"(... | Add a new check box.
@param date the date for the check box
@param checkState the initial check state. | [
"Add",
"a",
"new",
"check",
"box",
"."
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsCheckableDatePanel.java#L272-L278 |
Impetus/Kundera | src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java | AbstractManagedType.onValidity | private void onValidity(String paramString, boolean checkValidity, SingularAttribute<? super X, ?> attribute) {
"""
On validity check.
@param paramString
the param string
@param checkValidity
the check validity
@param attribute
the attribute
"""
if (checkValidity)
{
checkFor... | java | private void onValidity(String paramString, boolean checkValidity, SingularAttribute<? super X, ?> attribute)
{
if (checkValidity)
{
checkForValid(paramString, attribute);
}
} | [
"private",
"void",
"onValidity",
"(",
"String",
"paramString",
",",
"boolean",
"checkValidity",
",",
"SingularAttribute",
"<",
"?",
"super",
"X",
",",
"?",
">",
"attribute",
")",
"{",
"if",
"(",
"checkValidity",
")",
"{",
"checkForValid",
"(",
"paramString",
... | On validity check.
@param paramString
the param string
@param checkValidity
the check validity
@param attribute
the attribute | [
"On",
"validity",
"check",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L1193-L1200 |
GoogleCloudPlatform/appengine-mapreduce | java/src/main/java/com/google/appengine/tools/mapreduce/impl/GoogleCloudStorageReduceInput.java | GoogleCloudStorageReduceInput.createReaderForShard | private MergingReader<K, V> createReaderForShard(
Marshaller<KeyValue<ByteBuffer, ? extends Iterable<V>>> marshaller,
GoogleCloudStorageFileSet reducerInputFileSet) {
"""
Create a {@link MergingReader} that combines all the input files the reducer to provide a
global sort over all data for the shard.
... | java | private MergingReader<K, V> createReaderForShard(
Marshaller<KeyValue<ByteBuffer, ? extends Iterable<V>>> marshaller,
GoogleCloudStorageFileSet reducerInputFileSet) {
ArrayList<PeekingInputReader<KeyValue<ByteBuffer, ? extends Iterable<V>>>> inputFiles =
new ArrayList<>();
GoogleCloudStorage... | [
"private",
"MergingReader",
"<",
"K",
",",
"V",
">",
"createReaderForShard",
"(",
"Marshaller",
"<",
"KeyValue",
"<",
"ByteBuffer",
",",
"?",
"extends",
"Iterable",
"<",
"V",
">",
">",
">",
"marshaller",
",",
"GoogleCloudStorageFileSet",
"reducerInputFileSet",
"... | Create a {@link MergingReader} that combines all the input files the reducer to provide a
global sort over all data for the shard.
(There are multiple input files in the event that the data didn't fit into the sorter's
memory)
A {@link MergingReader} is used to combine contents while maintaining key-order. This requi... | [
"Create",
"a",
"{",
"@link",
"MergingReader",
"}",
"that",
"combines",
"all",
"the",
"input",
"files",
"the",
"reducer",
"to",
"provide",
"a",
"global",
"sort",
"over",
"all",
"data",
"for",
"the",
"shard",
"."
] | train | https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/GoogleCloudStorageReduceInput.java#L71-L82 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java | DataLabelingServiceClient.formatAnnotationSpecSetName | @Deprecated
public static final String formatAnnotationSpecSetName(String project, String annotationSpecSet) {
"""
Formats a string containing the fully-qualified path to represent a annotation_spec_set
resource.
@deprecated Use the {@link AnnotationSpecSetName} class instead.
"""
return ANNOTATION_S... | java | @Deprecated
public static final String formatAnnotationSpecSetName(String project, String annotationSpecSet) {
return ANNOTATION_SPEC_SET_PATH_TEMPLATE.instantiate(
"project", project,
"annotation_spec_set", annotationSpecSet);
} | [
"@",
"Deprecated",
"public",
"static",
"final",
"String",
"formatAnnotationSpecSetName",
"(",
"String",
"project",
",",
"String",
"annotationSpecSet",
")",
"{",
"return",
"ANNOTATION_SPEC_SET_PATH_TEMPLATE",
".",
"instantiate",
"(",
"\"project\"",
",",
"project",
",",
... | Formats a string containing the fully-qualified path to represent a annotation_spec_set
resource.
@deprecated Use the {@link AnnotationSpecSetName} class instead. | [
"Formats",
"a",
"string",
"containing",
"the",
"fully",
"-",
"qualified",
"path",
"to",
"represent",
"a",
"annotation_spec_set",
"resource",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L162-L167 |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/AbstractDb.java | AbstractDb.insertOrUpdate | public int insertOrUpdate(Entity record, String... keys) throws SQLException {
"""
插入或更新数据<br>
根据给定的字段名查询数据,如果存在则更新这些数据,否则执行插入
@param record 记录
@param keys 需要检查唯一性的字段
@return 插入行数
@throws SQLException SQL执行异常
@since 4.0.10
"""
Connection conn = null;
try {
conn = this.getConnection();
ret... | java | public int insertOrUpdate(Entity record, String... keys) throws SQLException {
Connection conn = null;
try {
conn = this.getConnection();
return runner.insertOrUpdate(conn, record, keys);
} catch (SQLException e) {
throw e;
} finally {
this.closeConnection(conn);
}
} | [
"public",
"int",
"insertOrUpdate",
"(",
"Entity",
"record",
",",
"String",
"...",
"keys",
")",
"throws",
"SQLException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"try",
"{",
"conn",
"=",
"this",
".",
"getConnection",
"(",
")",
";",
"return",
"runner",
... | 插入或更新数据<br>
根据给定的字段名查询数据,如果存在则更新这些数据,否则执行插入
@param record 记录
@param keys 需要检查唯一性的字段
@return 插入行数
@throws SQLException SQL执行异常
@since 4.0.10 | [
"插入或更新数据<br",
">",
"根据给定的字段名查询数据,如果存在则更新这些数据,否则执行插入"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L268-L278 |
phax/ph-schedule | ph-mini-quartz/src/main/java/com/helger/quartz/core/QuartzScheduler.java | QuartzScheduler.triggerJob | public void triggerJob (final JobKey jobKey, final JobDataMap data) throws SchedulerException {
"""
<p>
Trigger the identified <code>{@link com.helger.quartz.IJob}</code> (execute
it now) - with a non-volatile trigger.
</p>
"""
validateState ();
final IOperableTrigger trig = (IOperableTrigger) newT... | java | public void triggerJob (final JobKey jobKey, final JobDataMap data) throws SchedulerException
{
validateState ();
final IOperableTrigger trig = (IOperableTrigger) newTrigger ().withIdentity (_newTriggerId (),
IScheduler.DEFAULT_... | [
"public",
"void",
"triggerJob",
"(",
"final",
"JobKey",
"jobKey",
",",
"final",
"JobDataMap",
"data",
")",
"throws",
"SchedulerException",
"{",
"validateState",
"(",
")",
";",
"final",
"IOperableTrigger",
"trig",
"=",
"(",
"IOperableTrigger",
")",
"newTrigger",
... | <p>
Trigger the identified <code>{@link com.helger.quartz.IJob}</code> (execute
it now) - with a non-volatile trigger.
</p> | [
"<p",
">",
"Trigger",
"the",
"identified",
"<code",
">",
"{"
] | train | https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/core/QuartzScheduler.java#L947-L977 |
wouterd/docker-maven-plugin | src/main/java/net/wouterdanes/docker/remoteapi/MiscService.java | MiscService.buildImage | public String buildImage(byte[] tarArchive, Optional<String> name, Optional<String> buildArguments) {
"""
Builds an image based on the passed tar archive. Optionally names & tags the image
@param tarArchive the tar archive to use as a source for the image
@param name the name and option... | java | public String buildImage(byte[] tarArchive, Optional<String> name, Optional<String> buildArguments) {
Response response = getServiceEndPoint()
.path("/build")
.queryParam("q", true)
.queryParam("t", name.orElse(null))
.queryParam("buildargs", UriCo... | [
"public",
"String",
"buildImage",
"(",
"byte",
"[",
"]",
"tarArchive",
",",
"Optional",
"<",
"String",
">",
"name",
",",
"Optional",
"<",
"String",
">",
"buildArguments",
")",
"{",
"Response",
"response",
"=",
"getServiceEndPoint",
"(",
")",
".",
"path",
"... | Builds an image based on the passed tar archive. Optionally names & tags the image
@param tarArchive the tar archive to use as a source for the image
@param name the name and optional tag of the image.
@param buildArguments a list of optional build arguments made available to the Dockerfile.... | [
"Builds",
"an",
"image",
"based",
"on",
"the",
"passed",
"tar",
"archive",
".",
"Optionally",
"names",
"&",
";",
"tags",
"the",
"image"
] | train | https://github.com/wouterd/docker-maven-plugin/blob/ea15f9e6c273989bb91f4228fb52cb73d00e07b3/src/main/java/net/wouterdanes/docker/remoteapi/MiscService.java#L121-L141 |
openbase/jul | processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java | XMLProcessor.extractAttributeValue | public static String extractAttributeValue(final String attrName, final Node doc, final boolean throwException) throws XMLParsingException {
"""
<p>
Returns the first Attribute with name attrName from Document doc. Uses xPath "//
@throws XMLParsingException
@param throwException flag set throw exception if no... | java | public static String extractAttributeValue(final String attrName, final Node doc, final boolean throwException) throws XMLParsingException {
String xpath = "descendant-or-self::*/@" + attrName;
Nodes nodes = doc.query(xpath);
for (int i = 0; i < nodes.size(); i++) {
if (nodes.get(i) ... | [
"public",
"static",
"String",
"extractAttributeValue",
"(",
"final",
"String",
"attrName",
",",
"final",
"Node",
"doc",
",",
"final",
"boolean",
"throwException",
")",
"throws",
"XMLParsingException",
"{",
"String",
"xpath",
"=",
"\"descendant-or-self::*/@\"",
"+",
... | <p>
Returns the first Attribute with name attrName from Document doc. Uses xPath "//
@throws XMLParsingException
@param throwException flag set throw exception if no such Attribute can be found. <br>
@param attrName
@param doc
@return | [
"<p",
">",
"Returns",
"the",
"first",
"Attribute",
"with",
"name",
"attrName",
"from",
"Document",
"doc",
".",
"Uses",
"xPath",
"//"
] | train | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java#L269-L282 |
hypercube1024/firefly | firefly/src/main/java/com/firefly/codec/websocket/stream/IOState.java | IOState.onReadFailure | public void onReadFailure(Throwable t) {
"""
The local endpoint has reached a read failure.
<p>
This could be a normal result after a proper close handshake, or even a premature close due to a connection disconnect.
@param t the read failure
"""
ConnectionState event = null;
synchronized (... | java | public void onReadFailure(Throwable t) {
ConnectionState event = null;
synchronized (this) {
if (this.state == ConnectionState.CLOSED) {
// already closed
return;
}
// Build out Close Reason
String reason = "WebSocket Read ... | [
"public",
"void",
"onReadFailure",
"(",
"Throwable",
"t",
")",
"{",
"ConnectionState",
"event",
"=",
"null",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"state",
"==",
"ConnectionState",
".",
"CLOSED",
")",
"{",
"// already closed",
... | The local endpoint has reached a read failure.
<p>
This could be a normal result after a proper close handshake, or even a premature close due to a connection disconnect.
@param t the read failure | [
"The",
"local",
"endpoint",
"has",
"reached",
"a",
"read",
"failure",
".",
"<p",
">",
"This",
"could",
"be",
"a",
"normal",
"result",
"after",
"a",
"proper",
"close",
"handshake",
"or",
"even",
"a",
"premature",
"close",
"due",
"to",
"a",
"connection",
"... | train | https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/websocket/stream/IOState.java#L395-L430 |
BranchMetrics/android-branch-deep-linking | Branch-SDK/src/io/branch/referral/Branch.java | Branch.initSession | public boolean initSession(BranchUniversalReferralInitListener callback, boolean isReferrable, Activity activity) {
"""
<p>Initialises a session with the Branch API.</p>
@param callback A {@link BranchUniversalReferralInitListener} instance that will be called
following successful (or unsuccessful) initial... | java | public boolean initSession(BranchUniversalReferralInitListener callback, boolean isReferrable, Activity activity) {
initUserSessionInternal(callback, activity, isReferrable);
return true;
} | [
"public",
"boolean",
"initSession",
"(",
"BranchUniversalReferralInitListener",
"callback",
",",
"boolean",
"isReferrable",
",",
"Activity",
"activity",
")",
"{",
"initUserSessionInternal",
"(",
"callback",
",",
"activity",
",",
"isReferrable",
")",
";",
"return",
"tr... | <p>Initialises a session with the Branch API.</p>
@param callback A {@link BranchUniversalReferralInitListener} instance that will be called
following successful (or unsuccessful) initialisation of the session
with the Branch API.
@param isReferrable A {@link Boolean} value indicating whether this initialisation
s... | [
"<p",
">",
"Initialises",
"a",
"session",
"with",
"the",
"Branch",
"API",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1311-L1314 |
daimajia/AndroidImageSlider | library/src/main/java/com/daimajia/slider/library/SliderLayout.java | SliderLayout.setSliderTransformDuration | public void setSliderTransformDuration(int period,Interpolator interpolator) {
"""
set the duration between two slider changes.
@param period
@param interpolator
"""
try{
Field mScroller = ViewPagerEx.class.getDeclaredField("mScroller");
mScroller.setAccessible(true);
... | java | public void setSliderTransformDuration(int period,Interpolator interpolator){
try{
Field mScroller = ViewPagerEx.class.getDeclaredField("mScroller");
mScroller.setAccessible(true);
FixedSpeedScroller scroller = new FixedSpeedScroller(mViewPager.getContext(),interpolator, peri... | [
"public",
"void",
"setSliderTransformDuration",
"(",
"int",
"period",
",",
"Interpolator",
"interpolator",
")",
"{",
"try",
"{",
"Field",
"mScroller",
"=",
"ViewPagerEx",
".",
"class",
".",
"getDeclaredField",
"(",
"\"mScroller\"",
")",
";",
"mScroller",
".",
"s... | set the duration between two slider changes.
@param period
@param interpolator | [
"set",
"the",
"duration",
"between",
"two",
"slider",
"changes",
"."
] | train | https://github.com/daimajia/AndroidImageSlider/blob/e318cabdef668de985efdcc45ca304e2ac6f58b5/library/src/main/java/com/daimajia/slider/library/SliderLayout.java#L380-L389 |
OpenLiberty/open-liberty | dev/com.ibm.rls.jdbc/src/com/ibm/ws/recoverylog/custom/jdbc/impl/SQLMultiScopeRecoveryLog.java | SQLMultiScopeRecoveryLog.closeConnectionAfterBatch | private void closeConnectionAfterBatch(Connection conn, int initialIsolation) throws SQLException {
"""
closes the connection and resets the isolation level if required
"""
if (_isDB2)
{
if (Connection.TRANSACTION_REPEATABLE_READ != initialIsolation && Connection.TRANSACTION_SERIALI... | java | private void closeConnectionAfterBatch(Connection conn, int initialIsolation) throws SQLException {
if (_isDB2)
{
if (Connection.TRANSACTION_REPEATABLE_READ != initialIsolation && Connection.TRANSACTION_SERIALIZABLE != initialIsolation)
try
{
... | [
"private",
"void",
"closeConnectionAfterBatch",
"(",
"Connection",
"conn",
",",
"int",
"initialIsolation",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"_isDB2",
")",
"{",
"if",
"(",
"Connection",
".",
"TRANSACTION_REPEATABLE_READ",
"!=",
"initialIsolation",
"&&",... | closes the connection and resets the isolation level if required | [
"closes",
"the",
"connection",
"and",
"resets",
"the",
"isolation",
"level",
"if",
"required"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.rls.jdbc/src/com/ibm/ws/recoverylog/custom/jdbc/impl/SQLMultiScopeRecoveryLog.java#L3496-L3516 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/component/canvas/CanvasRenderer.java | CanvasRenderer.encodeBegin | @Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
"""
This methods generates the HTML code of the current b:canvas.
@param context the FacesContext.
@param component the current b:canvas.
@throws IOException thrown if something goes wrong when writing the HTML ... | java | @Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
Canvas canvas = (Canvas) component;
ResponseWriter rw = context.getResponseWriter();
String clientId = canvas.getClientId();
rw.startElement("canvas",... | [
"@",
"Override",
"public",
"void",
"encodeBegin",
"(",
"FacesContext",
"context",
",",
"UIComponent",
"component",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"component",
".",
"isRendered",
"(",
")",
")",
"{",
"return",
";",
"}",
"Canvas",
"canvas",
... | This methods generates the HTML code of the current b:canvas.
@param context the FacesContext.
@param component the current b:canvas.
@throws IOException thrown if something goes wrong when writing the HTML code. | [
"This",
"methods",
"generates",
"the",
"HTML",
"code",
"of",
"the",
"current",
"b",
":",
"canvas",
"."
] | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/canvas/CanvasRenderer.java#L42-L79 |
Mthwate/DatLib | src/main/java/com/mthwate/datlib/HashUtils.java | HashUtils.sha224Hex | public static String sha224Hex(String data, Charset charset) throws NoSuchAlgorithmException {
"""
Hashes a string using the SHA-224 algorithm. Returns a hexadecimal result.
@since 1.1
@param data the string to hash
@param charset the charset of the string
@return the hexadecimal SHA-224 hash of the string
... | java | public static String sha224Hex(String data, Charset charset) throws NoSuchAlgorithmException {
return sha224Hex(data.getBytes(charset));
} | [
"public",
"static",
"String",
"sha224Hex",
"(",
"String",
"data",
",",
"Charset",
"charset",
")",
"throws",
"NoSuchAlgorithmException",
"{",
"return",
"sha224Hex",
"(",
"data",
".",
"getBytes",
"(",
"charset",
")",
")",
";",
"}"
] | Hashes a string using the SHA-224 algorithm. Returns a hexadecimal result.
@since 1.1
@param data the string to hash
@param charset the charset of the string
@return the hexadecimal SHA-224 hash of the string
@throws NoSuchAlgorithmException the algorithm is not supported by existing providers | [
"Hashes",
"a",
"string",
"using",
"the",
"SHA",
"-",
"224",
"algorithm",
".",
"Returns",
"a",
"hexadecimal",
"result",
"."
] | train | https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/HashUtils.java#L360-L362 |
JavaMoney/jsr354-ri | moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/ECBRateReadingHandler.java | ECBRateReadingHandler.addRate | void addRate(CurrencyUnit term, LocalDate localDate, Number rate) {
"""
Method to add a currency exchange rate.
@param term the term (target) currency, mapped from EUR.
@param rate The rate.
"""
RateType rateType = RateType.HISTORIC;
ExchangeRateBuilder builder;
if (Object... | java | void addRate(CurrencyUnit term, LocalDate localDate, Number rate) {
RateType rateType = RateType.HISTORIC;
ExchangeRateBuilder builder;
if (Objects.nonNull(localDate)) {
// TODO check/test!
if (localDate.equals(LocalDate.now())) {
rateType = RateType.DEFER... | [
"void",
"addRate",
"(",
"CurrencyUnit",
"term",
",",
"LocalDate",
"localDate",
",",
"Number",
"rate",
")",
"{",
"RateType",
"rateType",
"=",
"RateType",
".",
"HISTORIC",
";",
"ExchangeRateBuilder",
"builder",
";",
"if",
"(",
"Objects",
".",
"nonNull",
"(",
"... | Method to add a currency exchange rate.
@param term the term (target) currency, mapped from EUR.
@param rate The rate. | [
"Method",
"to",
"add",
"a",
"currency",
"exchange",
"rate",
"."
] | train | https://github.com/JavaMoney/jsr354-ri/blob/cf8ff2bbaf9b115acc05eb9b0c76c8397c308284/moneta-convert/moneta-convert-ecb/src/main/java/org/javamoney/moneta/convert/ecb/ECBRateReadingHandler.java#L100-L126 |
openengsb/openengsb | components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/ManipulationUtils.java | ManipulationUtils.addFileFunction | private static void addFileFunction(CtClass clazz, String property)
throws NotFoundException, CannotCompileException {
"""
Adds the functionality that the models can handle File objects themselves.
"""
String wrapperName = property + "wrapper";
String funcName = "set";
funcName ... | java | private static void addFileFunction(CtClass clazz, String property)
throws NotFoundException, CannotCompileException {
String wrapperName = property + "wrapper";
String funcName = "set";
funcName = funcName + Character.toUpperCase(wrapperName.charAt(0));
funcName = funcName + wra... | [
"private",
"static",
"void",
"addFileFunction",
"(",
"CtClass",
"clazz",
",",
"String",
"property",
")",
"throws",
"NotFoundException",
",",
"CannotCompileException",
"{",
"String",
"wrapperName",
"=",
"property",
"+",
"\"wrapper\"",
";",
"String",
"funcName",
"=",
... | Adds the functionality that the models can handle File objects themselves. | [
"Adds",
"the",
"functionality",
"that",
"the",
"models",
"can",
"handle",
"File",
"objects",
"themselves",
"."
] | train | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/weaver/service/src/main/java/org/openengsb/core/weaver/service/internal/model/ManipulationUtils.java#L498-L511 |
netheosgithub/pcs_api | java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java | PcsUtils.buildCStorageException | public static CStorageException buildCStorageException( CResponse response, String message, CPath path ) {
"""
Some common code between providers. Handles the different status codes, and generates a nice exception
@param response The wrapped HTTP response
@param message The error message (provided by the serve... | java | public static CStorageException buildCStorageException( CResponse response, String message, CPath path )
{
switch ( response.getStatus() ) {
case 401:
return new CAuthenticationException( message, response );
case 404:
message = "No file found at URL ... | [
"public",
"static",
"CStorageException",
"buildCStorageException",
"(",
"CResponse",
"response",
",",
"String",
"message",
",",
"CPath",
"path",
")",
"{",
"switch",
"(",
"response",
".",
"getStatus",
"(",
")",
")",
"{",
"case",
"401",
":",
"return",
"new",
"... | Some common code between providers. Handles the different status codes, and generates a nice exception
@param response The wrapped HTTP response
@param message The error message (provided by the server or by the application)
@param path The file requested (which failed)
@return The exception | [
"Some",
"common",
"code",
"between",
"providers",
".",
"Handles",
"the",
"different",
"status",
"codes",
"and",
"generates",
"a",
"nice",
"exception"
] | train | https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/PcsUtils.java#L117-L130 |
awslabs/amazon-sqs-java-extended-client-lib | src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClient.java | AmazonSQSExtendedClient.changeMessageVisibilityBatch | public ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch(
String queueUrl,
java.util.List<ChangeMessageVisibilityBatchRequestEntry> entries) {
"""
Simplified method form for invoking the ChangeMessageVisibilityBatch
operation.
@see #changeMessageVisibilityBatch(ChangeMessageVisibilityBatchR... | java | public ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch(
String queueUrl,
java.util.List<ChangeMessageVisibilityBatchRequestEntry> entries) {
ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest =
new ChangeMessageVisibilityBatchRequest(queueUrl, entries);
return changeMe... | [
"public",
"ChangeMessageVisibilityBatchResult",
"changeMessageVisibilityBatch",
"(",
"String",
"queueUrl",
",",
"java",
".",
"util",
".",
"List",
"<",
"ChangeMessageVisibilityBatchRequestEntry",
">",
"entries",
")",
"{",
"ChangeMessageVisibilityBatchRequest",
"changeMessageVisi... | Simplified method form for invoking the ChangeMessageVisibilityBatch
operation.
@see #changeMessageVisibilityBatch(ChangeMessageVisibilityBatchRequest) | [
"Simplified",
"method",
"form",
"for",
"invoking",
"the",
"ChangeMessageVisibilityBatch",
"operation",
"."
] | train | https://github.com/awslabs/amazon-sqs-java-extended-client-lib/blob/df0c6251b99e682d6179938fe784590e662b84ea/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClient.java#L983-L989 |
Metatavu/edelphi | edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/util/ChartModelProvider.java | ChartModelProvider.translateMarkerToRange | private static Double translateMarkerToRange(double size, Double min, Double max, Double value) {
"""
Translates marker value to be correct in given range
@param size size of the range
@param min min value
@param max max value
@param value original value
@return translated value
"""
if (value != nul... | java | private static Double translateMarkerToRange(double size, Double min, Double max, Double value) {
if (value != null && min != null && max != null) {
return (size / (max - min)) * (value - min);
}
return value;
} | [
"private",
"static",
"Double",
"translateMarkerToRange",
"(",
"double",
"size",
",",
"Double",
"min",
",",
"Double",
"max",
",",
"Double",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
"&&",
"min",
"!=",
"null",
"&&",
"max",
"!=",
"null",
")",
"... | Translates marker value to be correct in given range
@param size size of the range
@param min min value
@param max max value
@param value original value
@return translated value | [
"Translates",
"marker",
"value",
"to",
"be",
"correct",
"in",
"given",
"range"
] | train | https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/util/ChartModelProvider.java#L781-L787 |
phax/ph-schedule | ph-mini-quartz/src/main/java/com/helger/quartz/SimpleScheduleBuilder.java | SimpleScheduleBuilder.repeatMinutelyForTotalCount | @Nonnull
public static SimpleScheduleBuilder repeatMinutelyForTotalCount (final int nCount, final int nMinutes) {
"""
Create a SimpleScheduleBuilder set to repeat the given number of times - 1
with an interval of the given number of minutes.
<p>
Note: Total count = 1 (at start time) + repeat count
</p>
@r... | java | @Nonnull
public static SimpleScheduleBuilder repeatMinutelyForTotalCount (final int nCount, final int nMinutes)
{
ValueEnforcer.isGT0 (nCount, "Count");
return simpleSchedule ().withIntervalInMinutes (nMinutes).withRepeatCount (nCount - 1);
} | [
"@",
"Nonnull",
"public",
"static",
"SimpleScheduleBuilder",
"repeatMinutelyForTotalCount",
"(",
"final",
"int",
"nCount",
",",
"final",
"int",
"nMinutes",
")",
"{",
"ValueEnforcer",
".",
"isGT0",
"(",
"nCount",
",",
"\"Count\"",
")",
";",
"return",
"simpleSchedul... | Create a SimpleScheduleBuilder set to repeat the given number of times - 1
with an interval of the given number of minutes.
<p>
Note: Total count = 1 (at start time) + repeat count
</p>
@return the new SimpleScheduleBuilder | [
"Create",
"a",
"SimpleScheduleBuilder",
"set",
"to",
"repeat",
"the",
"given",
"number",
"of",
"times",
"-",
"1",
"with",
"an",
"interval",
"of",
"the",
"given",
"number",
"of",
"minutes",
".",
"<p",
">",
"Note",
":",
"Total",
"count",
"=",
"1",
"(",
"... | train | https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/SimpleScheduleBuilder.java#L173-L178 |
mikepenz/FastAdapter | library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/DragDropUtil.java | DragDropUtil.onMove | public static void onMove(ItemAdapter itemAdapter, int oldPosition, int newPosition) {
"""
/*
This functions handles the default drag and drop move event
It takes care to move all items one by one within the passed in positions
@param fastAdapter the adapter
@param oldPosition the start position of the move
... | java | public static void onMove(ItemAdapter itemAdapter, int oldPosition, int newPosition) {
// necessary, because the positions passed to this function may be jumping in case of that the recycler view is scrolled while holding an item outside of the recycler view
if (oldPosition < newPosition) {
... | [
"public",
"static",
"void",
"onMove",
"(",
"ItemAdapter",
"itemAdapter",
",",
"int",
"oldPosition",
",",
"int",
"newPosition",
")",
"{",
"// necessary, because the positions passed to this function may be jumping in case of that the recycler view is scrolled while holding an item outsi... | /*
This functions handles the default drag and drop move event
It takes care to move all items one by one within the passed in positions
@param fastAdapter the adapter
@param oldPosition the start position of the move
@param newPosition the end position of the move | [
"/",
"*",
"This",
"functions",
"handles",
"the",
"default",
"drag",
"and",
"drop",
"move",
"event",
"It",
"takes",
"care",
"to",
"move",
"all",
"items",
"one",
"by",
"one",
"within",
"the",
"passed",
"in",
"positions"
] | train | https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/DragDropUtil.java#L47-L58 |
codelibs/jcifs | src/main/java/jcifs/smb1/Config.java | Config.getProperty | public static String getProperty( String key, String def ) {
"""
Retrieve a <code>String</code>. If the key cannot be found,
the provided <code>def</code> default parameter will be returned.
"""
return prp.getProperty( key, def );
} | java | public static String getProperty( String key, String def ) {
return prp.getProperty( key, def );
} | [
"public",
"static",
"String",
"getProperty",
"(",
"String",
"key",
",",
"String",
"def",
")",
"{",
"return",
"prp",
".",
"getProperty",
"(",
"key",
",",
"def",
")",
";",
"}"
] | Retrieve a <code>String</code>. If the key cannot be found,
the provided <code>def</code> default parameter will be returned. | [
"Retrieve",
"a",
"<code",
">",
"String<",
"/",
"code",
">",
".",
"If",
"the",
"key",
"cannot",
"be",
"found",
"the",
"provided",
"<code",
">",
"def<",
"/",
"code",
">",
"default",
"parameter",
"will",
"be",
"returned",
"."
] | train | https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/Config.java#L204-L206 |
googleapis/google-http-java-client | google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java | SecurityUtils.getPrivateKey | public static PrivateKey getPrivateKey(KeyStore keyStore, String alias, String keyPass)
throws GeneralSecurityException {
"""
Returns the private key from the key store.
@param keyStore key store
@param alias alias under which the key is stored
@param keyPass password protecting the key
@return private... | java | public static PrivateKey getPrivateKey(KeyStore keyStore, String alias, String keyPass)
throws GeneralSecurityException {
return (PrivateKey) keyStore.getKey(alias, keyPass.toCharArray());
} | [
"public",
"static",
"PrivateKey",
"getPrivateKey",
"(",
"KeyStore",
"keyStore",
",",
"String",
"alias",
",",
"String",
"keyPass",
")",
"throws",
"GeneralSecurityException",
"{",
"return",
"(",
"PrivateKey",
")",
"keyStore",
".",
"getKey",
"(",
"alias",
",",
"key... | Returns the private key from the key store.
@param keyStore key store
@param alias alias under which the key is stored
@param keyPass password protecting the key
@return private key | [
"Returns",
"the",
"private",
"key",
"from",
"the",
"key",
"store",
"."
] | train | https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java#L92-L95 |
ykrasik/jaci | jaci-core/src/main/java/com/github/ykrasik/jaci/path/ParsedPath.java | ParsedPath.toDirectory | public static ParsedPath toDirectory(String rawPath) {
"""
Create a path that is expected to represent a path to a directory.
This means that if the path ends with a delimiter '/', it is considered the same as if it didn't.
i.e. path/to and path/to/ are considered the same - a path with 2 elements: 'path' and 't... | java | public static ParsedPath toDirectory(String rawPath) {
final String path = rawPath.trim();
if (path.isEmpty()) {
// TODO: Is This legal?
return EMPTY;
}
if ("/".equals(path)) {
// TODO: Is this special case needed?
return ROOT;
}
... | [
"public",
"static",
"ParsedPath",
"toDirectory",
"(",
"String",
"rawPath",
")",
"{",
"final",
"String",
"path",
"=",
"rawPath",
".",
"trim",
"(",
")",
";",
"if",
"(",
"path",
".",
"isEmpty",
"(",
")",
")",
"{",
"// TODO: Is This legal?",
"return",
"EMPTY",... | Create a path that is expected to represent a path to a directory.
This means that if the path ends with a delimiter '/', it is considered the same as if it didn't.
i.e. path/to and path/to/ are considered the same - a path with 2 elements: 'path' and 'to'.
@param rawPath Path to parse.
@return A {@link ParsedPath} ou... | [
"Create",
"a",
"path",
"that",
"is",
"expected",
"to",
"represent",
"a",
"path",
"to",
"a",
"directory",
".",
"This",
"means",
"that",
"if",
"the",
"path",
"ends",
"with",
"a",
"delimiter",
"/",
"it",
"is",
"considered",
"the",
"same",
"as",
"if",
"it"... | train | https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-core/src/main/java/com/github/ykrasik/jaci/path/ParsedPath.java#L150-L168 |
carewebframework/carewebframework-core | org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/thread/ThreadEx.java | ThreadEx.setAttribute | public void setAttribute(String name, Object value) {
"""
Sets the named attribute to the specified value.
@param name Name of the attribute.
@param value Value to associate with the attribute.
"""
synchronized (attribute) {
attribute.put(name, value);
}
} | java | public void setAttribute(String name, Object value) {
synchronized (attribute) {
attribute.put(name, value);
}
} | [
"public",
"void",
"setAttribute",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"synchronized",
"(",
"attribute",
")",
"{",
"attribute",
".",
"put",
"(",
"name",
",",
"value",
")",
";",
"}",
"}"
] | Sets the named attribute to the specified value.
@param name Name of the attribute.
@param value Value to associate with the attribute. | [
"Sets",
"the",
"named",
"attribute",
"to",
"the",
"specified",
"value",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/thread/ThreadEx.java#L216-L220 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionTime_conditionId_PUT | public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionTime_conditionId_PUT(String billingAccount, String serviceName, Long dialplanId, Long extensionId, Long conditionId, OvhOvhPabxDialplanExtensionConditionTime body) throws IOException {
"""
Alter this object properties... | java | public void billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionTime_conditionId_PUT(String billingAccount, String serviceName, Long dialplanId, Long extensionId, Long conditionId, OvhOvhPabxDialplanExtensionConditionTime body) throws IOException {
String qPath = "/telephony/{billing... | [
"public",
"void",
"billingAccount_ovhPabx_serviceName_dialplan_dialplanId_extension_extensionId_conditionTime_conditionId_PUT",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"dialplanId",
",",
"Long",
"extensionId",
",",
"Long",
"conditionId",
",",
... | Alter this object properties
REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/dialplan/{dialplanId}/extension/{extensionId}/conditionTime/{conditionId}
@param body [required] New object properties
@param billingAccount [required] The name of your billingAccount
@param serviceName [required]
@param dialplanI... | [
"Alter",
"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#L7139-L7143 |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/cmdline/ExtensionUtils.java | ExtensionUtils.listToolExtensionDirectories | static private List<File> listToolExtensionDirectories(String extension) {
"""
Compose a list which contains all of directories which need to look into.
The directory may or may not exist.
the list of directories which this method returns is:
1, wlp/bin/tools/extensions,
2. wlp/usr/extension/bin/tools/extensio... | java | static private List<File> listToolExtensionDirectories(String extension) {
List<File> dirs = new ArrayList<File>();
dirs.add(new File(Utils.getInstallDir(), EXTENSION_DIR + extension)); // wlp/bin/tools/extensions
dirs.add(new File(Utils.getInstallDir(), USER_EXTENSION_DIR + extension)); // wlp/... | [
"static",
"private",
"List",
"<",
"File",
">",
"listToolExtensionDirectories",
"(",
"String",
"extension",
")",
"{",
"List",
"<",
"File",
">",
"dirs",
"=",
"new",
"ArrayList",
"<",
"File",
">",
"(",
")",
";",
"dirs",
".",
"add",
"(",
"new",
"File",
"("... | Compose a list which contains all of directories which need to look into.
The directory may or may not exist.
the list of directories which this method returns is:
1, wlp/bin/tools/extensions,
2. wlp/usr/extension/bin/tools/extensions,
3. all locations returned from ProductExtension.getProductExtensions() with /bin/too... | [
"Compose",
"a",
"list",
"which",
"contains",
"all",
"of",
"directories",
"which",
"need",
"to",
"look",
"into",
".",
"The",
"directory",
"may",
"or",
"may",
"not",
"exist",
".",
"the",
"list",
"of",
"directories",
"which",
"this",
"method",
"returns",
"is"... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/cmdline/ExtensionUtils.java#L55-L65 |
ZieIony/Carbon | carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java | ShapeAppearanceModel.setTopLeftCorner | public void setTopLeftCorner(@CornerFamily int cornerFamily, @Dimension int cornerSize) {
"""
Sets the corner treatment for the top-left corner.
@param cornerFamily the family to use to create the corner treatment
@param cornerSize the size to use to create the corner treatment
"""
setTopLeftCorn... | java | public void setTopLeftCorner(@CornerFamily int cornerFamily, @Dimension int cornerSize) {
setTopLeftCorner(MaterialShapeUtils.createCornerTreatment(cornerFamily, cornerSize));
} | [
"public",
"void",
"setTopLeftCorner",
"(",
"@",
"CornerFamily",
"int",
"cornerFamily",
",",
"@",
"Dimension",
"int",
"cornerSize",
")",
"{",
"setTopLeftCorner",
"(",
"MaterialShapeUtils",
".",
"createCornerTreatment",
"(",
"cornerFamily",
",",
"cornerSize",
")",
")"... | Sets the corner treatment for the top-left corner.
@param cornerFamily the family to use to create the corner treatment
@param cornerSize the size to use to create the corner treatment | [
"Sets",
"the",
"corner",
"treatment",
"for",
"the",
"top",
"-",
"left",
"corner",
"."
] | train | https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/shadow/ShapeAppearanceModel.java#L232-L234 |
Azure/azure-sdk-for-java | policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java | PolicyStatesInner.listQueryResultsForResourceGroup | public PolicyStatesQueryResultsInner listQueryResultsForResourceGroup(PolicyStatesResource policyStatesResource, String subscriptionId, String resourceGroupName, QueryOptions queryOptions) {
"""
Queries policy states for the resources under the resource group.
@param policyStatesResource The virtual resource un... | java | public PolicyStatesQueryResultsInner listQueryResultsForResourceGroup(PolicyStatesResource policyStatesResource, String subscriptionId, String resourceGroupName, QueryOptions queryOptions) {
return listQueryResultsForResourceGroupWithServiceResponseAsync(policyStatesResource, subscriptionId, resourceGroupName, ... | [
"public",
"PolicyStatesQueryResultsInner",
"listQueryResultsForResourceGroup",
"(",
"PolicyStatesResource",
"policyStatesResource",
",",
"String",
"subscriptionId",
",",
"String",
"resourceGroupName",
",",
"QueryOptions",
"queryOptions",
")",
"{",
"return",
"listQueryResultsForRe... | Queries policy states for the resources under the resource group.
@param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest'
@par... | [
"Queries",
"policy",
"states",
"for",
"the",
"resources",
"under",
"the",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L982-L984 |
telly/groundy | library/src/main/java/com/telly/groundy/Groundy.java | Groundy.addIntegerArrayList | public Groundy addIntegerArrayList(String key, ArrayList<Integer> value) {
"""
Inserts an ArrayList<Integer> value into the mapping of this Bundle, replacing any existing
value for the given key. Either key or value may be null.
@param key a String, or null
@param value an ArrayList<Integer> object, or null
... | java | public Groundy addIntegerArrayList(String key, ArrayList<Integer> value) {
mArgs.putIntegerArrayList(key, value);
return this;
} | [
"public",
"Groundy",
"addIntegerArrayList",
"(",
"String",
"key",
",",
"ArrayList",
"<",
"Integer",
">",
"value",
")",
"{",
"mArgs",
".",
"putIntegerArrayList",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Inserts an ArrayList<Integer> value into the mapping of this Bundle, replacing any existing
value for the given key. Either key or value may be null.
@param key a String, or null
@param value an ArrayList<Integer> object, or null | [
"Inserts",
"an",
"ArrayList<Integer",
">",
"value",
"into",
"the",
"mapping",
"of",
"this",
"Bundle",
"replacing",
"any",
"existing",
"value",
"for",
"the",
"given",
"key",
".",
"Either",
"key",
"or",
"value",
"may",
"be",
"null",
"."
] | train | https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L560-L563 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Objects.java | Objects.deepEquals | public static boolean deepEquals(Object a, Object b) {
"""
Returns {@code true} if the arguments are deeply equal to each other
and {@code false} otherwise.
Two {@code null} values are deeply equal. If both arguments are
arrays, the algorithm in {@link Arrays#deepEquals(Object[],
Object[]) Arrays.deepEquals... | java | public static boolean deepEquals(Object a, Object b) {
if (a == b)
return true;
else if (a == null || b == null)
return false;
else
return Arrays.deepEquals0(a, b);
} | [
"public",
"static",
"boolean",
"deepEquals",
"(",
"Object",
"a",
",",
"Object",
"b",
")",
"{",
"if",
"(",
"a",
"==",
"b",
")",
"return",
"true",
";",
"else",
"if",
"(",
"a",
"==",
"null",
"||",
"b",
"==",
"null",
")",
"return",
"false",
";",
"els... | Returns {@code true} if the arguments are deeply equal to each other
and {@code false} otherwise.
Two {@code null} values are deeply equal. If both arguments are
arrays, the algorithm in {@link Arrays#deepEquals(Object[],
Object[]) Arrays.deepEquals} is used to determine equality.
Otherwise, equality is determined by... | [
"Returns",
"{",
"@code",
"true",
"}",
"if",
"the",
"arguments",
"are",
"deeply",
"equal",
"to",
"each",
"other",
"and",
"{",
"@code",
"false",
"}",
"otherwise",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Objects.java#L79-L86 |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java | XMLUtil.getAttributeDate | @Pure
public static Date getAttributeDate(Node document, boolean caseSensitive, String... path) {
"""
Replies the date that corresponds to the specified attribute's path.
<p>The path is an ordered list of tag's names and ended by the name of
the attribute.
@param document is the XML document to explore.
@... | java | @Pure
public static Date getAttributeDate(Node document, boolean caseSensitive, String... path) {
assert document != null : AssertMessages.notNullParameter(0);
return getAttributeDateWithDefault(document, caseSensitive, null, path);
} | [
"@",
"Pure",
"public",
"static",
"Date",
"getAttributeDate",
"(",
"Node",
"document",
",",
"boolean",
"caseSensitive",
",",
"String",
"...",
"path",
")",
"{",
"assert",
"document",
"!=",
"null",
":",
"AssertMessages",
".",
"notNullParameter",
"(",
"0",
")",
... | Replies the date that corresponds to the specified attribute's path.
<p>The path is an ordered list of tag's names and ended by the name of
the attribute.
@param document is the XML document to explore.
@param caseSensitive indicates of the {@code path}'s components are case sensitive.
@param path is the list of and ... | [
"Replies",
"the",
"date",
"that",
"corresponds",
"to",
"the",
"specified",
"attribute",
"s",
"path",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L498-L502 |
UrielCh/ovh-java-sdk | ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java | ApiOvhIp.loadBalancing_serviceName_backend_backend_GET | public OvhLoadBalancingBackendIp loadBalancing_serviceName_backend_backend_GET(String serviceName, String backend) throws IOException {
"""
Get this object properties
REST: GET /ip/loadBalancing/{serviceName}/backend/{backend}
@param serviceName [required] The internal name of your IP load balancing
@param ba... | java | public OvhLoadBalancingBackendIp loadBalancing_serviceName_backend_backend_GET(String serviceName, String backend) throws IOException {
String qPath = "/ip/loadBalancing/{serviceName}/backend/{backend}";
StringBuilder sb = path(qPath, serviceName, backend);
String resp = exec(qPath, "GET", sb.toString(), null);
... | [
"public",
"OvhLoadBalancingBackendIp",
"loadBalancing_serviceName_backend_backend_GET",
"(",
"String",
"serviceName",
",",
"String",
"backend",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/ip/loadBalancing/{serviceName}/backend/{backend}\"",
";",
"StringBuilder"... | Get this object properties
REST: GET /ip/loadBalancing/{serviceName}/backend/{backend}
@param serviceName [required] The internal name of your IP load balancing
@param backend [required] IP of your backend | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1398-L1403 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/ProxiedFileSystemCache.java | ProxiedFileSystemCache.getProxiedFileSystem | @Deprecated
public static FileSystem getProxiedFileSystem(@NonNull final String userNameToProxyAs, Properties properties,
URI fsURI) throws IOException {
"""
Gets a {@link FileSystem} that can perform any operations allowed by the specified userNameToProxyAs.
@param userNameToProxyAs The name of the use... | java | @Deprecated
public static FileSystem getProxiedFileSystem(@NonNull final String userNameToProxyAs, Properties properties,
URI fsURI) throws IOException {
return getProxiedFileSystem(userNameToProxyAs, properties, fsURI, new Configuration());
} | [
"@",
"Deprecated",
"public",
"static",
"FileSystem",
"getProxiedFileSystem",
"(",
"@",
"NonNull",
"final",
"String",
"userNameToProxyAs",
",",
"Properties",
"properties",
",",
"URI",
"fsURI",
")",
"throws",
"IOException",
"{",
"return",
"getProxiedFileSystem",
"(",
... | Gets a {@link FileSystem} that can perform any operations allowed by the specified userNameToProxyAs.
@param userNameToProxyAs The name of the user the super user should proxy as
@param properties {@link java.util.Properties} containing initialization properties.
@param fsURI The {@link URI} for the {@link FileSystem}... | [
"Gets",
"a",
"{",
"@link",
"FileSystem",
"}",
"that",
"can",
"perform",
"any",
"operations",
"allowed",
"by",
"the",
"specified",
"userNameToProxyAs",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ProxiedFileSystemCache.java#L74-L78 |
mapfish/mapfish-print | core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java | PAbstractObject.optInt | @Override
public final Integer optInt(final String key, final Integer defaultValue) {
"""
Get a property as an int or default value.
@param key the property name
@param defaultValue the default value
"""
Integer result = optInt(key);
return result == null ? defaultValue : result;
} | java | @Override
public final Integer optInt(final String key, final Integer defaultValue) {
Integer result = optInt(key);
return result == null ? defaultValue : result;
} | [
"@",
"Override",
"public",
"final",
"Integer",
"optInt",
"(",
"final",
"String",
"key",
",",
"final",
"Integer",
"defaultValue",
")",
"{",
"Integer",
"result",
"=",
"optInt",
"(",
"key",
")",
";",
"return",
"result",
"==",
"null",
"?",
"defaultValue",
":",... | Get a property as an int or default value.
@param key the property name
@param defaultValue the default value | [
"Get",
"a",
"property",
"as",
"an",
"int",
"or",
"default",
"value",
"."
] | train | https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L65-L69 |
smartsheet-platform/smartsheet-java-sdk | src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java | SheetResourcesImpl.createSheetInFolderFromTemplate | public Sheet createSheetInFolderFromTemplate(long folderId, Sheet sheet, EnumSet<SheetTemplateInclusion> includes) throws SmartsheetException {
"""
Create a sheet in given folder.
It mirrors to the following Smartsheet REST API method: POST /folder/{folderId}/sheets
Exceptions:
IllegalArgumentException : if... | java | public Sheet createSheetInFolderFromTemplate(long folderId, Sheet sheet, EnumSet<SheetTemplateInclusion> includes) throws SmartsheetException {
HashMap<String, Object> parameters = new HashMap<String, Object>();
parameters.put("include", QueryUtil.generateCommaSeparatedList(includes));
String pa... | [
"public",
"Sheet",
"createSheetInFolderFromTemplate",
"(",
"long",
"folderId",
",",
"Sheet",
"sheet",
",",
"EnumSet",
"<",
"SheetTemplateInclusion",
">",
"includes",
")",
"throws",
"SmartsheetException",
"{",
"HashMap",
"<",
"String",
",",
"Object",
">",
"parameters... | Create a sheet in given folder.
It mirrors to the following Smartsheet REST API method: POST /folder/{folderId}/sheets
Exceptions:
IllegalArgumentException : if any argument is null
InvalidRequestException : if there is any problem with the REST API request
AuthorizationException : if there is any problem with the RE... | [
"Create",
"a",
"sheet",
"in",
"given",
"folder",
"."
] | train | https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java#L507-L513 |
alkacon/opencms-core | src/org/opencms/ade/configuration/CmsADEConfigCacheState.java | CmsADEConfigCacheState.createUpdatedCopy | public CmsADEConfigCacheState createUpdatedCopy(
Map<CmsUUID, CmsADEConfigDataInternal> sitemapUpdates,
List<CmsADEConfigDataInternal> moduleUpdates,
Map<CmsUUID, CmsElementView> elementViewUpdates) {
"""
Creates a new object which represents the changed configuration state given some updat... | java | public CmsADEConfigCacheState createUpdatedCopy(
Map<CmsUUID, CmsADEConfigDataInternal> sitemapUpdates,
List<CmsADEConfigDataInternal> moduleUpdates,
Map<CmsUUID, CmsElementView> elementViewUpdates) {
Map<CmsUUID, CmsADEConfigDataInternal> newSitemapConfigs = Maps.newHashMap(m_siteConfi... | [
"public",
"CmsADEConfigCacheState",
"createUpdatedCopy",
"(",
"Map",
"<",
"CmsUUID",
",",
"CmsADEConfigDataInternal",
">",
"sitemapUpdates",
",",
"List",
"<",
"CmsADEConfigDataInternal",
">",
"moduleUpdates",
",",
"Map",
"<",
"CmsUUID",
",",
"CmsElementView",
">",
"el... | Creates a new object which represents the changed configuration state given some updates, without
changing the current configuration state (this object instance).
@param sitemapUpdates a map containing changed sitemap configurations indexed by structure id (the map values are null if the corresponding sitemap configur... | [
"Creates",
"a",
"new",
"object",
"which",
"represents",
"the",
"changed",
"configuration",
"state",
"given",
"some",
"updates",
"without",
"changing",
"the",
"current",
"configuration",
"state",
"(",
"this",
"object",
"instance",
")",
"."
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsADEConfigCacheState.java#L169-L196 |
pravega/pravega | segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexReader.java | IndexReader.getBucketOffsets | @VisibleForTesting
CompletableFuture<List<Long>> getBucketOffsets(DirectSegmentAccess segment, TableBucket bucket, TimeoutTimer timer) {
"""
Gets the offsets for all the Table Entries in the given {@link TableBucket}.
@param segment A {@link DirectSegmentAccess}
@param bucket The {@link TableBucket} to ge... | java | @VisibleForTesting
CompletableFuture<List<Long>> getBucketOffsets(DirectSegmentAccess segment, TableBucket bucket, TimeoutTimer timer) {
val result = new ArrayList<Long>();
AtomicLong offset = new AtomicLong(bucket.getSegmentOffset());
return Futures.loop(
() -> offset.get() ... | [
"@",
"VisibleForTesting",
"CompletableFuture",
"<",
"List",
"<",
"Long",
">",
">",
"getBucketOffsets",
"(",
"DirectSegmentAccess",
"segment",
",",
"TableBucket",
"bucket",
",",
"TimeoutTimer",
"timer",
")",
"{",
"val",
"result",
"=",
"new",
"ArrayList",
"<",
"Lo... | Gets the offsets for all the Table Entries in the given {@link TableBucket}.
@param segment A {@link DirectSegmentAccess}
@param bucket The {@link TableBucket} to get offsets for.
@param timer Timer for the operation.
@return A CompletableFuture that, when completed, will contain a List of offsets, with the first o... | [
"Gets",
"the",
"offsets",
"for",
"all",
"the",
"Table",
"Entries",
"in",
"the",
"given",
"{",
"@link",
"TableBucket",
"}",
"."
] | train | https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexReader.java#L169-L182 |
infinispan/infinispan | core/src/main/java/org/infinispan/distribution/LocalizedCacheTopology.java | LocalizedCacheTopology.makeSegmentedSingletonTopology | public static LocalizedCacheTopology makeSegmentedSingletonTopology(KeyPartitioner keyPartitioner, int numSegments,
Address localAddress) {
"""
Creates a new local topology that has a single address but multiple segments. This is useful when the data
storage is segmented in some way (ie. segmented store)... | java | public static LocalizedCacheTopology makeSegmentedSingletonTopology(KeyPartitioner keyPartitioner, int numSegments,
Address localAddress) {
return new LocalizedCacheTopology(keyPartitioner, numSegments, localAddress);
} | [
"public",
"static",
"LocalizedCacheTopology",
"makeSegmentedSingletonTopology",
"(",
"KeyPartitioner",
"keyPartitioner",
",",
"int",
"numSegments",
",",
"Address",
"localAddress",
")",
"{",
"return",
"new",
"LocalizedCacheTopology",
"(",
"keyPartitioner",
",",
"numSegments"... | Creates a new local topology that has a single address but multiple segments. This is useful when the data
storage is segmented in some way (ie. segmented store)
@param keyPartitioner partitioner to decide which segment a given key maps to
@param numSegments how many segments there are
@param localAddress the address o... | [
"Creates",
"a",
"new",
"local",
"topology",
"that",
"has",
"a",
"single",
"address",
"but",
"multiple",
"segments",
".",
"This",
"is",
"useful",
"when",
"the",
"data",
"storage",
"is",
"segmented",
"in",
"some",
"way",
"(",
"ie",
".",
"segmented",
"store",... | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/distribution/LocalizedCacheTopology.java#L61-L64 |
ngageoint/geopackage-core-java | src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java | PropertiesManagerCore.deleteValue | public boolean deleteValue(String geoPackage, String property, String value) {
"""
Delete the property value from a specified GeoPackage
@param geoPackage
GeoPackage name
@param property
property name
@param value
property value
@return true if deleted
"""
boolean deleted = false;
PropertiesCoreEx... | java | public boolean deleteValue(String geoPackage, String property, String value) {
boolean deleted = false;
PropertiesCoreExtension<T, ?, ?, ?> properties = propertiesMap
.get(geoPackage);
if (properties != null) {
deleted = properties.deleteValue(property, value) > 0;
}
return deleted;
} | [
"public",
"boolean",
"deleteValue",
"(",
"String",
"geoPackage",
",",
"String",
"property",
",",
"String",
"value",
")",
"{",
"boolean",
"deleted",
"=",
"false",
";",
"PropertiesCoreExtension",
"<",
"T",
",",
"?",
",",
"?",
",",
"?",
">",
"properties",
"="... | Delete the property value from a specified GeoPackage
@param geoPackage
GeoPackage name
@param property
property name
@param value
property value
@return true if deleted | [
"Delete",
"the",
"property",
"value",
"from",
"a",
"specified",
"GeoPackage"
] | train | https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/properties/PropertiesManagerCore.java#L492-L500 |
Azure/azure-sdk-for-java | eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java | EventSubscriptionsInner.updateAsync | public Observable<EventSubscriptionInner> updateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
"""
Update an event subscription.
Asynchronously updates an existing event subscription.
@param scope The scope of existing event subscription... | java | public Observable<EventSubscriptionInner> updateAsync(String scope, String eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters) {
return updateWithServiceResponseAsync(scope, eventSubscriptionName, eventSubscriptionUpdateParameters).map(new Func1<ServiceResponse<EventSubsc... | [
"public",
"Observable",
"<",
"EventSubscriptionInner",
">",
"updateAsync",
"(",
"String",
"scope",
",",
"String",
"eventSubscriptionName",
",",
"EventSubscriptionUpdateParameters",
"eventSubscriptionUpdateParameters",
")",
"{",
"return",
"updateWithServiceResponseAsync",
"(",
... | Update an event subscription.
Asynchronously updates an existing event subscription.
@param scope The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions/{... | [
"Update",
"an",
"event",
"subscription",
".",
"Asynchronously",
"updates",
"an",
"existing",
"event",
"subscription",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L594-L601 |
facebookarchive/hadoop-20 | src/contrib/corona/src/java/org/apache/hadoop/corona/SchedulerForType.java | SchedulerForType.matchNodeForSession | private MatchedPair matchNodeForSession(
Session session, LocalityLevel level) {
"""
Find a matching pair of node, request by looping through the requests in
the session, looking at the hosts in each request and making look-ups
into the node manager.
@param session The session
@param level The locality lev... | java | private MatchedPair matchNodeForSession(
Session session, LocalityLevel level) {
Iterator<ResourceRequestInfo> pendingRequestIterator =
session.getPendingRequestIteratorForType(type);
while (pendingRequestIterator.hasNext()) {
ResourceRequestInfo req = pendingRequestIterator.next();
Set<... | [
"private",
"MatchedPair",
"matchNodeForSession",
"(",
"Session",
"session",
",",
"LocalityLevel",
"level",
")",
"{",
"Iterator",
"<",
"ResourceRequestInfo",
">",
"pendingRequestIterator",
"=",
"session",
".",
"getPendingRequestIteratorForType",
"(",
"type",
")",
";",
... | Find a matching pair of node, request by looping through the requests in
the session, looking at the hosts in each request and making look-ups
into the node manager.
@param session The session
@param level The locality level at which we are trying to schedule.
@return A match if found, null if not. | [
"Find",
"a",
"matching",
"pair",
"of",
"node",
"request",
"by",
"looping",
"through",
"the",
"requests",
"in",
"the",
"session",
"looking",
"at",
"the",
"hosts",
"in",
"each",
"request",
"and",
"making",
"look",
"-",
"ups",
"into",
"the",
"node",
"manager"... | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/SchedulerForType.java#L441-L467 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.