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 |
|---|---|---|---|---|---|---|---|---|---|---|
alkacon/opencms-core | src/org/opencms/lock/CmsLockManager.java | CmsLockManager.removeDeletedResource | public void removeDeletedResource(CmsDbContext dbc, String resourceName) throws CmsException {
"""
Removes a resource after it has been deleted by the driver manager.<p>
@param dbc the current database context
@param resourceName the root path of the deleted resource
@throws CmsException if something goes wro... | java | public void removeDeletedResource(CmsDbContext dbc, String resourceName) throws CmsException {
try {
m_driverManager.getVfsDriver(dbc).readResource(dbc, dbc.currentProject().getUuid(), resourceName, false);
throw new CmsLockException(
Messages.get().container(
... | [
"public",
"void",
"removeDeletedResource",
"(",
"CmsDbContext",
"dbc",
",",
"String",
"resourceName",
")",
"throws",
"CmsException",
"{",
"try",
"{",
"m_driverManager",
".",
"getVfsDriver",
"(",
"dbc",
")",
".",
"readResource",
"(",
"dbc",
",",
"dbc",
".",
"cu... | Removes a resource after it has been deleted by the driver manager.<p>
@param dbc the current database context
@param resourceName the root path of the deleted resource
@throws CmsException if something goes wrong | [
"Removes",
"a",
"resource",
"after",
"it",
"has",
"been",
"deleted",
"by",
"the",
"driver",
"manager",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/lock/CmsLockManager.java#L498-L511 |
VoltDB/voltdb | examples/fraud-detection/client/frauddetection/FraudSimulation.java | FraudSimulation.runBenchmark | public void runBenchmark() throws Exception {
"""
Core benchmark code.
Connect. Initialize. Run the loop. Cleanup. Print Results.
@throws Exception if anything unexpected happens.
"""
printHeading("Publishing Train Activities");
String trains[] = { "1", "2", "3", "4", "5", "6", "7", "8" };... | java | public void runBenchmark() throws Exception {
printHeading("Publishing Train Activities");
String trains[] = { "1", "2", "3", "4", "5", "6", "7", "8" };
List<TrainActivityPublisher> trainPubs = new ArrayList<>();
SwipeEntryActivityPublisher entry = new SwipeEntryActivityPublisher(config... | [
"public",
"void",
"runBenchmark",
"(",
")",
"throws",
"Exception",
"{",
"printHeading",
"(",
"\"Publishing Train Activities\"",
")",
";",
"String",
"trains",
"[",
"]",
"=",
"{",
"\"1\"",
",",
"\"2\"",
",",
"\"3\"",
",",
"\"4\"",
",",
"\"5\"",
",",
"\"6\"",
... | Core benchmark code.
Connect. Initialize. Run the loop. Cleanup. Print Results.
@throws Exception if anything unexpected happens. | [
"Core",
"benchmark",
"code",
".",
"Connect",
".",
"Initialize",
".",
"Run",
"the",
"loop",
".",
"Cleanup",
".",
"Print",
"Results",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/fraud-detection/client/frauddetection/FraudSimulation.java#L582-L607 |
intellimate/Izou | src/main/java/org/intellimate/izou/system/sound/SoundManager.java | SoundManager.closeCallback | private void closeCallback(AddOnModel addOnModel, IzouSoundLine izouSoundLine) {
"""
the close-callback or the AddonModel, removes now redundant references
@param addOnModel the addOnModel where the IzouSoundLine belongs to
@param izouSoundLine the izouSoundLine
"""
debug("removing soundline " + izou... | java | private void closeCallback(AddOnModel addOnModel, IzouSoundLine izouSoundLine) {
debug("removing soundline " + izouSoundLine + " from " + addOnModel);
Predicate<WeakReference<IzouSoundLineBaseClass>> removeFromList =
weakReference -> weakReference.get() != null && weakReference.get().equ... | [
"private",
"void",
"closeCallback",
"(",
"AddOnModel",
"addOnModel",
",",
"IzouSoundLine",
"izouSoundLine",
")",
"{",
"debug",
"(",
"\"removing soundline \"",
"+",
"izouSoundLine",
"+",
"\" from \"",
"+",
"addOnModel",
")",
";",
"Predicate",
"<",
"WeakReference",
"<... | the close-callback or the AddonModel, removes now redundant references
@param addOnModel the addOnModel where the IzouSoundLine belongs to
@param izouSoundLine the izouSoundLine | [
"the",
"close",
"-",
"callback",
"or",
"the",
"AddonModel",
"removes",
"now",
"redundant",
"references"
] | train | https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/system/sound/SoundManager.java#L143-L166 |
gallandarakhneorg/afc | advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java | DBaseFileReader.read2ByteIntegerRecordValue | private static int read2ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Integer> value) throws IOException {
"""
Read a 2 BYTE INTEGER record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@par... | java | private static int read2ByteIntegerRecordValue(DBaseFileField field, int nrecord, int nfield,
byte[] rawData, int rawOffset, OutputParameter<Integer> value) throws IOException {
final short rawNumber = EndianNumbers.toLEShort(rawData[rawOffset], rawData[rawOffset + 1]);
try {
value.set(new Integer(rawNumber))... | [
"private",
"static",
"int",
"read2ByteIntegerRecordValue",
"(",
"DBaseFileField",
"field",
",",
"int",
"nrecord",
",",
"int",
"nfield",
",",
"byte",
"[",
"]",
"rawData",
",",
"int",
"rawOffset",
",",
"OutputParameter",
"<",
"Integer",
">",
"value",
")",
"throw... | Read a 2 BYTE INTEGER record value.
@param field is the current parsed field.
@param nrecord is the number of the record
@param nfield is the number of the field
@param rawData raw data
@param rawOffset is the index at which the data could be obtained
@param value will be set with the value extracted from the dBASE fi... | [
"Read",
"a",
"2",
"BYTE",
"INTEGER",
"record",
"value",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/DBaseFileReader.java#L1177-L1186 |
glyptodon/guacamole-client | extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/UserService.java | UserService.retrieveHistory | public List<ActivityRecord> retrieveHistory(ModeledAuthenticatedUser authenticatedUser,
ModeledUser user) throws GuacamoleException {
"""
Retrieves the login history of the given user, including any active
sessions.
@param authenticatedUser
The user retrieving the login history.
@param user
Th... | java | public List<ActivityRecord> retrieveHistory(ModeledAuthenticatedUser authenticatedUser,
ModeledUser user) throws GuacamoleException {
String username = user.getIdentifier();
// Retrieve history only if READ permission is granted
if (hasObjectPermission(authenticatedUser, username, ... | [
"public",
"List",
"<",
"ActivityRecord",
">",
"retrieveHistory",
"(",
"ModeledAuthenticatedUser",
"authenticatedUser",
",",
"ModeledUser",
"user",
")",
"throws",
"GuacamoleException",
"{",
"String",
"username",
"=",
"user",
".",
"getIdentifier",
"(",
")",
";",
"// R... | Retrieves the login history of the given user, including any active
sessions.
@param authenticatedUser
The user retrieving the login history.
@param user
The user whose history is being retrieved.
@return
The login history of the given user, including any active sessions.
@throws GuacamoleException
If permission to... | [
"Retrieves",
"the",
"login",
"history",
"of",
"the",
"given",
"user",
"including",
"any",
"active",
"sessions",
"."
] | 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/UserService.java#L576-L588 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/curves/PrecisionRecallCurve.java | PrecisionRecallCurve.getConfusionMatrixAtThreshold | public Confusion getConfusionMatrixAtThreshold(double threshold) {
"""
Get the binary confusion matrix for the given threshold. As per {@link #getPointAtThreshold(double)},
if the threshold is not found exactly, the next highest threshold exceeding the requested threshold
is returned
@param threshold Threshol... | java | public Confusion getConfusionMatrixAtThreshold(double threshold) {
Point p = getPointAtThreshold(threshold);
int idx = p.idx;
int tn = totalCount - (tpCount[idx] + fpCount[idx] + fnCount[idx]);
return new Confusion(p, tpCount[idx], fpCount[idx], fnCount[idx], tn);
} | [
"public",
"Confusion",
"getConfusionMatrixAtThreshold",
"(",
"double",
"threshold",
")",
"{",
"Point",
"p",
"=",
"getPointAtThreshold",
"(",
"threshold",
")",
";",
"int",
"idx",
"=",
"p",
".",
"idx",
";",
"int",
"tn",
"=",
"totalCount",
"-",
"(",
"tpCount",
... | Get the binary confusion matrix for the given threshold. As per {@link #getPointAtThreshold(double)},
if the threshold is not found exactly, the next highest threshold exceeding the requested threshold
is returned
@param threshold Threshold at which to get the confusion matrix
@return Binary confusion matrix | [
"Get",
"the",
"binary",
"confusion",
"matrix",
"for",
"the",
"given",
"threshold",
".",
"As",
"per",
"{",
"@link",
"#getPointAtThreshold",
"(",
"double",
")",
"}",
"if",
"the",
"threshold",
"is",
"not",
"found",
"exactly",
"the",
"next",
"highest",
"threshol... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/curves/PrecisionRecallCurve.java#L209-L214 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java | HtmlDocletWriter.pathString | protected DocPath pathString(TypeElement te, DocPath name) {
"""
Return the path to the class page for a typeElement.
@param te TypeElement for which the path is requested.
@param name Name of the file(doesn't include path).
"""
return pathString(utils.containingPackage(te), name);
} | java | protected DocPath pathString(TypeElement te, DocPath name) {
return pathString(utils.containingPackage(te), name);
} | [
"protected",
"DocPath",
"pathString",
"(",
"TypeElement",
"te",
",",
"DocPath",
"name",
")",
"{",
"return",
"pathString",
"(",
"utils",
".",
"containingPackage",
"(",
"te",
")",
",",
"name",
")",
";",
"}"
] | Return the path to the class page for a typeElement.
@param te TypeElement for which the path is requested.
@param name Name of the file(doesn't include path). | [
"Return",
"the",
"path",
"to",
"the",
"class",
"page",
"for",
"a",
"typeElement",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L1061-L1063 |
revelytix/spark | spark-http-client/src/main/java/spark/protocol/parser/XMLSelectResults.java | XMLSelectResults.readNext | protected Map<String,RDFNode> readNext() throws SparqlException {
"""
Parse the input stream to look for a result.
@return A new Row based on a single result from the results section.
@throws XMLStreamException There was an error reading the XML stream.
@throws SparqlException The XML was not valid SPARQL resul... | java | protected Map<String,RDFNode> readNext() throws SparqlException {
try {
// read <result> or </results>
int eventType = reader.nextTag();
// if a closing element, then it should be </results>
if (eventType == END_ELEMENT) {
// already read the final result, so clean up and return noth... | [
"protected",
"Map",
"<",
"String",
",",
"RDFNode",
">",
"readNext",
"(",
")",
"throws",
"SparqlException",
"{",
"try",
"{",
"// read <result> or </results>",
"int",
"eventType",
"=",
"reader",
".",
"nextTag",
"(",
")",
";",
"// if a closing element, then it should b... | Parse the input stream to look for a result.
@return A new Row based on a single result from the results section.
@throws XMLStreamException There was an error reading the XML stream.
@throws SparqlException The XML was not valid SPARQL results. | [
"Parse",
"the",
"input",
"stream",
"to",
"look",
"for",
"a",
"result",
"."
] | train | https://github.com/revelytix/spark/blob/d777d40c962bc66fdc04b7c3a66d20b777ff6fb4/spark-http-client/src/main/java/spark/protocol/parser/XMLSelectResults.java#L133-L165 |
redbox-mint/redbox | plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java | CurationManager.createTask | private JsonObject createTask(JsonSimple response, String oid, String task) {
"""
Create a task. Tasks are basically just trivial messages that will come
back to this manager for later action.
@param response
The response to edit
@param oid
The object to schedule for clearing
@param task
The task String t... | java | private JsonObject createTask(JsonSimple response, String oid, String task) {
return createTask(response, null, oid, task);
} | [
"private",
"JsonObject",
"createTask",
"(",
"JsonSimple",
"response",
",",
"String",
"oid",
",",
"String",
"task",
")",
"{",
"return",
"createTask",
"(",
"response",
",",
"null",
",",
"oid",
",",
"task",
")",
";",
"}"
] | Create a task. Tasks are basically just trivial messages that will come
back to this manager for later action.
@param response
The response to edit
@param oid
The object to schedule for clearing
@param task
The task String to use on receipt
@return JsonObject Access to the 'message' node of this task to provide
furthe... | [
"Create",
"a",
"task",
".",
"Tasks",
"are",
"basically",
"just",
"trivial",
"messages",
"that",
"will",
"come",
"back",
"to",
"this",
"manager",
"for",
"later",
"action",
"."
] | train | https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java#L1695-L1697 |
JodaOrg/joda-time | src/main/java/org/joda/time/TimeOfDay.java | TimeOfDay.withChronologyRetainFields | public TimeOfDay withChronologyRetainFields(Chronology newChronology) {
"""
Returns a copy of this time with the specified chronology.
This instance is immutable and unaffected by this method call.
<p>
This method retains the values of the fields, thus the result will
typically refer to a different instant.
<... | java | public TimeOfDay withChronologyRetainFields(Chronology newChronology) {
newChronology = DateTimeUtils.getChronology(newChronology);
newChronology = newChronology.withUTC();
if (newChronology == getChronology()) {
return this;
} else {
TimeOfDay newTimeOfDay = new ... | [
"public",
"TimeOfDay",
"withChronologyRetainFields",
"(",
"Chronology",
"newChronology",
")",
"{",
"newChronology",
"=",
"DateTimeUtils",
".",
"getChronology",
"(",
"newChronology",
")",
";",
"newChronology",
"=",
"newChronology",
".",
"withUTC",
"(",
")",
";",
"if"... | Returns a copy of this time with the specified chronology.
This instance is immutable and unaffected by this method call.
<p>
This method retains the values of the fields, thus the result will
typically refer to a different instant.
<p>
The time zone of the specified chronology is ignored, as TimeOfDay
operates without... | [
"Returns",
"a",
"copy",
"of",
"this",
"time",
"with",
"the",
"specified",
"chronology",
".",
"This",
"instance",
"is",
"immutable",
"and",
"unaffected",
"by",
"this",
"method",
"call",
".",
"<p",
">",
"This",
"method",
"retains",
"the",
"values",
"of",
"th... | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/TimeOfDay.java#L493-L503 |
windup/windup | rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JmsDestinationService.java | JmsDestinationService.createUnique | public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType) {
"""
Creates a new instance with the given name, or converts an existing instance at this location if one already exists
"""
JmsDestinationModel model = createUnique(application... | java | public JmsDestinationModel createUnique(Set<ProjectModel> applications, String jndiName, JmsDestinationType destinationType)
{
JmsDestinationModel model = createUnique(applications, jndiName);
model.setDestinationType(destinationType);
return model;
} | [
"public",
"JmsDestinationModel",
"createUnique",
"(",
"Set",
"<",
"ProjectModel",
">",
"applications",
",",
"String",
"jndiName",
",",
"JmsDestinationType",
"destinationType",
")",
"{",
"JmsDestinationModel",
"model",
"=",
"createUnique",
"(",
"applications",
",",
"jn... | Creates a new instance with the given name, or converts an existing instance at this location if one already exists | [
"Creates",
"a",
"new",
"instance",
"with",
"the",
"given",
"name",
"or",
"converts",
"an",
"existing",
"instance",
"at",
"this",
"location",
"if",
"one",
"already",
"exists"
] | train | https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JmsDestinationService.java#L45-L51 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Node.appendMarker | boolean appendMarker(Node<K,V> f) {
"""
Tries to append a deletion marker to this node.
@param f the assumed current successor of this node
@return true if successful
"""
return casNext(f, new Node<K,V>(f));
} | java | boolean appendMarker(Node<K,V> f) {
return casNext(f, new Node<K,V>(f));
} | [
"boolean",
"appendMarker",
"(",
"Node",
"<",
"K",
",",
"V",
">",
"f",
")",
"{",
"return",
"casNext",
"(",
"f",
",",
"new",
"Node",
"<",
"K",
",",
"V",
">",
"(",
"f",
")",
")",
";",
"}"
] | Tries to append a deletion marker to this node.
@param f the assumed current successor of this node
@return true if successful | [
"Tries",
"to",
"append",
"a",
"deletion",
"marker",
"to",
"this",
"node",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L488-L490 |
BlueBrain/bluima | modules/bluima_typesystem/src/main/java/de/julielab/jules/types/GOMention.java | GOMention.setCategories | public void setCategories(int i, String v) {
"""
indexed setter for categories - sets an indexed value - created for the shared task, here we add the group
@generated
@param i index in the array to set
@param v value to set into the array
"""
if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).c... | java | public void setCategories(int i, String v) {
if (GOMention_Type.featOkTst && ((GOMention_Type)jcasType).casFeat_categories == null)
jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.GOMention");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((GOMention_Type)jcasT... | [
"public",
"void",
"setCategories",
"(",
"int",
"i",
",",
"String",
"v",
")",
"{",
"if",
"(",
"GOMention_Type",
".",
"featOkTst",
"&&",
"(",
"(",
"GOMention_Type",
")",
"jcasType",
")",
".",
"casFeat_categories",
"==",
"null",
")",
"jcasType",
".",
"jcas",
... | indexed setter for categories - sets an indexed value - created for the shared task, here we add the group
@generated
@param i index in the array to set
@param v value to set into the array | [
"indexed",
"setter",
"for",
"categories",
"-",
"sets",
"an",
"indexed",
"value",
"-",
"created",
"for",
"the",
"shared",
"task",
"here",
"we",
"add",
"the",
"group"
] | train | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/GOMention.java#L116-L120 |
wso2/transport-http | components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java | Util.shouldEnforceChunkingforHttpOneZero | public static boolean shouldEnforceChunkingforHttpOneZero(ChunkConfig chunkConfig, String httpVersion) {
"""
Returns whether to enforce chunking on HTTP 1.0 requests.
@param chunkConfig Chunking configuration.
@param httpVersion http version string.
@return true if chunking should be enforced else false.
... | java | public static boolean shouldEnforceChunkingforHttpOneZero(ChunkConfig chunkConfig, String httpVersion) {
return chunkConfig == ChunkConfig.ALWAYS && Float.valueOf(httpVersion) >= Constants.HTTP_1_0;
} | [
"public",
"static",
"boolean",
"shouldEnforceChunkingforHttpOneZero",
"(",
"ChunkConfig",
"chunkConfig",
",",
"String",
"httpVersion",
")",
"{",
"return",
"chunkConfig",
"==",
"ChunkConfig",
".",
"ALWAYS",
"&&",
"Float",
".",
"valueOf",
"(",
"httpVersion",
")",
">="... | Returns whether to enforce chunking on HTTP 1.0 requests.
@param chunkConfig Chunking configuration.
@param httpVersion http version string.
@return true if chunking should be enforced else false. | [
"Returns",
"whether",
"to",
"enforce",
"chunking",
"on",
"HTTP",
"1",
".",
"0",
"requests",
"."
] | train | https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/Util.java#L308-L310 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/record/compiler/ant/RccTask.java | RccTask.execute | public void execute() throws BuildException {
"""
Invoke the Hadoop record compiler on each record definition file
"""
if (src == null && filesets.size()==0) {
throw new BuildException("There must be a file attribute or a fileset child element");
}
if (src != null) {
doCompile(src);
... | java | public void execute() throws BuildException {
if (src == null && filesets.size()==0) {
throw new BuildException("There must be a file attribute or a fileset child element");
}
if (src != null) {
doCompile(src);
}
Project myProject = getProject();
for (int i = 0; i < filesets.size(); ... | [
"public",
"void",
"execute",
"(",
")",
"throws",
"BuildException",
"{",
"if",
"(",
"src",
"==",
"null",
"&&",
"filesets",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"\"There must be a file attribute or a fileset child elem... | Invoke the Hadoop record compiler on each record definition file | [
"Invoke",
"the",
"Hadoop",
"record",
"compiler",
"on",
"each",
"record",
"definition",
"file"
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/record/compiler/ant/RccTask.java#L105-L122 |
buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addProfiles | private void addProfiles(MavenPomDescriptor pomDescriptor, Model model, ScannerContext scannerContext) {
"""
Adds information about defined profile.
@param pomDescriptor
The descriptor for the current POM.
@param model
The Maven Model.
@param scannerContext
The scanner context.
"""
List<Profile... | java | private void addProfiles(MavenPomDescriptor pomDescriptor, Model model, ScannerContext scannerContext) {
List<Profile> profiles = model.getProfiles();
Store store = scannerContext.getStore();
for (Profile profile : profiles) {
MavenProfileDescriptor mavenProfileDescriptor = store.cre... | [
"private",
"void",
"addProfiles",
"(",
"MavenPomDescriptor",
"pomDescriptor",
",",
"Model",
"model",
",",
"ScannerContext",
"scannerContext",
")",
"{",
"List",
"<",
"Profile",
">",
"profiles",
"=",
"model",
".",
"getProfiles",
"(",
")",
";",
"Store",
"store",
... | Adds information about defined profile.
@param pomDescriptor
The descriptor for the current POM.
@param model
The Maven Model.
@param scannerContext
The scanner context. | [
"Adds",
"information",
"about",
"defined",
"profile",
"."
] | train | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L564-L579 |
haraldk/TwelveMonkeys | sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/Log.java | Log.logInfo | public void logInfo(String message, Exception exception) {
"""
Prints info info to the current infoLog
@param message The message to log
@param exception An Exception
"""
if (!(logInfo || globalLog.logInfo))
return;
if (infoLog != null)
log(infoLog, "INFO", ow... | java | public void logInfo(String message, Exception exception) {
if (!(logInfo || globalLog.logInfo))
return;
if (infoLog != null)
log(infoLog, "INFO", owner, message, exception);
else
log(globalLog.infoLog, "INFO", owner, message, exception);
} | [
"public",
"void",
"logInfo",
"(",
"String",
"message",
",",
"Exception",
"exception",
")",
"{",
"if",
"(",
"!",
"(",
"logInfo",
"||",
"globalLog",
".",
"logInfo",
")",
")",
"return",
";",
"if",
"(",
"infoLog",
"!=",
"null",
")",
"log",
"(",
"infoLog",
... | Prints info info to the current infoLog
@param message The message to log
@param exception An Exception | [
"Prints",
"info",
"info",
"to",
"the",
"current",
"infoLog"
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/Log.java#L591-L599 |
mangstadt/biweekly | src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java | ICalPropertyScribe.parseText | public final T parseText(String value, ICalDataType dataType, ICalParameters parameters, ParseContext context) {
"""
Unmarshals a property from a plain-text iCalendar data stream.
@param value the value as read off the wire
@param dataType the data type of the property value. The property's VALUE
parameter is u... | java | public final T parseText(String value, ICalDataType dataType, ICalParameters parameters, ParseContext context) {
T property = _parseText(value, dataType, parameters, context);
property.setParameters(parameters);
return property;
} | [
"public",
"final",
"T",
"parseText",
"(",
"String",
"value",
",",
"ICalDataType",
"dataType",
",",
"ICalParameters",
"parameters",
",",
"ParseContext",
"context",
")",
"{",
"T",
"property",
"=",
"_parseText",
"(",
"value",
",",
"dataType",
",",
"parameters",
"... | Unmarshals a property from a plain-text iCalendar data stream.
@param value the value as read off the wire
@param dataType the data type of the property value. The property's VALUE
parameter is used to determine the data type. If the property has no
VALUE parameter, then this parameter will be set to the property's
def... | [
"Unmarshals",
"a",
"property",
"from",
"a",
"plain",
"-",
"text",
"iCalendar",
"data",
"stream",
"."
] | train | https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/scribe/property/ICalPropertyScribe.java#L244-L248 |
alkacon/opencms-core | src/org/opencms/importexport/CmsImportVersion7.java | CmsImportVersion7.addResourceAttributesRules | protected void addResourceAttributesRules(Digester digester, String xpath) {
"""
Adds the XML digester rules for resource attributes.<p>
@param digester the digester to add the rules to
@param xpath the base xpath for the rules
"""
digester.addCallMethod(xpath + N_SOURCE, "setSource", 0);
... | java | protected void addResourceAttributesRules(Digester digester, String xpath) {
digester.addCallMethod(xpath + N_SOURCE, "setSource", 0);
digester.addCallMethod(xpath + N_DESTINATION, "setDestination", 0);
digester.addCallMethod(xpath + N_TYPE, "setType", 0);
digester.addCallMethod(xpath +... | [
"protected",
"void",
"addResourceAttributesRules",
"(",
"Digester",
"digester",
",",
"String",
"xpath",
")",
"{",
"digester",
".",
"addCallMethod",
"(",
"xpath",
"+",
"N_SOURCE",
",",
"\"setSource\"",
",",
"0",
")",
";",
"digester",
".",
"addCallMethod",
"(",
... | Adds the XML digester rules for resource attributes.<p>
@param digester the digester to add the rules to
@param xpath the base xpath for the rules | [
"Adds",
"the",
"XML",
"digester",
"rules",
"for",
"resource",
"attributes",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/importexport/CmsImportVersion7.java#L3070-L3084 |
kiegroup/drools | kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java | CompiledFEELSemanticMappings.mult | public static Object mult(Object left, Object right) {
"""
FEEL spec Table 45
Delegates to {@link InfixOpNode} except evaluationcontext
"""
return InfixOpNode.mult(left, right, null);
} | java | public static Object mult(Object left, Object right) {
return InfixOpNode.mult(left, right, null);
} | [
"public",
"static",
"Object",
"mult",
"(",
"Object",
"left",
",",
"Object",
"right",
")",
"{",
"return",
"InfixOpNode",
".",
"mult",
"(",
"left",
",",
"right",
",",
"null",
")",
";",
"}"
] | FEEL spec Table 45
Delegates to {@link InfixOpNode} except evaluationcontext | [
"FEEL",
"spec",
"Table",
"45",
"Delegates",
"to",
"{"
] | train | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java#L314-L316 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.downloadSingleArtifactsFile | public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException {
"""
Download a single artifact file from within the job's artifacts archive.
Only a single file is going to be extracted from the archive and streamed to a client.
<pre><code>G... | java | public InputStream downloadSingleArtifactsFile(Object projectIdOrPath, Integer jobId, Path artifactPath) throws GitLabApiException {
String path = artifactPath.toString().replace("\\", "/");
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrP... | [
"public",
"InputStream",
"downloadSingleArtifactsFile",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"jobId",
",",
"Path",
"artifactPath",
")",
"throws",
"GitLabApiException",
"{",
"String",
"path",
"=",
"artifactPath",
".",
"toString",
"(",
")",
".",
"replace"... | Download a single artifact file from within the job's artifacts archive.
Only a single file is going to be extracted from the archive and streamed to a client.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id/artifacts/*artifact_path</code></pre>
@param projectIdOrPath id, path of the project, or a Project... | [
"Download",
"a",
"single",
"artifact",
"file",
"from",
"within",
"the",
"job",
"s",
"artifacts",
"archive",
"."
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L407-L412 |
UweTrottmann/getglue-java | src/main/java/com/uwetrottmann/getglue/GetGlue.java | GetGlue.getAuthorizationRequest | public static OAuthClientRequest getAuthorizationRequest(String clientId, String redirectUri)
throws OAuthSystemException {
"""
Build an OAuth authorization request.
@param clientId The OAuth client id obtained from tvtag.
@param redirectUri The URI to redirect to with appended auth code query para... | java | public static OAuthClientRequest getAuthorizationRequest(String clientId, String redirectUri)
throws OAuthSystemException {
return OAuthClientRequest
.authorizationLocation(OAUTH2_AUTHORIZATION_URL)
.setScope("public read write")
.setResponseType(Respo... | [
"public",
"static",
"OAuthClientRequest",
"getAuthorizationRequest",
"(",
"String",
"clientId",
",",
"String",
"redirectUri",
")",
"throws",
"OAuthSystemException",
"{",
"return",
"OAuthClientRequest",
".",
"authorizationLocation",
"(",
"OAUTH2_AUTHORIZATION_URL",
")",
".",... | Build an OAuth authorization request.
@param clientId The OAuth client id obtained from tvtag.
@param redirectUri The URI to redirect to with appended auth code query parameter.
@throws OAuthSystemException | [
"Build",
"an",
"OAuth",
"authorization",
"request",
"."
] | train | https://github.com/UweTrottmann/getglue-java/blob/9d79c150124f7e71c88568510df5f4f7ccd75d25/src/main/java/com/uwetrottmann/getglue/GetGlue.java#L62-L71 |
indeedeng/util | util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java | Quicksortables.sortheap | private static void sortheap(Quicksortable q, int size) {
"""
sorts the heap stored in q
@param q The quicksortable to heapsort.
@param size The size of the quicksortable.
"""
for (int i = size-1; i >= 1; i--) {
q.swap(0, i);
heapifyDown(q, 0, i);
}
} | java | private static void sortheap(Quicksortable q, int size) {
for (int i = size-1; i >= 1; i--) {
q.swap(0, i);
heapifyDown(q, 0, i);
}
} | [
"private",
"static",
"void",
"sortheap",
"(",
"Quicksortable",
"q",
",",
"int",
"size",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"size",
"-",
"1",
";",
"i",
">=",
"1",
";",
"i",
"--",
")",
"{",
"q",
".",
"swap",
"(",
"0",
",",
"i",
")",
";",
... | sorts the heap stored in q
@param q The quicksortable to heapsort.
@param size The size of the quicksortable. | [
"sorts",
"the",
"heap",
"stored",
"in",
"q"
] | train | https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java#L253-L258 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/SizeConfig.java | SizeConfig.imports | public static SizeConfig imports(Xml root) {
"""
Import the size data from configurer.
@param root The root reference (must not be <code>null</code>).
@return The size data.
@throws LionEngineException If unable to read node.
"""
Check.notNull(root);
final Xml node = root.getChild(NODE... | java | public static SizeConfig imports(Xml root)
{
Check.notNull(root);
final Xml node = root.getChild(NODE_SIZE);
final int width = node.readInteger(ATT_WIDTH);
final int height = node.readInteger(ATT_HEIGHT);
return new SizeConfig(width, height);
} | [
"public",
"static",
"SizeConfig",
"imports",
"(",
"Xml",
"root",
")",
"{",
"Check",
".",
"notNull",
"(",
"root",
")",
";",
"final",
"Xml",
"node",
"=",
"root",
".",
"getChild",
"(",
"NODE_SIZE",
")",
";",
"final",
"int",
"width",
"=",
"node",
".",
"r... | Import the size data from configurer.
@param root The root reference (must not be <code>null</code>).
@return The size data.
@throws LionEngineException If unable to read node. | [
"Import",
"the",
"size",
"data",
"from",
"configurer",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/SizeConfig.java#L63-L72 |
alkacon/opencms-core | src/org/opencms/ui/dialogs/permissions/CmsPrincipalSelect.java | CmsPrincipalSelect.setPrincipal | protected void setPrincipal(int type, String principalName) {
"""
Sets the principal type and name.<p>
@param type the principal type
@param principalName the principal name
"""
m_principalName.setValue(principalName);
String typeName = null;
switch (type) {
case 0:
... | java | protected void setPrincipal(int type, String principalName) {
m_principalName.setValue(principalName);
String typeName = null;
switch (type) {
case 0:
typeName = I_CmsPrincipal.PRINCIPAL_GROUP;
break;
case 1:
default:
... | [
"protected",
"void",
"setPrincipal",
"(",
"int",
"type",
",",
"String",
"principalName",
")",
"{",
"m_principalName",
".",
"setValue",
"(",
"principalName",
")",
";",
"String",
"typeName",
"=",
"null",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"0",
":"... | Sets the principal type and name.<p>
@param type the principal type
@param principalName the principal name | [
"Sets",
"the",
"principal",
"type",
"and",
"name",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/permissions/CmsPrincipalSelect.java#L593-L610 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/JavaWriterHelper.java | JavaWriterHelper.writeJava2File | public static void writeJava2File(Filer filer, String packageName, TypeSpec typeSpec) throws IOException {
"""
Write java 2 file.
@param filer the filer
@param packageName the package name
@param typeSpec the type spec
@throws IOException Signals that an I/O exception has occurred.
"""
JavaFile target ... | java | public static void writeJava2File(Filer filer, String packageName, TypeSpec typeSpec) throws IOException {
JavaFile target = JavaFile.builder(packageName, typeSpec).skipJavaLangImports(true).build();
target.writeTo(filer);
} | [
"public",
"static",
"void",
"writeJava2File",
"(",
"Filer",
"filer",
",",
"String",
"packageName",
",",
"TypeSpec",
"typeSpec",
")",
"throws",
"IOException",
"{",
"JavaFile",
"target",
"=",
"JavaFile",
".",
"builder",
"(",
"packageName",
",",
"typeSpec",
")",
... | Write java 2 file.
@param filer the filer
@param packageName the package name
@param typeSpec the type spec
@throws IOException Signals that an I/O exception has occurred. | [
"Write",
"java",
"2",
"file",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/JavaWriterHelper.java#L28-L31 |
rometools/rome | rome/src/main/java/com/rometools/rome/io/impl/DateParser.java | DateParser.parseRFC822 | public static Date parseRFC822(String sDate, final Locale locale) {
"""
Parses a Date out of a String with a date in RFC822 format.
<p/>
It parsers the following formats:
<ul>
<li>"EEE, dd MMM yyyy HH:mm:ss z"</li>
<li>"EEE, dd MMM yyyy HH:mm z"</li>
<li>"EEE, dd MMM yy HH:mm:ss z"</li>
<li>"EEE, dd MMM yy ... | java | public static Date parseRFC822(String sDate, final Locale locale) {
sDate = convertUnsupportedTimeZones(sDate);
return parseUsingMask(RFC822_MASKS, sDate, locale);
} | [
"public",
"static",
"Date",
"parseRFC822",
"(",
"String",
"sDate",
",",
"final",
"Locale",
"locale",
")",
"{",
"sDate",
"=",
"convertUnsupportedTimeZones",
"(",
"sDate",
")",
";",
"return",
"parseUsingMask",
"(",
"RFC822_MASKS",
",",
"sDate",
",",
"locale",
")... | Parses a Date out of a String with a date in RFC822 format.
<p/>
It parsers the following formats:
<ul>
<li>"EEE, dd MMM yyyy HH:mm:ss z"</li>
<li>"EEE, dd MMM yyyy HH:mm z"</li>
<li>"EEE, dd MMM yy HH:mm:ss z"</li>
<li>"EEE, dd MMM yy HH:mm z"</li>
<li>"dd MMM yyyy HH:mm:ss z"</li>
<li>"dd MMM yyyy HH:mm z"</li>
<li>"... | [
"Parses",
"a",
"Date",
"out",
"of",
"a",
"String",
"with",
"a",
"date",
"in",
"RFC822",
"format",
".",
"<p",
"/",
">",
"It",
"parsers",
"the",
"following",
"formats",
":",
"<ul",
">",
"<li",
">",
"EEE",
"dd",
"MMM",
"yyyy",
"HH",
":",
"mm",
":",
... | train | https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/DateParser.java#L145-L148 |
drapostolos/type-parser | src/main/java/com/github/drapostolos/typeparser/ParserHelper.java | ParserHelper.parseType | public Object parseType(String input, Type targetType) {
"""
This method gives access to {@link TypeParser#parseType(String, Type)}.
@param input String to parse.
@param targetType The target type to parse the given input to.
@return an instance of type.
"""
return typeParser.parseType(input, targ... | java | public Object parseType(String input, Type targetType) {
return typeParser.parseType(input, targetType);
} | [
"public",
"Object",
"parseType",
"(",
"String",
"input",
",",
"Type",
"targetType",
")",
"{",
"return",
"typeParser",
".",
"parseType",
"(",
"input",
",",
"targetType",
")",
";",
"}"
] | This method gives access to {@link TypeParser#parseType(String, Type)}.
@param input String to parse.
@param targetType The target type to parse the given input to.
@return an instance of type. | [
"This",
"method",
"gives",
"access",
"to",
"{",
"@link",
"TypeParser#parseType",
"(",
"String",
"Type",
")",
"}",
"."
] | train | https://github.com/drapostolos/type-parser/blob/74c66311f8dd009897c74ab5069e36c045cda073/src/main/java/com/github/drapostolos/typeparser/ParserHelper.java#L54-L56 |
liferay/com-liferay-commerce | commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListAccountRelPersistenceImpl.java | CommercePriceListAccountRelPersistenceImpl.fetchByUUID_G | @Override
public CommercePriceListAccountRel fetchByUUID_G(String uuid, long groupId) {
"""
Returns the commerce price list account rel where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return... | java | @Override
public CommercePriceListAccountRel fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | [
"@",
"Override",
"public",
"CommercePriceListAccountRel",
"fetchByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"{",
"return",
"fetchByUUID_G",
"(",
"uuid",
",",
"groupId",
",",
"true",
")",
";",
"}"
] | Returns the commerce price list account rel where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching commerce price list account rel, or <code>null</code> if a matching commerce price list ... | [
"Returns",
"the",
"commerce",
"price",
"list",
"account",
"rel",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses",
... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListAccountRelPersistenceImpl.java#L713-L716 |
wcm-io-caravan/caravan-hal | resource/src/main/java/io/wcm/caravan/hal/resource/HalResource.java | HalResource.removeLink | public HalResource removeLink(String relation, int index) {
"""
Removes one link for the given relation and index.
@param relation Link relation
@param index Array index
@return HAL resource
"""
return removeResource(HalResourceType.LINKS, relation, index);
} | java | public HalResource removeLink(String relation, int index) {
return removeResource(HalResourceType.LINKS, relation, index);
} | [
"public",
"HalResource",
"removeLink",
"(",
"String",
"relation",
",",
"int",
"index",
")",
"{",
"return",
"removeResource",
"(",
"HalResourceType",
".",
"LINKS",
",",
"relation",
",",
"index",
")",
";",
"}"
] | Removes one link for the given relation and index.
@param relation Link relation
@param index Array index
@return HAL resource | [
"Removes",
"one",
"link",
"for",
"the",
"given",
"relation",
"and",
"index",
"."
] | train | https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/resource/src/main/java/io/wcm/caravan/hal/resource/HalResource.java#L440-L442 |
line/centraldogma | server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java | ContentServiceV1.listCommits | @Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/commits(?<revision>(|/.*))$")
public CompletableFuture<?> listCommits(@Param("revision") String revision,
@Param("path") @Default("/**") String path,
@Param("t... | java | @Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/commits(?<revision>(|/.*))$")
public CompletableFuture<?> listCommits(@Param("revision") String revision,
@Param("path") @Default("/**") String path,
@Param("t... | [
"@",
"Get",
"(",
"\"regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/commits(?<revision>(|/.*))$\"",
")",
"public",
"CompletableFuture",
"<",
"?",
">",
"listCommits",
"(",
"@",
"Param",
"(",
"\"revision\"",
")",
"String",
"revision",
",",
"@",
"Param",
"(",
... | GET /projects/{projectName}/repos/{repoName}/commits/{revision}?
path={path}&to={to}&maxCommits={maxCommits}
<p>Returns a commit or the list of commits in the path. If the user specify the {@code revision} only,
this will return the corresponding commit. If the user does not specify the {@code revision} or
spe... | [
"GET",
"/",
"projects",
"/",
"{",
"projectName",
"}",
"/",
"repos",
"/",
"{",
"repoName",
"}",
"/",
"commits",
"/",
"{",
"revision",
"}",
"?",
"path",
"=",
"{",
"path",
"}",
"&",
";",
"to",
"=",
"{",
"to",
"}",
"&",
";",
"maxCommits",
"=",
... | train | https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java#L293-L324 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/quorum/impl/QuorumImpl.java | QuorumImpl.onHeartbeat | void onHeartbeat(Member member, long timestamp) {
"""
Notify a {@link HeartbeatAware} {@code QuorumFunction} that a heartbeat has been received from a member.
@param member source member
@param timestamp heartbeat's timestamp
"""
if (!heartbeatAwareQuorumFunction) {
return;
}... | java | void onHeartbeat(Member member, long timestamp) {
if (!heartbeatAwareQuorumFunction) {
return;
}
((HeartbeatAware) quorumFunction).onHeartbeat(member, timestamp);
} | [
"void",
"onHeartbeat",
"(",
"Member",
"member",
",",
"long",
"timestamp",
")",
"{",
"if",
"(",
"!",
"heartbeatAwareQuorumFunction",
")",
"{",
"return",
";",
"}",
"(",
"(",
"HeartbeatAware",
")",
"quorumFunction",
")",
".",
"onHeartbeat",
"(",
"member",
",",
... | Notify a {@link HeartbeatAware} {@code QuorumFunction} that a heartbeat has been received from a member.
@param member source member
@param timestamp heartbeat's timestamp | [
"Notify",
"a",
"{",
"@link",
"HeartbeatAware",
"}",
"{",
"@code",
"QuorumFunction",
"}",
"that",
"a",
"heartbeat",
"has",
"been",
"received",
"from",
"a",
"member",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/quorum/impl/QuorumImpl.java#L120-L125 |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/grid/Grid.java | Grid.getRemoteNodeInfo | public static RemoteNodeInformation getRemoteNodeInfo(String hostName, int port, SessionId session) {
"""
For a given Session ID against a host on a particular port, this method returns the remote webdriver node and the
port to which the execution was redirected to by the hub.
@param hostName
The name of the ... | java | public static RemoteNodeInformation getRemoteNodeInfo(String hostName, int port, SessionId session) {
logger.entering(new Object[] { hostName, port, session });
RemoteNodeInformation node = null;
String errorMsg = "Failed to acquire remote webdriver node and port info. Root cause: ";
//... | [
"public",
"static",
"RemoteNodeInformation",
"getRemoteNodeInfo",
"(",
"String",
"hostName",
",",
"int",
"port",
",",
"SessionId",
"session",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"hostName",
",",
"port",
",",
"session",
"... | For a given Session ID against a host on a particular port, this method returns the remote webdriver node and the
port to which the execution was redirected to by the hub.
@param hostName
The name of the hub machine
@param port
The port on which the hub machine is listening to
@param session
An object of type {@link S... | [
"For",
"a",
"given",
"Session",
"ID",
"against",
"a",
"host",
"on",
"a",
"particular",
"port",
"this",
"method",
"returns",
"the",
"remote",
"webdriver",
"node",
"and",
"the",
"port",
"to",
"which",
"the",
"execution",
"was",
"redirected",
"to",
"by",
"the... | train | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/grid/Grid.java#L197-L227 |
lessthanoptimal/ejml | main/ejml-ddense/src/org/ejml/dense/row/mult/MatrixMultProduct_DDRM.java | MatrixMultProduct_DDRM.inner_reorder_lower | public static void inner_reorder_lower(DMatrix1Row A , DMatrix1Row B ) {
"""
Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this
function will only store the lower triangle. The value of the upper triangular matrix is undefined.
<p>B = A<sup>T</sup>*A</s... | java | public static void inner_reorder_lower(DMatrix1Row A , DMatrix1Row B )
{
final int cols = A.numCols;
B.reshape(cols,cols);
Arrays.fill(B.data,0);
for (int i = 0; i <cols; i++) {
for (int j = 0; j <=i; j++) {
B.data[i*cols+j] += A.data[i]*A.data[j];
... | [
"public",
"static",
"void",
"inner_reorder_lower",
"(",
"DMatrix1Row",
"A",
",",
"DMatrix1Row",
"B",
")",
"{",
"final",
"int",
"cols",
"=",
"A",
".",
"numCols",
";",
"B",
".",
"reshape",
"(",
"cols",
",",
"cols",
")",
";",
"Arrays",
".",
"fill",
"(",
... | Computes the inner product of A times A and stores the results in B. The inner product is symmetric and this
function will only store the lower triangle. The value of the upper triangular matrix is undefined.
<p>B = A<sup>T</sup>*A</sup>
@param A (Input) Matrix
@param B (Output) Storage for output. | [
"Computes",
"the",
"inner",
"product",
"of",
"A",
"times",
"A",
"and",
"stores",
"the",
"results",
"in",
"B",
".",
"The",
"inner",
"product",
"is",
"symmetric",
"and",
"this",
"function",
"will",
"only",
"store",
"the",
"lower",
"triangle",
".",
"The",
"... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/mult/MatrixMultProduct_DDRM.java#L162-L182 |
cdk/cdk | legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java | SMSDNormalizer.makeDeepCopy | public static IAtomContainer makeDeepCopy(IAtomContainer container) {
"""
Returns deep copy of the molecule
@param container
@return deep copy of the mol
"""
IAtomContainer newAtomContainer = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
int lonePairCount = conta... | java | public static IAtomContainer makeDeepCopy(IAtomContainer container) {
IAtomContainer newAtomContainer = DefaultChemObjectBuilder.getInstance().newInstance(IAtomContainer.class);
int lonePairCount = container.getLonePairCount();
int singleElectronCount = container.getSingleElectronCount();
... | [
"public",
"static",
"IAtomContainer",
"makeDeepCopy",
"(",
"IAtomContainer",
"container",
")",
"{",
"IAtomContainer",
"newAtomContainer",
"=",
"DefaultChemObjectBuilder",
".",
"getInstance",
"(",
")",
".",
"newInstance",
"(",
"IAtomContainer",
".",
"class",
")",
";",
... | Returns deep copy of the molecule
@param container
@return deep copy of the mol | [
"Returns",
"deep",
"copy",
"of",
"the",
"molecule"
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/normalize/SMSDNormalizer.java#L76-L116 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/inventory/message/InventoryActionMessage.java | InventoryActionMessage.sendAction | @SideOnly(Side.CLIENT)
public static void sendAction(ActionType action, int inventoryId, int slotNumber, int code) {
"""
Sends GUI action to the server {@link MalisisInventoryContainer}.
@param action the action
@param inventoryId the inventory id
@param slotNumber the slot number
@param code the code
"... | java | @SideOnly(Side.CLIENT)
public static void sendAction(ActionType action, int inventoryId, int slotNumber, int code)
{
int windowId = Utils.getClientPlayer().openContainer.windowId;
Packet packet = new Packet(action, inventoryId, slotNumber, code, windowId);
MalisisCore.network.sendToServer(packet);
} | [
"@",
"SideOnly",
"(",
"Side",
".",
"CLIENT",
")",
"public",
"static",
"void",
"sendAction",
"(",
"ActionType",
"action",
",",
"int",
"inventoryId",
",",
"int",
"slotNumber",
",",
"int",
"code",
")",
"{",
"int",
"windowId",
"=",
"Utils",
".",
"getClientPlay... | Sends GUI action to the server {@link MalisisInventoryContainer}.
@param action the action
@param inventoryId the inventory id
@param slotNumber the slot number
@param code the code | [
"Sends",
"GUI",
"action",
"to",
"the",
"server",
"{",
"@link",
"MalisisInventoryContainer",
"}",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/inventory/message/InventoryActionMessage.java#L81-L87 |
eduarddrenth/ConfigurableReports | src/main/java/com/vectorprint/report/itext/style/stylers/ImportTiff.java | ImportTiff.createImage | @Override
protected com.itextpdf.text.Image createImage(PdfContentByte canvas, Object data, float opacity) throws VectorPrintException, BadElementException {
"""
calls {@link #processImage(com.itextpdf.text.Image) } on pages imported from the tiff in the URL, always returns
null, because each page from a tiff ... | java | @Override
protected com.itextpdf.text.Image createImage(PdfContentByte canvas, Object data, float opacity) throws VectorPrintException, BadElementException {
if (imageBeingProcessed!=null) {
return imageBeingProcessed;
}
this.data = data;
boolean doFooter = getSettings().getBooleanPr... | [
"@",
"Override",
"protected",
"com",
".",
"itextpdf",
".",
"text",
".",
"Image",
"createImage",
"(",
"PdfContentByte",
"canvas",
",",
"Object",
"data",
",",
"float",
"opacity",
")",
"throws",
"VectorPrintException",
",",
"BadElementException",
"{",
"if",
"(",
... | calls {@link #processImage(com.itextpdf.text.Image) } on pages imported from the tiff in the URL, always returns
null, because each page from a tiff is imported as an image.
@param canvas
@param data
@param opacity the value of opacity
@throws VectorPrintException
@throws BadElementException
@return the com.itextpdf.t... | [
"calls",
"{",
"@link",
"#processImage",
"(",
"com",
".",
"itextpdf",
".",
"text",
".",
"Image",
")",
"}",
"on",
"pages",
"imported",
"from",
"the",
"tiff",
"in",
"the",
"URL",
"always",
"returns",
"null",
"because",
"each",
"page",
"from",
"a",
"tiff",
... | train | https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/stylers/ImportTiff.java#L196-L218 |
looly/hutool | hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java | AbstractAsymmetricCrypto.decryptStrFromBcd | public String decryptStrFromBcd(String data, KeyType keyType, Charset charset) {
"""
解密为字符串,密文需为BCD格式
@param data 数据,BCD格式
@param keyType 密钥类型
@param charset 加密前编码
@return 解密后的密文
@since 4.5.2
"""
return StrUtil.str(decryptFromBcd(data, keyType, charset), charset);
} | java | public String decryptStrFromBcd(String data, KeyType keyType, Charset charset) {
return StrUtil.str(decryptFromBcd(data, keyType, charset), charset);
} | [
"public",
"String",
"decryptStrFromBcd",
"(",
"String",
"data",
",",
"KeyType",
"keyType",
",",
"Charset",
"charset",
")",
"{",
"return",
"StrUtil",
".",
"str",
"(",
"decryptFromBcd",
"(",
"data",
",",
"keyType",
",",
"charset",
")",
",",
"charset",
")",
"... | 解密为字符串,密文需为BCD格式
@param data 数据,BCD格式
@param keyType 密钥类型
@param charset 加密前编码
@return 解密后的密文
@since 4.5.2 | [
"解密为字符串,密文需为BCD格式"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/asymmetric/AbstractAsymmetricCrypto.java#L310-L312 |
palaima/DebugDrawer | debugdrawer-timber/src/main/java/io/palaima/debugdrawer/timber/util/Intents.java | Intents.maybeStartActivity | public static boolean maybeStartActivity(Context context, Intent intent) {
"""
Attempt to launch the supplied {@link Intent}. Queries on-device packages before launching and
will display a simple message if none are available to handle it.
"""
if (hasHandler(context, intent)) {
context.sta... | java | public static boolean maybeStartActivity(Context context, Intent intent) {
if (hasHandler(context, intent)) {
context.startActivity(intent);
return true;
} else {
Toast.makeText(context, "There are no applications available to handle this action",
Toas... | [
"public",
"static",
"boolean",
"maybeStartActivity",
"(",
"Context",
"context",
",",
"Intent",
"intent",
")",
"{",
"if",
"(",
"hasHandler",
"(",
"context",
",",
"intent",
")",
")",
"{",
"context",
".",
"startActivity",
"(",
"intent",
")",
";",
"return",
"t... | Attempt to launch the supplied {@link Intent}. Queries on-device packages before launching and
will display a simple message if none are available to handle it. | [
"Attempt",
"to",
"launch",
"the",
"supplied",
"{"
] | train | https://github.com/palaima/DebugDrawer/blob/49b5992a1148757bd740c4a0b7df10ef70ade6d8/debugdrawer-timber/src/main/java/io/palaima/debugdrawer/timber/util/Intents.java#L15-L24 |
j256/ormlite-android | src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java | OrmLiteConfigUtil.writeConfigFile | public static void writeConfigFile(File configFile, boolean sortClasses) throws SQLException, IOException {
"""
Finds the annotated classes in the current directory or below and writes a configuration file.
@param sortClasses
Set to true to sort the classes by name before the file is generated.
"""
write... | java | public static void writeConfigFile(File configFile, boolean sortClasses) throws SQLException, IOException {
writeConfigFile(configFile, new File("."), sortClasses);
} | [
"public",
"static",
"void",
"writeConfigFile",
"(",
"File",
"configFile",
",",
"boolean",
"sortClasses",
")",
"throws",
"SQLException",
",",
"IOException",
"{",
"writeConfigFile",
"(",
"configFile",
",",
"new",
"File",
"(",
"\".\"",
")",
",",
"sortClasses",
")",... | Finds the annotated classes in the current directory or below and writes a configuration file.
@param sortClasses
Set to true to sort the classes by name before the file is generated. | [
"Finds",
"the",
"annotated",
"classes",
"in",
"the",
"current",
"directory",
"or",
"below",
"and",
"writes",
"a",
"configuration",
"file",
"."
] | train | https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java#L159-L161 |
apache/incubator-shardingsphere | sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/parser/SQLParserFactory.java | SQLParserFactory.newInstance | public static SQLParser newInstance(final DatabaseType databaseType, final String sql) {
"""
New instance of SQL parser.
@param databaseType database type
@param sql SQL
@return SQL parser
"""
for (ShardingParseEngine each : NewInstanceServiceLoader.newServiceInstances(ShardingParseEngine.class)) ... | java | public static SQLParser newInstance(final DatabaseType databaseType, final String sql) {
for (ShardingParseEngine each : NewInstanceServiceLoader.newServiceInstances(ShardingParseEngine.class)) {
if (DatabaseType.valueOf(each.getDatabaseType()) == databaseType) {
return each.createSQ... | [
"public",
"static",
"SQLParser",
"newInstance",
"(",
"final",
"DatabaseType",
"databaseType",
",",
"final",
"String",
"sql",
")",
"{",
"for",
"(",
"ShardingParseEngine",
"each",
":",
"NewInstanceServiceLoader",
".",
"newServiceInstances",
"(",
"ShardingParseEngine",
"... | New instance of SQL parser.
@param databaseType database type
@param sql SQL
@return SQL parser | [
"New",
"instance",
"of",
"SQL",
"parser",
"."
] | train | https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/parser/SQLParserFactory.java#L47-L54 |
couchbase/couchbase-jvm-core | src/main/java/com/couchbase/client/core/env/DefaultCoreEnvironment.java | DefaultCoreEnvironment.wrapBestEffortShutdown | private Observable<ShutdownStatus> wrapBestEffortShutdown(Observable<Boolean> source, final String target) {
"""
This method wraps an Observable of Boolean (for shutdown hook) into an Observable of ShutdownStatus.
It will log each status with a short message indicating which target has been shut down, and the res... | java | private Observable<ShutdownStatus> wrapBestEffortShutdown(Observable<Boolean> source, final String target) {
return wrapShutdown(source, target)
.map(new Func1<ShutdownStatus, ShutdownStatus>() {
@Override
public ShutdownStatus call(ShutdownStatus original... | [
"private",
"Observable",
"<",
"ShutdownStatus",
">",
"wrapBestEffortShutdown",
"(",
"Observable",
"<",
"Boolean",
">",
"source",
",",
"final",
"String",
"target",
")",
"{",
"return",
"wrapShutdown",
"(",
"source",
",",
"target",
")",
".",
"map",
"(",
"new",
... | This method wraps an Observable of Boolean (for shutdown hook) into an Observable of ShutdownStatus.
It will log each status with a short message indicating which target has been shut down, and the result of
the call.
Additionally it will ignore signals that shutdown status is false (as long as no exception is detected... | [
"This",
"method",
"wraps",
"an",
"Observable",
"of",
"Boolean",
"(",
"for",
"shutdown",
"hook",
")",
"into",
"an",
"Observable",
"of",
"ShutdownStatus",
".",
"It",
"will",
"log",
"each",
"status",
"with",
"a",
"short",
"message",
"indicating",
"which",
"targ... | train | https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/env/DefaultCoreEnvironment.java#L699-L712 |
apptentive/apptentive-android | apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java | Util.setBackground | public static void setBackground(View v, Drawable d) {
"""
helper method to set the background depending on the android version
@param v
@param d
"""
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
v.setBackgroundDrawable(d);
} else {
v.setBackground(d);
}
} | java | public static void setBackground(View v, Drawable d) {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
v.setBackgroundDrawable(d);
} else {
v.setBackground(d);
}
} | [
"public",
"static",
"void",
"setBackground",
"(",
"View",
"v",
",",
"Drawable",
"d",
")",
"{",
"if",
"(",
"android",
".",
"os",
".",
"Build",
".",
"VERSION",
".",
"SDK_INT",
"<",
"android",
".",
"os",
".",
"Build",
".",
"VERSION_CODES",
".",
"JELLY_BEA... | helper method to set the background depending on the android version
@param v
@param d | [
"helper",
"method",
"to",
"set",
"the",
"background",
"depending",
"on",
"the",
"android",
"version"
] | train | https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L361-L367 |
protegeproject/jpaul | src/main/java/jpaul/DataStructs/NoCompTreeMap.java | NoCompTreeMap.put | public final V put(K key, V value) {
"""
Associates the specified value with the specified key in this map.
"""
BinTreeNode<K,V> prev = null;
BinTreeNode<K,V> node = root;
int key_hash_code = key.hashCode();
while(node != null) {
prev = node;
if(key_hash_code < node.keyHashCode) {
node = node.... | java | public final V put(K key, V value) {
BinTreeNode<K,V> prev = null;
BinTreeNode<K,V> node = root;
int key_hash_code = key.hashCode();
while(node != null) {
prev = node;
if(key_hash_code < node.keyHashCode) {
node = node.left;
}
else {
if((key_hash_code > node.keyHashCode) || !node.key.equals... | [
"public",
"final",
"V",
"put",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"BinTreeNode",
"<",
"K",
",",
"V",
">",
"prev",
"=",
"null",
";",
"BinTreeNode",
"<",
"K",
",",
"V",
">",
"node",
"=",
"root",
";",
"int",
"key_hash_code",
"=",
"key",
... | Associates the specified value with the specified key in this map. | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"this",
"map",
"."
] | train | https://github.com/protegeproject/jpaul/blob/db579ffb16faaa4b0c577ec82c246f7349427714/src/main/java/jpaul/DataStructs/NoCompTreeMap.java#L103-L145 |
pippo-java/pippo | pippo-core/src/main/java/ro/pippo/core/util/StringUtils.java | StringUtils.removeEnd | public static String removeEnd(String str, String remove) {
"""
<p>Removes a substring only if it is at the end of a source string,
otherwise returns the source string.</p>
<p/>
<p>A {@code null} source string will return {@code null}.
An empty ("") source string will return the empty string.
A {@code null} s... | java | public static String removeEnd(String str, String remove) {
if (isNullOrEmpty(str) || isNullOrEmpty(remove)) {
return str;
}
if (str.endsWith(remove)) {
return str.substring(0, str.length() - remove.length());
}
return str;
} | [
"public",
"static",
"String",
"removeEnd",
"(",
"String",
"str",
",",
"String",
"remove",
")",
"{",
"if",
"(",
"isNullOrEmpty",
"(",
"str",
")",
"||",
"isNullOrEmpty",
"(",
"remove",
")",
")",
"{",
"return",
"str",
";",
"}",
"if",
"(",
"str",
".",
"e... | <p>Removes a substring only if it is at the end of a source string,
otherwise returns the source string.</p>
<p/>
<p>A {@code null} source string will return {@code null}.
An empty ("") source string will return the empty string.
A {@code null} search string will return the source string.</p>
<p/>
<pre>
StringUtils.rem... | [
"<p",
">",
"Removes",
"a",
"substring",
"only",
"if",
"it",
"is",
"at",
"the",
"end",
"of",
"a",
"source",
"string",
"otherwise",
"returns",
"the",
"source",
"string",
".",
"<",
"/",
"p",
">",
"<p",
"/",
">",
"<p",
">",
"A",
"{",
"@code",
"null",
... | train | https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/util/StringUtils.java#L111-L121 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java | ThreadLocalRandom.doubles | public DoubleStream doubles(long streamSize) {
"""
Returns a stream producing the given {@code streamSize} number of
pseudorandom {@code double} values, each between zero
(inclusive) and one (exclusive).
@param streamSize the number of values to generate
@return a stream of {@code double} values
@throws Ill... | java | public DoubleStream doubles(long streamSize) {
if (streamSize < 0L)
throw new IllegalArgumentException(BAD_SIZE);
return StreamSupport.doubleStream
(new RandomDoublesSpliterator
(0L, streamSize, Double.MAX_VALUE, 0.0),
false);
} | [
"public",
"DoubleStream",
"doubles",
"(",
"long",
"streamSize",
")",
"{",
"if",
"(",
"streamSize",
"<",
"0L",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"BAD_SIZE",
")",
";",
"return",
"StreamSupport",
".",
"doubleStream",
"(",
"new",
"RandomDoublesSp... | Returns a stream producing the given {@code streamSize} number of
pseudorandom {@code double} values, each between zero
(inclusive) and one (exclusive).
@param streamSize the number of values to generate
@return a stream of {@code double} values
@throws IllegalArgumentException if {@code streamSize} is
less than zero
... | [
"Returns",
"a",
"stream",
"producing",
"the",
"given",
"{",
"@code",
"streamSize",
"}",
"number",
"of",
"pseudorandom",
"{",
"@code",
"double",
"}",
"values",
"each",
"between",
"zero",
"(",
"inclusive",
")",
"and",
"one",
"(",
"exclusive",
")",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java#L651-L658 |
Azure/azure-sdk-for-java | resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java | ResourcesInner.deleteAsync | public Observable<Void> deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) {
"""
Deletes a resource.
@param resourceGroupName The name of the resource group that contains the resource to delete. The name... | java | public Observable<Void> deleteAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) {
return deleteWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resource... | [
"public",
"Observable",
"<",
"Void",
">",
"deleteAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceProviderNamespace",
",",
"String",
"parentResourcePath",
",",
"String",
"resourceType",
",",
"String",
"resourceName",
",",
"String",
"apiVersion",
")"... | Deletes a resource.
@param resourceGroupName The name of the resource group that contains the resource to delete. The name is case insensitive.
@param resourceProviderNamespace The namespace of the resource provider.
@param parentResourcePath The parent resource identity.
@param resourceType The resource type.
@param ... | [
"Deletes",
"a",
"resource",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L1120-L1127 |
ironjacamar/ironjacamar | core/src/main/java/org/ironjacamar/core/workmanager/SecurityActions.java | SecurityActions.getDeclaredField | static Field getDeclaredField(final Class<?> c, final String name)
throws NoSuchFieldException {
"""
Get the declared field
@param c The class
@param name The name
@return The field
@exception NoSuchFieldException If a matching field is not found.
"""
if (System.getSecurityManager() == null)
... | java | static Field getDeclaredField(final Class<?> c, final String name)
throws NoSuchFieldException
{
if (System.getSecurityManager() == null)
return c.getDeclaredField(name);
Field result = AccessController.doPrivileged(new PrivilegedAction<Field>()
{
public Field run()
... | [
"static",
"Field",
"getDeclaredField",
"(",
"final",
"Class",
"<",
"?",
">",
"c",
",",
"final",
"String",
"name",
")",
"throws",
"NoSuchFieldException",
"{",
"if",
"(",
"System",
".",
"getSecurityManager",
"(",
")",
"==",
"null",
")",
"return",
"c",
".",
... | Get the declared field
@param c The class
@param name The name
@return The field
@exception NoSuchFieldException If a matching field is not found. | [
"Get",
"the",
"declared",
"field"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/SecurityActions.java#L140-L165 |
twitter/hraven | hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserBase.java | JobHistoryFileParserBase.getXmxValue | public static long getXmxValue(String javaChildOptsStr) {
"""
parses the -Xmx value from the mapred.child.java.opts
in the job conf usually appears as the
following in the job conf:
"mapred.child.java.opts" : "-Xmx3072M"
or
"mapred.child.java.opts" :" -Xmx1024m -verbose:gc -Xloggc:/tmp/@taskid@.gc
@return xm... | java | public static long getXmxValue(String javaChildOptsStr) {
long retVal = 0L;
String valueStr = extractXmxValueStr(javaChildOptsStr);
char lastChar = valueStr.charAt(valueStr.length() - 1);
try {
if (Character.isLetter(lastChar)) {
String xmxValStr = valueStr.substring(0, valueStr.length() -... | [
"public",
"static",
"long",
"getXmxValue",
"(",
"String",
"javaChildOptsStr",
")",
"{",
"long",
"retVal",
"=",
"0L",
";",
"String",
"valueStr",
"=",
"extractXmxValueStr",
"(",
"javaChildOptsStr",
")",
";",
"char",
"lastChar",
"=",
"valueStr",
".",
"charAt",
"(... | parses the -Xmx value from the mapred.child.java.opts
in the job conf usually appears as the
following in the job conf:
"mapred.child.java.opts" : "-Xmx3072M"
or
"mapred.child.java.opts" :" -Xmx1024m -verbose:gc -Xloggc:/tmp/@taskid@.gc
@return xmx value in MB | [
"parses",
"the",
"-",
"Xmx",
"value",
"from",
"the",
"mapred",
".",
"child",
".",
"java",
".",
"opts",
"in",
"the",
"job",
"conf",
"usually",
"appears",
"as",
"the",
"following",
"in",
"the",
"job",
"conf",
":",
"mapred",
".",
"child",
".",
"java",
"... | train | https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserBase.java#L108-L146 |
netplex/json-smart-v2 | json-smart/src/main/java/net/minidev/json/parser/JSONParserString.java | JSONParserString.parse | public Object parse(String in) throws ParseException {
"""
use to return Primitive Type, or String, Or JsonObject or JsonArray
generated by a ContainerFactory
"""
return parse(in, JSONValue.defaultReader.DEFAULT);
} | java | public Object parse(String in) throws ParseException {
return parse(in, JSONValue.defaultReader.DEFAULT);
} | [
"public",
"Object",
"parse",
"(",
"String",
"in",
")",
"throws",
"ParseException",
"{",
"return",
"parse",
"(",
"in",
",",
"JSONValue",
".",
"defaultReader",
".",
"DEFAULT",
")",
";",
"}"
] | use to return Primitive Type, or String, Or JsonObject or JsonArray
generated by a ContainerFactory | [
"use",
"to",
"return",
"Primitive",
"Type",
"or",
"String",
"Or",
"JsonObject",
"or",
"JsonArray",
"generated",
"by",
"a",
"ContainerFactory"
] | train | https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/parser/JSONParserString.java#L38-L40 |
boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/groups/GroupsInterface.java | GroupsInterface.joinRequest | public void joinRequest(String groupId, String message, boolean acceptRules) throws FlickrException {
"""
Request to join a group.
Note: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to
acceptRules) prior to making ... | java | public void joinRequest(String groupId, String message, boolean acceptRules) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_JOIN_REQUEST);
parameters.put("group_id", groupId);
parameters.put("message", message)... | [
"public",
"void",
"joinRequest",
"(",
"String",
"groupId",
",",
"String",
"message",
",",
"boolean",
"acceptRules",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Obj... | Request to join a group.
Note: if a group has rules, the client must display the rules to the user and the user must accept them (which is indicated by passing a true value to
acceptRules) prior to making the join request.
@param groupId
- groupId parameter
@param message
- (required) message to group administrator
@... | [
"Request",
"to",
"join",
"a",
"group",
"."
] | train | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/groups/GroupsInterface.java#L289-L300 |
deeplearning4j/deeplearning4j | nd4j/nd4j-common/src/main/java/org/nd4j/linalg/collection/MultiDimensionalMap.java | MultiDimensionalMap.putAll | public void putAll(Map<? extends Pair<K, T>, ? extends V> m) {
"""
Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling {@link Map<>#put(k, v)} on this map once
for each mapping from key <tt>k</tt> to value <tt>v</tt> in th... | java | public void putAll(Map<? extends Pair<K, T>, ? extends V> m) {
backedMap.putAll(m);
} | [
"public",
"void",
"putAll",
"(",
"Map",
"<",
"?",
"extends",
"Pair",
"<",
"K",
",",
"T",
">",
",",
"?",
"extends",
"V",
">",
"m",
")",
"{",
"backedMap",
".",
"putAll",
"(",
"m",
")",
";",
"}"
] | Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling {@link Map<>#put(k, v)} on this map once
for each mapping from key <tt>k</tt> to value <tt>v</tt> in the
specified map. The behavior of this operation is undefined if the
specif... | [
"Copies",
"all",
"of",
"the",
"mappings",
"from",
"the",
"specified",
"map",
"to",
"this",
"map",
"(",
"optional",
"operation",
")",
".",
"The",
"effect",
"of",
"this",
"call",
"is",
"equivalent",
"to",
"that",
"of",
"calling",
"{",
"@link",
"Map<",
">",... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/collection/MultiDimensionalMap.java#L262-L264 |
alkacon/opencms-core | src/org/opencms/search/solr/CmsSolrDocument.java | CmsSolrDocument.addMultiValuedField | public void addMultiValuedField(String fieldName, List<String> values) {
"""
Adds a multi-valued field.<p>
@param fieldName the field name to put the values in
@param values the values to put in the field
"""
if ((values != null) && (values.size() > 0)) {
for (String value : values) {
... | java | public void addMultiValuedField(String fieldName, List<String> values) {
if ((values != null) && (values.size() > 0)) {
for (String value : values) {
m_doc.addField(fieldName, value);
}
}
} | [
"public",
"void",
"addMultiValuedField",
"(",
"String",
"fieldName",
",",
"List",
"<",
"String",
">",
"values",
")",
"{",
"if",
"(",
"(",
"values",
"!=",
"null",
")",
"&&",
"(",
"values",
".",
"size",
"(",
")",
">",
"0",
")",
")",
"{",
"for",
"(",
... | Adds a multi-valued field.<p>
@param fieldName the field name to put the values in
@param values the values to put in the field | [
"Adds",
"a",
"multi",
"-",
"valued",
"field",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/CmsSolrDocument.java#L189-L196 |
sebastiangraf/treetank | interfacemodules/iscsi/src/main/java/org/treetank/iscsi/jscsi/HybridTreetankStorageModule.java | HybridTreetankStorageModule.createStorage | private void createStorage() throws TTException {
"""
Bootstrap a new device as a treetank storage using nodes to abstract the
device.
@throws IOException
is thrown if a node couldn't be created due to errors in the
backend.
"""
LOGGER.debug("Creating storage with " + mDataNumbers + " nodes co... | java | private void createStorage() throws TTException {
LOGGER.debug("Creating storage with " + mDataNumbers + " nodes containing " + BLOCKS_IN_DATA
+ " blocks with " + IStorageModule.VIRTUAL_BLOCK_SIZE + " bytes each.");
// Creating mirror
jCloudsStorageModule =
new J... | [
"private",
"void",
"createStorage",
"(",
")",
"throws",
"TTException",
"{",
"LOGGER",
".",
"debug",
"(",
"\"Creating storage with \"",
"+",
"mDataNumbers",
"+",
"\" nodes containing \"",
"+",
"BLOCKS_IN_DATA",
"+",
"\" blocks with \"",
"+",
"IStorageModule",
".",
"VIR... | Bootstrap a new device as a treetank storage using nodes to abstract the
device.
@throws IOException
is thrown if a node couldn't be created due to errors in the
backend. | [
"Bootstrap",
"a",
"new",
"device",
"as",
"a",
"treetank",
"storage",
"using",
"nodes",
"to",
"abstract",
"the",
"device",
"."
] | train | https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/iscsi/src/main/java/org/treetank/iscsi/jscsi/HybridTreetankStorageModule.java#L141-L164 |
landawn/AbacusUtil | src/com/landawn/abacus/util/Multimap.java | Multimap.replaceAllIf | public <X extends Exception> boolean replaceAllIf(Try.Predicate<? super K, X> predicate, Collection<?> oldValues, E newValue) throws X {
"""
Replace the specified value (all occurrences) from the value set associated with keys which satisfy the specified <code>predicate</code>.
@param predicate
@param oldValues
... | java | public <X extends Exception> boolean replaceAllIf(Try.Predicate<? super K, X> predicate, Collection<?> oldValues, E newValue) throws X {
boolean modified = false;
for (Map.Entry<K, V> entry : this.valueMap.entrySet()) {
if (predicate.test(entry.getKey())) {
if (entry.ge... | [
"public",
"<",
"X",
"extends",
"Exception",
">",
"boolean",
"replaceAllIf",
"(",
"Try",
".",
"Predicate",
"<",
"?",
"super",
"K",
",",
"X",
">",
"predicate",
",",
"Collection",
"<",
"?",
">",
"oldValues",
",",
"E",
"newValue",
")",
"throws",
"X",
"{",
... | Replace the specified value (all occurrences) from the value set associated with keys which satisfy the specified <code>predicate</code>.
@param predicate
@param oldValues
@param newValue
@return <code>true</code> if this Multimap is modified by this operation, otherwise <code>false</code>. | [
"Replace",
"the",
"specified",
"value",
"(",
"all",
"occurrences",
")",
"from",
"the",
"value",
"set",
"associated",
"with",
"keys",
"which",
"satisfy",
"the",
"specified",
"<code",
">",
"predicate<",
"/",
"code",
">",
".",
"@param",
"predicate",
"@param",
"... | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Multimap.java#L885-L898 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarOutputStream.java | JarOutputStream.get16 | private static int get16(byte[] b, int off) {
"""
/*
Fetches unsigned 16-bit value from byte array at specified offset.
The bytes are assumed to be in Intel (little-endian) byte order.
"""
return Byte.toUnsignedInt(b[off]) | ( Byte.toUnsignedInt(b[off+1]) << 8);
} | java | private static int get16(byte[] b, int off) {
return Byte.toUnsignedInt(b[off]) | ( Byte.toUnsignedInt(b[off+1]) << 8);
} | [
"private",
"static",
"int",
"get16",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"off",
")",
"{",
"return",
"Byte",
".",
"toUnsignedInt",
"(",
"b",
"[",
"off",
"]",
")",
"|",
"(",
"Byte",
".",
"toUnsignedInt",
"(",
"b",
"[",
"off",
"+",
"1",
"]",
"... | /*
Fetches unsigned 16-bit value from byte array at specified offset.
The bytes are assumed to be in Intel (little-endian) byte order. | [
"/",
"*",
"Fetches",
"unsigned",
"16",
"-",
"bit",
"value",
"from",
"byte",
"array",
"at",
"specified",
"offset",
".",
"The",
"bytes",
"are",
"assumed",
"to",
"be",
"in",
"Intel",
"(",
"little",
"-",
"endian",
")",
"byte",
"order",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarOutputStream.java#L137-L139 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_statistics_memory_GET | public ArrayList<OvhRtmMemory> serviceName_statistics_memory_GET(String serviceName) throws IOException {
"""
Get server memory informations
REST: GET /dedicated/server/{serviceName}/statistics/memory
@param serviceName [required] The internal name of your dedicated server
"""
String qPath = "/dedicated/... | java | public ArrayList<OvhRtmMemory> serviceName_statistics_memory_GET(String serviceName) throws IOException {
String qPath = "/dedicated/server/{serviceName}/statistics/memory";
StringBuilder sb = path(qPath, serviceName);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, t9);
} | [
"public",
"ArrayList",
"<",
"OvhRtmMemory",
">",
"serviceName_statistics_memory_GET",
"(",
"String",
"serviceName",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/server/{serviceName}/statistics/memory\"",
";",
"StringBuilder",
"sb",
"=",
"path",
... | Get server memory informations
REST: GET /dedicated/server/{serviceName}/statistics/memory
@param serviceName [required] The internal name of your dedicated server | [
"Get",
"server",
"memory",
"informations"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1304-L1309 |
Azure/azure-sdk-for-java | mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingEndpointsInner.java | StreamingEndpointsInner.scaleAsync | public Observable<Void> scaleAsync(String resourceGroupName, String accountName, String streamingEndpointName) {
"""
Scale StreamingEndpoint.
Scales an existing StreamingEndpoint.
@param resourceGroupName The name of the resource group within the Azure subscription.
@param accountName The Media Services accou... | java | public Observable<Void> scaleAsync(String resourceGroupName, String accountName, String streamingEndpointName) {
return scaleWithServiceResponseAsync(resourceGroupName, accountName, streamingEndpointName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceRe... | [
"public",
"Observable",
"<",
"Void",
">",
"scaleAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"accountName",
",",
"String",
"streamingEndpointName",
")",
"{",
"return",
"scaleWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"accountName",
",",
"s... | Scale StreamingEndpoint.
Scales an existing StreamingEndpoint.
@param resourceGroupName The name of the resource group within the Azure subscription.
@param accountName The Media Services account name.
@param streamingEndpointName The name of the StreamingEndpoint.
@throws IllegalArgumentException thrown if parameters... | [
"Scale",
"StreamingEndpoint",
".",
"Scales",
"an",
"existing",
"StreamingEndpoint",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingEndpointsInner.java#L1507-L1514 |
op4j/op4j | src/main/java/org/op4j/functions/FnFunc.java | FnFunc.ifNotNullAndTrueThen | public static final <T> Function<T,T> ifNotNullAndTrueThen(final Type<T> targetType, final IFunction<? super T, Boolean> condition, final IFunction<? super T,? extends T> thenFunction) {
"""
<p>
Builds a function that will execute the specified function <tt>thenFunction</tt>
only if the target object is not null... | java | public static final <T> Function<T,T> ifNotNullAndTrueThen(final Type<T> targetType, final IFunction<? super T, Boolean> condition, final IFunction<? super T,? extends T> thenFunction) {
return ifTrueThen(targetType, FnBoolean.and(FnObject.isNotNull(),condition), thenFunction);
} | [
"public",
"static",
"final",
"<",
"T",
">",
"Function",
"<",
"T",
",",
"T",
">",
"ifNotNullAndTrueThen",
"(",
"final",
"Type",
"<",
"T",
">",
"targetType",
",",
"final",
"IFunction",
"<",
"?",
"super",
"T",
",",
"Boolean",
">",
"condition",
",",
"final... | <p>
Builds a function that will execute the specified function <tt>thenFunction</tt>
only if the target object is not null and the result of executing <tt>condition</tt> on
it is true.
</p>
<p>
The built function cannot change the return type (receives <tt>T</tt> and returns <tt>T</tt>)
because the <tt>thenFunction</tt... | [
"<p",
">",
"Builds",
"a",
"function",
"that",
"will",
"execute",
"the",
"specified",
"function",
"<tt",
">",
"thenFunction<",
"/",
"tt",
">",
"only",
"if",
"the",
"target",
"object",
"is",
"not",
"null",
"and",
"the",
"result",
"of",
"executing",
"<tt",
... | train | https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnFunc.java#L371-L373 |
alipay/sofa-rpc | extension-impl/bootstrap-dubbo/src/main/java/com/alipay/sofa/rpc/bootstrap/dubbo/DubboProviderBootstrap.java | DubboProviderBootstrap.getKeyPairs | private String getKeyPairs(String key, Object value) {
"""
Gets key pairs.
@param key the key
@param value the value
@return the key pairs
"""
if (value != null) {
return "&" + key + "=" + value.toString();
} else {
return "";
}
} | java | private String getKeyPairs(String key, Object value) {
if (value != null) {
return "&" + key + "=" + value.toString();
} else {
return "";
}
} | [
"private",
"String",
"getKeyPairs",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"!=",
"null",
")",
"{",
"return",
"\"&\"",
"+",
"key",
"+",
"\"=\"",
"+",
"value",
".",
"toString",
"(",
")",
";",
"}",
"else",
"{",
"re... | Gets key pairs.
@param key the key
@param value the value
@return the key pairs | [
"Gets",
"key",
"pairs",
"."
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/bootstrap-dubbo/src/main/java/com/alipay/sofa/rpc/bootstrap/dubbo/DubboProviderBootstrap.java#L217-L223 |
Javacord/Javacord | javacord-core/src/main/java/org/javacord/core/util/ClassHelper.java | ClassHelper.getInterfacesAsStream | public static Stream<Class<?>> getInterfacesAsStream(Class<?> clazz) {
"""
Get a stream of all interfaces of the given class including extended interfaces and interfaces of all
superclasses.
If the given class is an interface, it will be included in the result, otherwise not.
@param clazz The class to get the... | java | public static Stream<Class<?>> getInterfacesAsStream(Class<?> clazz) {
return getSuperclassesAsStream(clazz, true)
.flatMap(superClass -> Stream.concat(
superClass.isInterface() ? Stream.of(superClass) : Stream.empty(),
Arrays.stream(superClass.get... | [
"public",
"static",
"Stream",
"<",
"Class",
"<",
"?",
">",
">",
"getInterfacesAsStream",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"return",
"getSuperclassesAsStream",
"(",
"clazz",
",",
"true",
")",
".",
"flatMap",
"(",
"superClass",
"->",
"Stream",... | Get a stream of all interfaces of the given class including extended interfaces and interfaces of all
superclasses.
If the given class is an interface, it will be included in the result, otherwise not.
@param clazz The class to get the interfaces for.
@return The stream of interfaces of the given class. | [
"Get",
"a",
"stream",
"of",
"all",
"interfaces",
"of",
"the",
"given",
"class",
"including",
"extended",
"interfaces",
"and",
"interfaces",
"of",
"all",
"superclasses",
".",
"If",
"the",
"given",
"class",
"is",
"an",
"interface",
"it",
"will",
"be",
"include... | train | https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/util/ClassHelper.java#L37-L43 |
Azure/azure-sdk-for-java | hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java | ExtensionsInner.getMonitoringStatus | public ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupName, String clusterName) {
"""
Gets the status of Operations Management Suite (OMS) on the HDInsight cluster.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@throws IllegalArgum... | java | public ClusterMonitoringResponseInner getMonitoringStatus(String resourceGroupName, String clusterName) {
return getMonitoringStatusWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body();
} | [
"public",
"ClusterMonitoringResponseInner",
"getMonitoringStatus",
"(",
"String",
"resourceGroupName",
",",
"String",
"clusterName",
")",
"{",
"return",
"getMonitoringStatusWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"clusterName",
")",
".",
"toBlocking",
"(",
... | Gets the status of Operations Management Suite (OMS) on the HDInsight cluster.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected ... | [
"Gets",
"the",
"status",
"of",
"Operations",
"Management",
"Suite",
"(",
"OMS",
")",
"on",
"the",
"HDInsight",
"cluster",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java#L281-L283 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java | CacheableWorkspaceDataManager.getCachedCleanItemData | protected ItemData getCachedCleanItemData(NodeData parentData, QPathEntry name, ItemType itemType)
throws RepositoryException {
"""
It is similar to {@link #getCachedItemData(NodeData, QPathEntry, ItemType)} except that if it is a property
it will check if it is complete or not, if not it will remove the en... | java | protected ItemData getCachedCleanItemData(NodeData parentData, QPathEntry name, ItemType itemType)
throws RepositoryException
{
ItemData data = getCachedItemData(parentData, name, itemType);
if (data != null && !data.isNode() && !(data instanceof NullItemData) && forceLoad((PropertyData)data))
... | [
"protected",
"ItemData",
"getCachedCleanItemData",
"(",
"NodeData",
"parentData",
",",
"QPathEntry",
"name",
",",
"ItemType",
"itemType",
")",
"throws",
"RepositoryException",
"{",
"ItemData",
"data",
"=",
"getCachedItemData",
"(",
"parentData",
",",
"name",
",",
"i... | It is similar to {@link #getCachedItemData(NodeData, QPathEntry, ItemType)} except that if it is a property
it will check if it is complete or not, if not it will remove the entry from
the cache and returns null | [
"It",
"is",
"similar",
"to",
"{"
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java#L1295-L1306 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/script/Script.java | Script.getScriptSigWithSignature | public Script getScriptSigWithSignature(Script scriptSig, byte[] sigBytes, int index) {
"""
Returns a copy of the given scriptSig with the signature inserted in the given position.
"""
int sigsPrefixCount = 0;
int sigsSuffixCount = 0;
if (ScriptPattern.isP2SH(this)) {
sigsPr... | java | public Script getScriptSigWithSignature(Script scriptSig, byte[] sigBytes, int index) {
int sigsPrefixCount = 0;
int sigsSuffixCount = 0;
if (ScriptPattern.isP2SH(this)) {
sigsPrefixCount = 1; // OP_0 <sig>* <redeemScript>
sigsSuffixCount = 1;
} else if (ScriptPat... | [
"public",
"Script",
"getScriptSigWithSignature",
"(",
"Script",
"scriptSig",
",",
"byte",
"[",
"]",
"sigBytes",
",",
"int",
"index",
")",
"{",
"int",
"sigsPrefixCount",
"=",
"0",
";",
"int",
"sigsSuffixCount",
"=",
"0",
";",
"if",
"(",
"ScriptPattern",
".",
... | Returns a copy of the given scriptSig with the signature inserted in the given position. | [
"Returns",
"a",
"copy",
"of",
"the",
"given",
"scriptSig",
"with",
"the",
"signature",
"inserted",
"in",
"the",
"given",
"position",
"."
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/script/Script.java#L419-L431 |
alkacon/opencms-core | src/org/opencms/file/CmsObject.java | CmsObject.addRelationToResource | public void addRelationToResource(String resourceName, String targetPath, String type) throws CmsException {
"""
Adds a new relation to the given resource.<p>
@param resourceName the name of the source resource
@param targetPath the path of the target resource
@param type the type of the relation
@throws C... | java | public void addRelationToResource(String resourceName, String targetPath, String type) throws CmsException {
createRelation(resourceName, targetPath, type, false);
} | [
"public",
"void",
"addRelationToResource",
"(",
"String",
"resourceName",
",",
"String",
"targetPath",
",",
"String",
"type",
")",
"throws",
"CmsException",
"{",
"createRelation",
"(",
"resourceName",
",",
"targetPath",
",",
"type",
",",
"false",
")",
";",
"}"
] | Adds a new relation to the given resource.<p>
@param resourceName the name of the source resource
@param targetPath the path of the target resource
@param type the type of the relation
@throws CmsException if something goes wrong | [
"Adds",
"a",
"new",
"relation",
"to",
"the",
"given",
"resource",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L146-L149 |
Sciss/abc4j | abc/src/main/java/abc/ui/swing/ScoreTemplate.java | ScoreTemplate.setPosition | public void setPosition(byte[] fields, byte vert, byte horiz) {
"""
Sets the position of several fields
@param fields
array of {@link ScoreElements} constants
@param vert
one of {@link VerticalPosition} constants
@param horiz
one of {@link HorizontalPosition} constants
"""
for (byte field : fi... | java | public void setPosition(byte[] fields, byte vert, byte horiz) {
for (byte field : fields) {
setVisible(field, true);
Position p = new Position(vert, horiz);
byte[] p1f = getPosition(field);
Position p1 = p1f == null ? null : new Position(p1f[0], p1f[1]); /... | [
"public",
"void",
"setPosition",
"(",
"byte",
"[",
"]",
"fields",
",",
"byte",
"vert",
",",
"byte",
"horiz",
")",
"{",
"for",
"(",
"byte",
"field",
":",
"fields",
")",
"{",
"setVisible",
"(",
"field",
",",
"true",
")",
";",
"Position",
"p",
"=",
"n... | Sets the position of several fields
@param fields
array of {@link ScoreElements} constants
@param vert
one of {@link VerticalPosition} constants
@param horiz
one of {@link HorizontalPosition} constants | [
"Sets",
"the",
"position",
"of",
"several",
"fields"
] | train | https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/ScoreTemplate.java#L834-L856 |
trellis-ldp/trellis | core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java | HttpUtils.checkIfNoneMatch | public static void checkIfNoneMatch(final String method, final String ifNoneMatch, final EntityTag etag) {
"""
Check for a conditional operation.
@param method the HTTP method
@param ifNoneMatch the If-None-Match header
@param etag the resource etag
"""
if (ifNoneMatch == null) {
return;... | java | public static void checkIfNoneMatch(final String method, final String ifNoneMatch, final EntityTag etag) {
if (ifNoneMatch == null) {
return;
}
final Set<String> items = stream(ifNoneMatch.split(",")).map(String::trim).collect(toSet());
if (isGetOrHead(method)) {
... | [
"public",
"static",
"void",
"checkIfNoneMatch",
"(",
"final",
"String",
"method",
",",
"final",
"String",
"ifNoneMatch",
",",
"final",
"EntityTag",
"etag",
")",
"{",
"if",
"(",
"ifNoneMatch",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"Set",
"<",... | Check for a conditional operation.
@param method the HTTP method
@param ifNoneMatch the If-None-Match header
@param etag the resource etag | [
"Check",
"for",
"a",
"conditional",
"operation",
"."
] | train | https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/HttpUtils.java#L359-L375 |
Azure/azure-sdk-for-java | mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java | ODataAtomUnmarshaller.unmarshalEntry | @SuppressWarnings("rawtypes")
public <T extends ODataEntity> T unmarshalEntry(InputStream stream,
Class<T> contentType) throws JAXBException, ServiceException {
"""
Given a stream containing XML with an Atom entry element at the root,
unmarshal it into an instance of contentType
@param stream
... | java | @SuppressWarnings("rawtypes")
public <T extends ODataEntity> T unmarshalEntry(InputStream stream,
Class<T> contentType) throws JAXBException, ServiceException {
validateNotNull(stream, "stream");
validateNotNull(contentType, "contentType");
Class<?> marshallingContentType = getM... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"<",
"T",
"extends",
"ODataEntity",
">",
"T",
"unmarshalEntry",
"(",
"InputStream",
"stream",
",",
"Class",
"<",
"T",
">",
"contentType",
")",
"throws",
"JAXBException",
",",
"ServiceException",
"{",
... | Given a stream containing XML with an Atom entry element at the root,
unmarshal it into an instance of contentType
@param stream
- stream containing XML data
@param contentType
- type of object to return
@return An instance of contentType
@throws JAXBException
@throws ServiceException | [
"Given",
"a",
"stream",
"containing",
"XML",
"with",
"an",
"Atom",
"entry",
"element",
"at",
"the",
"root",
"unmarshal",
"it",
"into",
"an",
"instance",
"of",
"contentType"
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/implementation/ODataAtomUnmarshaller.java#L113-L123 |
ozimov/cirneco | hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/collect/IsIterableContainingInRelativeOrder.java | IsIterableContainingInRelativeOrder.containsInRelativeOrder | public static <T> Matcher<Iterable<? extends T>> containsInRelativeOrder(final Iterable<T> items) {
"""
Creates a matcher for {@linkplain Iterable}s that matches when a single pass over the examined
{@linkplain Iterable} yields a series of items, that contains items logically equal to the corresponding item in
t... | java | public static <T> Matcher<Iterable<? extends T>> containsInRelativeOrder(final Iterable<T> items) {
final Collection<Matcher<? super T>> matchers = new ArrayList<>();
for (final T item : items) {
matchers.add(equalTo(item));
}
return new IsIterableContainingInRelativeOrder<T... | [
"public",
"static",
"<",
"T",
">",
"Matcher",
"<",
"Iterable",
"<",
"?",
"extends",
"T",
">",
">",
"containsInRelativeOrder",
"(",
"final",
"Iterable",
"<",
"T",
">",
"items",
")",
"{",
"final",
"Collection",
"<",
"Matcher",
"<",
"?",
"super",
"T",
">"... | Creates a matcher for {@linkplain Iterable}s that matches when a single pass over the examined
{@linkplain Iterable} yields a series of items, that contains items logically equal to the corresponding item in
the specified items, in the same relative order For example:<br />
<p>
<p>
<p>
<pre>
//Arrange
Iterable<String> ... | [
"Creates",
"a",
"matcher",
"for",
"{",
"@linkplain",
"Iterable",
"}",
"s",
"that",
"matches",
"when",
"a",
"single",
"pass",
"over",
"the",
"examined",
"{",
"@linkplain",
"Iterable",
"}",
"yields",
"a",
"series",
"of",
"items",
"that",
"contains",
"items",
... | train | https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/collect/IsIterableContainingInRelativeOrder.java#L40-L47 |
camunda/camunda-bpm-platform | engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/converter/VariableListConverter.java | VariableListConverter.convertQueryParameterToType | @Override
public List<VariableQueryParameterDto> convertQueryParameterToType(String value) {
"""
Expects a query parameter of multiple variable expressions formatted as KEY_OPERATOR_VALUE, e.g. aVariable_eq_aValue.
Multiple values are expected to be comma-separated.
"""
String[] expressions = value.spli... | java | @Override
public List<VariableQueryParameterDto> convertQueryParameterToType(String value) {
String[] expressions = value.split(EXPRESSION_DELIMITER);
List<VariableQueryParameterDto> queryVariables = new ArrayList<VariableQueryParameterDto>();
for (String expression : expressions) {
String[] value... | [
"@",
"Override",
"public",
"List",
"<",
"VariableQueryParameterDto",
">",
"convertQueryParameterToType",
"(",
"String",
"value",
")",
"{",
"String",
"[",
"]",
"expressions",
"=",
"value",
".",
"split",
"(",
"EXPRESSION_DELIMITER",
")",
";",
"List",
"<",
"Variabl... | Expects a query parameter of multiple variable expressions formatted as KEY_OPERATOR_VALUE, e.g. aVariable_eq_aValue.
Multiple values are expected to be comma-separated. | [
"Expects",
"a",
"query",
"parameter",
"of",
"multiple",
"variable",
"expressions",
"formatted",
"as",
"KEY_OPERATOR_VALUE",
"e",
".",
"g",
".",
"aVariable_eq_aValue",
".",
"Multiple",
"values",
"are",
"expected",
"to",
"be",
"comma",
"-",
"separated",
"."
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/converter/VariableListConverter.java#L41-L62 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasActivationUtils.java | KerasActivationUtils.getIActivationFromConfig | public static IActivation getIActivationFromConfig(Map<String, Object> layerConfig, KerasLayerConfiguration conf)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException {
"""
Get activation function from Keras layer configuration.
@param layerConfig dictionary containing K... | java | public static IActivation getIActivationFromConfig(Map<String, Object> layerConfig, KerasLayerConfiguration conf)
throws InvalidKerasConfigurationException, UnsupportedKerasConfigurationException {
return getActivationFromConfig(layerConfig, conf).getActivationFunction();
} | [
"public",
"static",
"IActivation",
"getIActivationFromConfig",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"layerConfig",
",",
"KerasLayerConfiguration",
"conf",
")",
"throws",
"InvalidKerasConfigurationException",
",",
"UnsupportedKerasConfigurationException",
"{",
"ret... | Get activation function from Keras layer configuration.
@param layerConfig dictionary containing Keras layer configuration
@return DL4J activation function
@throws InvalidKerasConfigurationException Invalid Keras config
@throws UnsupportedKerasConfigurationException Unsupported Keras config | [
"Get",
"activation",
"function",
"from",
"Keras",
"layer",
"configuration",
"."
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasActivationUtils.java#L95-L98 |
Waikato/moa | moa/src/main/java/moa/gui/visualization/AbstractGraphPlot.java | AbstractGraphPlot.setGraph | protected void setGraph(MeasureCollection[] measures, MeasureCollection[] stds, Color[] colors) {
"""
Sets the graph by updating the measures and currently measure index.
This method should not be directly called, but may be used by subclasses
to save space.
@param measures measure information
@param stds stan... | java | protected void setGraph(MeasureCollection[] measures, MeasureCollection[] stds, Color[] colors) {
this.measures = measures;
this.measureStds = stds;
this.colors = colors;
repaint();
} | [
"protected",
"void",
"setGraph",
"(",
"MeasureCollection",
"[",
"]",
"measures",
",",
"MeasureCollection",
"[",
"]",
"stds",
",",
"Color",
"[",
"]",
"colors",
")",
"{",
"this",
".",
"measures",
"=",
"measures",
";",
"this",
".",
"measureStds",
"=",
"stds",... | Sets the graph by updating the measures and currently measure index.
This method should not be directly called, but may be used by subclasses
to save space.
@param measures measure information
@param stds standard deviation of the measures
@param colors color encoding for the plots | [
"Sets",
"the",
"graph",
"by",
"updating",
"the",
"measures",
"and",
"currently",
"measure",
"index",
".",
"This",
"method",
"should",
"not",
"be",
"directly",
"called",
"but",
"may",
"be",
"used",
"by",
"subclasses",
"to",
"save",
"space",
"."
] | train | https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/gui/visualization/AbstractGraphPlot.java#L94-L99 |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java | XMLUtil.getAttributeInt | @Pure
public static int getAttributeInt(Node document, boolean caseSensitive, String... path) {
"""
Replies the integer value that corresponds to the specified attribute's path.
<p>The path is an ordered list of tag's names and ended by the name of
the attribute.
@param document is the XML document to expl... | java | @Pure
public static int getAttributeInt(Node document, boolean caseSensitive, String... path) {
assert document != null : AssertMessages.notNullParameter(0);
return getAttributeIntWithDefault(document, caseSensitive, 0, path);
} | [
"@",
"Pure",
"public",
"static",
"int",
"getAttributeInt",
"(",
"Node",
"document",
",",
"boolean",
"caseSensitive",
",",
"String",
"...",
"path",
")",
"{",
"assert",
"document",
"!=",
"null",
":",
"AssertMessages",
".",
"notNullParameter",
"(",
"0",
")",
";... | Replies the integer value that corresponds to the specified attribute's path.
<p>The path is an ordered list of tag's names and ended by the name of
the attribute.
@param document is the XML document to explore.
@param caseSensitive indicates of the {@code path}'s components are case sensitive.
@param path is the lis... | [
"Replies",
"the",
"integer",
"value",
"that",
"corresponds",
"to",
"the",
"specified",
"attribute",
"s",
"path",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L811-L815 |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.serviceName_updateInvalidOrMissingRio_POST | public void serviceName_updateInvalidOrMissingRio_POST(String serviceName, Boolean relaunchWithoutPortability, String rio) throws IOException {
"""
Update RIO, or disable portability, for order in error because of missing or invalid RIO
REST: POST /xdsl/{serviceName}/updateInvalidOrMissingRio
@param rio [requi... | java | public void serviceName_updateInvalidOrMissingRio_POST(String serviceName, Boolean relaunchWithoutPortability, String rio) throws IOException {
String qPath = "/xdsl/{serviceName}/updateInvalidOrMissingRio";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Object>();
a... | [
"public",
"void",
"serviceName_updateInvalidOrMissingRio_POST",
"(",
"String",
"serviceName",
",",
"Boolean",
"relaunchWithoutPortability",
",",
"String",
"rio",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/{serviceName}/updateInvalidOrMissingRio\"",
";... | Update RIO, or disable portability, for order in error because of missing or invalid RIO
REST: POST /xdsl/{serviceName}/updateInvalidOrMissingRio
@param rio [required] RIO number for portability
@param relaunchWithoutPortability [required] Do not set RIO, and relaunch order without portability
@param serviceName [requ... | [
"Update",
"RIO",
"or",
"disable",
"portability",
"for",
"order",
"in",
"error",
"because",
"of",
"missing",
"or",
"invalid",
"RIO"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L644-L651 |
jenkinsci/multi-branch-project-plugin | src/main/java/com/github/mjdetullio/jenkins/plugins/multibranch/TemplateDrivenBranchProjectFactory.java | TemplateDrivenBranchProjectFactory.updateByXml | @SuppressWarnings("ThrowFromFinallyBlock")
private void updateByXml(final P project, Source source) throws IOException {
"""
This is a mirror of {@link hudson.model.AbstractItem#updateByXml(Source)} without the
{@link hudson.model.listeners.SaveableListener#fireOnChange(Saveable, XmlFile)} trigger.
@param ... | java | @SuppressWarnings("ThrowFromFinallyBlock")
private void updateByXml(final P project, Source source) throws IOException {
project.checkPermission(Item.CONFIGURE);
final String projectName = project.getName();
XmlFile configXmlFile = project.getConfigFile();
final AtomicFileWriter out ... | [
"@",
"SuppressWarnings",
"(",
"\"ThrowFromFinallyBlock\"",
")",
"private",
"void",
"updateByXml",
"(",
"final",
"P",
"project",
",",
"Source",
"source",
")",
"throws",
"IOException",
"{",
"project",
".",
"checkPermission",
"(",
"Item",
".",
"CONFIGURE",
")",
";"... | This is a mirror of {@link hudson.model.AbstractItem#updateByXml(Source)} without the
{@link hudson.model.listeners.SaveableListener#fireOnChange(Saveable, XmlFile)} trigger.
@param project project to update by XML
@param source source of XML
@throws IOException if error performing update | [
"This",
"is",
"a",
"mirror",
"of",
"{",
"@link",
"hudson",
".",
"model",
".",
"AbstractItem#updateByXml",
"(",
"Source",
")",
"}",
"without",
"the",
"{",
"@link",
"hudson",
".",
"model",
".",
"listeners",
".",
"SaveableListener#fireOnChange",
"(",
"Saveable",
... | train | https://github.com/jenkinsci/multi-branch-project-plugin/blob/a98828f6b5ea4e0f69a83f3d274fe05063caad52/src/main/java/com/github/mjdetullio/jenkins/plugins/multibranch/TemplateDrivenBranchProjectFactory.java#L169-L206 |
enasequence/sequencetools | src/main/java/uk/ac/ebi/embl/api/translation/CdsTranslator.java | CdsTranslator.checkLocations | private boolean checkLocations(long length, CompoundLocation<Location> locations) {
"""
Checks that the locations are within the sequence length
@param length
@param locations
@return
"""
for(Location location : locations.getLocations()){
if(location instanceof RemoteLocation)
con... | java | private boolean checkLocations(long length, CompoundLocation<Location> locations) {
for(Location location : locations.getLocations()){
if(location instanceof RemoteLocation)
continue;
if(location.getIntBeginPosition() == null ||
location.getIntBeginPosition() ... | [
"private",
"boolean",
"checkLocations",
"(",
"long",
"length",
",",
"CompoundLocation",
"<",
"Location",
">",
"locations",
")",
"{",
"for",
"(",
"Location",
"location",
":",
"locations",
".",
"getLocations",
"(",
")",
")",
"{",
"if",
"(",
"location",
"instan... | Checks that the locations are within the sequence length
@param length
@param locations
@return | [
"Checks",
"that",
"the",
"locations",
"are",
"within",
"the",
"sequence",
"length"
] | train | https://github.com/enasequence/sequencetools/blob/4127f5e1a17540239f5810136153fbd6737fa262/src/main/java/uk/ac/ebi/embl/api/translation/CdsTranslator.java#L248-L262 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyImpl_CustomFieldSerializer.java | OWLAnnotationPropertyImpl_CustomFieldSerializer.serializeInstance | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLAnnotationPropertyImpl instance) throws SerializationException {
"""
Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google.gwt... | java | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLAnnotationPropertyImpl instance) throws SerializationException {
serialize(streamWriter, instance);
} | [
"@",
"Override",
"public",
"void",
"serializeInstance",
"(",
"SerializationStreamWriter",
"streamWriter",
",",
"OWLAnnotationPropertyImpl",
"instance",
")",
"throws",
"SerializationException",
"{",
"serialize",
"(",
"streamWriter",
",",
"instance",
")",
";",
"}"
] | Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the
object's content to
@param instance the object instance to serialize
@throws com.google.gwt.user.client.rp... | [
"Serializes",
"the",
"content",
"of",
"the",
"object",
"into",
"the",
"{"
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyImpl_CustomFieldSerializer.java#L63-L66 |
openengsb/openengsb | components/util/src/main/java/org/openengsb/core/util/ModelUtils.java | ModelUtils.tryToSetValueThroughField | private static boolean tryToSetValueThroughField(OpenEngSBModelEntry entry, Object instance)
throws IllegalAccessException {
"""
Tries to set the value of an OpenEngSBModelEntry to its corresponding field of the model. Returns true if the
field can be set, returns false if not.
"""
try {
... | java | private static boolean tryToSetValueThroughField(OpenEngSBModelEntry entry, Object instance)
throws IllegalAccessException {
try {
Field field = instance.getClass().getDeclaredField(entry.getKey());
field.setAccessible(true);
field.set(instance, entry.getValue());
... | [
"private",
"static",
"boolean",
"tryToSetValueThroughField",
"(",
"OpenEngSBModelEntry",
"entry",
",",
"Object",
"instance",
")",
"throws",
"IllegalAccessException",
"{",
"try",
"{",
"Field",
"field",
"=",
"instance",
".",
"getClass",
"(",
")",
".",
"getDeclaredFiel... | Tries to set the value of an OpenEngSBModelEntry to its corresponding field of the model. Returns true if the
field can be set, returns false if not. | [
"Tries",
"to",
"set",
"the",
"value",
"of",
"an",
"OpenEngSBModelEntry",
"to",
"its",
"corresponding",
"field",
"of",
"the",
"model",
".",
"Returns",
"true",
"if",
"the",
"field",
"can",
"be",
"set",
"returns",
"false",
"if",
"not",
"."
] | train | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/ModelUtils.java#L75-L90 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/renderer/AnimatedRenderer.java | AnimatedRenderer.registerRenderable | public static void registerRenderable(IBlockAccess world, BlockPos pos, AnimatedModelComponent amc) {
"""
Registers the {@link AnimatedModelComponent} at the specified position if there isn't already one.
@param pos the pos
@param amc the amc
"""
IAnimatedRenderable r = animatedRenderables.get(pos);
if... | java | public static void registerRenderable(IBlockAccess world, BlockPos pos, AnimatedModelComponent amc)
{
IAnimatedRenderable r = animatedRenderables.get(pos);
if (r == null)
animatedRenderables.put(pos, amc.createRenderable(world, pos));
} | [
"public",
"static",
"void",
"registerRenderable",
"(",
"IBlockAccess",
"world",
",",
"BlockPos",
"pos",
",",
"AnimatedModelComponent",
"amc",
")",
"{",
"IAnimatedRenderable",
"r",
"=",
"animatedRenderables",
".",
"get",
"(",
"pos",
")",
";",
"if",
"(",
"r",
"=... | Registers the {@link AnimatedModelComponent} at the specified position if there isn't already one.
@param pos the pos
@param amc the amc | [
"Registers",
"the",
"{",
"@link",
"AnimatedModelComponent",
"}",
"at",
"the",
"specified",
"position",
"if",
"there",
"isn",
"t",
"already",
"one",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/AnimatedRenderer.java#L182-L187 |
Whiley/WhileyCompiler | src/main/java/wyc/io/WhileyFileParser.java | WhileyFileParser.parseLengthOfExpression | private Expr parseLengthOfExpression(EnclosingScope scope, boolean terminated) {
"""
Parse a length of expression, which is of the form:
<pre>
TermExpr::= ...
| '|' Expr '|'
</pre>
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and als... | java | private Expr parseLengthOfExpression(EnclosingScope scope, boolean terminated) {
int start = index;
match(VerticalBar);
// We have to parse an Append Expression here, which is the most general
// form of expression that can generate a collection of some kind. All
// expressions higher up (e.g. logical express... | [
"private",
"Expr",
"parseLengthOfExpression",
"(",
"EnclosingScope",
"scope",
",",
"boolean",
"terminated",
")",
"{",
"int",
"start",
"=",
"index",
";",
"match",
"(",
"VerticalBar",
")",
";",
"// We have to parse an Append Expression here, which is the most general",
"// ... | Parse a length of expression, which is of the form:
<pre>
TermExpr::= ...
| '|' Expr '|'
</pre>
@param scope
The enclosing scope for this statement, which determines the
set of visible (i.e. declared) variables and also the current
indentation level.
@param terminated
This indicates that the expression is known to b... | [
"Parse",
"a",
"length",
"of",
"expression",
"which",
"is",
"of",
"the",
"form",
":"
] | train | https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2886-L2898 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java | VirtualNetworkGatewaysInner.resetVpnClientSharedKey | public void resetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) {
"""
Resets the VPN client shared key of the virtual network gateway in the specified resource group.
@param resourceGroupName The name of the resource group.
@param virtualNetworkGatewayName The name of the virtua... | java | public void resetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) {
resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body();
} | [
"public",
"void",
"resetVpnClientSharedKey",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualNetworkGatewayName",
")",
"{",
"resetVpnClientSharedKeyWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"virtualNetworkGatewayName",
")",
".",
"toBlocking",
"(",
"... | Resets the VPN client shared key of the virtual network gateway in the specified resource group.
@param resourceGroupName The name of the resource group.
@param virtualNetworkGatewayName The name of the virtual network gateway.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudExce... | [
"Resets",
"the",
"VPN",
"client",
"shared",
"key",
"of",
"the",
"virtual",
"network",
"gateway",
"in",
"the",
"specified",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java#L1471-L1473 |
lucee/Lucee | core/src/main/java/lucee/runtime/net/http/ReqRspUtil.java | ReqRspUtil.encodeRedirectURLEL | public static String encodeRedirectURLEL(HttpServletResponse rsp, String url) {
"""
if encodings fails the given url is returned
@param rsp
@param url
@return
"""
try {
return rsp.encodeRedirectURL(url);
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return url;
}
} | java | public static String encodeRedirectURLEL(HttpServletResponse rsp, String url) {
try {
return rsp.encodeRedirectURL(url);
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return url;
}
} | [
"public",
"static",
"String",
"encodeRedirectURLEL",
"(",
"HttpServletResponse",
"rsp",
",",
"String",
"url",
")",
"{",
"try",
"{",
"return",
"rsp",
".",
"encodeRedirectURL",
"(",
"url",
")",
";",
"}",
"catch",
"(",
"Throwable",
"t",
")",
"{",
"ExceptionUtil... | if encodings fails the given url is returned
@param rsp
@param url
@return | [
"if",
"encodings",
"fails",
"the",
"given",
"url",
"is",
"returned"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/net/http/ReqRspUtil.java#L612-L620 |
hypercube1024/firefly | firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java | ScriptUtils.executeSqlScript | public static void executeSqlScript(Connection connection, EncodedResource resource) throws ScriptException {
"""
Execute the given SQL script using default settings for statement
separators, comment delimiters, and exception handling flags.
<p>
Statement separators and comments will be removed before executing... | java | public static void executeSqlScript(Connection connection, EncodedResource resource) throws ScriptException {
executeSqlScript(connection, resource, false, false, DEFAULT_COMMENT_PREFIX, DEFAULT_STATEMENT_SEPARATOR,
DEFAULT_BLOCK_COMMENT_START_DELIMITER, DEFAULT_BLOCK_COMMENT_END_DELIMITER);
... | [
"public",
"static",
"void",
"executeSqlScript",
"(",
"Connection",
"connection",
",",
"EncodedResource",
"resource",
")",
"throws",
"ScriptException",
"{",
"executeSqlScript",
"(",
"connection",
",",
"resource",
",",
"false",
",",
"false",
",",
"DEFAULT_COMMENT_PREFIX... | Execute the given SQL script using default settings for statement
separators, comment delimiters, and exception handling flags.
<p>
Statement separators and comments will be removed before executing
individual statements within the supplied script.
<p>
<strong>Warning</strong>: this method does <em>not</em> release the... | [
"Execute",
"the",
"given",
"SQL",
"script",
"using",
"default",
"settings",
"for",
"statement",
"separators",
"comment",
"delimiters",
"and",
"exception",
"handling",
"flags",
".",
"<p",
">",
"Statement",
"separators",
"and",
"comments",
"will",
"be",
"removed",
... | train | https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-db/src/main/java/com/firefly/db/init/ScriptUtils.java#L397-L400 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/message/ReusableMessageFactory.java | ReusableMessageFactory.newMessage | @Override
public Message newMessage(final String message, final Object... params) {
"""
Creates {@link ReusableParameterizedMessage} instances.
@param message The message pattern.
@param params The message parameters.
@return The Message.
@see MessageFactory#newMessage(String, Object...)
"""
... | java | @Override
public Message newMessage(final String message, final Object... params) {
return getParameterized().set(message, params);
} | [
"@",
"Override",
"public",
"Message",
"newMessage",
"(",
"final",
"String",
"message",
",",
"final",
"Object",
"...",
"params",
")",
"{",
"return",
"getParameterized",
"(",
")",
".",
"set",
"(",
"message",
",",
"params",
")",
";",
"}"
] | Creates {@link ReusableParameterizedMessage} instances.
@param message The message pattern.
@param params The message parameters.
@return The Message.
@see MessageFactory#newMessage(String, Object...) | [
"Creates",
"{",
"@link",
"ReusableParameterizedMessage",
"}",
"instances",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ReusableMessageFactory.java#L108-L111 |
mygreen/excel-cellformatter | src/main/java/com/github/mygreen/cellformatter/ObjectCellFormatter.java | ObjectCellFormatter.formatAsString | public String formatAsString(final ObjectCell<?> cell, final Locale locale) {
"""
ロケールを指定してセルの値を文字列として取得する
@param cell Javaの仮想的なオブジェクトを表現するセル。
@param locale locale フォーマットしたロケール。nullでも可能。
ロケールに依存する場合、指定したロケールにより自動的に切り替わります。
@return フォーマットした文字列。cellがnullの場合、空文字を返す。
"""
return format(cell, locale).ge... | java | public String formatAsString(final ObjectCell<?> cell, final Locale locale) {
return format(cell, locale).getText();
} | [
"public",
"String",
"formatAsString",
"(",
"final",
"ObjectCell",
"<",
"?",
">",
"cell",
",",
"final",
"Locale",
"locale",
")",
"{",
"return",
"format",
"(",
"cell",
",",
"locale",
")",
".",
"getText",
"(",
")",
";",
"}"
] | ロケールを指定してセルの値を文字列として取得する
@param cell Javaの仮想的なオブジェクトを表現するセル。
@param locale locale フォーマットしたロケール。nullでも可能。
ロケールに依存する場合、指定したロケールにより自動的に切り替わります。
@return フォーマットした文字列。cellがnullの場合、空文字を返す。 | [
"ロケールを指定してセルの値を文字列として取得する"
] | train | https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/ObjectCellFormatter.java#L224-L226 |
alkacon/opencms-core | src/org/opencms/db/generic/CmsSqlManager.java | CmsSqlManager.getPreparedStatementForSql | public PreparedStatement getPreparedStatementForSql(Connection con, String query) throws SQLException {
"""
Returns a PreparedStatement for a JDBC connection specified by the SQL query.<p>
@param con the JDBC connection
@param query the SQL query
@return PreparedStatement a new PreparedStatement containing th... | java | public PreparedStatement getPreparedStatementForSql(Connection con, String query) throws SQLException {
// unfortunately, this wrapper is essential, because some JDBC driver
// implementations don't accept the delegated objects of DBCP's connection pool.
return con.prepareStatement(query);
... | [
"public",
"PreparedStatement",
"getPreparedStatementForSql",
"(",
"Connection",
"con",
",",
"String",
"query",
")",
"throws",
"SQLException",
"{",
"// unfortunately, this wrapper is essential, because some JDBC driver",
"// implementations don't accept the delegated objects of DBCP's con... | Returns a PreparedStatement for a JDBC connection specified by the SQL query.<p>
@param con the JDBC connection
@param query the SQL query
@return PreparedStatement a new PreparedStatement containing the pre-compiled SQL statement
@throws SQLException if a database access error occurs | [
"Returns",
"a",
"PreparedStatement",
"for",
"a",
"JDBC",
"connection",
"specified",
"by",
"the",
"SQL",
"query",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsSqlManager.java#L286-L291 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java | FileUtil.convertCharset | public static File convertCharset(File file, Charset srcCharset, Charset destCharset) {
"""
转换文件编码<br>
此方法用于转换文件编码,读取的文件实际编码必须与指定的srcCharset编码一致,否则导致乱码
@param file 文件
@param srcCharset 原文件的编码,必须与文件内容的编码保持一致
@param destCharset 转码后的编码
@return 被转换编码的文件
@see CharsetUtil#convert(File, Charset, Charset)
@since ... | java | public static File convertCharset(File file, Charset srcCharset, Charset destCharset) {
return CharsetUtil.convert(file, srcCharset, destCharset);
} | [
"public",
"static",
"File",
"convertCharset",
"(",
"File",
"file",
",",
"Charset",
"srcCharset",
",",
"Charset",
"destCharset",
")",
"{",
"return",
"CharsetUtil",
".",
"convert",
"(",
"file",
",",
"srcCharset",
",",
"destCharset",
")",
";",
"}"
] | 转换文件编码<br>
此方法用于转换文件编码,读取的文件实际编码必须与指定的srcCharset编码一致,否则导致乱码
@param file 文件
@param srcCharset 原文件的编码,必须与文件内容的编码保持一致
@param destCharset 转码后的编码
@return 被转换编码的文件
@see CharsetUtil#convert(File, Charset, Charset)
@since 3.1.0 | [
"转换文件编码<br",
">",
"此方法用于转换文件编码,读取的文件实际编码必须与指定的srcCharset编码一致,否则导致乱码"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3229-L3231 |
googleads/googleads-java-lib | examples/admanager_axis/src/main/java/admanager/axis/v201808/baserateservice/GetAllBaseRates.java | GetAllBaseRates.runExample | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
"""
Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws ... | java | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
// Get the BaseRateService.
BaseRateServiceInterface baseRateService =
adManagerServices.get(session, BaseRateServiceInterface.class);
// Create a statement to select all base... | [
"public",
"static",
"void",
"runExample",
"(",
"AdManagerServices",
"adManagerServices",
",",
"AdManagerSession",
"session",
")",
"throws",
"RemoteException",
"{",
"// Get the BaseRateService.",
"BaseRateServiceInterface",
"baseRateService",
"=",
"adManagerServices",
".",
"ge... | Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws RemoteException if the API request failed due to other errors. | [
"Runs",
"the",
"example",
"."
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201808/baserateservice/GetAllBaseRates.java#L51-L85 |
skyscreamer/JSONassert | src/main/java/org/skyscreamer/jsonassert/JSONAssert.java | JSONAssert.assertNotEquals | public static void assertNotEquals(String expectedStr, String actualStr, JSONComparator comparator)
throws JSONException {
"""
Asserts that the json string provided does not match the expected string. If it is it throws an
{@link AssertionError}.
@param expectedStr Expected JSON string
@param act... | java | public static void assertNotEquals(String expectedStr, String actualStr, JSONComparator comparator)
throws JSONException {
assertNotEquals("", expectedStr, actualStr, comparator);
} | [
"public",
"static",
"void",
"assertNotEquals",
"(",
"String",
"expectedStr",
",",
"String",
"actualStr",
",",
"JSONComparator",
"comparator",
")",
"throws",
"JSONException",
"{",
"assertNotEquals",
"(",
"\"\"",
",",
"expectedStr",
",",
"actualStr",
",",
"comparator"... | Asserts that the json string provided does not match the expected string. If it is it throws an
{@link AssertionError}.
@param expectedStr Expected JSON string
@param actualStr String to compare
@param comparator Comparator
@throws JSONException JSON parsing error | [
"Asserts",
"that",
"the",
"json",
"string",
"provided",
"does",
"not",
"match",
"the",
"expected",
"string",
".",
"If",
"it",
"is",
"it",
"throws",
"an",
"{",
"@link",
"AssertionError",
"}",
"."
] | train | https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONAssert.java#L495-L498 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java | RouteFilterRulesInner.beginCreateOrUpdate | public RouteFilterRuleInner beginCreateOrUpdate(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) {
"""
Creates or updates a route in the specified route filter.
@param resourceGroupName The name of the resource group.
@param routeFilterName The ... | java | public RouteFilterRuleInner beginCreateOrUpdate(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).toBlocking().single().b... | [
"public",
"RouteFilterRuleInner",
"beginCreateOrUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"routeFilterName",
",",
"String",
"ruleName",
",",
"RouteFilterRuleInner",
"routeFilterRuleParameters",
")",
"{",
"return",
"beginCreateOrUpdateWithServiceResponseAsync",
... | Creates or updates a route in the specified route filter.
@param resourceGroupName The name of the resource group.
@param routeFilterName The name of the route filter.
@param ruleName The name of the route filter rule.
@param routeFilterRuleParameters Parameters supplied to the create or update route filter rule opera... | [
"Creates",
"or",
"updates",
"a",
"route",
"in",
"the",
"specified",
"route",
"filter",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java#L454-L456 |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/code/Symtab.java | Symtab.enterConstant | private VarSymbol enterConstant(String name, Type type) {
"""
Enter a constant into symbol table.
@param name The constant's name.
@param type The constant's type.
"""
VarSymbol c = new VarSymbol(
PUBLIC | STATIC | FINAL,
names.fromString(name),
type,
... | java | private VarSymbol enterConstant(String name, Type type) {
VarSymbol c = new VarSymbol(
PUBLIC | STATIC | FINAL,
names.fromString(name),
type,
predefClass);
c.setData(type.constValue());
predefClass.members().enter(c);
return c;
} | [
"private",
"VarSymbol",
"enterConstant",
"(",
"String",
"name",
",",
"Type",
"type",
")",
"{",
"VarSymbol",
"c",
"=",
"new",
"VarSymbol",
"(",
"PUBLIC",
"|",
"STATIC",
"|",
"FINAL",
",",
"names",
".",
"fromString",
"(",
"name",
")",
",",
"type",
",",
"... | Enter a constant into symbol table.
@param name The constant's name.
@param type The constant's type. | [
"Enter",
"a",
"constant",
"into",
"symbol",
"table",
"."
] | train | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Symtab.java#L233-L242 |
TheCoder4eu/BootsFaces-OSP | src/main/java/net/bootsfaces/component/carouselItem/CarouselItemRenderer.java | CarouselItemRenderer.encodeBegin | @Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
"""
This methods generates the HTML code of the current b:carouselItem.
<code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code>
to generate ... | java | @Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
CarouselItem carouselItem = (CarouselItem) component;
ResponseWriter rw = context.getResponseWriter();
// String clientId = carouselItem.getClientId();
... | [
"@",
"Override",
"public",
"void",
"encodeBegin",
"(",
"FacesContext",
"context",
",",
"UIComponent",
"component",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"component",
".",
"isRendered",
"(",
")",
")",
"{",
"return",
";",
"}",
"CarouselItem",
"car... | This methods generates the HTML code of the current b:carouselItem.
<code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code>
to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component... | [
"This",
"methods",
"generates",
"the",
"HTML",
"code",
"of",
"the",
"current",
"b",
":",
"carouselItem",
".",
"<code",
">",
"encodeBegin<",
"/",
"code",
">",
"generates",
"the",
"start",
"of",
"the",
"component",
".",
"After",
"the",
"the",
"JSF",
"framewo... | train | https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/carouselItem/CarouselItemRenderer.java#L62-L90 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java | TypeHandlerUtils.convertSqlXml | public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException {
"""
Transfers data from byte[] into sql.SQLXML
@param conn connection for which sql.SQLXML object would be created
@param value array of bytes
@return sql.SQLXML from array of bytes
@throws SQLException
"""
O... | java | public static Object convertSqlXml(Connection conn, byte[] value) throws SQLException {
Object result = createSQLXML(conn);
result = convertSqlXml(result, value);
return result;
} | [
"public",
"static",
"Object",
"convertSqlXml",
"(",
"Connection",
"conn",
",",
"byte",
"[",
"]",
"value",
")",
"throws",
"SQLException",
"{",
"Object",
"result",
"=",
"createSQLXML",
"(",
"conn",
")",
";",
"result",
"=",
"convertSqlXml",
"(",
"result",
",",
... | Transfers data from byte[] into sql.SQLXML
@param conn connection for which sql.SQLXML object would be created
@param value array of bytes
@return sql.SQLXML from array of bytes
@throws SQLException | [
"Transfers",
"data",
"from",
"byte",
"[]",
"into",
"sql",
".",
"SQLXML"
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L288-L294 |
mozilla/rhino | src/org/mozilla/javascript/ScriptRuntime.java | ScriptRuntime.escapeAttributeValue | public static String escapeAttributeValue(Object value, Context cx) {
"""
Escapes the reserved characters in a value of an attribute
@param value Unescaped text
@return The escaped text
"""
XMLLib xmlLib = currentXMLLib(cx);
return xmlLib.escapeAttributeValue(value);
} | java | public static String escapeAttributeValue(Object value, Context cx)
{
XMLLib xmlLib = currentXMLLib(cx);
return xmlLib.escapeAttributeValue(value);
} | [
"public",
"static",
"String",
"escapeAttributeValue",
"(",
"Object",
"value",
",",
"Context",
"cx",
")",
"{",
"XMLLib",
"xmlLib",
"=",
"currentXMLLib",
"(",
"cx",
")",
";",
"return",
"xmlLib",
".",
"escapeAttributeValue",
"(",
"value",
")",
";",
"}"
] | Escapes the reserved characters in a value of an attribute
@param value Unescaped text
@return The escaped text | [
"Escapes",
"the",
"reserved",
"characters",
"in",
"a",
"value",
"of",
"an",
"attribute"
] | train | https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L4429-L4433 |
korpling/ANNIS | annis-gui/src/main/java/annis/gui/ExampleQueriesPanel.java | ExampleQueriesPanel.setSelectedCorpusInBackground | public void setSelectedCorpusInBackground(final Set<String> selectedCorpora) {
"""
Sets the selected corpora and causes a reload
@param selectedCorpora Specifies the corpora example queries are fetched for.
If it is null, all available example queries are
fetched.
"""
loadingIndicator.setVisible(true);
... | java | public void setSelectedCorpusInBackground(final Set<String> selectedCorpora) {
loadingIndicator.setVisible(true);
table.setVisible(false);
Background.run(new ExampleFetcher(selectedCorpora, UI.getCurrent()));
} | [
"public",
"void",
"setSelectedCorpusInBackground",
"(",
"final",
"Set",
"<",
"String",
">",
"selectedCorpora",
")",
"{",
"loadingIndicator",
".",
"setVisible",
"(",
"true",
")",
";",
"table",
".",
"setVisible",
"(",
"false",
")",
";",
"Background",
".",
"run",... | Sets the selected corpora and causes a reload
@param selectedCorpora Specifies the corpora example queries are fetched for.
If it is null, all available example queries are
fetched. | [
"Sets",
"the",
"selected",
"corpora",
"and",
"causes",
"a",
"reload"
] | train | https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-gui/src/main/java/annis/gui/ExampleQueriesPanel.java#L249-L253 |
phax/ph-oton | ph-oton-core/src/main/java/com/helger/photon/core/servlet/AbstractObjectDeliveryHttpHandler.java | AbstractObjectDeliveryHttpHandler._initialFillSet | private static void _initialFillSet (@Nonnull final ICommonsOrderedSet <String> aSet,
@Nullable final String sItemList,
final boolean bUnify) {
"""
Helper function to convert the configuration string to a collection.
@param aSet
The ... | java | private static void _initialFillSet (@Nonnull final ICommonsOrderedSet <String> aSet,
@Nullable final String sItemList,
final boolean bUnify)
{
ValueEnforcer.notNull (aSet, "Set");
if (!aSet.isEmpty ())
throw new IllegalArgume... | [
"private",
"static",
"void",
"_initialFillSet",
"(",
"@",
"Nonnull",
"final",
"ICommonsOrderedSet",
"<",
"String",
">",
"aSet",
",",
"@",
"Nullable",
"final",
"String",
"sItemList",
",",
"final",
"boolean",
"bUnify",
")",
"{",
"ValueEnforcer",
".",
"notNull",
... | Helper function to convert the configuration string to a collection.
@param aSet
The set to be filled. May not be <code>null</code>.
@param sItemList
The string to be separated to a list. Each item is separated by a
",".
@param bUnify
To unify the found item by converting them all to lowercase. This
makes only sense f... | [
"Helper",
"function",
"to",
"convert",
"the",
"configuration",
"string",
"to",
"a",
"collection",
"."
] | train | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/servlet/AbstractObjectDeliveryHttpHandler.java#L122-L149 |
aws/aws-sdk-java | aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/model/AddTagsToStreamRequest.java | AddTagsToStreamRequest.withTags | public AddTagsToStreamRequest withTags(java.util.Map<String, String> tags) {
"""
<p>
A set of up to 10 key-value pairs to use to create the tags.
</p>
@param tags
A set of up to 10 key-value pairs to use to create the tags.
@return Returns a reference to this object so that method calls can be chained toget... | java | public AddTagsToStreamRequest withTags(java.util.Map<String, String> tags) {
setTags(tags);
return this;
} | [
"public",
"AddTagsToStreamRequest",
"withTags",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"setTags",
"(",
"tags",
")",
";",
"return",
"this",
";",
"}"
] | <p>
A set of up to 10 key-value pairs to use to create the tags.
</p>
@param tags
A set of up to 10 key-value pairs to use to create the tags.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"A",
"set",
"of",
"up",
"to",
"10",
"key",
"-",
"value",
"pairs",
"to",
"use",
"to",
"create",
"the",
"tags",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesis/src/main/java/com/amazonaws/services/kinesis/model/AddTagsToStreamRequest.java#L122-L125 |
sshtools/j2ssh-maverick | j2ssh-maverick/src/main/java/com/sshtools/net/ForwardingClient.java | ForwardingClient.getLocalForwardingTunnels | public ActiveTunnel[] getLocalForwardingTunnels(String addressToBind,
int portToBind) throws IOException {
"""
Get the active tunnels for a local forwarding listener.
@param addressToBind
@param portToBind
@return ActiveTunnel[]
@throws IOException
"""
return getLocalForwardingTunnels(generateKey(ad... | java | public ActiveTunnel[] getLocalForwardingTunnels(String addressToBind,
int portToBind) throws IOException {
return getLocalForwardingTunnels(generateKey(addressToBind, portToBind));
} | [
"public",
"ActiveTunnel",
"[",
"]",
"getLocalForwardingTunnels",
"(",
"String",
"addressToBind",
",",
"int",
"portToBind",
")",
"throws",
"IOException",
"{",
"return",
"getLocalForwardingTunnels",
"(",
"generateKey",
"(",
"addressToBind",
",",
"portToBind",
")",
")",
... | Get the active tunnels for a local forwarding listener.
@param addressToBind
@param portToBind
@return ActiveTunnel[]
@throws IOException | [
"Get",
"the",
"active",
"tunnels",
"for",
"a",
"local",
"forwarding",
"listener",
"."
] | train | https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/net/ForwardingClient.java#L489-L492 |
RobotiumTech/robotium | robotium-solo/src/main/java/com/robotium/solo/Waiter.java | Waiter.getFragment | private android.app.Fragment getFragment(String tag, int id) {
"""
Returns a Fragment with a given tag or id.
@param tag the tag of the Fragment or null if no tag
@param id the id of the Fragment
@return a SupportFragment with a given tag or id
"""
try{
if(tag == null)
return activityUtils.getCu... | java | private android.app.Fragment getFragment(String tag, int id){
try{
if(tag == null)
return activityUtils.getCurrentActivity().getFragmentManager().findFragmentById(id);
else
return activityUtils.getCurrentActivity().getFragmentManager().findFragmentByTag(tag);
}catch (Throwable ignored) {}
return n... | [
"private",
"android",
".",
"app",
".",
"Fragment",
"getFragment",
"(",
"String",
"tag",
",",
"int",
"id",
")",
"{",
"try",
"{",
"if",
"(",
"tag",
"==",
"null",
")",
"return",
"activityUtils",
".",
"getCurrentActivity",
"(",
")",
".",
"getFragmentManager",
... | Returns a Fragment with a given tag or id.
@param tag the tag of the Fragment or null if no tag
@param id the id of the Fragment
@return a SupportFragment with a given tag or id | [
"Returns",
"a",
"Fragment",
"with",
"a",
"given",
"tag",
"or",
"id",
"."
] | train | https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L837-L847 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.license_virtuozzo_serviceName_upgrade_GET | public ArrayList<String> license_virtuozzo_serviceName_upgrade_GET(String serviceName, OvhOrderableVirtuozzoContainerNumberEnum containerNumber) throws IOException {
"""
Get allowed durations for 'upgrade' option
REST: GET /order/license/virtuozzo/{serviceName}/upgrade
@param containerNumber [required] How muc... | java | public ArrayList<String> license_virtuozzo_serviceName_upgrade_GET(String serviceName, OvhOrderableVirtuozzoContainerNumberEnum containerNumber) throws IOException {
String qPath = "/order/license/virtuozzo/{serviceName}/upgrade";
StringBuilder sb = path(qPath, serviceName);
query(sb, "containerNumber", container... | [
"public",
"ArrayList",
"<",
"String",
">",
"license_virtuozzo_serviceName_upgrade_GET",
"(",
"String",
"serviceName",
",",
"OvhOrderableVirtuozzoContainerNumberEnum",
"containerNumber",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/license/virtuozzo/{serv... | Get allowed durations for 'upgrade' option
REST: GET /order/license/virtuozzo/{serviceName}/upgrade
@param containerNumber [required] How much container is this license able to manage ...
@param serviceName [required] The name of your Virtuozzo license | [
"Get",
"allowed",
"durations",
"for",
"upgrade",
"option"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1054-L1060 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.