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 |
|---|---|---|---|---|---|---|---|---|---|---|
comapi/comapi-sdk-android | COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java | InternalService.getConversation | public void getConversation(@NonNull final String conversationId, @Nullable Callback<ComapiResult<ConversationDetails>> callback) {
"""
Returns observable to create a conversation.
@param conversationId ID of a conversation to obtain.
@param callback Callback to deliver new session instance.
"""
... | java | public void getConversation(@NonNull final String conversationId, @Nullable Callback<ComapiResult<ConversationDetails>> callback) {
adapter.adapt(getConversation(conversationId), callback);
} | [
"public",
"void",
"getConversation",
"(",
"@",
"NonNull",
"final",
"String",
"conversationId",
",",
"@",
"Nullable",
"Callback",
"<",
"ComapiResult",
"<",
"ConversationDetails",
">",
">",
"callback",
")",
"{",
"adapter",
".",
"adapt",
"(",
"getConversation",
"("... | Returns observable to create a conversation.
@param conversationId ID of a conversation to obtain.
@param callback Callback to deliver new session instance. | [
"Returns",
"observable",
"to",
"create",
"a",
"conversation",
"."
] | train | https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L493-L495 |
haraldk/TwelveMonkeys | sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java | DebugUtil.printTimeDifference | public static void printTimeDifference(final Calendar pStartCalendar, final PrintStream pPrintStream) {
"""
Prints out the difference between the given calendar time and present time.
<p>
@param pStartCalendar the {@code java.util.Calendar} to compare with present time.
@param pPrintStream the {@code java.io.Pr... | java | public static void printTimeDifference(final Calendar pStartCalendar, final PrintStream pPrintStream) {
GregorianCalendar endCalendar = new GregorianCalendar();
printTimeDifference(pStartCalendar, endCalendar, pPrintStream);
} | [
"public",
"static",
"void",
"printTimeDifference",
"(",
"final",
"Calendar",
"pStartCalendar",
",",
"final",
"PrintStream",
"pPrintStream",
")",
"{",
"GregorianCalendar",
"endCalendar",
"=",
"new",
"GregorianCalendar",
"(",
")",
";",
"printTimeDifference",
"(",
"pStar... | Prints out the difference between the given calendar time and present time.
<p>
@param pStartCalendar the {@code java.util.Calendar} to compare with present time.
@param pPrintStream the {@code java.io.PrintStream} for flushing the results.
@see <a href="http://java.sun.com/products/jdk/1.3/docs/api/java/util/Calendar.... | [
"Prints",
"out",
"the",
"difference",
"between",
"the",
"given",
"calendar",
"time",
"and",
"present",
"time",
".",
"<p",
">"
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L1057-L1062 |
teatrove/teatrove | trove/src/main/java/org/teatrove/trove/util/IntHashMap.java | IntHashMap.put | public Object put(Object key, Object value) {
"""
Associates the specified value with the specified key in this map.
If the map previously contained a mapping for this key, the old
value is replaced.
@param key key with which the specified value is to be associated.
@param value value to be associated with t... | java | public Object put(Object key, Object value) {
if (key instanceof Number) {
return put( ((Number)key).intValue(), value );
}
else {
throw new UnsupportedOperationException
("IntHashMap key must be a number");
}
} | [
"public",
"Object",
"put",
"(",
"Object",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"key",
"instanceof",
"Number",
")",
"{",
"return",
"put",
"(",
"(",
"(",
"Number",
")",
"key",
")",
".",
"intValue",
"(",
")",
",",
"value",
")",
";",
"... | Associates the specified value with the specified key in this map.
If the map previously contained a mapping for this key, the old
value is replaced.
@param key key with which the specified value is to be associated.
@param value value to be associated with the specified key.
@return previous value associated with spe... | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"this",
"map",
".",
"If",
"the",
"map",
"previously",
"contained",
"a",
"mapping",
"for",
"this",
"key",
"the",
"old",
"value",
"is",
"replaced",
"."
] | train | https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/IntHashMap.java#L299-L307 |
datumbox/datumbox-framework | datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/TransposeDataList.java | TransposeDataList.put | public final FlatDataList put(Object key, FlatDataList value) {
"""
Adds a particular key-value into the internal map. It returns the previous
value which was associated with that key.
@param key
@param value
@return
"""
return internalData.put(key, value);
} | java | public final FlatDataList put(Object key, FlatDataList value) {
return internalData.put(key, value);
} | [
"public",
"final",
"FlatDataList",
"put",
"(",
"Object",
"key",
",",
"FlatDataList",
"value",
")",
"{",
"return",
"internalData",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Adds a particular key-value into the internal map. It returns the previous
value which was associated with that key.
@param key
@param value
@return | [
"Adds",
"a",
"particular",
"key",
"-",
"value",
"into",
"the",
"internal",
"map",
".",
"It",
"returns",
"the",
"previous",
"value",
"which",
"was",
"associated",
"with",
"that",
"key",
"."
] | train | https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-common/src/main/java/com/datumbox/framework/common/dataobjects/TransposeDataList.java#L79-L81 |
elastic/elasticsearch-hadoop | mr/src/main/java/org/elasticsearch/hadoop/serialization/bulk/AbstractBulkFactory.java | AbstractBulkFactory.getMetadataExtractorOrFallback | protected FieldExtractor getMetadataExtractorOrFallback(Metadata meta, FieldExtractor fallbackExtractor) {
"""
Get the extractor for a given field, trying first one from a MetadataExtractor, and failing that,
falling back to the provided 'static' one
"""
if (metaExtractor != null) {
FieldE... | java | protected FieldExtractor getMetadataExtractorOrFallback(Metadata meta, FieldExtractor fallbackExtractor) {
if (metaExtractor != null) {
FieldExtractor metaFE = metaExtractor.get(meta);
if (metaFE != null) {
return metaFE;
}
}
return fallbackExt... | [
"protected",
"FieldExtractor",
"getMetadataExtractorOrFallback",
"(",
"Metadata",
"meta",
",",
"FieldExtractor",
"fallbackExtractor",
")",
"{",
"if",
"(",
"metaExtractor",
"!=",
"null",
")",
"{",
"FieldExtractor",
"metaFE",
"=",
"metaExtractor",
".",
"get",
"(",
"me... | Get the extractor for a given field, trying first one from a MetadataExtractor, and failing that,
falling back to the provided 'static' one | [
"Get",
"the",
"extractor",
"for",
"a",
"given",
"field",
"trying",
"first",
"one",
"from",
"a",
"MetadataExtractor",
"and",
"failing",
"that",
"falling",
"back",
"to",
"the",
"provided",
"static",
"one"
] | train | https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/serialization/bulk/AbstractBulkFactory.java#L491-L499 |
javamelody/javamelody | javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPdfWriter.java | MPdfWriter.renderHeaders | protected void renderHeaders(final MBasicTable table, final Table datatable)
throws BadElementException {
"""
Effectue le rendu des headers.
@param table
MBasicTable
@param datatable
Table
@throws BadElementException
e
"""
final int columnCount = table.getColumnCount();
final TableColumnModel... | java | protected void renderHeaders(final MBasicTable table, final Table datatable)
throws BadElementException {
final int columnCount = table.getColumnCount();
final TableColumnModel columnModel = table.getColumnModel();
// size of columns
float totalWidth = 0;
for (int i = 0; i < columnCount; i++) {
t... | [
"protected",
"void",
"renderHeaders",
"(",
"final",
"MBasicTable",
"table",
",",
"final",
"Table",
"datatable",
")",
"throws",
"BadElementException",
"{",
"final",
"int",
"columnCount",
"=",
"table",
".",
"getColumnCount",
"(",
")",
";",
"final",
"TableColumnModel... | Effectue le rendu des headers.
@param table
MBasicTable
@param datatable
Table
@throws BadElementException
e | [
"Effectue",
"le",
"rendu",
"des",
"headers",
"."
] | train | https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPdfWriter.java#L246-L277 |
grpc/grpc-java | api/src/main/java/io/grpc/InternalLogId.java | InternalLogId.allocate | public static InternalLogId allocate(Class<?> type, @Nullable String details) {
"""
Creates a log id.
@param type the "Type" to be used when logging this id. The short name of this class will be
used, or else a default if the class is anonymous.
@param details a short, human readable string that describes t... | java | public static InternalLogId allocate(Class<?> type, @Nullable String details) {
return allocate(getClassName(type), details);
} | [
"public",
"static",
"InternalLogId",
"allocate",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"@",
"Nullable",
"String",
"details",
")",
"{",
"return",
"allocate",
"(",
"getClassName",
"(",
"type",
")",
",",
"details",
")",
";",
"}"
] | Creates a log id.
@param type the "Type" to be used when logging this id. The short name of this class will be
used, or else a default if the class is anonymous.
@param details a short, human readable string that describes the object the id is attached to.
Typically this will be an address or target. | [
"Creates",
"a",
"log",
"id",
"."
] | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/InternalLogId.java#L43-L45 |
ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/SequenceLabelerTrainer.java | SequenceLabelerTrainer.getSequenceStream | public static ObjectStream<SequenceLabelSample> getSequenceStream(
final String inputData, final String clearFeatures,
final String aCorpusFormat) throws IOException {
"""
Getting the stream with the right corpus format.
@param inputData
the input data
@param clearFeatures
clear the features
@pa... | java | public static ObjectStream<SequenceLabelSample> getSequenceStream(
final String inputData, final String clearFeatures,
final String aCorpusFormat) throws IOException {
ObjectStream<SequenceLabelSample> samples = null;
if (aCorpusFormat.equalsIgnoreCase("conll03")) {
final ObjectStream<String> ... | [
"public",
"static",
"ObjectStream",
"<",
"SequenceLabelSample",
">",
"getSequenceStream",
"(",
"final",
"String",
"inputData",
",",
"final",
"String",
"clearFeatures",
",",
"final",
"String",
"aCorpusFormat",
")",
"throws",
"IOException",
"{",
"ObjectStream",
"<",
"... | Getting the stream with the right corpus format.
@param inputData
the input data
@param clearFeatures
clear the features
@param aCorpusFormat
the corpus format
@return the stream from the several corpus formats
@throws IOException
the io exception | [
"Getting",
"the",
"stream",
"with",
"the",
"right",
"corpus",
"format",
"."
] | train | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/SequenceLabelerTrainer.java#L244-L269 |
Mthwate/DatLib | src/main/java/com/mthwate/datlib/PropertyUtils.java | PropertyUtils.getProperty | public static String getProperty(InputStream input, String key) {
"""
Retrieves a value from a properties input stream.
@since 1.2
@param input the properties input stream
@param key the property key
@return the value retrieved with the supplied key
"""
return getProperty(input, key, null);
} | java | public static String getProperty(InputStream input, String key) {
return getProperty(input, key, null);
} | [
"public",
"static",
"String",
"getProperty",
"(",
"InputStream",
"input",
",",
"String",
"key",
")",
"{",
"return",
"getProperty",
"(",
"input",
",",
"key",
",",
"null",
")",
";",
"}"
] | Retrieves a value from a properties input stream.
@since 1.2
@param input the properties input stream
@param key the property key
@return the value retrieved with the supplied key | [
"Retrieves",
"a",
"value",
"from",
"a",
"properties",
"input",
"stream",
"."
] | train | https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/PropertyUtils.java#L21-L23 |
jtrfp/javamod | src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java | MP3FileID3Controller.writeTags | public void writeTags() throws FileNotFoundException, IOException {
"""
Writes the current state of the id3 tags to the file. What tags are
written depends upon the tagType passed to the constructor.
@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs
"""
Rando... | java | public void writeTags() throws FileNotFoundException, IOException
{
RandomAccessFile raf = null;
try
{
raf = new RandomAccessFile(mp3File, "rw");
// Write out id3v2 first because if the filesize is changed when an
// id3v2 is written then the id3v1 may be moved away from the end
// of the file which ... | [
"public",
"void",
"writeTags",
"(",
")",
"throws",
"FileNotFoundException",
",",
"IOException",
"{",
"RandomAccessFile",
"raf",
"=",
"null",
";",
"try",
"{",
"raf",
"=",
"new",
"RandomAccessFile",
"(",
"mp3File",
",",
"\"rw\"",
")",
";",
"// Write out id3v2 firs... | Writes the current state of the id3 tags to the file. What tags are
written depends upon the tagType passed to the constructor.
@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs | [
"Writes",
"the",
"current",
"state",
"of",
"the",
"id3",
"tags",
"to",
"the",
"file",
".",
"What",
"tags",
"are",
"written",
"depends",
"upon",
"the",
"tagType",
"passed",
"to",
"the",
"constructor",
"."
] | train | https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/MP3FileID3Controller.java#L130-L152 |
threerings/gwt-utils | src/main/java/com/threerings/gwt/ui/SmartGrid.java | SmartGrid.setText | public void setText (int row, int column, String text, String style) {
"""
Sets the text in the specified cell, with the specified style and column span.
"""
setText(row, column, text);
if (style != null) {
getCellFormatter().setStyleName(row, column, style);
}
} | java | public void setText (int row, int column, String text, String style)
{
setText(row, column, text);
if (style != null) {
getCellFormatter().setStyleName(row, column, style);
}
} | [
"public",
"void",
"setText",
"(",
"int",
"row",
",",
"int",
"column",
",",
"String",
"text",
",",
"String",
"style",
")",
"{",
"setText",
"(",
"row",
",",
"column",
",",
"text",
")",
";",
"if",
"(",
"style",
"!=",
"null",
")",
"{",
"getCellFormatter"... | Sets the text in the specified cell, with the specified style and column span. | [
"Sets",
"the",
"text",
"in",
"the",
"specified",
"cell",
"with",
"the",
"specified",
"style",
"and",
"column",
"span",
"."
] | train | https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/SmartGrid.java#L57-L63 |
apereo/cas | support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationRequestBuilder.java | WsFederationRequestBuilder.getRelativeRedirectUrlFor | @SneakyThrows
private static String getRelativeRedirectUrlFor(final WsFederationConfiguration config, final Service service, final HttpServletRequest request) {
"""
Gets redirect url for.
@param config the config
@param service the service
@param request the request
@return the redirect url for
"""
... | java | @SneakyThrows
private static String getRelativeRedirectUrlFor(final WsFederationConfiguration config, final Service service, final HttpServletRequest request) {
val builder = new URIBuilder(WsFederationNavigationController.ENDPOINT_REDIRECT);
builder.addParameter(WsFederationNavigationController.PAR... | [
"@",
"SneakyThrows",
"private",
"static",
"String",
"getRelativeRedirectUrlFor",
"(",
"final",
"WsFederationConfiguration",
"config",
",",
"final",
"Service",
"service",
",",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"builder",
"=",
"new",
"URIBuilder... | Gets redirect url for.
@param config the config
@param service the service
@param request the request
@return the redirect url for | [
"Gets",
"redirect",
"url",
"for",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-wsfederation-webflow/src/main/java/org/apereo/cas/web/flow/WsFederationRequestBuilder.java#L48-L60 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/GrahamScanConvexHull2D.java | GrahamScanConvexHull2D.isLeft | protected final int isLeft(double[] a, double[] b, double[] o) {
"""
Test whether a point is left of the other wrt. the origin.
@param a double[] A
@param b double[] B
@param o Origin double[]
@return +1 when left, 0 when same, -1 when right
"""
final double cross = getRX(a, o) * getRY(b, o) - getRY(... | java | protected final int isLeft(double[] a, double[] b, double[] o) {
final double cross = getRX(a, o) * getRY(b, o) - getRY(a, o) * getRX(b, o);
if(cross == 0) {
// Compare manhattan distances - same angle!
final double dista = Math.abs(getRX(a, o)) + Math.abs(getRY(a, o));
final double distb = Ma... | [
"protected",
"final",
"int",
"isLeft",
"(",
"double",
"[",
"]",
"a",
",",
"double",
"[",
"]",
"b",
",",
"double",
"[",
"]",
"o",
")",
"{",
"final",
"double",
"cross",
"=",
"getRX",
"(",
"a",
",",
"o",
")",
"*",
"getRY",
"(",
"b",
",",
"o",
")... | Test whether a point is left of the other wrt. the origin.
@param a double[] A
@param b double[] B
@param o Origin double[]
@return +1 when left, 0 when same, -1 when right | [
"Test",
"whether",
"a",
"point",
"is",
"left",
"of",
"the",
"other",
"wrt",
".",
"the",
"origin",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/GrahamScanConvexHull2D.java#L193-L202 |
konvergeio/cofoja | src/main/java/com/google/java/contract/util/Predicates.java | Predicates.forEntries | public static <K, V> Predicate<Map<K, V>> forEntries(
final Predicate<? super Set<Map.Entry<K, V>>> p) {
"""
Returns a predicate that evaluates to {@code true} if the entry
set of its argument satisfies {@code p}.
"""
return new Predicate<Map<K, V>>() {
@Override
public boolean apply(Map... | java | public static <K, V> Predicate<Map<K, V>> forEntries(
final Predicate<? super Set<Map.Entry<K, V>>> p) {
return new Predicate<Map<K, V>>() {
@Override
public boolean apply(Map<K, V> obj) {
return p.apply(obj.entrySet());
}
};
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"Predicate",
"<",
"Map",
"<",
"K",
",",
"V",
">",
">",
"forEntries",
"(",
"final",
"Predicate",
"<",
"?",
"super",
"Set",
"<",
"Map",
".",
"Entry",
"<",
"K",
",",
"V",
">",
">",
">",
"p",
")",
"{",... | Returns a predicate that evaluates to {@code true} if the entry
set of its argument satisfies {@code p}. | [
"Returns",
"a",
"predicate",
"that",
"evaluates",
"to",
"{"
] | train | https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/util/Predicates.java#L240-L248 |
btrplace/scheduler | choco/src/main/java/org/btrplace/scheduler/choco/constraint/CAmong.java | CAmong.getGroup | public int getGroup(Node n, List<Collection<Node>> grps) {
"""
Get the group the node belong to.
@param n the node
@return the group identifier, {@code -1} if the node does not belong to a group
"""
int i = 0;
for (Collection<Node> pGrp : grps) {
if (pGrp.contains(n)) {
... | java | public int getGroup(Node n, List<Collection<Node>> grps) {
int i = 0;
for (Collection<Node> pGrp : grps) {
if (pGrp.contains(n)) {
return i;
}
i++;
}
return -1;
} | [
"public",
"int",
"getGroup",
"(",
"Node",
"n",
",",
"List",
"<",
"Collection",
"<",
"Node",
">",
">",
"grps",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
"Collection",
"<",
"Node",
">",
"pGrp",
":",
"grps",
")",
"{",
"if",
"(",
"pGrp",
"."... | Get the group the node belong to.
@param n the node
@return the group identifier, {@code -1} if the node does not belong to a group | [
"Get",
"the",
"group",
"the",
"node",
"belong",
"to",
"."
] | train | https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/constraint/CAmong.java#L181-L190 |
google/closure-compiler | src/com/google/javascript/jscomp/JsMessageVisitor.java | JsMessageVisitor.extractFromReturnDescendant | private static void extractFromReturnDescendant(Builder builder, Node node)
throws MalformedException {
"""
Appends value parts to the message builder by traversing the descendants
of the given RETURN node.
@param builder the message builder
@param node the node from where we extract a message
@throws ... | java | private static void extractFromReturnDescendant(Builder builder, Node node)
throws MalformedException {
switch (node.getToken()) {
case STRING:
builder.appendStringPart(node.getString());
break;
case NAME:
builder.appendPlaceholderReference(node.getString());
break... | [
"private",
"static",
"void",
"extractFromReturnDescendant",
"(",
"Builder",
"builder",
",",
"Node",
"node",
")",
"throws",
"MalformedException",
"{",
"switch",
"(",
"node",
".",
"getToken",
"(",
")",
")",
"{",
"case",
"STRING",
":",
"builder",
".",
"appendStri... | Appends value parts to the message builder by traversing the descendants
of the given RETURN node.
@param builder the message builder
@param node the node from where we extract a message
@throws MalformedException if the parsed message is invalid | [
"Appends",
"value",
"parts",
"to",
"the",
"message",
"builder",
"by",
"traversing",
"the",
"descendants",
"of",
"the",
"given",
"RETURN",
"node",
"."
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/JsMessageVisitor.java#L688-L707 |
carewebframework/carewebframework-core | org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/controller/FrameworkController.java | FrameworkController.getController | @SuppressWarnings("unchecked")
public static <T> T getController(BaseComponent comp, Class<T> type) {
"""
Locates and returns a controller of the given type by searching up the component tree
starting at the specified component.
@param <T> The type of controller sought.
@param comp Component for start of ... | java | @SuppressWarnings("unchecked")
public static <T> T getController(BaseComponent comp, Class<T> type) {
while (comp != null) {
Object controller = getController(comp);
if (type.isInstance(controller)) {
return (T) controller;
}
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"getController",
"(",
"BaseComponent",
"comp",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"while",
"(",
"comp",
"!=",
"null",
")",
"{",
"Object",
"controller"... | Locates and returns a controller of the given type by searching up the component tree
starting at the specified component.
@param <T> The type of controller sought.
@param comp Component for start of search.
@param type The type of controller sought.
@return The controller instance, or null if not found. | [
"Locates",
"and",
"returns",
"a",
"controller",
"of",
"the",
"given",
"type",
"by",
"searching",
"up",
"the",
"component",
"tree",
"starting",
"at",
"the",
"specified",
"component",
"."
] | train | https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/controller/FrameworkController.java#L127-L140 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LabelsApi.java | LabelsApi.deleteLabel | public void deleteLabel(Object projectIdOrPath, String name) throws GitLabApiException {
"""
Delete the specified label
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param name the name for the label
@throws GitLabApiException if any exception occurs
... | java | public void deleteLabel(Object projectIdOrPath, String name) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("name", name, true);
Response.Status expectedStatus = (isApiVersion(GitLabApi.ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete... | [
"public",
"void",
"deleteLabel",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"name",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"name\"",
",",
"name",
",",
"true",
... | Delete the specified label
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param name the name for the label
@throws GitLabApiException if any exception occurs | [
"Delete",
"the",
"specified",
"label"
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LabelsApi.java#L194-L199 |
DDTH/ddth-dao | ddth-dao-core/src/main/java/com/github/ddth/dao/BaseBo.java | BaseBo.fromMap | @SuppressWarnings("unchecked")
public BaseBo fromMap(Map<String, Object> data) {
"""
De-serialize the BO from a Java map (previously generated by {@link #toMap()}.
<p>
This method is meant to be used in conjunction with method {@code #toMap()}. Use
{@link #setAttributes(Map)} to reset just the underlying ... | java | @SuppressWarnings("unchecked")
public BaseBo fromMap(Map<String, Object> data) {
if (data != null) {
Lock lock = lockForWrite();
try {
Boolean dirty = DPathUtils.getValue(data, SER_FIELD_DIRTY, Boolean.class);
Map<String, Object> attrs = DPathUtils.get... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"BaseBo",
"fromMap",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"data",
")",
"{",
"if",
"(",
"data",
"!=",
"null",
")",
"{",
"Lock",
"lock",
"=",
"lockForWrite",
"(",
")",
";",
"try",
... | De-serialize the BO from a Java map (previously generated by {@link #toMap()}.
<p>
This method is meant to be used in conjunction with method {@code #toMap()}. Use
{@link #setAttributes(Map)} to reset just the underlying attribute map.
</p>
@param data
BO data as a Java map (generated via {@link #toMap()}
@return | [
"De",
"-",
"serialize",
"the",
"BO",
"from",
"a",
"Java",
"map",
"(",
"previously",
"generated",
"by",
"{",
"@link",
"#toMap",
"()",
"}",
"."
] | train | https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/BaseBo.java#L570-L585 |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java | DynamicReportBuilder.addGlobalVariable | public DynamicReportBuilder addGlobalVariable(String name, AbstractColumn col, DJCalculation op) {
"""
For variable registration only (can bee later referenced in custom
expression)
@param name
@param col
@param op
@return
"""
globalVariablesGroup.addVariable(new DJGroupVariableDef(name, col, op... | java | public DynamicReportBuilder addGlobalVariable(String name, AbstractColumn col, DJCalculation op) {
globalVariablesGroup.addVariable(new DJGroupVariableDef(name, col, op));
return this;
} | [
"public",
"DynamicReportBuilder",
"addGlobalVariable",
"(",
"String",
"name",
",",
"AbstractColumn",
"col",
",",
"DJCalculation",
"op",
")",
"{",
"globalVariablesGroup",
".",
"addVariable",
"(",
"new",
"DJGroupVariableDef",
"(",
"name",
",",
"col",
",",
"op",
")",... | For variable registration only (can bee later referenced in custom
expression)
@param name
@param col
@param op
@return | [
"For",
"variable",
"registration",
"only",
"(",
"can",
"bee",
"later",
"referenced",
"in",
"custom",
"expression",
")"
] | train | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L736-L739 |
kejunxia/AndroidMvc | library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Controller.java | Controller.runTask | protected <RESULT> Task.Monitor<RESULT> runTask(final Task<RESULT> task,
final Task.Callback<RESULT> callback) {
"""
Run a task on threads supplied by injected {@link ExecutorService}. By default it runs tasks
on separate threads by {@link ExecutorService} injec... | java | protected <RESULT> Task.Monitor<RESULT> runTask(final Task<RESULT> task,
final Task.Callback<RESULT> callback) {
return runTask(executorService, task, callback);
} | [
"protected",
"<",
"RESULT",
">",
"Task",
".",
"Monitor",
"<",
"RESULT",
">",
"runTask",
"(",
"final",
"Task",
"<",
"RESULT",
">",
"task",
",",
"final",
"Task",
".",
"Callback",
"<",
"RESULT",
">",
"callback",
")",
"{",
"return",
"runTask",
"(",
"execut... | Run a task on threads supplied by injected {@link ExecutorService}. By default it runs tasks
on separate threads by {@link ExecutorService} injected from AndroidMvc framework. A simple
{@link ExecutorService} that runs tasks on the same thread in test cases to make the test
easier.
<p>The methods of callback will be g... | [
"Run",
"a",
"task",
"on",
"threads",
"supplied",
"by",
"injected",
"{",
"@link",
"ExecutorService",
"}",
".",
"By",
"default",
"it",
"runs",
"tasks",
"on",
"separate",
"threads",
"by",
"{",
"@link",
"ExecutorService",
"}",
"injected",
"from",
"AndroidMvc",
"... | train | https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc-core/src/main/java/com/shipdream/lib/android/mvc/Controller.java#L188-L191 |
weld/core | impl/src/main/java/org/jboss/weld/bean/proxy/InterceptedSubclassFactory.java | InterceptedSubclassFactory.createInterceptorBody | protected void createInterceptorBody(ClassMethod method, MethodInformation methodInfo, boolean delegateToSuper, ClassMethod staticConstructor) {
"""
Creates the given method on the proxy class where the implementation
forwards the call directly to the method handler.
<p/>
the generated bytecode is equivalent to... | java | protected void createInterceptorBody(ClassMethod method, MethodInformation methodInfo, boolean delegateToSuper, ClassMethod staticConstructor) {
invokeMethodHandler(method, methodInfo, true, DEFAULT_METHOD_RESOLVER, delegateToSuper, staticConstructor);
} | [
"protected",
"void",
"createInterceptorBody",
"(",
"ClassMethod",
"method",
",",
"MethodInformation",
"methodInfo",
",",
"boolean",
"delegateToSuper",
",",
"ClassMethod",
"staticConstructor",
")",
"{",
"invokeMethodHandler",
"(",
"method",
",",
"methodInfo",
",",
"true"... | Creates the given method on the proxy class where the implementation
forwards the call directly to the method handler.
<p/>
the generated bytecode is equivalent to:
<p/>
return (RetType) methodHandler.invoke(this,param1,param2);
@param methodInfo any JLR method
@param delegateToSuper
@return the method byte code | [
"Creates",
"the",
"given",
"method",
"on",
"the",
"proxy",
"class",
"where",
"the",
"implementation",
"forwards",
"the",
"call",
"directly",
"to",
"the",
"method",
"handler",
".",
"<p",
"/",
">",
"the",
"generated",
"bytecode",
"is",
"equivalent",
"to",
":",... | train | https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/bean/proxy/InterceptedSubclassFactory.java#L335-L338 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedNumberFormat.java | RuleBasedNumberFormat.getRuleSetDisplayName | public String getRuleSetDisplayName(String ruleSetName, ULocale loc) {
"""
Return the rule set display name for the provided rule set and locale.
The locale is matched against the locales for which there is display name data, using
normal fallback rules. If no locale matches, the default display name is returne... | java | public String getRuleSetDisplayName(String ruleSetName, ULocale loc) {
String[] rsnames = publicRuleSetNames;
for (int ix = 0; ix < rsnames.length; ++ix) {
if (rsnames[ix].equals(ruleSetName)) {
String[] names = getNameListForLocale(loc);
if (names != null) {
... | [
"public",
"String",
"getRuleSetDisplayName",
"(",
"String",
"ruleSetName",
",",
"ULocale",
"loc",
")",
"{",
"String",
"[",
"]",
"rsnames",
"=",
"publicRuleSetNames",
";",
"for",
"(",
"int",
"ix",
"=",
"0",
";",
"ix",
"<",
"rsnames",
".",
"length",
";",
"... | Return the rule set display name for the provided rule set and locale.
The locale is matched against the locales for which there is display name data, using
normal fallback rules. If no locale matches, the default display name is returned.
@return the display name for the rule set
@see #getRuleSetDisplayNames
@throws ... | [
"Return",
"the",
"rule",
"set",
"display",
"name",
"for",
"the",
"provided",
"rule",
"set",
"and",
"locale",
".",
"The",
"locale",
"is",
"matched",
"against",
"the",
"locales",
"for",
"which",
"there",
"is",
"display",
"name",
"data",
"using",
"normal",
"f... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedNumberFormat.java#L1098-L1110 |
zandero/rest.vertx | src/main/java/com/zandero/rest/reader/ReaderFactory.java | ReaderFactory.get | public ValueReader get(MethodParameter parameter,
Class<? extends ValueReader> byMethodDefinition,
InjectionProvider provider,
RoutingContext context,
MediaType... mediaTypes) {
"""
Step over all possibilities to provid... | java | public ValueReader get(MethodParameter parameter,
Class<? extends ValueReader> byMethodDefinition,
InjectionProvider provider,
RoutingContext context,
MediaType... mediaTypes) {
// by type
Class<?> readerType = null;
... | [
"public",
"ValueReader",
"get",
"(",
"MethodParameter",
"parameter",
",",
"Class",
"<",
"?",
"extends",
"ValueReader",
">",
"byMethodDefinition",
",",
"InjectionProvider",
"provider",
",",
"RoutingContext",
"context",
",",
"MediaType",
"...",
"mediaTypes",
")",
"{",... | Step over all possibilities to provide desired reader
@param parameter check parameter if reader is set or we have a type reader present
@param byMethodDefinition check default definition
@param provider injection provider if any
@param context routing context
@param mediaTypes ch... | [
"Step",
"over",
"all",
"possibilities",
"to",
"provide",
"desired",
"reader"
] | train | https://github.com/zandero/rest.vertx/blob/ba458720cf59e076953eab9dac7227eeaf9e58ce/src/main/java/com/zandero/rest/reader/ReaderFactory.java#L49-L83 |
lamydev/Android-Notification | core/src/zemin/notification/NotificationBoard.java | NotificationBoard.setInitialTouchArea | public void setInitialTouchArea(int l, int t, int r, int b) {
"""
Set the touch area where the user can touch to pull the board down.
@param l
@param t
@param r
@param b
"""
mContentView.setTouchToOpen(l, t, r, b);
} | java | public void setInitialTouchArea(int l, int t, int r, int b) {
mContentView.setTouchToOpen(l, t, r, b);
} | [
"public",
"void",
"setInitialTouchArea",
"(",
"int",
"l",
",",
"int",
"t",
",",
"int",
"r",
",",
"int",
"b",
")",
"{",
"mContentView",
".",
"setTouchToOpen",
"(",
"l",
",",
"t",
",",
"r",
",",
"b",
")",
";",
"}"
] | Set the touch area where the user can touch to pull the board down.
@param l
@param t
@param r
@param b | [
"Set",
"the",
"touch",
"area",
"where",
"the",
"user",
"can",
"touch",
"to",
"pull",
"the",
"board",
"down",
"."
] | train | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoard.java#L544-L546 |
apache/flink | flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java | StreamExecutionEnvironment.fromCollection | public <OUT> DataStreamSource<OUT> fromCollection(Collection<OUT> data) {
"""
Creates a data stream from the given non-empty collection. The type of the data stream is that of the
elements in the collection.
<p>The framework will try and determine the exact type from the collection elements. In case of generic... | java | public <OUT> DataStreamSource<OUT> fromCollection(Collection<OUT> data) {
Preconditions.checkNotNull(data, "Collection must not be null");
if (data.isEmpty()) {
throw new IllegalArgumentException("Collection must not be empty");
}
OUT first = data.iterator().next();
if (first == null) {
throw new Illeg... | [
"public",
"<",
"OUT",
">",
"DataStreamSource",
"<",
"OUT",
">",
"fromCollection",
"(",
"Collection",
"<",
"OUT",
">",
"data",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"data",
",",
"\"Collection must not be null\"",
")",
";",
"if",
"(",
"data",
".... | Creates a data stream from the given non-empty collection. The type of the data stream is that of the
elements in the collection.
<p>The framework will try and determine the exact type from the collection elements. In case of generic
elements, it may be necessary to manually supply the type information via
{@link #fro... | [
"Creates",
"a",
"data",
"stream",
"from",
"the",
"given",
"non",
"-",
"empty",
"collection",
".",
"The",
"type",
"of",
"the",
"data",
"stream",
"is",
"that",
"of",
"the",
"elements",
"in",
"the",
"collection",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L768-L789 |
google/closure-templates | java/src/com/google/template/soy/passes/PluginResolver.java | PluginResolver.lookupPrintDirective | public SoyPrintDirective lookupPrintDirective(String name, int numArgs, SourceLocation location) {
"""
Returns a print directive with the given name and arity.
<p>An error will be reported according to the current {@link Mode} and a placeholder function
will be returned if it cannot be found.
"""
SoyPr... | java | public SoyPrintDirective lookupPrintDirective(String name, int numArgs, SourceLocation location) {
SoyPrintDirective soyPrintDirective = printDirectives.get(name);
if (soyPrintDirective == null) {
reportMissing(location, "print directive", name, printDirectives.keySet());
soyPrintDirective = createP... | [
"public",
"SoyPrintDirective",
"lookupPrintDirective",
"(",
"String",
"name",
",",
"int",
"numArgs",
",",
"SourceLocation",
"location",
")",
"{",
"SoyPrintDirective",
"soyPrintDirective",
"=",
"printDirectives",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"soyPr... | Returns a print directive with the given name and arity.
<p>An error will be reported according to the current {@link Mode} and a placeholder function
will be returned if it cannot be found. | [
"Returns",
"a",
"print",
"directive",
"with",
"the",
"given",
"name",
"and",
"arity",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/passes/PluginResolver.java#L177-L186 |
AgNO3/jcifs-ng | src/main/java/jcifs/Config.java | Config.getInetAddressArray | public static InetAddress[] getInetAddressArray ( Properties props, String key, String delim, InetAddress[] def ) {
"""
Retrieve an array of <tt>InetAddress</tt> created from a property
value containing a <tt>delim</tt> separated list of host names and/or
ip addresses.
"""
String p = props.getPropert... | java | public static InetAddress[] getInetAddressArray ( Properties props, String key, String delim, InetAddress[] def ) {
String p = props.getProperty(key);
if ( p != null ) {
StringTokenizer tok = new StringTokenizer(p, delim);
int len = tok.countTokens();
InetAddress[] ar... | [
"public",
"static",
"InetAddress",
"[",
"]",
"getInetAddressArray",
"(",
"Properties",
"props",
",",
"String",
"key",
",",
"String",
"delim",
",",
"InetAddress",
"[",
"]",
"def",
")",
"{",
"String",
"p",
"=",
"props",
".",
"getProperty",
"(",
"key",
")",
... | Retrieve an array of <tt>InetAddress</tt> created from a property
value containing a <tt>delim</tt> separated list of host names and/or
ip addresses. | [
"Retrieve",
"an",
"array",
"of",
"<tt",
">",
"InetAddress<",
"/",
"tt",
">",
"created",
"from",
"a",
"property",
"value",
"containing",
"a",
"<tt",
">",
"delim<",
"/",
"tt",
">",
"separated",
"list",
"of",
"host",
"names",
"and",
"/",
"or",
"ip",
"addr... | train | https://github.com/AgNO3/jcifs-ng/blob/0311107a077ea372527ae74839eec8042197332f/src/main/java/jcifs/Config.java#L182-L201 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java | PluralRules.forLocale | public static PluralRules forLocale(Locale locale, PluralType type) {
"""
Provides access to the predefined <code>PluralRules</code> for a given
{@link java.util.Locale} and the plural type.
<p>ICU defines plural rules for many locales based on CLDR <i>Language Plural Rules</i>.
For these predefined rules, se... | java | public static PluralRules forLocale(Locale locale, PluralType type) {
return forLocale(ULocale.forLocale(locale), type);
} | [
"public",
"static",
"PluralRules",
"forLocale",
"(",
"Locale",
"locale",
",",
"PluralType",
"type",
")",
"{",
"return",
"forLocale",
"(",
"ULocale",
".",
"forLocale",
"(",
"locale",
")",
",",
"type",
")",
";",
"}"
] | Provides access to the predefined <code>PluralRules</code> for a given
{@link java.util.Locale} and the plural type.
<p>ICU defines plural rules for many locales based on CLDR <i>Language Plural Rules</i>.
For these predefined rules, see CLDR page at
http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_p... | [
"Provides",
"access",
"to",
"the",
"predefined",
"<code",
">",
"PluralRules<",
"/",
"code",
">",
"for",
"a",
"given",
"{",
"@link",
"java",
".",
"util",
".",
"Locale",
"}",
"and",
"the",
"plural",
"type",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L1947-L1949 |
google/closure-compiler | src/com/google/javascript/jscomp/Es6ToEs3Util.java | Es6ToEs3Util.withType | static Node withType(Node n, JSType t) {
"""
Adds the type t to Node n, and returns n. Does nothing if t is null.
"""
if (t != null) {
n.setJSType(t);
}
return n;
} | java | static Node withType(Node n, JSType t) {
if (t != null) {
n.setJSType(t);
}
return n;
} | [
"static",
"Node",
"withType",
"(",
"Node",
"n",
",",
"JSType",
"t",
")",
"{",
"if",
"(",
"t",
"!=",
"null",
")",
"{",
"n",
".",
"setJSType",
"(",
"t",
")",
";",
"}",
"return",
"n",
";",
"}"
] | Adds the type t to Node n, and returns n. Does nothing if t is null. | [
"Adds",
"the",
"type",
"t",
"to",
"Node",
"n",
"and",
"returns",
"n",
".",
"Does",
"nothing",
"if",
"t",
"is",
"null",
"."
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6ToEs3Util.java#L97-L102 |
couchbase/couchbase-lite-java | src/main/java/com/couchbase/lite/AbstractReplicator.java | AbstractReplicator.addChangeListener | @NonNull
public ListenerToken addChangeListener(Executor executor, @NonNull ReplicatorChangeListener listener) {
"""
Set the given ReplicatorChangeListener to the this replicator.
@param listener
"""
if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }
... | java | @NonNull
public ListenerToken addChangeListener(Executor executor, @NonNull ReplicatorChangeListener listener) {
if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }
synchronized (lock) {
if (listener == null) { throw new IllegalArgumentException(); ... | [
"@",
"NonNull",
"public",
"ListenerToken",
"addChangeListener",
"(",
"Executor",
"executor",
",",
"@",
"NonNull",
"ReplicatorChangeListener",
"listener",
")",
"{",
"if",
"(",
"listener",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"l... | Set the given ReplicatorChangeListener to the this replicator.
@param listener | [
"Set",
"the",
"given",
"ReplicatorChangeListener",
"to",
"the",
"this",
"replicator",
"."
] | train | https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/AbstractReplicator.java#L397-L407 |
VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.rateLimitedLog | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args) {
"""
This rate limited log must be used by the importers to log messages that may
happen frequently and must be rate limited.
@param level the log level
@param cause cause exception, if there is one
@param ... | java | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | [
"@",
"Override",
"public",
"void",
"rateLimitedLog",
"(",
"Level",
"level",
",",
"Throwable",
"cause",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"rateLimitedLog",
"(",
"LOG_SUPPRESSION_INTERVAL_SECONDS",
",",
"level",
",",... | This rate limited log must be used by the importers to log messages that may
happen frequently and must be rate limited.
@param level the log level
@param cause cause exception, if there is one
@param format error message format
@param args arguments to format the error message | [
"This",
"rate",
"limited",
"log",
"must",
"be",
"used",
"by",
"the",
"importers",
"to",
"log",
"messages",
"that",
"may",
"happen",
"frequently",
"and",
"must",
"be",
"rate",
"limited",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L157-L161 |
salesforce/Argus | ArgusCore/src/main/java/com/salesforce/dva/argus/service/warden/WardenNotifier.java | WardenNotifier.sendWardenEmailToUser | protected void sendWardenEmailToUser(NotificationContext context, SubSystem subSystem) {
"""
Sends an email to user and admin with information on suspension and when user will be reinstated.
@param context Notification context of the warden notifier
@param subSystem The sub system user has been suspended... | java | protected void sendWardenEmailToUser(NotificationContext context, SubSystem subSystem) {
EntityManager em = emf.get();
PrincipalUser user = getWardenUser(context.getAlert().getName());
SuspensionRecord record = SuspensionRecord.findByUserAndSubsystem(em, user, subSystem);
Set<String> to ... | [
"protected",
"void",
"sendWardenEmailToUser",
"(",
"NotificationContext",
"context",
",",
"SubSystem",
"subSystem",
")",
"{",
"EntityManager",
"em",
"=",
"emf",
".",
"get",
"(",
")",
";",
"PrincipalUser",
"user",
"=",
"getWardenUser",
"(",
"context",
".",
"getAl... | Sends an email to user and admin with information on suspension and when user will be reinstated.
@param context Notification context of the warden notifier
@param subSystem The sub system user has been suspended from | [
"Sends",
"an",
"email",
"to",
"user",
"and",
"admin",
"with",
"information",
"on",
"suspension",
"and",
"when",
"user",
"will",
"be",
"reinstated",
"."
] | train | https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/warden/WardenNotifier.java#L177-L205 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Grego.java | Grego.getDayOfWeekInMonth | public static int getDayOfWeekInMonth(int year, int month, int dayOfMonth) {
"""
/*
Returns the ordinal number for the specified day of week in the month.
The valid return value is 1, 2, 3, 4 or -1.
"""
int weekInMonth = (dayOfMonth + 6)/7;
if (weekInMonth == 4) {
if (dayOfMonth +... | java | public static int getDayOfWeekInMonth(int year, int month, int dayOfMonth) {
int weekInMonth = (dayOfMonth + 6)/7;
if (weekInMonth == 4) {
if (dayOfMonth + 7 > monthLength(year, month)) {
weekInMonth = -1;
}
} else if (weekInMonth == 5) {
weekI... | [
"public",
"static",
"int",
"getDayOfWeekInMonth",
"(",
"int",
"year",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"int",
"weekInMonth",
"=",
"(",
"dayOfMonth",
"+",
"6",
")",
"/",
"7",
";",
"if",
"(",
"weekInMonth",
"==",
"4",
")",
"{",
... | /*
Returns the ordinal number for the specified day of week in the month.
The valid return value is 1, 2, 3, 4 or -1. | [
"/",
"*",
"Returns",
"the",
"ordinal",
"number",
"for",
"the",
"specified",
"day",
"of",
"week",
"in",
"the",
"month",
".",
"The",
"valid",
"return",
"value",
"is",
"1",
"2",
"3",
"4",
"or",
"-",
"1",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Grego.java#L207-L217 |
facebookarchive/hadoop-20 | src/mapred/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java | FileOutputCommitter.getFinalPath | private Path getFinalPath(Path jobOutputDir, Path taskOutput,
Path taskOutputPath) throws IOException {
"""
Find the final name of a given output file, given the job output directory
and the work directory.
@param jobOutputDir the job's output directory
@param taskOutput the specifi... | java | private Path getFinalPath(Path jobOutputDir, Path taskOutput,
Path taskOutputPath) throws IOException {
URI taskOutputUri = taskOutput.toUri();
URI relativePath = taskOutputPath.toUri().relativize(taskOutputUri);
if (taskOutputUri == relativePath) {
throw new IOException("... | [
"private",
"Path",
"getFinalPath",
"(",
"Path",
"jobOutputDir",
",",
"Path",
"taskOutput",
",",
"Path",
"taskOutputPath",
")",
"throws",
"IOException",
"{",
"URI",
"taskOutputUri",
"=",
"taskOutput",
".",
"toUri",
"(",
")",
";",
"URI",
"relativePath",
"=",
"ta... | Find the final name of a given output file, given the job output directory
and the work directory.
@param jobOutputDir the job's output directory
@param taskOutput the specific task output file
@param taskOutputPath the job's work directory
@return the final path for the specific output file
@throws IOException | [
"Find",
"the",
"final",
"name",
"of",
"a",
"given",
"output",
"file",
"given",
"the",
"job",
"output",
"directory",
"and",
"the",
"work",
"directory",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java#L248-L261 |
cdk/cdk | storage/inchi/src/main/java/org/openscience/cdk/graph/invariant/InChINumbersTools.java | InChINumbersTools.findPiBondedOxygen | private static IAtom findPiBondedOxygen(IAtomContainer container, IAtom atom) {
"""
Find a neutral oxygen bonded to the {@code atom} with a pi bond.
@param container the container
@param atom an atom from the container
@return a pi bonded oxygen (or null if not found)
"""
for (IBond bond : co... | java | private static IAtom findPiBondedOxygen(IAtomContainer container, IAtom atom) {
for (IBond bond : container.getConnectedBondsList(atom)) {
if (bond.getOrder() == IBond.Order.DOUBLE) {
IAtom neighbor = bond.getOther(atom);
int charge = neighbor.getFormalCharge() == nul... | [
"private",
"static",
"IAtom",
"findPiBondedOxygen",
"(",
"IAtomContainer",
"container",
",",
"IAtom",
"atom",
")",
"{",
"for",
"(",
"IBond",
"bond",
":",
"container",
".",
"getConnectedBondsList",
"(",
"atom",
")",
")",
"{",
"if",
"(",
"bond",
".",
"getOrder... | Find a neutral oxygen bonded to the {@code atom} with a pi bond.
@param container the container
@param atom an atom from the container
@return a pi bonded oxygen (or null if not found) | [
"Find",
"a",
"neutral",
"oxygen",
"bonded",
"to",
"the",
"{",
"@code",
"atom",
"}",
"with",
"a",
"pi",
"bond",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/inchi/src/main/java/org/openscience/cdk/graph/invariant/InChINumbersTools.java#L213-L222 |
phax/ph-oton | ph-oton-security/src/main/java/com/helger/photon/security/usergroup/UserGroupManager.java | UserGroupManager.createNewUserGroup | @Nonnull
public IUserGroup createNewUserGroup (@Nonnull @Nonempty final String sName,
@Nullable final String sDescription,
@Nullable final Map <String, String> aCustomAttrs) {
"""
Create a new user group.
@param sName
The name of... | java | @Nonnull
public IUserGroup createNewUserGroup (@Nonnull @Nonempty final String sName,
@Nullable final String sDescription,
@Nullable final Map <String, String> aCustomAttrs)
{
// Create user group
final UserGroup aUserGroup = ne... | [
"@",
"Nonnull",
"public",
"IUserGroup",
"createNewUserGroup",
"(",
"@",
"Nonnull",
"@",
"Nonempty",
"final",
"String",
"sName",
",",
"@",
"Nullable",
"final",
"String",
"sDescription",
",",
"@",
"Nullable",
"final",
"Map",
"<",
"String",
",",
"String",
">",
... | Create a new user group.
@param sName
The name of the user group to create. May neither be
<code>null</code> nor empty.
@param sDescription
The optional description of the user group. May be <code>null</code>
.
@param aCustomAttrs
A set of custom attributes. May be <code>null</code>.
@return The created user group. | [
"Create",
"a",
"new",
"user",
"group",
"."
] | train | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/usergroup/UserGroupManager.java#L135-L154 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java | FilterExprIteratorSimple.fixupVariables | public void fixupVariables(java.util.Vector vars, int globalsSize) {
"""
This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
@param vars List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corre... | java | public void fixupVariables(java.util.Vector vars, int globalsSize)
{
super.fixupVariables(vars, globalsSize);
m_expr.fixupVariables(vars, globalsSize);
} | [
"public",
"void",
"fixupVariables",
"(",
"java",
".",
"util",
".",
"Vector",
"vars",
",",
"int",
"globalsSize",
")",
"{",
"super",
".",
"fixupVariables",
"(",
"vars",
",",
"globalsSize",
")",
";",
"m_expr",
".",
"fixupVariables",
"(",
"vars",
",",
"globals... | This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
@param vars List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector f... | [
"This",
"function",
"is",
"used",
"to",
"fixup",
"variables",
"from",
"QNames",
"to",
"stack",
"frame",
"indexes",
"at",
"stylesheet",
"build",
"time",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java#L201-L205 |
VoltDB/voltdb | src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java | VoltDDLElementTracker.addExportedTable | void addExportedTable(String tableName, String targetName, boolean isStream) {
"""
Track an exported table
@param tableName a table name
@param targetName
@throws VoltCompilerException when the given table is already exported
"""
assert tableName != null && ! tableName.trim().isEmpty();
asse... | java | void addExportedTable(String tableName, String targetName, boolean isStream) {
assert tableName != null && ! tableName.trim().isEmpty();
assert targetName != null && ! targetName.trim().isEmpty();
// store uppercase in the catalog as typename
targetName = targetName.toUpperCase();
... | [
"void",
"addExportedTable",
"(",
"String",
"tableName",
",",
"String",
"targetName",
",",
"boolean",
"isStream",
")",
"{",
"assert",
"tableName",
"!=",
"null",
"&&",
"!",
"tableName",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
";",
"assert",
"targetN... | Track an exported table
@param tableName a table name
@param targetName
@throws VoltCompilerException when the given table is already exported | [
"Track",
"an",
"exported",
"table"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltDDLElementTracker.java#L195-L214 |
OpenLiberty/open-liberty | dev/com.ibm.ws.org.apache.cxf.cxf.rt.frontend.jaxrs.3.2/src/com/ibm/ws/jaxrs20/utils/UriEncoder.java | UriEncoder.needsEncoding | private static boolean needsEncoding(String s, boolean relax, boolean[] unreserved) {
"""
Determines if the input string contains any invalid URI characters that
require encoding
@param uri the string to test
@return true if the the input string contains only valid URI characters
"""
int len = s.l... | java | private static boolean needsEncoding(String s, boolean relax, boolean[] unreserved) {
int len = s.length();
for (int i = 0; i < len; ++i) {
char c = s.charAt(i);
if (c == '%' && relax) {
continue;
}
if (c > unreserved.length) {
... | [
"private",
"static",
"boolean",
"needsEncoding",
"(",
"String",
"s",
",",
"boolean",
"relax",
",",
"boolean",
"[",
"]",
"unreserved",
")",
"{",
"int",
"len",
"=",
"s",
".",
"length",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
... | Determines if the input string contains any invalid URI characters that
require encoding
@param uri the string to test
@return true if the the input string contains only valid URI characters | [
"Determines",
"if",
"the",
"input",
"string",
"contains",
"any",
"invalid",
"URI",
"characters",
"that",
"require",
"encoding"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.org.apache.cxf.cxf.rt.frontend.jaxrs.3.2/src/com/ibm/ws/jaxrs20/utils/UriEncoder.java#L411-L426 |
symphonyoss/messageml-utils | src/main/java/org/symphonyoss/symphony/messageml/util/IndentedPrintStream.java | IndentedPrintStream.println | public void println(String pattern, Object... arguments) {
"""
Convenience method for calling string.format and printing
with line breaks
"""
println(String.format(pattern, arguments));
} | java | public void println(String pattern, Object... arguments) {
println(String.format(pattern, arguments));
} | [
"public",
"void",
"println",
"(",
"String",
"pattern",
",",
"Object",
"...",
"arguments",
")",
"{",
"println",
"(",
"String",
".",
"format",
"(",
"pattern",
",",
"arguments",
")",
")",
";",
"}"
] | Convenience method for calling string.format and printing
with line breaks | [
"Convenience",
"method",
"for",
"calling",
"string",
".",
"format",
"and",
"printing",
"with",
"line",
"breaks"
] | train | https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/messageml/util/IndentedPrintStream.java#L585-L587 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel.java | dnspolicylabel.get | public static dnspolicylabel get(nitro_service service, String labelname) throws Exception {
"""
Use this API to fetch dnspolicylabel resource of given name .
"""
dnspolicylabel obj = new dnspolicylabel();
obj.set_labelname(labelname);
dnspolicylabel response = (dnspolicylabel) obj.get_resource(service);... | java | public static dnspolicylabel get(nitro_service service, String labelname) throws Exception{
dnspolicylabel obj = new dnspolicylabel();
obj.set_labelname(labelname);
dnspolicylabel response = (dnspolicylabel) obj.get_resource(service);
return response;
} | [
"public",
"static",
"dnspolicylabel",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"labelname",
")",
"throws",
"Exception",
"{",
"dnspolicylabel",
"obj",
"=",
"new",
"dnspolicylabel",
"(",
")",
";",
"obj",
".",
"set_labelname",
"(",
"labelname",
")",
... | Use this API to fetch dnspolicylabel resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"dnspolicylabel",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicylabel.java#L335-L340 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/engine/impl/context/Context.java | Context.executeWithinProcessApplication | public static <T> T executeWithinProcessApplication(Callable<T> callback, ProcessApplicationReference processApplicationReference) {
"""
Use {@link #executeWithinProcessApplication(Callable, ProcessApplicationReference, InvocationContext)}
instead if an {@link InvocationContext} is available.
"""
return e... | java | public static <T> T executeWithinProcessApplication(Callable<T> callback, ProcessApplicationReference processApplicationReference) {
return executeWithinProcessApplication(callback, processApplicationReference, null);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"executeWithinProcessApplication",
"(",
"Callable",
"<",
"T",
">",
"callback",
",",
"ProcessApplicationReference",
"processApplicationReference",
")",
"{",
"return",
"executeWithinProcessApplication",
"(",
"callback",
",",
"proces... | Use {@link #executeWithinProcessApplication(Callable, ProcessApplicationReference, InvocationContext)}
instead if an {@link InvocationContext} is available. | [
"Use",
"{"
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/context/Context.java#L181-L183 |
kubernetes-client/java | util/src/main/java/io/kubernetes/client/informer/impl/DefaultSharedIndexInformer.java | DefaultSharedIndexInformer.handleDeltas | private void handleDeltas(Deque<MutablePair<DeltaFIFO.DeltaType, Object>> deltas) {
"""
handleDeltas handles deltas and call processor distribute.
@param deltas deltas
"""
if (Collections.isEmptyCollection(deltas)) {
return;
}
// from oldest to newest
for (MutablePair<DeltaFIFO.DeltaT... | java | private void handleDeltas(Deque<MutablePair<DeltaFIFO.DeltaType, Object>> deltas) {
if (Collections.isEmptyCollection(deltas)) {
return;
}
// from oldest to newest
for (MutablePair<DeltaFIFO.DeltaType, Object> delta : deltas) {
DeltaFIFO.DeltaType deltaType = delta.getLeft();
switch (... | [
"private",
"void",
"handleDeltas",
"(",
"Deque",
"<",
"MutablePair",
"<",
"DeltaFIFO",
".",
"DeltaType",
",",
"Object",
">",
">",
"deltas",
")",
"{",
"if",
"(",
"Collections",
".",
"isEmptyCollection",
"(",
"deltas",
")",
")",
"{",
"return",
";",
"}",
"/... | handleDeltas handles deltas and call processor distribute.
@param deltas deltas | [
"handleDeltas",
"handles",
"deltas",
"and",
"call",
"processor",
"distribute",
"."
] | train | https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/util/src/main/java/io/kubernetes/client/informer/impl/DefaultSharedIndexInformer.java#L167-L198 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/query/FieldCriteria.java | FieldCriteria.buildNotLessCriteria | static FieldCriteria buildNotLessCriteria(Object anAttribute, Object aValue, UserAlias anAlias) {
"""
static FieldCriteria buildNotLessCriteria(Object anAttribute, Object aValue, String anAlias)
"""
return new FieldCriteria(anAttribute, aValue, NOT_LESS, anAlias);
} | java | static FieldCriteria buildNotLessCriteria(Object anAttribute, Object aValue, UserAlias anAlias)
{
return new FieldCriteria(anAttribute, aValue, NOT_LESS, anAlias);
} | [
"static",
"FieldCriteria",
"buildNotLessCriteria",
"(",
"Object",
"anAttribute",
",",
"Object",
"aValue",
",",
"UserAlias",
"anAlias",
")",
"{",
"return",
"new",
"FieldCriteria",
"(",
"anAttribute",
",",
"aValue",
",",
"NOT_LESS",
",",
"anAlias",
")",
";",
"}"
] | static FieldCriteria buildNotLessCriteria(Object anAttribute, Object aValue, String anAlias) | [
"static",
"FieldCriteria",
"buildNotLessCriteria",
"(",
"Object",
"anAttribute",
"Object",
"aValue",
"String",
"anAlias",
")"
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/FieldCriteria.java#L63-L66 |
unbescape/unbescape | src/main/java/org/unbescape/xml/XmlEscape.java | XmlEscape.escapeXml11 | public static void escapeXml11(final Reader reader, final Writer writer)
throws IOException {
"""
<p>
Perform an XML 1.1 level 2 (markup-significant and all non-ASCII chars) <strong>escape</strong> operation
on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>.
</p>
<p>
<em>Level 2</em... | java | public static void escapeXml11(final Reader reader, final Writer writer)
throws IOException {
escapeXml(reader, writer, XmlEscapeSymbols.XML11_SYMBOLS,
XmlEscapeType.CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA,
XmlEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFIC... | [
"public",
"static",
"void",
"escapeXml11",
"(",
"final",
"Reader",
"reader",
",",
"final",
"Writer",
"writer",
")",
"throws",
"IOException",
"{",
"escapeXml",
"(",
"reader",
",",
"writer",
",",
"XmlEscapeSymbols",
".",
"XML11_SYMBOLS",
",",
"XmlEscapeType",
".",... | <p>
Perform an XML 1.1 level 2 (markup-significant and all non-ASCII chars) <strong>escape</strong> operation
on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>.
</p>
<p>
<em>Level 2</em> means this method will escape:
</p>
<ul>
<li>The five markup-significant characters: <tt><</tt>, <tt>></tt>, <tt... | [
"<p",
">",
"Perform",
"an",
"XML",
"1",
".",
"1",
"level",
"2",
"(",
"markup",
"-",
"significant",
"and",
"all",
"non",
"-",
"ASCII",
"chars",
")",
"<strong",
">",
"escape<",
"/",
"strong",
">",
"operation",
"on",
"a",
"<tt",
">",
"Reader<",
"/",
"... | train | https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1450-L1455 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/application/session/ApplicationSession.java | ApplicationSession.getSessionAttribute | public Object getSessionAttribute(String key, Object defaultValue) {
"""
Get a value from the session attributes map.
@param key a unique string code
@param defaultValue the default value if not found
@return The session attibute or the default value if not found
"""
Object attributeValue = this.s... | java | public Object getSessionAttribute(String key, Object defaultValue)
{
Object attributeValue = this.sessionAttributes.get(key);
if (attributeValue == null)
attributeValue = defaultValue;
return attributeValue;
} | [
"public",
"Object",
"getSessionAttribute",
"(",
"String",
"key",
",",
"Object",
"defaultValue",
")",
"{",
"Object",
"attributeValue",
"=",
"this",
".",
"sessionAttributes",
".",
"get",
"(",
"key",
")",
";",
"if",
"(",
"attributeValue",
"==",
"null",
")",
"at... | Get a value from the session attributes map.
@param key a unique string code
@param defaultValue the default value if not found
@return The session attibute or the default value if not found | [
"Get",
"a",
"value",
"from",
"the",
"session",
"attributes",
"map",
"."
] | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/application/session/ApplicationSession.java#L264-L270 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/odmg/locking/ReadCommittedStrategy.java | ReadCommittedStrategy.readLock | public boolean readLock(TransactionImpl tx, Object obj) {
"""
acquire a read lock on Object obj for Transaction tx.
@param tx the transaction requesting the lock
@param obj the Object to be locked
@return true if successful, else false
"""
LockEntry writer = getWriter(obj);
if (writer ==... | java | public boolean readLock(TransactionImpl tx, Object obj)
{
LockEntry writer = getWriter(obj);
if (writer == null)
{
addReader(tx, obj);
// if there has been a successful write locking, try again
if (getWriter(obj) == null)
return t... | [
"public",
"boolean",
"readLock",
"(",
"TransactionImpl",
"tx",
",",
"Object",
"obj",
")",
"{",
"LockEntry",
"writer",
"=",
"getWriter",
"(",
"obj",
")",
";",
"if",
"(",
"writer",
"==",
"null",
")",
"{",
"addReader",
"(",
"tx",
",",
"obj",
")",
";",
"... | acquire a read lock on Object obj for Transaction tx.
@param tx the transaction requesting the lock
@param obj the Object to be locked
@return true if successful, else false | [
"acquire",
"a",
"read",
"lock",
"on",
"Object",
"obj",
"for",
"Transaction",
"tx",
".",
"@param",
"tx",
"the",
"transaction",
"requesting",
"the",
"lock",
"@param",
"obj",
"the",
"Object",
"to",
"be",
"locked",
"@return",
"true",
"if",
"successful",
"else",
... | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/locking/ReadCommittedStrategy.java#L44-L68 |
Harium/keel | src/main/java/com/harium/keel/catalano/math/distance/Distance.java | Distance.Manhattan | public static double Manhattan(IntPoint p, IntPoint q) {
"""
Gets the Manhattan distance between two points.
@param p IntPoint with X and Y axis coordinates.
@param q IntPoint with X and Y axis coordinates.
@return The Manhattan distance between x and y.
"""
return Manhattan(p.x, p.y, q.x, q.y);
... | java | public static double Manhattan(IntPoint p, IntPoint q) {
return Manhattan(p.x, p.y, q.x, q.y);
} | [
"public",
"static",
"double",
"Manhattan",
"(",
"IntPoint",
"p",
",",
"IntPoint",
"q",
")",
"{",
"return",
"Manhattan",
"(",
"p",
".",
"x",
",",
"p",
".",
"y",
",",
"q",
".",
"x",
",",
"q",
".",
"y",
")",
";",
"}"
] | Gets the Manhattan distance between two points.
@param p IntPoint with X and Y axis coordinates.
@param q IntPoint with X and Y axis coordinates.
@return The Manhattan distance between x and y. | [
"Gets",
"the",
"Manhattan",
"distance",
"between",
"two",
"points",
"."
] | train | https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L717-L719 |
fabric8io/kubernetes-client | kubernetes-client/src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java | KubeConfigUtils.getCluster | public static Cluster getCluster(Config config, Context context) {
"""
Returns the current {@link Cluster} for the current context
@param config {@link Config} config object
@param context {@link Context} context object
@return current {@link Cluster} for current context
"""
Cluster cluster = n... | java | public static Cluster getCluster(Config config, Context context) {
Cluster cluster = null;
if (config != null && context != null) {
String clusterName = context.getCluster();
if (clusterName != null) {
List<NamedCluster> clusters = config.getClusters();
if (clusters != null) {
... | [
"public",
"static",
"Cluster",
"getCluster",
"(",
"Config",
"config",
",",
"Context",
"context",
")",
"{",
"Cluster",
"cluster",
"=",
"null",
";",
"if",
"(",
"config",
"!=",
"null",
"&&",
"context",
"!=",
"null",
")",
"{",
"String",
"clusterName",
"=",
"... | Returns the current {@link Cluster} for the current context
@param config {@link Config} config object
@param context {@link Context} context object
@return current {@link Cluster} for current context | [
"Returns",
"the",
"current",
"{",
"@link",
"Cluster",
"}",
"for",
"the",
"current",
"context"
] | train | https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java#L118-L134 |
alkacon/opencms-core | src/org/opencms/workplace/tools/CmsToolManager.java | CmsToolManager.setCurrentRoot | public void setCurrentRoot(CmsWorkplace wp, String key) {
"""
Sets the current user's root key.<p>
@param wp the workplace context
@param key the current user's root key to set
"""
// use last used root if param empty
if (CmsStringUtil.isEmpty(key) || key.trim().equals("null")) {
... | java | public void setCurrentRoot(CmsWorkplace wp, String key) {
// use last used root if param empty
if (CmsStringUtil.isEmpty(key) || key.trim().equals("null")) {
key = getCurrentRoot(wp).getKey();
}
// set it
CmsToolUserData userData = getUserData(wp);
userData.s... | [
"public",
"void",
"setCurrentRoot",
"(",
"CmsWorkplace",
"wp",
",",
"String",
"key",
")",
"{",
"// use last used root if param empty",
"if",
"(",
"CmsStringUtil",
".",
"isEmpty",
"(",
"key",
")",
"||",
"key",
".",
"trim",
"(",
")",
".",
"equals",
"(",
"\"nul... | Sets the current user's root key.<p>
@param wp the workplace context
@param key the current user's root key to set | [
"Sets",
"the",
"current",
"user",
"s",
"root",
"key",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolManager.java#L553-L562 |
wisdom-framework/wisdom | core/wisdom-api/src/main/java/org/wisdom/api/http/Result.java | Result.addToFlash | public Result addToFlash(String key, String value) {
"""
Adds the given key-value pair to the current flash. This method requires a current HTTP context. If none, a
{@link java.lang.IllegalStateException} is thrown.
@param key the key
@param value the value
@return the current result
"""
curren... | java | public Result addToFlash(String key, String value) {
current(true).flash().put(key, value);
return this;
} | [
"public",
"Result",
"addToFlash",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"current",
"(",
"true",
")",
".",
"flash",
"(",
")",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Adds the given key-value pair to the current flash. This method requires a current HTTP context. If none, a
{@link java.lang.IllegalStateException} is thrown.
@param key the key
@param value the value
@return the current result | [
"Adds",
"the",
"given",
"key",
"-",
"value",
"pair",
"to",
"the",
"current",
"flash",
".",
"This",
"method",
"requires",
"a",
"current",
"HTTP",
"context",
".",
"If",
"none",
"a",
"{",
"@link",
"java",
".",
"lang",
".",
"IllegalStateException",
"}",
"is"... | train | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-api/src/main/java/org/wisdom/api/http/Result.java#L565-L568 |
kiegroup/jbpm | jbpm-services/jbpm-kie-services/src/main/java/org/jbpm/kie/services/impl/utils/PreUndeployOperations.java | PreUndeployOperations.abortUnitActiveProcessInstances | public static Function<DeploymentUnit, Boolean> abortUnitActiveProcessInstances(final RuntimeDataService runtimeDataService, final DeploymentService deploymentService) {
"""
Returns a function that checks if a given {@link DeploymentUnit} has active process instances instances, aborts them and,
if nothing wrong h... | java | public static Function<DeploymentUnit, Boolean> abortUnitActiveProcessInstances(final RuntimeDataService runtimeDataService, final DeploymentService deploymentService) {
return unit -> {
Collection<ProcessInstanceDesc> activeProcesses = runtimeDataService.getProcessInstancesByDeploymentId(unit.getId... | [
"public",
"static",
"Function",
"<",
"DeploymentUnit",
",",
"Boolean",
">",
"abortUnitActiveProcessInstances",
"(",
"final",
"RuntimeDataService",
"runtimeDataService",
",",
"final",
"DeploymentService",
"deploymentService",
")",
"{",
"return",
"unit",
"->",
"{",
"Colle... | Returns a function that checks if a given {@link DeploymentUnit} has active process instances instances, aborts them and,
if nothing wrong happened, lets the undeployment operation continue.
@param runtimeDataService a {@link RuntimeDataService} to query the process instances
@param deploymentService a {@link Deploymen... | [
"Returns",
"a",
"function",
"that",
"checks",
"if",
"a",
"given",
"{"
] | train | https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-services/jbpm-kie-services/src/main/java/org/jbpm/kie/services/impl/utils/PreUndeployOperations.java#L74-L100 |
sarl/sarl | main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java | MarkdownParser.setOutlineEntryFormat | public void setOutlineEntryFormat(String formatWithoutNumbers, String formatWithNumbers) {
"""
Change the formats to be applied to the outline entries.
<p>The format must be compatible with {@link MessageFormat}.
<p>If section auto-numbering is on,
the first parameter <code>{0}</code> equals to the prefix,
... | java | public void setOutlineEntryFormat(String formatWithoutNumbers, String formatWithNumbers) {
if (!Strings.isEmpty(formatWithoutNumbers)) {
this.outlineEntryWithoutNumberFormat = formatWithoutNumbers;
}
if (!Strings.isEmpty(formatWithNumbers)) {
this.outlineEntryWithNumberFormat = formatWithNumbers;
}
} | [
"public",
"void",
"setOutlineEntryFormat",
"(",
"String",
"formatWithoutNumbers",
",",
"String",
"formatWithNumbers",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isEmpty",
"(",
"formatWithoutNumbers",
")",
")",
"{",
"this",
".",
"outlineEntryWithoutNumberFormat",
"="... | Change the formats to be applied to the outline entries.
<p>The format must be compatible with {@link MessageFormat}.
<p>If section auto-numbering is on,
the first parameter <code>{0}</code> equals to the prefix,
the second parameter <code>{1}</code> equals to the string representation of the section number,
the thir... | [
"Change",
"the",
"formats",
"to",
"be",
"applied",
"to",
"the",
"outline",
"entries",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/externalmaven/io.sarl.maven.docs.generator/src/main/java/io/sarl/maven/docs/markdown/MarkdownParser.java#L330-L337 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscCompilationJobsInner.java | DscCompilationJobsInner.getStream | public JobStreamInner getStream(String resourceGroupName, String automationAccountName, UUID jobId, String jobStreamId) {
"""
Retrieve the job stream identified by job stream id.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param j... | java | public JobStreamInner getStream(String resourceGroupName, String automationAccountName, UUID jobId, String jobStreamId) {
return getStreamWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId, jobStreamId).toBlocking().single().body();
} | [
"public",
"JobStreamInner",
"getStream",
"(",
"String",
"resourceGroupName",
",",
"String",
"automationAccountName",
",",
"UUID",
"jobId",
",",
"String",
"jobStreamId",
")",
"{",
"return",
"getStreamWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"automationAcco... | Retrieve the job stream identified by job stream id.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@param jobId The job id.
@param jobStreamId The job stream id.
@throws IllegalArgumentException thrown if parameters fail the validation
@throw... | [
"Retrieve",
"the",
"job",
"stream",
"identified",
"by",
"job",
"stream",
"id",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscCompilationJobsInner.java#L530-L532 |
CenturyLinkCloud/mdw | mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java | ObjectAdapterActivity.handleAdapterSuccess | protected void handleAdapterSuccess(Object pResponse)
throws ActivityException,ConnectionException,AdapterException {
"""
The method is invoked when the external system interaction is a success.
(i.e. the external system responded something, even an error code).
The method may convert external-system-det... | java | protected void handleAdapterSuccess(Object pResponse)
throws ActivityException,ConnectionException,AdapterException {
if (pResponse==null) return;
String varname = this.getAttributeValue(RESPONSE_VARIABLE);
if (varname==null) return;
String vartype = this.getParameterType(varname... | [
"protected",
"void",
"handleAdapterSuccess",
"(",
"Object",
"pResponse",
")",
"throws",
"ActivityException",
",",
"ConnectionException",
",",
"AdapterException",
"{",
"if",
"(",
"pResponse",
"==",
"null",
")",
"return",
";",
"String",
"varname",
"=",
"this",
".",
... | The method is invoked when the external system interaction is a success.
(i.e. the external system responded something, even an error code).
The method may convert external-system-detected errors into failure
by throwing an Adapter exception here. Throwing non-retryable
exception will lead to handleAdapterFailure to be... | [
"The",
"method",
"is",
"invoked",
"when",
"the",
"external",
"system",
"interaction",
"is",
"a",
"success",
".",
"(",
"i",
".",
"e",
".",
"the",
"external",
"system",
"responded",
"something",
"even",
"an",
"error",
"code",
")",
".",
"The",
"method",
"ma... | train | https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/src/com/centurylink/mdw/workflow/adapter/ObjectAdapterActivity.java#L175-L190 |
xqbase/util | util-jdk17/src/main/java/com/xqbase/util/Time.java | Time.nextMidnightPlus | public static long nextMidnightPlus(long now, long plus) {
"""
Get next time (Unix time in milliseconds) in a day<p>
E.g. xqbase.com will backup data every 4:00am, so the next backup will happen at:<p>
<code>nextMidnightPlus(now, 4 * HOUR)</code>
@param now current time (Unix time in milliseconds)
@param plu... | java | public static long nextMidnightPlus(long now, long plus) {
long next = (now + timeZoneOffset) / DAY * DAY - timeZoneOffset;
next += plus;
if (next < now) {
next += DAY;
}
return next;
} | [
"public",
"static",
"long",
"nextMidnightPlus",
"(",
"long",
"now",
",",
"long",
"plus",
")",
"{",
"long",
"next",
"=",
"(",
"now",
"+",
"timeZoneOffset",
")",
"/",
"DAY",
"*",
"DAY",
"-",
"timeZoneOffset",
";",
"next",
"+=",
"plus",
";",
"if",
"(",
... | Get next time (Unix time in milliseconds) in a day<p>
E.g. xqbase.com will backup data every 4:00am, so the next backup will happen at:<p>
<code>nextMidnightPlus(now, 4 * HOUR)</code>
@param now current time (Unix time in milliseconds)
@param plus milliseconds after midnight (12:00am) | [
"Get",
"next",
"time",
"(",
"Unix",
"time",
"in",
"milliseconds",
")",
"in",
"a",
"day<p",
">",
"E",
".",
"g",
".",
"xqbase",
".",
"com",
"will",
"backup",
"data",
"every",
"4",
":",
"00am",
"so",
"the",
"next",
"backup",
"will",
"happen",
"at",
":... | train | https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util-jdk17/src/main/java/com/xqbase/util/Time.java#L133-L140 |
landawn/AbacusUtil | src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java | PoolablePreparedStatement.setTimestamp | @Override
public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
"""
Method setTimestamp.
@param parameterIndex
@param x
@throws SQLException
@see java.sql.PreparedStatement#setTimestamp(int, Timestamp)
"""
internalStmt.setTimestamp(parameterIndex, x);
} | java | @Override
public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
internalStmt.setTimestamp(parameterIndex, x);
} | [
"@",
"Override",
"public",
"void",
"setTimestamp",
"(",
"int",
"parameterIndex",
",",
"Timestamp",
"x",
")",
"throws",
"SQLException",
"{",
"internalStmt",
".",
"setTimestamp",
"(",
"parameterIndex",
",",
"x",
")",
";",
"}"
] | Method setTimestamp.
@param parameterIndex
@param x
@throws SQLException
@see java.sql.PreparedStatement#setTimestamp(int, Timestamp) | [
"Method",
"setTimestamp",
"."
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L1031-L1034 |
Stratio/stratio-cassandra | src/java/com/stratio/cassandra/index/service/RowService.java | RowService.accepted | private boolean accepted(Row row, List<IndexExpression> expressions) {
"""
Returns {@code true} if the specified {@link Row} satisfies the all the specified {@link IndexExpression}s,
{@code false} otherwise.
@param row A {@link Row}.
@param expressions A list of {@link IndexExpression}s to be satisfie... | java | private boolean accepted(Row row, List<IndexExpression> expressions) {
if (!expressions.isEmpty()) {
Columns columns = rowMapper.columns(row);
for (IndexExpression expression : expressions) {
if (!accepted(columns, expression)) {
return false;
... | [
"private",
"boolean",
"accepted",
"(",
"Row",
"row",
",",
"List",
"<",
"IndexExpression",
">",
"expressions",
")",
"{",
"if",
"(",
"!",
"expressions",
".",
"isEmpty",
"(",
")",
")",
"{",
"Columns",
"columns",
"=",
"rowMapper",
".",
"columns",
"(",
"row",... | Returns {@code true} if the specified {@link Row} satisfies the all the specified {@link IndexExpression}s,
{@code false} otherwise.
@param row A {@link Row}.
@param expressions A list of {@link IndexExpression}s to be satisfied by {@code row}.
@return {@code true} if the specified {@link Row} satisfies the al... | [
"Returns",
"{",
"@code",
"true",
"}",
"if",
"the",
"specified",
"{",
"@link",
"Row",
"}",
"satisfies",
"the",
"all",
"the",
"specified",
"{",
"@link",
"IndexExpression",
"}",
"s",
"{",
"@code",
"false",
"}",
"otherwise",
"."
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/RowService.java#L305-L315 |
grandstaish/paperparcel | paperparcel-compiler/src/main/java/paperparcel/Utils.java | Utils.getAdaptedType | static TypeMirror getAdaptedType(Elements elements, Types types, DeclaredType adapterType) {
"""
Returns the {@link TypeMirror} argument found in a given {@code TypeAdapter} type.
"""
TypeElement typeAdapterElement = elements.getTypeElement(TYPE_ADAPTER_CLASS_NAME);
TypeParameterElement param = typeAda... | java | static TypeMirror getAdaptedType(Elements elements, Types types, DeclaredType adapterType) {
TypeElement typeAdapterElement = elements.getTypeElement(TYPE_ADAPTER_CLASS_NAME);
TypeParameterElement param = typeAdapterElement.getTypeParameters().get(0);
return paramAsMemberOf(types, adapterType, param);
} | [
"static",
"TypeMirror",
"getAdaptedType",
"(",
"Elements",
"elements",
",",
"Types",
"types",
",",
"DeclaredType",
"adapterType",
")",
"{",
"TypeElement",
"typeAdapterElement",
"=",
"elements",
".",
"getTypeElement",
"(",
"TYPE_ADAPTER_CLASS_NAME",
")",
";",
"TypePara... | Returns the {@link TypeMirror} argument found in a given {@code TypeAdapter} type. | [
"Returns",
"the",
"{"
] | train | https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L230-L234 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Camera.java | Camera.drawFov | public void drawFov(Graphic g, int x, int y, int gridH, int gridV, Surface surface) {
"""
Draw the camera field of view according to a grid.
@param g The graphic output.
@param x The horizontal location.
@param y The vertical location.
@param gridH The horizontal grid.
@param gridV The vertical grid.
@para... | java | public void drawFov(Graphic g, int x, int y, int gridH, int gridV, Surface surface)
{
final int h = x + (int) Math.floor((getX() + getViewX()) / gridH);
final int v = y + (int) -Math.floor((getY() + getHeight()) / gridV);
final int tileWidth = getWidth() / gridH;
final int tileHeight... | [
"public",
"void",
"drawFov",
"(",
"Graphic",
"g",
",",
"int",
"x",
",",
"int",
"y",
",",
"int",
"gridH",
",",
"int",
"gridV",
",",
"Surface",
"surface",
")",
"{",
"final",
"int",
"h",
"=",
"x",
"+",
"(",
"int",
")",
"Math",
".",
"floor",
"(",
"... | Draw the camera field of view according to a grid.
@param g The graphic output.
@param x The horizontal location.
@param y The vertical location.
@param gridH The horizontal grid.
@param gridV The vertical grid.
@param surface The surface referential (minimap). | [
"Draw",
"the",
"camera",
"field",
"of",
"view",
"according",
"to",
"a",
"grid",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/Camera.java#L158-L165 |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.incidents_id_GET | public OvhIncident incidents_id_GET(Long id) throws IOException {
"""
Get this object properties
REST: GET /xdsl/incidents/{id}
@param id [required] ID of the incident
"""
String qPath = "/xdsl/incidents/{id}";
StringBuilder sb = path(qPath, id);
String resp = execN(qPath, "GET", sb.toString(), null)... | java | public OvhIncident incidents_id_GET(Long id) throws IOException {
String qPath = "/xdsl/incidents/{id}";
StringBuilder sb = path(qPath, id);
String resp = execN(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhIncident.class);
} | [
"public",
"OvhIncident",
"incidents_id_GET",
"(",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/incidents/{id}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"id",
")",
";",
"String",
"resp",
"=",
"execN",
... | Get this object properties
REST: GET /xdsl/incidents/{id}
@param id [required] ID of the incident | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1992-L1997 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/KeySet.java | KeySet.singleKey | public static KeySet singleKey(Key key) {
"""
Creates a key set containing a single key. {@code key} should contain exactly as many elements
as there are columns in the primary or index key with this this key set is used.
"""
return new KeySet(false, ImmutableList.of(key), ImmutableList.<KeyRange>of());
... | java | public static KeySet singleKey(Key key) {
return new KeySet(false, ImmutableList.of(key), ImmutableList.<KeyRange>of());
} | [
"public",
"static",
"KeySet",
"singleKey",
"(",
"Key",
"key",
")",
"{",
"return",
"new",
"KeySet",
"(",
"false",
",",
"ImmutableList",
".",
"of",
"(",
"key",
")",
",",
"ImmutableList",
".",
"<",
"KeyRange",
">",
"of",
"(",
")",
")",
";",
"}"
] | Creates a key set containing a single key. {@code key} should contain exactly as many elements
as there are columns in the primary or index key with this this key set is used. | [
"Creates",
"a",
"key",
"set",
"containing",
"a",
"single",
"key",
".",
"{"
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/KeySet.java#L49-L51 |
glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java | ModeledUser.putUnrestrictedAttributes | private void putUnrestrictedAttributes(Map<String, String> attributes) {
"""
Stores all unrestricted (unprivileged) attributes within the given Map,
pulling the values of those attributes from the underlying user model.
If no value is yet defined for an attribute, that attribute will be set
to null.
@param a... | java | private void putUnrestrictedAttributes(Map<String, String> attributes) {
// Set full name attribute
attributes.put(User.Attribute.FULL_NAME, getModel().getFullName());
// Set email address attribute
attributes.put(User.Attribute.EMAIL_ADDRESS, getModel().getEmailAddress());
//... | [
"private",
"void",
"putUnrestrictedAttributes",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"attributes",
")",
"{",
"// Set full name attribute",
"attributes",
".",
"put",
"(",
"User",
".",
"Attribute",
".",
"FULL_NAME",
",",
"getModel",
"(",
")",
".",
"get... | Stores all unrestricted (unprivileged) attributes within the given Map,
pulling the values of those attributes from the underlying user model.
If no value is yet defined for an attribute, that attribute will be set
to null.
@param attributes
The Map to store all unrestricted attributes within. | [
"Stores",
"all",
"unrestricted",
"(",
"unprivileged",
")",
"attributes",
"within",
"the",
"given",
"Map",
"pulling",
"the",
"values",
"of",
"those",
"attributes",
"from",
"the",
"underlying",
"user",
"model",
".",
"If",
"no",
"value",
"is",
"yet",
"defined",
... | train | https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java#L338-L352 |
beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java | Component.findString | protected String findString(String expr, String field, String errorMsg) {
"""
Evaluates the OGNL stack to find a String value.
<p/>
If the given expression is <tt>null</tt/> a error is logged and a <code>RuntimeException</code>
is thrown constructed with a messaged based on the given field and errorMsg paramter... | java | protected String findString(String expr, String field, String errorMsg) {
if (expr == null) {
throw fieldError(field, errorMsg, null);
} else {
return findString(expr);
}
} | [
"protected",
"String",
"findString",
"(",
"String",
"expr",
",",
"String",
"field",
",",
"String",
"errorMsg",
")",
"{",
"if",
"(",
"expr",
"==",
"null",
")",
"{",
"throw",
"fieldError",
"(",
"field",
",",
"errorMsg",
",",
"null",
")",
";",
"}",
"else"... | Evaluates the OGNL stack to find a String value.
<p/>
If the given expression is <tt>null</tt/> a error is logged and a <code>RuntimeException</code>
is thrown constructed with a messaged based on the given field and errorMsg paramter.
@param expr
OGNL expression.
@param field
field name used when throwing <code>Runti... | [
"Evaluates",
"the",
"OGNL",
"stack",
"to",
"find",
"a",
"String",
"value",
".",
"<p",
"/",
">",
"If",
"the",
"given",
"expression",
"is",
"<tt",
">",
"null<",
"/",
"tt",
"/",
">",
"a",
"error",
"is",
"logged",
"and",
"a",
"<code",
">",
"RuntimeExcept... | train | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java#L184-L190 |
james-hu/jabb-core | src/main/java/net/sf/jabb/util/db/ColumnMetaData.java | ColumnMetaData.createMapByLabelOrName | static public Map<String, ColumnMetaData> createMapByLabelOrName(ResultSetMetaData m) throws SQLException {
"""
Get all the column meta data and put them into a map keyed by column label or name
@param m the result set meta data
@return the map of column label/name and column meta data
@throws SQLException
... | java | static public Map<String, ColumnMetaData> createMapByLabelOrName(ResultSetMetaData m) throws SQLException{
Map<String, ColumnMetaData> result = new HashMap<String, ColumnMetaData>();
for (int i = 1; i <= m.getColumnCount(); i ++){
ColumnMetaData cm = new ColumnMetaData(m, i);
result.put(cm.getLabelOrName(... | [
"static",
"public",
"Map",
"<",
"String",
",",
"ColumnMetaData",
">",
"createMapByLabelOrName",
"(",
"ResultSetMetaData",
"m",
")",
"throws",
"SQLException",
"{",
"Map",
"<",
"String",
",",
"ColumnMetaData",
">",
"result",
"=",
"new",
"HashMap",
"<",
"String",
... | Get all the column meta data and put them into a map keyed by column label or name
@param m the result set meta data
@return the map of column label/name and column meta data
@throws SQLException | [
"Get",
"all",
"the",
"column",
"meta",
"data",
"and",
"put",
"them",
"into",
"a",
"map",
"keyed",
"by",
"column",
"label",
"or",
"name"
] | train | https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/db/ColumnMetaData.java#L85-L92 |
CODAIT/stocator | src/main/java/com/ibm/stocator/fs/common/Utils.java | Utils.closeAll | public static void closeAll(Logger log, java.io.Closeable... closeables) {
"""
Close the Closeable objects and <b>ignore</b> any Exception or null
pointers. (This is the SLF4J equivalent of that in {@code IOUtils}).
@param log the log to log at debug level. Can be null
@param closeables the objects to close
... | java | public static void closeAll(Logger log, java.io.Closeable... closeables) {
for (java.io.Closeable c : closeables) {
if (c != null) {
try {
if (log != null) {
log.debug("Closing {}", c);
}
c.close();
} catch (Exception e) {
if (log != null && ... | [
"public",
"static",
"void",
"closeAll",
"(",
"Logger",
"log",
",",
"java",
".",
"io",
".",
"Closeable",
"...",
"closeables",
")",
"{",
"for",
"(",
"java",
".",
"io",
".",
"Closeable",
"c",
":",
"closeables",
")",
"{",
"if",
"(",
"c",
"!=",
"null",
... | Close the Closeable objects and <b>ignore</b> any Exception or null
pointers. (This is the SLF4J equivalent of that in {@code IOUtils}).
@param log the log to log at debug level. Can be null
@param closeables the objects to close | [
"Close",
"the",
"Closeable",
"objects",
"and",
"<b",
">",
"ignore<",
"/",
"b",
">",
"any",
"Exception",
"or",
"null",
"pointers",
".",
"(",
"This",
"is",
"the",
"SLF4J",
"equivalent",
"of",
"that",
"in",
"{",
"@code",
"IOUtils",
"}",
")",
"."
] | train | https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L516-L531 |
Domo42/saga-lib | saga-lib/src/main/java/com/codebullets/sagalib/processing/SagaInstanceFactory.java | SagaInstanceFactory.continueExisting | public Saga continueExisting(final String sagaTypeName, final SagaState state) throws ExecutionException {
"""
Create a new saga instance based on fully qualified name and the existing saga state.
@throws ExecutionException Is thrown in case no provider can be found to create an instance.
The actual cause can be... | java | public Saga continueExisting(final String sagaTypeName, final SagaState state) throws ExecutionException {
return continueSaga(sagaTypeName, state);
} | [
"public",
"Saga",
"continueExisting",
"(",
"final",
"String",
"sagaTypeName",
",",
"final",
"SagaState",
"state",
")",
"throws",
"ExecutionException",
"{",
"return",
"continueSaga",
"(",
"sagaTypeName",
",",
"state",
")",
";",
"}"
] | Create a new saga instance based on fully qualified name and the existing saga state.
@throws ExecutionException Is thrown in case no provider can be found to create an instance.
The actual cause can be inspected by {@link ExecutionException#getCause()}. | [
"Create",
"a",
"new",
"saga",
"instance",
"based",
"on",
"fully",
"qualified",
"name",
"and",
"the",
"existing",
"saga",
"state",
"."
] | train | https://github.com/Domo42/saga-lib/blob/c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef/saga-lib/src/main/java/com/codebullets/sagalib/processing/SagaInstanceFactory.java#L91-L93 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsJmsMapMessageImpl.java | JsJmsMapMessageImpl.setInt | public void setInt(String name, int value) throws UnsupportedEncodingException {
"""
/*
Set an integer value with the given name, into the Map.
Javadoc description supplied by JsJmsMessage interface.
"""
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setInt", In... | java | public void setInt(String name, int value) throws UnsupportedEncodingException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setInt", Integer.valueOf(value));
getBodyMap().put(name, Integer.valueOf(value));
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEna... | [
"public",
"void",
"setInt",
"(",
"String",
"name",
",",
"int",
"value",
")",
"throws",
"UnsupportedEncodingException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"SibTr",
".",
"en... | /*
Set an integer value with the given name, into the Map.
Javadoc description supplied by JsJmsMessage interface. | [
"/",
"*",
"Set",
"an",
"integer",
"value",
"with",
"the",
"given",
"name",
"into",
"the",
"Map",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsJmsMapMessageImpl.java#L318-L322 |
ggrandes/kvstore | src/main/java/org/javastack/kvstore/structures/bitset/SimpleBitSet.java | SimpleBitSet.checkRange | private static void checkRange(int fromIndex, int toIndex) {
"""
Checks that fromIndex ... toIndex is a valid range of bit indices.
"""
if (fromIndex < 0)
throw new IndexOutOfBoundsException("fromIndex < 0: " + fromIndex);
if (toIndex < 0)
throw new IndexOutOfBoundsException("toIndex < 0: " + toIndex... | java | private static void checkRange(int fromIndex, int toIndex) {
if (fromIndex < 0)
throw new IndexOutOfBoundsException("fromIndex < 0: " + fromIndex);
if (toIndex < 0)
throw new IndexOutOfBoundsException("toIndex < 0: " + toIndex);
if (fromIndex > toIndex)
throw new IndexOutOfBoundsException("fromIndex: " +... | [
"private",
"static",
"void",
"checkRange",
"(",
"int",
"fromIndex",
",",
"int",
"toIndex",
")",
"{",
"if",
"(",
"fromIndex",
"<",
"0",
")",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"fromIndex < 0: \"",
"+",
"fromIndex",
")",
";",
"if",
"(",
"toInd... | Checks that fromIndex ... toIndex is a valid range of bit indices. | [
"Checks",
"that",
"fromIndex",
"...",
"toIndex",
"is",
"a",
"valid",
"range",
"of",
"bit",
"indices",
"."
] | train | https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/structures/bitset/SimpleBitSet.java#L149-L157 |
classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/concurrency/AutoCloseableExecutorService.java | AutoCloseableExecutorService.afterExecute | @Override
public void afterExecute(final Runnable runnable, final Throwable throwable) {
"""
Catch exceptions from both submit() and execute(), and call {@link InterruptionChecker#interrupt()} to
interrupt all threads.
@param runnable
the Runnable
@param throwable
the Throwable
"""
super.aft... | java | @Override
public void afterExecute(final Runnable runnable, final Throwable throwable) {
super.afterExecute(runnable, throwable);
if (throwable != null) {
// Wrap the throwable in an ExecutionException (execute() does not do this)
interruptionChecker.setExecutionException(new... | [
"@",
"Override",
"public",
"void",
"afterExecute",
"(",
"final",
"Runnable",
"runnable",
",",
"final",
"Throwable",
"throwable",
")",
"{",
"super",
".",
"afterExecute",
"(",
"runnable",
",",
"throwable",
")",
";",
"if",
"(",
"throwable",
"!=",
"null",
")",
... | Catch exceptions from both submit() and execute(), and call {@link InterruptionChecker#interrupt()} to
interrupt all threads.
@param runnable
the Runnable
@param throwable
the Throwable | [
"Catch",
"exceptions",
"from",
"both",
"submit",
"()",
"and",
"execute",
"()",
"and",
"call",
"{",
"@link",
"InterruptionChecker#interrupt",
"()",
"}",
"to",
"interrupt",
"all",
"threads",
"."
] | train | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/concurrency/AutoCloseableExecutorService.java#L65-L88 |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/ProvisionerImpl.java | ProvisionerImpl.initialProvisioning | @Override
public void initialProvisioning(BundleContext systemBundleCtx, BootstrapConfig config) throws InvalidBundleContextException {
"""
Install the platform bundles, and check the returned install status for
exceptions, and issue appropriate diagnostics. Specifically, look for
pre-install exceptions, ins... | java | @Override
public void initialProvisioning(BundleContext systemBundleCtx, BootstrapConfig config) throws InvalidBundleContextException {
BundleInstallStatus installStatus;
BundleStartStatus startStatus;
// Obtain/initialize provisioner-related services and resources
getServices(syste... | [
"@",
"Override",
"public",
"void",
"initialProvisioning",
"(",
"BundleContext",
"systemBundleCtx",
",",
"BootstrapConfig",
"config",
")",
"throws",
"InvalidBundleContextException",
"{",
"BundleInstallStatus",
"installStatus",
";",
"BundleStartStatus",
"startStatus",
";",
"/... | Install the platform bundles, and check the returned install status for
exceptions, and issue appropriate diagnostics. Specifically, look for
pre-install exceptions, install
exceptions, or flat-out missing bundles (things listed in the bundle list
that didn't match any of the jars in the install dir).
@param provision... | [
"Install",
"the",
"platform",
"bundles",
"and",
"check",
"the",
"returned",
"install",
"status",
"for",
"exceptions",
"and",
"issue",
"appropriate",
"diagnostics",
".",
"Specifically",
"look",
"for",
"pre",
"-",
"install",
"exceptions",
"install",
"exceptions",
"o... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.nested/src/com/ibm/ws/kernel/launch/internal/ProvisionerImpl.java#L74-L110 |
grails/grails-core | grails-plugin-controllers/src/main/groovy/org/grails/plugins/web/controllers/api/ControllersDomainBindingApi.java | ControllersDomainBindingApi.initialize | public static void initialize(Object instance, Map namedArgs) {
"""
A map based constructor that binds the named arguments to the target instance
@param instance The target instance
@param namedArgs The named arguments
"""
PersistentEntity dc = getDomainClass(instance);
if (dc == null) {
... | java | public static void initialize(Object instance, Map namedArgs) {
PersistentEntity dc = getDomainClass(instance);
if (dc == null) {
DataBindingUtils.bindObjectToInstance(instance, namedArgs);
}
else {
DataBindingUtils.bindObjectToDomainInstance(dc, instance, namedAr... | [
"public",
"static",
"void",
"initialize",
"(",
"Object",
"instance",
",",
"Map",
"namedArgs",
")",
"{",
"PersistentEntity",
"dc",
"=",
"getDomainClass",
"(",
"instance",
")",
";",
"if",
"(",
"dc",
"==",
"null",
")",
"{",
"DataBindingUtils",
".",
"bindObjectT... | A map based constructor that binds the named arguments to the target instance
@param instance The target instance
@param namedArgs The named arguments | [
"A",
"map",
"based",
"constructor",
"that",
"binds",
"the",
"named",
"arguments",
"to",
"the",
"target",
"instance"
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-plugin-controllers/src/main/groovy/org/grails/plugins/web/controllers/api/ControllersDomainBindingApi.java#L58-L68 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java | PersonGroupPersonsImpl.updateFaceWithServiceResponseAsync | public Observable<ServiceResponse<Void>> updateFaceWithServiceResponseAsync(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) {
"""
Update a person persisted face's userData field.
@param personGroupId Id referencing a particular person group.
@... | java | public Observable<ServiceResponse<Void>> updateFaceWithServiceResponseAsync(String personGroupId, UUID personId, UUID persistedFaceId, UpdateFaceOptionalParameter updateFaceOptionalParameter) {
if (this.client.azureRegion() == null) {
throw new IllegalArgumentException("Parameter this.client.azureRe... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"Void",
">",
">",
"updateFaceWithServiceResponseAsync",
"(",
"String",
"personGroupId",
",",
"UUID",
"personId",
",",
"UUID",
"persistedFaceId",
",",
"UpdateFaceOptionalParameter",
"updateFaceOptionalParameter",
")",
"{... | Update a person persisted face's userData field.
@param personGroupId Id referencing a particular person group.
@param personId Id referencing a particular person.
@param persistedFaceId Id referencing a particular persistedFaceId of an existing face.
@param updateFaceOptionalParameter the object representing the opti... | [
"Update",
"a",
"person",
"persisted",
"face",
"s",
"userData",
"field",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java#L1030-L1046 |
netty/netty | codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java | HttpConversionUtil.toHttpResponse | public static HttpResponse toHttpResponse(final int streamId,
final Http2Headers http2Headers,
final boolean validateHttpHeaders) throws Http2Exception {
"""
Create a new object to contain the response data.
@param strea... | java | public static HttpResponse toHttpResponse(final int streamId,
final Http2Headers http2Headers,
final boolean validateHttpHeaders) throws Http2Exception {
final HttpResponseStatus status = parseStatus(http2Headers.status(... | [
"public",
"static",
"HttpResponse",
"toHttpResponse",
"(",
"final",
"int",
"streamId",
",",
"final",
"Http2Headers",
"http2Headers",
",",
"final",
"boolean",
"validateHttpHeaders",
")",
"throws",
"Http2Exception",
"{",
"final",
"HttpResponseStatus",
"status",
"=",
"pa... | Create a new object to contain the response data.
@param streamId The stream associated with the response
@param http2Headers The initial set of HTTP/2 headers to create the response with
@param validateHttpHeaders <ul>
<li>{@code true} to validate HTTP headers in the http-codec</li>
<li>{@code false} not to validate ... | [
"Create",
"a",
"new",
"object",
"to",
"contain",
"the",
"response",
"data",
"."
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java#L312-L327 |
redkale/redkale | src/org/redkale/net/http/HttpRequest.java | HttpRequest.getLongHeader | public long getLongHeader(int radix, String name, long defaultValue) {
"""
获取指定的header的long值, 没有返回默认long值
@param radix 进制数
@param name header名
@param defaultValue 默认long值
@return header值
"""
return header.getLongValue(radix, name, defaultValue);
} | java | public long getLongHeader(int radix, String name, long defaultValue) {
return header.getLongValue(radix, name, defaultValue);
} | [
"public",
"long",
"getLongHeader",
"(",
"int",
"radix",
",",
"String",
"name",
",",
"long",
"defaultValue",
")",
"{",
"return",
"header",
".",
"getLongValue",
"(",
"radix",
",",
"name",
",",
"defaultValue",
")",
";",
"}"
] | 获取指定的header的long值, 没有返回默认long值
@param radix 进制数
@param name header名
@param defaultValue 默认long值
@return header值 | [
"获取指定的header的long值",
"没有返回默认long值"
] | train | https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpRequest.java#L1157-L1159 |
dihedron/dihedron-commons | src/main/java/org/dihedron/core/reflection/Types.java | Types.getAsString | public static String getAsString(Type type) {
"""
Returns the string representation of a type; all class names are fully
qualified, and generics are properly resolved, including their parameter
types (e.g. Map<String, String>).
@param type
the type to describe.
@return
a textual description of the ty... | java | public static String getAsString(Type type) {
String result = null;
if(isSimple(type)) {
result = ((Class<?>)type).getCanonicalName();
} else if(isGeneric(type)) {
StringBuilder buffer = new StringBuilder();
// grab the name of the container class (e.g. List, Map...)
ParameterizedType contai... | [
"public",
"static",
"String",
"getAsString",
"(",
"Type",
"type",
")",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"isSimple",
"(",
"type",
")",
")",
"{",
"result",
"=",
"(",
"(",
"Class",
"<",
"?",
">",
")",
"type",
")",
".",
"getCanonic... | Returns the string representation of a type; all class names are fully
qualified, and generics are properly resolved, including their parameter
types (e.g. Map<String, String>).
@param type
the type to describe.
@return
a textual description of the type (e.g. Map<String, String>). | [
"Returns",
"the",
"string",
"representation",
"of",
"a",
"type",
";",
"all",
"class",
"names",
"are",
"fully",
"qualified",
"and",
"generics",
"are",
"properly",
"resolved",
"including",
"their",
"parameter",
"types",
"(",
"e",
".",
"g",
".",
"Map<",
";",
... | train | https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/core/reflection/Types.java#L44-L68 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsColor.java | CmsColor.setRGB | public void setRGB(int red, int green, int blue) throws Exception {
"""
Sets the Red, Green, and Blue color variables.<p>
@param red valid range is 0-255
@param green valid range is 0-255
@param blue valid range is 0-255
@throws java.lang.Exception if something goes wrong
"""
if ((red < 0) || ... | java | public void setRGB(int red, int green, int blue) throws Exception {
if ((red < 0) || (red > 255)) {
throw new Exception();
}
if ((green < 0) || (green > 255)) {
throw new Exception();
}
if ((blue < 0) || (blue > 255)) {
throw new Exce... | [
"public",
"void",
"setRGB",
"(",
"int",
"red",
",",
"int",
"green",
",",
"int",
"blue",
")",
"throws",
"Exception",
"{",
"if",
"(",
"(",
"red",
"<",
"0",
")",
"||",
"(",
"red",
">",
"255",
")",
")",
"{",
"throw",
"new",
"Exception",
"(",
")",
"... | Sets the Red, Green, and Blue color variables.<p>
@param red valid range is 0-255
@param green valid range is 0-255
@param blue valid range is 0-255
@throws java.lang.Exception if something goes wrong | [
"Sets",
"the",
"Red",
"Green",
"and",
"Blue",
"color",
"variables",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsColor.java#L172-L191 |
OpenLiberty/open-liberty | dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/TimeoutManager.java | TimeoutManager.setTimeout | public static void setTimeout(TransactionImpl tran, int timeoutType, int seconds) {
"""
Sets the timeout for the transaction to the specified type and time in
seconds.
<p>
If the type is none, the timeout for the transaction is
cancelled, otherwise the current timeout for the transaction is modified
to be of ... | java | public static void setTimeout(TransactionImpl tran, int timeoutType, int seconds)
{
if (tc.isEntryEnabled())
Tr.entry(tc, "setTimeout",
new Object[] { tran, timeoutType, seconds });
switch (timeoutType)
{
// If the new type is active or in_doubt, the... | [
"public",
"static",
"void",
"setTimeout",
"(",
"TransactionImpl",
"tran",
",",
"int",
"timeoutType",
",",
"int",
"seconds",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"setTimeout\"",
",",
"new",... | Sets the timeout for the transaction to the specified type and time in
seconds.
<p>
If the type is none, the timeout for the transaction is
cancelled, otherwise the current timeout for the transaction is modified
to be of the new type and duration.
@param localTID The local identifier for the transaction.
@param timeo... | [
"Sets",
"the",
"timeout",
"for",
"the",
"transaction",
"to",
"the",
"specified",
"type",
"and",
"time",
"in",
"seconds",
".",
"<p",
">",
"If",
"the",
"type",
"is",
"none",
"the",
"timeout",
"for",
"the",
"transaction",
"is",
"cancelled",
"otherwise",
"the"... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/TimeoutManager.java#L60-L104 |
jpush/jmessage-api-java-client | src/main/java/cn/jmessage/api/reportv2/ReportClient.java | ReportClient.getUserStatistic | public UserStatListResult getUserStatistic(String startTime, int duration)
throws APIConnectionException, APIRequestException {
"""
Get user statistic, now time unit only supports DAY
@param startTime start time, format: yyyy-MM-dd
@param duration 0-60
@return {@link UserStatListResult}
@throws API... | java | public UserStatListResult getUserStatistic(String startTime, int duration)
throws APIConnectionException, APIRequestException {
Preconditions.checkArgument(verifyDateFormat("DAY", startTime), "Illegal date format");
Preconditions.checkArgument(0 <= duration && duration <= 60, " 0 <= duration... | [
"public",
"UserStatListResult",
"getUserStatistic",
"(",
"String",
"startTime",
",",
"int",
"duration",
")",
"throws",
"APIConnectionException",
",",
"APIRequestException",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"verifyDateFormat",
"(",
"\"DAY\"",
",",
"startT... | Get user statistic, now time unit only supports DAY
@param startTime start time, format: yyyy-MM-dd
@param duration 0-60
@return {@link UserStatListResult}
@throws APIConnectionException connect exception
@throws APIRequestException request exception | [
"Get",
"user",
"statistic",
"now",
"time",
"unit",
"only",
"supports",
"DAY"
] | train | https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/reportv2/ReportClient.java#L255-L262 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java | DefaultGroovyStaticMethods.sleepImpl | private static void sleepImpl(long millis, Closure closure) {
"""
This method is used by both sleep() methods to implement sleeping
for the given time even if interrupted
@param millis the number of milliseconds to sleep
@param closure optional closure called when interrupted
as long as the closure returns ... | java | private static void sleepImpl(long millis, Closure closure) {
long start = System.currentTimeMillis();
long rest = millis;
long current;
while (rest > 0) {
try {
Thread.sleep(rest);
rest = 0;
} catch (InterruptedException e) {
... | [
"private",
"static",
"void",
"sleepImpl",
"(",
"long",
"millis",
",",
"Closure",
"closure",
")",
"{",
"long",
"start",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"long",
"rest",
"=",
"millis",
";",
"long",
"current",
";",
"while",
"(",
"rest... | This method is used by both sleep() methods to implement sleeping
for the given time even if interrupted
@param millis the number of milliseconds to sleep
@param closure optional closure called when interrupted
as long as the closure returns false the sleep continues | [
"This",
"method",
"is",
"used",
"by",
"both",
"sleep",
"()",
"methods",
"to",
"implement",
"sleeping",
"for",
"the",
"given",
"time",
"even",
"if",
"interrupted"
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java#L120-L138 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkInterfaceIPConfigurationsInner.java | NetworkInterfaceIPConfigurationsInner.listAsync | public Observable<Page<NetworkInterfaceIPConfigurationInner>> listAsync(final String resourceGroupName, final String networkInterfaceName) {
"""
Get all ip configurations in a network interface.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interfa... | java | public Observable<Page<NetworkInterfaceIPConfigurationInner>> listAsync(final String resourceGroupName, final String networkInterfaceName) {
return listWithServiceResponseAsync(resourceGroupName, networkInterfaceName)
.map(new Func1<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>, Page<N... | [
"public",
"Observable",
"<",
"Page",
"<",
"NetworkInterfaceIPConfigurationInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"networkInterfaceName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupNam... | Get all ip configurations in a network interface.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<NetworkInterfaceIPConfigurationI... | [
"Get",
"all",
"ip",
"configurations",
"in",
"a",
"network",
"interface",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkInterfaceIPConfigurationsInner.java#L123-L131 |
looly/hutool | hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java | Scheduler.updatePattern | public Scheduler updatePattern(String id, CronPattern pattern) {
"""
更新Task执行的时间规则
@param id Task的ID
@param pattern {@link CronPattern}
@return this
@since 4.0.10
"""
this.taskTable.updatePattern(id, pattern);
return this;
} | java | public Scheduler updatePattern(String id, CronPattern pattern) {
this.taskTable.updatePattern(id, pattern);
return this;
} | [
"public",
"Scheduler",
"updatePattern",
"(",
"String",
"id",
",",
"CronPattern",
"pattern",
")",
"{",
"this",
".",
"taskTable",
".",
"updatePattern",
"(",
"id",
",",
"pattern",
")",
";",
"return",
"this",
";",
"}"
] | 更新Task执行的时间规则
@param id Task的ID
@param pattern {@link CronPattern}
@return this
@since 4.0.10 | [
"更新Task执行的时间规则"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/Scheduler.java#L279-L282 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/visunproj/KeyVisualization.java | KeyVisualization.getPreferredColumns | protected static int getPreferredColumns(double width, double height, int numc, double maxwidth) {
"""
Compute the preferred number of columns.
@param width Target width
@param height Target height
@param numc Number of clusters
@param maxwidth Max width of entries
@return Preferred number of columns
""... | java | protected static int getPreferredColumns(double width, double height, int numc, double maxwidth) {
// Maximum width (compared to height) of labels - guess.
// FIXME: do we really need to do this three-step computation?
// Number of rows we'd use in a squared layout:
final double rows = Math.ceil(FastMat... | [
"protected",
"static",
"int",
"getPreferredColumns",
"(",
"double",
"width",
",",
"double",
"height",
",",
"int",
"numc",
",",
"double",
"maxwidth",
")",
"{",
"// Maximum width (compared to height) of labels - guess.",
"// FIXME: do we really need to do this three-step computat... | Compute the preferred number of columns.
@param width Target width
@param height Target height
@param numc Number of clusters
@param maxwidth Max width of entries
@return Preferred number of columns | [
"Compute",
"the",
"preferred",
"number",
"of",
"columns",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/visunproj/KeyVisualization.java#L130-L137 |
actorapp/actor-platform | actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/KeyManagerActor.java | KeyManagerActor.fetchUserPreKey | private Promise<PublicKey> fetchUserPreKey(final int uid, final int keyGroupId) {
"""
Fetching user's random pre key
@param uid User's id
@param keyGroupId User's key group id
"""
return pickUserGroup(uid, keyGroupId)
.flatMap(new Function<Tuple2<UserKeysGroup, UserKeys>, Pro... | java | private Promise<PublicKey> fetchUserPreKey(final int uid, final int keyGroupId) {
return pickUserGroup(uid, keyGroupId)
.flatMap(new Function<Tuple2<UserKeysGroup, UserKeys>, Promise<PublicKey>>() {
@Override
public Promise<PublicKey> apply(final Tuple2<Us... | [
"private",
"Promise",
"<",
"PublicKey",
">",
"fetchUserPreKey",
"(",
"final",
"int",
"uid",
",",
"final",
"int",
"keyGroupId",
")",
"{",
"return",
"pickUserGroup",
"(",
"uid",
",",
"keyGroupId",
")",
".",
"flatMap",
"(",
"new",
"Function",
"<",
"Tuple2",
"... | Fetching user's random pre key
@param uid User's id
@param keyGroupId User's key group id | [
"Fetching",
"user",
"s",
"random",
"pre",
"key"
] | train | https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/encryption/KeyManagerActor.java#L391-L428 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java | PearsonCorrelation.weightedCoefficient | public static double weightedCoefficient(NumberVector x, NumberVector y, double[] weights) {
"""
Compute the Pearson product-moment correlation coefficient for two
NumberVectors.
@param x first NumberVector
@param y second NumberVector
@param weights Weights
@return the Pearson product-moment correlation co... | java | public static double weightedCoefficient(NumberVector x, NumberVector y, double[] weights) {
final int xdim = x.getDimensionality();
final int ydim = y.getDimensionality();
if(xdim != ydim) {
throw new IllegalArgumentException("Invalid arguments: number vectors differ in dimensionality.");
}
i... | [
"public",
"static",
"double",
"weightedCoefficient",
"(",
"NumberVector",
"x",
",",
"NumberVector",
"y",
",",
"double",
"[",
"]",
"weights",
")",
"{",
"final",
"int",
"xdim",
"=",
"x",
".",
"getDimensionality",
"(",
")",
";",
"final",
"int",
"ydim",
"=",
... | Compute the Pearson product-moment correlation coefficient for two
NumberVectors.
@param x first NumberVector
@param y second NumberVector
@param weights Weights
@return the Pearson product-moment correlation coefficient for x and y | [
"Compute",
"the",
"Pearson",
"product",
"-",
"moment",
"correlation",
"coefficient",
"for",
"two",
"NumberVectors",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/PearsonCorrelation.java#L429-L468 |
alkacon/opencms-core | src/org/opencms/workplace/CmsWorkplace.java | CmsWorkplace.updateUserPreferences | public static void updateUserPreferences(CmsObject cms, HttpServletRequest req) {
"""
Updates the user preferences after changes have been made.<p>
@param cms the current cms context
@param req the current http request
"""
HttpSession session = req.getSession(false);
if (session == null) {... | java | public static void updateUserPreferences(CmsObject cms, HttpServletRequest req) {
HttpSession session = req.getSession(false);
if (session == null) {
return;
}
CmsWorkplaceSettings settings = (CmsWorkplaceSettings)session.getAttribute(
CmsWorkplaceManager.SESSION... | [
"public",
"static",
"void",
"updateUserPreferences",
"(",
"CmsObject",
"cms",
",",
"HttpServletRequest",
"req",
")",
"{",
"HttpSession",
"session",
"=",
"req",
".",
"getSession",
"(",
"false",
")",
";",
"if",
"(",
"session",
"==",
"null",
")",
"{",
"return",... | Updates the user preferences after changes have been made.<p>
@param cms the current cms context
@param req the current http request | [
"Updates",
"the",
"user",
"preferences",
"after",
"changes",
"have",
"been",
"made",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplace.java#L989-L1004 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java | SeaGlassButtonUI.getIcon | private Icon getIcon(AbstractButton b, Icon specificIcon, Icon defaultIcon, int state) {
"""
This method will return the icon that should be used for a button. We
only want to use the synth icon defined by the style if the specific icon
has not been defined for the button state and the backup icon is a
UIResour... | java | private Icon getIcon(AbstractButton b, Icon specificIcon, Icon defaultIcon, int state) {
Icon icon = specificIcon;
if (icon == null) {
if (defaultIcon instanceof UIResource) {
icon = getSynthIcon(b, state);
if (icon == null) {
icon = defau... | [
"private",
"Icon",
"getIcon",
"(",
"AbstractButton",
"b",
",",
"Icon",
"specificIcon",
",",
"Icon",
"defaultIcon",
",",
"int",
"state",
")",
"{",
"Icon",
"icon",
"=",
"specificIcon",
";",
"if",
"(",
"icon",
"==",
"null",
")",
"{",
"if",
"(",
"defaultIcon... | This method will return the icon that should be used for a button. We
only want to use the synth icon defined by the style if the specific icon
has not been defined for the button state and the backup icon is a
UIResource (we set it, not the developer).
@param b button
@param specificIcon icon returned fr... | [
"This",
"method",
"will",
"return",
"the",
"icon",
"that",
"should",
"be",
"used",
"for",
"a",
"button",
".",
"We",
"only",
"want",
"to",
"use",
"the",
"synth",
"icon",
"defined",
"by",
"the",
"style",
"if",
"the",
"specific",
"icon",
"has",
"not",
"be... | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java#L414-L429 |
apereo/cas | support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java | DelegatedClientNavigationController.buildRedirectViewBackToFlow | @SneakyThrows
protected View buildRedirectViewBackToFlow(final String clientName, final HttpServletRequest request) {
"""
Build redirect view back to flow view.
@param clientName the client name
@param request the request
@return the view
"""
val urlBuilder = new URIBuilder(String.valueOf(... | java | @SneakyThrows
protected View buildRedirectViewBackToFlow(final String clientName, final HttpServletRequest request) {
val urlBuilder = new URIBuilder(String.valueOf(request.getRequestURL()));
request.getParameterMap().forEach((k, v) -> {
val value = request.getParameter(k);
... | [
"@",
"SneakyThrows",
"protected",
"View",
"buildRedirectViewBackToFlow",
"(",
"final",
"String",
"clientName",
",",
"final",
"HttpServletRequest",
"request",
")",
"{",
"val",
"urlBuilder",
"=",
"new",
"URIBuilder",
"(",
"String",
".",
"valueOf",
"(",
"request",
".... | Build redirect view back to flow view.
@param clientName the client name
@param request the request
@return the view | [
"Build",
"redirect",
"view",
"back",
"to",
"flow",
"view",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/DelegatedClientNavigationController.java#L119-L134 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/InheritanceHelper.java | InheritanceHelper.isSameOrSubTypeOf | public boolean isSameOrSubTypeOf(Class type, String baseType) throws ClassNotFoundException {
"""
Determines whether the given type is the same or a sub type of the other type.
@param type The type
@param baseType The possible base type
@return <code>true</code> If <code>type</code> specifies the same or ... | java | public boolean isSameOrSubTypeOf(Class type, String baseType) throws ClassNotFoundException
{
return type.getName().equals(baseType.replace('$', '.')) ? true : getClass(baseType).isAssignableFrom(type);
} | [
"public",
"boolean",
"isSameOrSubTypeOf",
"(",
"Class",
"type",
",",
"String",
"baseType",
")",
"throws",
"ClassNotFoundException",
"{",
"return",
"type",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"baseType",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'... | Determines whether the given type is the same or a sub type of the other type.
@param type The type
@param baseType The possible base type
@return <code>true</code> If <code>type</code> specifies the same or a sub type of <code>baseType</code>
@throws ClassNotFoundException If the two classes are not on the classp... | [
"Determines",
"whether",
"the",
"given",
"type",
"is",
"the",
"same",
"or",
"a",
"sub",
"type",
"of",
"the",
"other",
"type",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/InheritanceHelper.java#L147-L150 |
NordicSemiconductor/Android-DFU-Library | dfu/src/main/java/no/nordicsemi/android/dfu/LegacyDfuImpl.java | LegacyDfuImpl.getStatusCode | private int getStatusCode(@Nullable final byte[] response, final int request)
throws UnknownResponseException {
"""
Checks whether the response received is valid and returns the status code.
@param response the response received from the DFU device.
@param request the expected Op Code.
@return The status ... | java | private int getStatusCode(@Nullable final byte[] response, final int request)
throws UnknownResponseException {
if (response == null || response.length != 3 || response[0] != OP_CODE_RESPONSE_CODE_KEY ||
response[1] != request || response[2] < 1 || response[2] > 6)
throw new UnknownResponseException("Invali... | [
"private",
"int",
"getStatusCode",
"(",
"@",
"Nullable",
"final",
"byte",
"[",
"]",
"response",
",",
"final",
"int",
"request",
")",
"throws",
"UnknownResponseException",
"{",
"if",
"(",
"response",
"==",
"null",
"||",
"response",
".",
"length",
"!=",
"3",
... | Checks whether the response received is valid and returns the status code.
@param response the response received from the DFU device.
@param request the expected Op Code.
@return The status code.
@throws UnknownResponseException if response was not valid. | [
"Checks",
"whether",
"the",
"response",
"received",
"is",
"valid",
"and",
"returns",
"the",
"status",
"code",
"."
] | train | https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/LegacyDfuImpl.java#L574-L580 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.listEntitiesAsync | public Observable<List<EntityExtractor>> listEntitiesAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) {
"""
Gets information about the entity models.
@param appId The application ID.
@param versionId The version ID.
@param listEntitiesOptionalParameter the objec... | java | public Observable<List<EntityExtractor>> listEntitiesAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) {
return listEntitiesWithServiceResponseAsync(appId, versionId, listEntitiesOptionalParameter).map(new Func1<ServiceResponse<List<EntityExtractor>>, List<EntityEx... | [
"public",
"Observable",
"<",
"List",
"<",
"EntityExtractor",
">",
">",
"listEntitiesAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"ListEntitiesOptionalParameter",
"listEntitiesOptionalParameter",
")",
"{",
"return",
"listEntitiesWithServiceResponseAsync",
... | Gets information about the entity models.
@param appId The application ID.
@param versionId The version ID.
@param listEntitiesOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observ... | [
"Gets",
"information",
"about",
"the",
"entity",
"models",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L1130-L1137 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/data/conversion/converters/BigDecimalConverter.java | BigDecimalConverter.canConvert | @Override
public boolean canConvert(Class<?> fromType, Class<?> toType) {
"""
Determines whether this {@link Converter} can convert {@link Object Objects}
{@link Class from type} {@link Class to type}.
@param fromType {@link Class type} to convert from.
@param toType {@link Class type} to convert to.
@retu... | java | @Override
public boolean canConvert(Class<?> fromType, Class<?> toType) {
return fromType != null && isAssignableTo(fromType, String.class) && BigDecimal.class.equals(toType);
} | [
"@",
"Override",
"public",
"boolean",
"canConvert",
"(",
"Class",
"<",
"?",
">",
"fromType",
",",
"Class",
"<",
"?",
">",
"toType",
")",
"{",
"return",
"fromType",
"!=",
"null",
"&&",
"isAssignableTo",
"(",
"fromType",
",",
"String",
".",
"class",
")",
... | Determines whether this {@link Converter} can convert {@link Object Objects}
{@link Class from type} {@link Class to type}.
@param fromType {@link Class type} to convert from.
@param toType {@link Class type} to convert to.
@return a boolean indicating whether this {@link Converter} can convert {@link Object Objects}
... | [
"Determines",
"whether",
"this",
"{",
"@link",
"Converter",
"}",
"can",
"convert",
"{",
"@link",
"Object",
"Objects",
"}",
"{",
"@link",
"Class",
"from",
"type",
"}",
"{",
"@link",
"Class",
"to",
"type",
"}",
"."
] | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/data/conversion/converters/BigDecimalConverter.java#L61-L64 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java | ApplicationGatewaysInner.getByResourceGroup | public ApplicationGatewayInner getByResourceGroup(String resourceGroupName, String applicationGatewayName) {
"""
Gets the specified application gateway.
@param resourceGroupName The name of the resource group.
@param applicationGatewayName The name of the application gateway.
@throws IllegalArgumentException ... | java | public ApplicationGatewayInner getByResourceGroup(String resourceGroupName, String applicationGatewayName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body();
} | [
"public",
"ApplicationGatewayInner",
"getByResourceGroup",
"(",
"String",
"resourceGroupName",
",",
"String",
"applicationGatewayName",
")",
"{",
"return",
"getByResourceGroupWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"applicationGatewayName",
")",
".",
"toBlocki... | Gets the specified application gateway.
@param resourceGroupName The name of the resource group.
@param applicationGatewayName The name of the application gateway.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws Runtim... | [
"Gets",
"the",
"specified",
"application",
"gateway",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L321-L323 |
pip-services3-java/pip-services3-commons-java | src/org/pipservices3/commons/refer/DependencyResolver.java | DependencyResolver.getRequired | public <T> List<T> getRequired(Class<T> type, String name) throws ReferenceException {
"""
Gets all required dependencies by their name. At least one dependency must
present. If no dependencies was found it throws a ReferenceException
@param type the Class type that defined the type of the result.
@param name... | java | public <T> List<T> getRequired(Class<T> type, String name) throws ReferenceException {
Object locator = find(name);
if (locator == null)
throw new ReferenceException(null, name);
return _references.getRequired(type, locator);
} | [
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"getRequired",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"String",
"name",
")",
"throws",
"ReferenceException",
"{",
"Object",
"locator",
"=",
"find",
"(",
"name",
")",
";",
"if",
"(",
"locator",
"==",
... | Gets all required dependencies by their name. At least one dependency must
present. If no dependencies was found it throws a ReferenceException
@param type the Class type that defined the type of the result.
@param name the dependency name to locate.
@return a list with found dependencies.
@throws ReferenceException w... | [
"Gets",
"all",
"required",
"dependencies",
"by",
"their",
"name",
".",
"At",
"least",
"one",
"dependency",
"must",
"present",
".",
"If",
"no",
"dependencies",
"was",
"found",
"it",
"throws",
"a",
"ReferenceException"
] | train | https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/refer/DependencyResolver.java#L213-L219 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/StringUtils.java | StringUtils.indexOf | @NullSafe
public static int indexOf(String text, String value) {
"""
Determines the index of the first occurrence of token in the String value. This indexOf operation is null-safe
and returns a -1 if the String value is null, or the token does not exist in the String value.
@param text the String value used... | java | @NullSafe
public static int indexOf(String text, String value) {
return text != null && value != null ? text.indexOf(value) : -1;
} | [
"@",
"NullSafe",
"public",
"static",
"int",
"indexOf",
"(",
"String",
"text",
",",
"String",
"value",
")",
"{",
"return",
"text",
"!=",
"null",
"&&",
"value",
"!=",
"null",
"?",
"text",
".",
"indexOf",
"(",
"value",
")",
":",
"-",
"1",
";",
"}"
] | Determines the index of the first occurrence of token in the String value. This indexOf operation is null-safe
and returns a -1 if the String value is null, or the token does not exist in the String value.
@param text the String value used to search for the token.
@param value the text to search for in the String val... | [
"Determines",
"the",
"index",
"of",
"the",
"first",
"occurrence",
"of",
"token",
"in",
"the",
"String",
"value",
".",
"This",
"indexOf",
"operation",
"is",
"null",
"-",
"safe",
"and",
"returns",
"a",
"-",
"1",
"if",
"the",
"String",
"value",
"is",
"null"... | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/StringUtils.java#L318-L321 |
Intel-HLS/GKL | src/main/java/com/intel/gkl/compression/IntelDeflaterFactory.java | IntelDeflaterFactory.makeDeflater | public Deflater makeDeflater(final int compressionLevel, final boolean gzipCompatible) {
"""
Returns an IntelDeflater if supported on the platform, otherwise returns a Java Deflater
@param compressionLevel the compression level (0-9)
@param gzipCompatible if true the use GZIP compatible compression
@return ... | java | public Deflater makeDeflater(final int compressionLevel, final boolean gzipCompatible) {
if (intelDeflaterSupported) {
if ((compressionLevel == 1 && gzipCompatible) || compressionLevel != 1) {
return new IntelDeflater(compressionLevel, gzipCompatible);
}
}
... | [
"public",
"Deflater",
"makeDeflater",
"(",
"final",
"int",
"compressionLevel",
",",
"final",
"boolean",
"gzipCompatible",
")",
"{",
"if",
"(",
"intelDeflaterSupported",
")",
"{",
"if",
"(",
"(",
"compressionLevel",
"==",
"1",
"&&",
"gzipCompatible",
")",
"||",
... | Returns an IntelDeflater if supported on the platform, otherwise returns a Java Deflater
@param compressionLevel the compression level (0-9)
@param gzipCompatible if true the use GZIP compatible compression
@return a Deflater object | [
"Returns",
"an",
"IntelDeflater",
"if",
"supported",
"on",
"the",
"platform",
"otherwise",
"returns",
"a",
"Java",
"Deflater"
] | train | https://github.com/Intel-HLS/GKL/blob/c071276633f01d8198198fb40df468a0dffb0d41/src/main/java/com/intel/gkl/compression/IntelDeflaterFactory.java#L32-L40 |
aol/cyclops | cyclops-futurestream/src/main/java/cyclops/stream/StreamSource.java | StreamSource.ofMultiple | public static <T> MultipleStreamSource<T> ofMultiple(final int backPressureAfter) {
"""
Connect multiple Streams to a Pushable datasource, each Stream will recieve the same
data. In this backpresure is applied by using a LinkedBlockingQueue. @see cyclops2.stream.StreamSource#ofMultiple(QueueFactory)
For more gra... | java | public static <T> MultipleStreamSource<T> ofMultiple(final int backPressureAfter) {
return new MultipleStreamSource<T>(
StreamSource.of(backPressureAfter)
.createQueue());
} | [
"public",
"static",
"<",
"T",
">",
"MultipleStreamSource",
"<",
"T",
">",
"ofMultiple",
"(",
"final",
"int",
"backPressureAfter",
")",
"{",
"return",
"new",
"MultipleStreamSource",
"<",
"T",
">",
"(",
"StreamSource",
".",
"of",
"(",
"backPressureAfter",
")",
... | Connect multiple Streams to a Pushable datasource, each Stream will recieve the same
data. In this backpresure is applied by using a LinkedBlockingQueue. @see cyclops2.stream.StreamSource#ofMultiple(QueueFactory)
For more granular management of Adapter based backpressure. Adapters can be backed by non-blocking data str... | [
"Connect",
"multiple",
"Streams",
"to",
"a",
"Pushable",
"datasource",
"each",
"Stream",
"will",
"recieve",
"the",
"same",
"data",
".",
"In",
"this",
"backpresure",
"is",
"applied",
"by",
"using",
"a",
"LinkedBlockingQueue",
".",
"@see",
"cyclops2",
".",
"stre... | train | https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops-futurestream/src/main/java/cyclops/stream/StreamSource.java#L252-L256 |
aehrc/snorocket | snorocket-core/src/main/java/au/csiro/snorocket/core/axioms/RI.java | RI.rule1 | boolean rule1(final IFactory factory, final Inclusion[] gcis) {
"""
r<sub>1</sub> ∘ … ∘ r<sub>k</sub> ⊑ s →
{r<sub>1</sub> ∘ … ∘ r<sub>k-1</sub> ⊑ u, u
∘ r<sub>k</sub> ⊑ s}
@param gcis
@return
"""
boolean result = false;
/... | java | boolean rule1(final IFactory factory, final Inclusion[] gcis) {
boolean result = false;
// TODO: make this "binarisation" more efficient by doing it for all
// elements rather than relying on multiple calls to this rule and
// stripping off one Role for each call.
if (lhs... | [
"boolean",
"rule1",
"(",
"final",
"IFactory",
"factory",
",",
"final",
"Inclusion",
"[",
"]",
"gcis",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"// TODO: make this \"binarisation\" more efficient by doing it for all\r",
"// elements rather than relying on multiple cal... | r<sub>1</sub> ∘ … ∘ r<sub>k</sub> ⊑ s →
{r<sub>1</sub> ∘ … ∘ r<sub>k-1</sub> ⊑ u, u
∘ r<sub>k</sub> ⊑ s}
@param gcis
@return | [
"r<sub",
">",
"1<",
"/",
"sub",
">",
"∘",
";",
"…",
";",
"∘",
";",
"r<sub",
">",
"k<",
"/",
"sub",
">",
"⊑",
";",
"s",
"&rarr",
";",
"{",
"r<sub",
">",
"1<",
"/",
"sub",
">",
"∘",
";",
"…",
";",
"∘",
";",
"r<sub... | train | https://github.com/aehrc/snorocket/blob/e33c1e216f8a66d6502e3a14e80876811feedd8b/snorocket-core/src/main/java/au/csiro/snorocket/core/axioms/RI.java#L98-L119 |
aws/aws-sdk-java | aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/JobUpdate.java | JobUpdate.withDefaultArguments | public JobUpdate withDefaultArguments(java.util.Map<String, String> defaultArguments) {
"""
<p>
The default arguments for this job.
</p>
<p>
You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue
itself consumes.
</p>
<p>
For information about how to ... | java | public JobUpdate withDefaultArguments(java.util.Map<String, String> defaultArguments) {
setDefaultArguments(defaultArguments);
return this;
} | [
"public",
"JobUpdate",
"withDefaultArguments",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"defaultArguments",
")",
"{",
"setDefaultArguments",
"(",
"defaultArguments",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The default arguments for this job.
</p>
<p>
You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue
itself consumes.
</p>
<p>
For information about how to specify and consume your own Job arguments, see the <a
href="http://docs.aws.amazon.com/glue/latest/dg/aw... | [
"<p",
">",
"The",
"default",
"arguments",
"for",
"this",
"job",
".",
"<",
"/",
"p",
">",
"<p",
">",
"You",
"can",
"specify",
"arguments",
"here",
"that",
"your",
"own",
"job",
"-",
"execution",
"script",
"consumes",
"as",
"well",
"as",
"arguments",
"th... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/JobUpdate.java#L507-L510 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.