repository_name stringlengths 7 54 | func_path_in_repository stringlengths 18 218 | func_name stringlengths 5 140 | whole_func_string stringlengths 79 3.99k | language stringclasses 1
value | func_code_string stringlengths 79 3.99k | func_code_tokens listlengths 20 624 | func_documentation_string stringlengths 61 1.96k | func_documentation_tokens listlengths 1 478 | split_name stringclasses 1
value | func_code_url stringlengths 107 339 |
|---|---|---|---|---|---|---|---|---|---|---|
geomajas/geomajas-project-client-gwt | plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/gfx/JsSnapService.java | JsSnapService.addNearestVertexSnappingRule | public void addNearestVertexSnappingRule(String snapLayer, double distance) {
SnapSourceProvider snapSourceProvider = new VectorLayerSourceProvider(editor.getMapWidget().getMapModel()
.getVectorLayer(snapLayer));
delegate.addSnappingRule(new SnappingRule(new NearestVertexSnapAlgorithm(), snapSourceProvider, dis... | java | public void addNearestVertexSnappingRule(String snapLayer, double distance) {
SnapSourceProvider snapSourceProvider = new VectorLayerSourceProvider(editor.getMapWidget().getMapModel()
.getVectorLayer(snapLayer));
delegate.addSnappingRule(new SnappingRule(new NearestVertexSnapAlgorithm(), snapSourceProvider, dis... | [
"public",
"void",
"addNearestVertexSnappingRule",
"(",
"String",
"snapLayer",
",",
"double",
"distance",
")",
"{",
"SnapSourceProvider",
"snapSourceProvider",
"=",
"new",
"VectorLayerSourceProvider",
"(",
"editor",
".",
"getMapWidget",
"(",
")",
".",
"getMapModel",
"(... | Add a new snapping rules to the list. Each new rule provides information on how snapping should occur.
The added rule will use algorithm {@link NearestVertexSnapAlgorithm}.
@param snapLayer
The layer id that will provide the target geometries where to snap.
@param distance
The maximum distance to bridge during snappin... | [
"Add",
"a",
"new",
"snapping",
"rules",
"to",
"the",
"list",
".",
"Each",
"new",
"rule",
"provides",
"information",
"on",
"how",
"snapping",
"should",
"occur",
".",
"The",
"added",
"rule",
"will",
"use",
"algorithm",
"{",
"@link",
"NearestVertexSnapAlgorithm",... | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/gfx/JsSnapService.java#L66-L70 |
Jasig/uPortal | uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/threading/QualityOfServiceBlockingQueue.java | QualityOfServiceBlockingQueue.waitForAdd | private boolean waitForAdd(long waitStart, long maxWait) throws InterruptedException {
while (this.size == 0) {
if (!waitOnCondition(this.notEmpty, maxWait, waitStart)) {
return false;
}
}
return true;
} | java | private boolean waitForAdd(long waitStart, long maxWait) throws InterruptedException {
while (this.size == 0) {
if (!waitOnCondition(this.notEmpty, maxWait, waitStart)) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"waitForAdd",
"(",
"long",
"waitStart",
",",
"long",
"maxWait",
")",
"throws",
"InterruptedException",
"{",
"while",
"(",
"this",
".",
"size",
"==",
"0",
")",
"{",
"if",
"(",
"!",
"waitOnCondition",
"(",
"this",
".",
"notEmpty",
",",
... | This MUST be called while {@link #writeLock} is locked by the current thread | [
"This",
"MUST",
"be",
"called",
"while",
"{"
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/threading/QualityOfServiceBlockingQueue.java#L688-L696 |
hibernate/hibernate-ogm | neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java | EmbeddedNeo4jEntityQueries.removeEntity | public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) {
Map<String, Object> params = params( columnValues );
executionEngine.execute( getRemoveEntityQuery(), params );
} | java | public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) {
Map<String, Object> params = params( columnValues );
executionEngine.execute( getRemoveEntityQuery(), params );
} | [
"public",
"void",
"removeEntity",
"(",
"GraphDatabaseService",
"executionEngine",
",",
"Object",
"[",
"]",
"columnValues",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"params",
"(",
"columnValues",
")",
";",
"executionEngine",
".",
"exec... | Remove the nodes representing the entity and the embedded elements attached to it.
@param executionEngine the {@link GraphDatabaseService} used to run the query
@param columnValues the values of the key identifying the entity to remove | [
"Remove",
"the",
"nodes",
"representing",
"the",
"entity",
"and",
"the",
"embedded",
"elements",
"attached",
"to",
"it",
"."
] | train | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java#L154-L157 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectAllValuesFromImpl_CustomFieldSerializer.java | OWLObjectAllValuesFromImpl_CustomFieldSerializer.serializeInstance | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectAllValuesFromImpl instance) throws SerializationException {
serialize(streamWriter, instance);
} | java | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectAllValuesFromImpl instance) throws SerializationException {
serialize(streamWriter, instance);
} | [
"@",
"Override",
"public",
"void",
"serializeInstance",
"(",
"SerializationStreamWriter",
"streamWriter",
",",
"OWLObjectAllValuesFromImpl",
"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.clie... | [
"Serializes",
"the",
"content",
"of",
"the",
"object",
"into",
"the",
"{",
"@link",
"com",
".",
"google",
".",
"gwt",
".",
"user",
".",
"client",
".",
"rpc",
".",
"SerializationStreamWriter",
"}",
"."
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectAllValuesFromImpl_CustomFieldSerializer.java#L73-L76 |
bazaarvoice/emodb | mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/BaseRecordReader.java | BaseRecordReader.setNextKeyValue | public boolean setNextKeyValue(Text key, Row value)
throws IOException {
if (!_rows.hasNext()) {
Closeables.close(this, true);
return false;
}
try {
Map<String, Object> content = _rows.next();
key.set(Coordinate.fromJson(content).toStr... | java | public boolean setNextKeyValue(Text key, Row value)
throws IOException {
if (!_rows.hasNext()) {
Closeables.close(this, true);
return false;
}
try {
Map<String, Object> content = _rows.next();
key.set(Coordinate.fromJson(content).toStr... | [
"public",
"boolean",
"setNextKeyValue",
"(",
"Text",
"key",
",",
"Row",
"value",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"_rows",
".",
"hasNext",
"(",
")",
")",
"{",
"Closeables",
".",
"close",
"(",
"this",
",",
"true",
")",
";",
"return",
... | Read the next row from the split, storing the coordinate in "key" and the content in "value". If there are no
more rows then false is returned and "key" and "value" are not modified.
@return true if a row was read, false if there were no more rows | [
"Read",
"the",
"next",
"row",
"from",
"the",
"split",
"storing",
"the",
"coordinate",
"in",
"key",
"and",
"the",
"content",
"in",
"value",
".",
"If",
"there",
"are",
"no",
"more",
"rows",
"then",
"false",
"is",
"returned",
"and",
"key",
"and",
"value",
... | train | https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/BaseRecordReader.java#L52-L71 |
motown-io/motown | samples/authentication/src/main/java/io/motown/sample/authentication/rest/TokenUtils.java | TokenUtils.validateToken | public static boolean validateToken(String authToken, UserDetails userDetails) {
String[] parts = authToken.split(TOKEN_SEPARATOR);
long expires = Long.parseLong(parts[1]);
String signature = parts[2];
return expires >= System.currentTimeMillis() && signature.equals(TokenUtils.computeSi... | java | public static boolean validateToken(String authToken, UserDetails userDetails) {
String[] parts = authToken.split(TOKEN_SEPARATOR);
long expires = Long.parseLong(parts[1]);
String signature = parts[2];
return expires >= System.currentTimeMillis() && signature.equals(TokenUtils.computeSi... | [
"public",
"static",
"boolean",
"validateToken",
"(",
"String",
"authToken",
",",
"UserDetails",
"userDetails",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"authToken",
".",
"split",
"(",
"TOKEN_SEPARATOR",
")",
";",
"long",
"expires",
"=",
"Long",
".",
"pars... | Validates the token signature against the user details and the current system time.
@param authToken authorization token.
@param userDetails user details.
@return true if token is not expired and is equal to computed signature on base of user details. | [
"Validates",
"the",
"token",
"signature",
"against",
"the",
"user",
"details",
"and",
"the",
"current",
"system",
"time",
"."
] | train | https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/samples/authentication/src/main/java/io/motown/sample/authentication/rest/TokenUtils.java#L101-L107 |
RestComm/sip-servlets | containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SIPWebContext.java | SIPWebContext.getSipContextAnchorDu | public static DeploymentUnit getSipContextAnchorDu(final DeploymentUnit du) {
// attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.)
DeploymentUnit parentDu = du.getParent();
if (parentDu == null) {
// this is a war only deployment... | java | public static DeploymentUnit getSipContextAnchorDu(final DeploymentUnit du) {
// attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.)
DeploymentUnit parentDu = du.getParent();
if (parentDu == null) {
// this is a war only deployment... | [
"public",
"static",
"DeploymentUnit",
"getSipContextAnchorDu",
"(",
"final",
"DeploymentUnit",
"du",
")",
"{",
"// attach context to top-level deploymentUnit so it can be used to get context resources (SipFactory, etc.)",
"DeploymentUnit",
"parentDu",
"=",
"du",
".",
"getParent",
"... | returns the anchor deployment unit that will have attached a SIPWebContext | [
"returns",
"the",
"anchor",
"deployment",
"unit",
"that",
"will",
"have",
"attached",
"a",
"SIPWebContext"
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/sip-servlets-as8-drop-in/jboss-as-restcomm/src/main/java/org/mobicents/as8/deployment/SIPWebContext.java#L592-L604 |
kobakei/Android-RateThisApp | ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java | RateThisApp.printStatus | private static void printStatus(final Context context) {
SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
log("*** RateThisApp Status ***");
log("Install Date: " + new Date(pref.getLong(KEY_INSTALL_DATE, 0)));
log("Launch Times: " + pref.getInt(KEY_... | java | private static void printStatus(final Context context) {
SharedPreferences pref = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
log("*** RateThisApp Status ***");
log("Install Date: " + new Date(pref.getLong(KEY_INSTALL_DATE, 0)));
log("Launch Times: " + pref.getInt(KEY_... | [
"private",
"static",
"void",
"printStatus",
"(",
"final",
"Context",
"context",
")",
"{",
"SharedPreferences",
"pref",
"=",
"context",
".",
"getSharedPreferences",
"(",
"PREF_NAME",
",",
"Context",
".",
"MODE_PRIVATE",
")",
";",
"log",
"(",
"\"*** RateThisApp Stat... | Print values in SharedPreferences (used for debug)
@param context | [
"Print",
"values",
"in",
"SharedPreferences",
"(",
"used",
"for",
"debug",
")"
] | train | https://github.com/kobakei/Android-RateThisApp/blob/c3d007c8c02beb6ff196745c2310c259737f5c81/ratethisapp/src/main/java/com/kobakei/ratethisapp/RateThisApp.java#L368-L374 |
atomix/atomix | protocols/log/src/main/java/io/atomix/protocols/log/DistributedLogProtocolBuilder.java | DistributedLogProtocolBuilder.withRetryDelay | public DistributedLogProtocolBuilder withRetryDelay(long retryDelay, TimeUnit timeUnit) {
return withRetryDelay(Duration.ofMillis(timeUnit.toMillis(retryDelay)));
} | java | public DistributedLogProtocolBuilder withRetryDelay(long retryDelay, TimeUnit timeUnit) {
return withRetryDelay(Duration.ofMillis(timeUnit.toMillis(retryDelay)));
} | [
"public",
"DistributedLogProtocolBuilder",
"withRetryDelay",
"(",
"long",
"retryDelay",
",",
"TimeUnit",
"timeUnit",
")",
"{",
"return",
"withRetryDelay",
"(",
"Duration",
".",
"ofMillis",
"(",
"timeUnit",
".",
"toMillis",
"(",
"retryDelay",
")",
")",
")",
";",
... | Sets the operation retry delay.
@param retryDelay the delay between operation retries
@param timeUnit the delay time unit
@return the proxy builder
@throws NullPointerException if the time unit is null | [
"Sets",
"the",
"operation",
"retry",
"delay",
"."
] | train | https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/log/src/main/java/io/atomix/protocols/log/DistributedLogProtocolBuilder.java#L109-L111 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/Predicates.java | Predicates.lessEqual | public static Predicate lessEqual(String attribute, Comparable value) {
return new GreaterLessPredicate(attribute, value, true, true);
} | java | public static Predicate lessEqual(String attribute, Comparable value) {
return new GreaterLessPredicate(attribute, value, true, true);
} | [
"public",
"static",
"Predicate",
"lessEqual",
"(",
"String",
"attribute",
",",
"Comparable",
"value",
")",
"{",
"return",
"new",
"GreaterLessPredicate",
"(",
"attribute",
",",
"value",
",",
"true",
",",
"true",
")",
";",
"}"
] | Creates a <b>less than or equal to</b> predicate that will pass items if the value stored under the given
item {@code attribute} is less than or equal to the given {@code value}.
<p>
See also <i>Special Attributes</i>, <i>Attribute Paths</i>, <i>Handling of {@code null}</i> and
<i>Implicit Type Conversion</i> sections ... | [
"Creates",
"a",
"<b",
">",
"less",
"than",
"or",
"equal",
"to<",
"/",
"b",
">",
"predicate",
"that",
"will",
"pass",
"items",
"if",
"the",
"value",
"stored",
"under",
"the",
"given",
"item",
"{",
"@code",
"attribute",
"}",
"is",
"less",
"than",
"or",
... | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/Predicates.java#L392-L394 |
lukas-krecan/lambda-param-name-extractor | src/main/java/net/javacrumbs/lambdaextractor/ParameterNameExtractor.java | ParameterNameExtractor.lambdaMethod | private static Method lambdaMethod(SerializedLambda serializedLambda) {
Class<?> containingClass = getClassForName(serializedLambda.getImplClass());
String implMethodName = serializedLambda.getImplMethodName();
return getMethod(containingClass, implMethodName);
} | java | private static Method lambdaMethod(SerializedLambda serializedLambda) {
Class<?> containingClass = getClassForName(serializedLambda.getImplClass());
String implMethodName = serializedLambda.getImplMethodName();
return getMethod(containingClass, implMethodName);
} | [
"private",
"static",
"Method",
"lambdaMethod",
"(",
"SerializedLambda",
"serializedLambda",
")",
"{",
"Class",
"<",
"?",
">",
"containingClass",
"=",
"getClassForName",
"(",
"serializedLambda",
".",
"getImplClass",
"(",
")",
")",
";",
"String",
"implMethodName",
"... | <ol>
<li>Serializes lambda to SerializedLambda</li>
<li>Finds containing class - class where the lambda method is implemented</li>
<li>Finds the method in the containing class</li>
</ol> | [
"<ol",
">",
"<li",
">",
"Serializes",
"lambda",
"to",
"SerializedLambda<",
"/",
"li",
">",
"<li",
">",
"Finds",
"containing",
"class",
"-",
"class",
"where",
"the",
"lambda",
"method",
"is",
"implemented<",
"/",
"li",
">",
"<li",
">",
"Finds",
"the",
"me... | train | https://github.com/lukas-krecan/lambda-param-name-extractor/blob/dec73479df14797771c8ec92819577f32a679362/src/main/java/net/javacrumbs/lambdaextractor/ParameterNameExtractor.java#L83-L87 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java | ApiOvhCloud.createProject_POST | public OvhNewProject createProject_POST(Long credit, String description, String voucher) throws IOException {
String qPath = "/cloud/createProject";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "credit", credit);
addBody(o, "description", description);
... | java | public OvhNewProject createProject_POST(Long credit, String description, String voucher) throws IOException {
String qPath = "/cloud/createProject";
StringBuilder sb = path(qPath);
HashMap<String, Object>o = new HashMap<String, Object>();
addBody(o, "credit", credit);
addBody(o, "description", description);
... | [
"public",
"OvhNewProject",
"createProject_POST",
"(",
"Long",
"credit",
",",
"String",
"description",
",",
"String",
"voucher",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/cloud/createProject\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qP... | Start a new cloud project
REST: POST /cloud/createProject
@param credit [required] Amount of cloud credit to purchase. Unit is base currency.
@param description [required] Project description
@param voucher [required] Voucher code | [
"Start",
"a",
"new",
"cloud",
"project"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2356-L2365 |
airlift/resolver | resolver/src/main/java/io/airlift/resolver/internal/Slf4jLoggerManager.java | Slf4jLoggerManager.getLoggerForComponent | public Logger getLoggerForComponent(String role, String hint)
{
return (null == hint
? getLoggerForComponent(role)
: new Slf4jLogger(loggerFactory.getLogger(role + '.' + hint)));
} | java | public Logger getLoggerForComponent(String role, String hint)
{
return (null == hint
? getLoggerForComponent(role)
: new Slf4jLogger(loggerFactory.getLogger(role + '.' + hint)));
} | [
"public",
"Logger",
"getLoggerForComponent",
"(",
"String",
"role",
",",
"String",
"hint",
")",
"{",
"return",
"(",
"null",
"==",
"hint",
"?",
"getLoggerForComponent",
"(",
"role",
")",
":",
"new",
"Slf4jLogger",
"(",
"loggerFactory",
".",
"getLogger",
"(",
... | The logger name for a component with a non-null hint is <code>role.hint</code>.
<b>Warning</b>: this does not conform to logger name as class name convention.
(and what about <code>null</code> and <code>default</code> hint equivalence?) | [
"The",
"logger",
"name",
"for",
"a",
"component",
"with",
"a",
"non",
"-",
"null",
"hint",
"is",
"<code",
">",
"role",
".",
"hint<",
"/",
"code",
">",
".",
"<b",
">",
"Warning<",
"/",
"b",
">",
":",
"this",
"does",
"not",
"conform",
"to",
"logger",... | train | https://github.com/airlift/resolver/blob/d34a9f3f9c5b0b94007a324d61771bf7eeb27592/resolver/src/main/java/io/airlift/resolver/internal/Slf4jLoggerManager.java#L53-L58 |
lessthanoptimal/ejml | main/ejml-core/src/org/ejml/data/DMatrixRMaj.java | DMatrixRMaj.get | @Override
public double get( int row , int col ) {
if( col < 0 || col >= numCols || row < 0 || row >= numRows ) {
throw new IllegalArgumentException("Specified element is out of bounds: "+row+" "+col);
}
return data[ row * numCols + col ];
} | java | @Override
public double get( int row , int col ) {
if( col < 0 || col >= numCols || row < 0 || row >= numRows ) {
throw new IllegalArgumentException("Specified element is out of bounds: "+row+" "+col);
}
return data[ row * numCols + col ];
} | [
"@",
"Override",
"public",
"double",
"get",
"(",
"int",
"row",
",",
"int",
"col",
")",
"{",
"if",
"(",
"col",
"<",
"0",
"||",
"col",
">=",
"numCols",
"||",
"row",
"<",
"0",
"||",
"row",
">=",
"numRows",
")",
"{",
"throw",
"new",
"IllegalArgumentExc... | Returns the value of the specified matrix element. Performs a bounds check to make sure
the requested element is part of the matrix.
@param row The row of the element.
@param col The column of the element.
@return The value of the element. | [
"Returns",
"the",
"value",
"of",
"the",
"specified",
"matrix",
"element",
".",
"Performs",
"a",
"bounds",
"check",
"to",
"make",
"sure",
"the",
"requested",
"element",
"is",
"part",
"of",
"the",
"matrix",
"."
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-core/src/org/ejml/data/DMatrixRMaj.java#L254-L261 |
bullhorn/sdk-rest | src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java | StandardBullhornData.handleGetFileContent | protected FileContent handleGetFileContent(Class<? extends FileEntity> type, Integer entityId, Integer fileId) {
Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForGetFile(BullhornEntityInfo.getTypesRestEntityName(type),
entityId, fileId);
String url = restUrlFa... | java | protected FileContent handleGetFileContent(Class<? extends FileEntity> type, Integer entityId, Integer fileId) {
Map<String, String> uriVariables = restUriVariablesFactory.getUriVariablesForGetFile(BullhornEntityInfo.getTypesRestEntityName(type),
entityId, fileId);
String url = restUrlFa... | [
"protected",
"FileContent",
"handleGetFileContent",
"(",
"Class",
"<",
"?",
"extends",
"FileEntity",
">",
"type",
",",
"Integer",
"entityId",
",",
"Integer",
"fileId",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"uriVariables",
"=",
"restUriVariablesFact... | Makes the api call to get the file content
@param type
@param entityId
@param fileId
@return | [
"Makes",
"the",
"api",
"call",
"to",
"get",
"the",
"file",
"content"
] | train | https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/StandardBullhornData.java#L1599-L1607 |
apache/flink | flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosArtifactServer.java | MesosArtifactServer.addFile | public synchronized URL addFile(File localFile, String remoteFile) throws IOException, MalformedURLException {
return addPath(new Path(localFile.toURI()), new Path(remoteFile));
} | java | public synchronized URL addFile(File localFile, String remoteFile) throws IOException, MalformedURLException {
return addPath(new Path(localFile.toURI()), new Path(remoteFile));
} | [
"public",
"synchronized",
"URL",
"addFile",
"(",
"File",
"localFile",
",",
"String",
"remoteFile",
")",
"throws",
"IOException",
",",
"MalformedURLException",
"{",
"return",
"addPath",
"(",
"new",
"Path",
"(",
"localFile",
".",
"toURI",
"(",
")",
")",
",",
"... | Adds a file to the artifact server.
@param localFile the local file to serve.
@param remoteFile the remote path with which to locate the file.
@return the fully-qualified remote path to the file.
@throws MalformedURLException if the remote path is invalid. | [
"Adds",
"a",
"file",
"to",
"the",
"artifact",
"server",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosArtifactServer.java#L198-L200 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java | SimpleDocTreeVisitor.visitIndex | @Override
public R visitIndex(IndexTree node, P p) {
return defaultAction(node, p);
} | java | @Override
public R visitIndex(IndexTree node, P p) {
return defaultAction(node, p);
} | [
"@",
"Override",
"public",
"R",
"visitIndex",
"(",
"IndexTree",
"node",
",",
"P",
"p",
")",
"{",
"return",
"defaultAction",
"(",
"node",
",",
"p",
")",
";",
"}"
] | {@inheritDoc} This implementation calls {@code defaultAction}.
@param node {@inheritDoc}
@param p {@inheritDoc}
@return the result of {@code defaultAction} | [
"{",
"@inheritDoc",
"}",
"This",
"implementation",
"calls",
"{",
"@code",
"defaultAction",
"}",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L237-L240 |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/sql/SqlBuilder.java | SqlBuilder.buildCondition | private String buildCondition(LogicalOperator logicalOperator, Condition... conditions) {
if (ArrayUtil.isEmpty(conditions)) {
return StrUtil.EMPTY;
}
if (null == logicalOperator) {
logicalOperator = LogicalOperator.AND;
}
final StringBuilder conditionStrBuilder = new StringBuilder();
boolea... | java | private String buildCondition(LogicalOperator logicalOperator, Condition... conditions) {
if (ArrayUtil.isEmpty(conditions)) {
return StrUtil.EMPTY;
}
if (null == logicalOperator) {
logicalOperator = LogicalOperator.AND;
}
final StringBuilder conditionStrBuilder = new StringBuilder();
boolea... | [
"private",
"String",
"buildCondition",
"(",
"LogicalOperator",
"logicalOperator",
",",
"Condition",
"...",
"conditions",
")",
"{",
"if",
"(",
"ArrayUtil",
".",
"isEmpty",
"(",
"conditions",
")",
")",
"{",
"return",
"StrUtil",
".",
"EMPTY",
";",
"}",
"if",
"(... | 构建组合条件<br>
例如:name = ? AND type IN (?, ?) AND other LIKE ?
@param logicalOperator 逻辑运算符
@param conditions 条件对象
@return 构建后的SQL语句条件部分 | [
"构建组合条件<br",
">",
"例如:name",
"=",
"?",
"AND",
"type",
"IN",
"(",
"?",
"?",
")",
"AND",
"other",
"LIKE",
"?"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlBuilder.java#L587-L611 |
aol/cyclops | cyclops/src/main/java/com/oath/cyclops/util/box/MutableLong.java | MutableLong.fromExternal | public static MutableLong fromExternal(final LongSupplier s, final LongConsumer c) {
return new MutableLong() {
@Override
public long getAsLong() {
return s.getAsLong();
}
@Override
public Long get() {
return getAsLong(... | java | public static MutableLong fromExternal(final LongSupplier s, final LongConsumer c) {
return new MutableLong() {
@Override
public long getAsLong() {
return s.getAsLong();
}
@Override
public Long get() {
return getAsLong(... | [
"public",
"static",
"MutableLong",
"fromExternal",
"(",
"final",
"LongSupplier",
"s",
",",
"final",
"LongConsumer",
"c",
")",
"{",
"return",
"new",
"MutableLong",
"(",
")",
"{",
"@",
"Override",
"public",
"long",
"getAsLong",
"(",
")",
"{",
"return",
"s",
... | Construct a MutableLong that gets and sets an external value using the provided Supplier and Consumer
e.g.
<pre>
{@code
MutableLong mutable = MutableLong.fromExternal(()->!this.value,val->!this.value);
}
</pre>
@param s Supplier of an external value
@param c Consumer that sets an external value
@return MutableLong t... | [
"Construct",
"a",
"MutableLong",
"that",
"gets",
"and",
"sets",
"an",
"external",
"value",
"using",
"the",
"provided",
"Supplier",
"and",
"Consumer"
] | train | https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/util/box/MutableLong.java#L81-L99 |
apache/flink | flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java | PropertiesUtil.getLong | public static long getLong(Properties config, String key, long defaultValue) {
String val = config.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Long.parseLong(val);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Value for configuration... | java | public static long getLong(Properties config, String key, long defaultValue) {
String val = config.getProperty(key);
if (val == null) {
return defaultValue;
} else {
try {
return Long.parseLong(val);
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("Value for configuration... | [
"public",
"static",
"long",
"getLong",
"(",
"Properties",
"config",
",",
"String",
"key",
",",
"long",
"defaultValue",
")",
"{",
"String",
"val",
"=",
"config",
".",
"getProperty",
"(",
"key",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"return... | Get long from properties.
This method throws an exception if the long is not valid.
@param config Properties
@param key key in Properties
@param defaultValue default value if value is not set
@return default or value of key | [
"Get",
"long",
"from",
"properties",
".",
"This",
"method",
"throws",
"an",
"exception",
"if",
"the",
"long",
"is",
"not",
"valid",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java#L61-L73 |
Impetus/Kundera | src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java | CassandraSchemaManager.onSetRepairChance | private void onSetRepairChance(CfDef cfDef, Properties cfProperties, StringBuilder builder)
{
String readRepairChance = cfProperties.getProperty(CassandraConstants.READ_REPAIR_CHANCE);
if (readRepairChance != null)
{
try
{
if (builder != null)
... | java | private void onSetRepairChance(CfDef cfDef, Properties cfProperties, StringBuilder builder)
{
String readRepairChance = cfProperties.getProperty(CassandraConstants.READ_REPAIR_CHANCE);
if (readRepairChance != null)
{
try
{
if (builder != null)
... | [
"private",
"void",
"onSetRepairChance",
"(",
"CfDef",
"cfDef",
",",
"Properties",
"cfProperties",
",",
"StringBuilder",
"builder",
")",
"{",
"String",
"readRepairChance",
"=",
"cfProperties",
".",
"getProperty",
"(",
"CassandraConstants",
".",
"READ_REPAIR_CHANCE",
")... | On set repair chance.
@param cfDef
the cf def
@param cfProperties
the cf properties
@param builder
the builder | [
"On",
"set",
"repair",
"chance",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2402-L2424 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_voicemail_serviceName_PUT | public void billingAccount_voicemail_serviceName_PUT(String billingAccount, String serviceName, OvhVoicemail body) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}";
StringBuilder sb = path(qPath, billingAccount, serviceName);
exec(qPath, "PUT", sb.toString(), body);
} | java | public void billingAccount_voicemail_serviceName_PUT(String billingAccount, String serviceName, OvhVoicemail body) throws IOException {
String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}";
StringBuilder sb = path(qPath, billingAccount, serviceName);
exec(qPath, "PUT", sb.toString(), body);
} | [
"public",
"void",
"billingAccount_voicemail_serviceName_PUT",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"OvhVoicemail",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/voicemail/{serviceName}\"",
";",... | Alter this object properties
REST: PUT /telephony/{billingAccount}/voicemail/{serviceName}
@param body [required] New object properties
@param billingAccount [required] The name of your billingAccount
@param serviceName [required] | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7767-L7771 |
mcxiaoke/Android-Next | core/src/main/java/com/mcxiaoke/next/utils/ReflectionUtils.java | ReflectionUtils.findMethod | public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
AssertUtils.notNull(clazz, "Class must not be null");
AssertUtils.notNull(name, "Method name must not be null");
Class<?> searchType = clazz;
while (searchType != null) {
Method[] methods =... | java | public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
AssertUtils.notNull(clazz, "Class must not be null");
AssertUtils.notNull(name, "Method name must not be null");
Class<?> searchType = clazz;
while (searchType != null) {
Method[] methods =... | [
"public",
"static",
"Method",
"findMethod",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"name",
",",
"Class",
"<",
"?",
">",
"...",
"paramTypes",
")",
"{",
"AssertUtils",
".",
"notNull",
"(",
"clazz",
",",
"\"Class must not be null\"",
")",
";",
... | Attempt to find a {@link Method} on the supplied class with the supplied name
and parameter types. Searches all superclasses up to {@code Object}.
<p>Returns {@code null} if no {@link Method} can be found.
@param clazz the class to introspect
@param name the name of the method
@param paramTypes the paramete... | [
"Attempt",
"to",
"find",
"a",
"{",
"@link",
"Method",
"}",
"on",
"the",
"supplied",
"class",
"with",
"the",
"supplied",
"name",
"and",
"parameter",
"types",
".",
"Searches",
"all",
"superclasses",
"up",
"to",
"{",
"@code",
"Object",
"}",
".",
"<p",
">",
... | train | https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/utils/ReflectionUtils.java#L182-L197 |
Carbonado/Carbonado | src/main/java/com/amazon/carbonado/raw/DataDecoder.java | DataDecoder.decodeFloat | public static float decodeFloat(byte[] src, int srcOffset)
throws CorruptEncodingException
{
int bits = decodeFloatBits(src, srcOffset);
bits ^= (bits < 0) ? 0x80000000 : 0xffffffff;
return Float.intBitsToFloat(bits);
} | java | public static float decodeFloat(byte[] src, int srcOffset)
throws CorruptEncodingException
{
int bits = decodeFloatBits(src, srcOffset);
bits ^= (bits < 0) ? 0x80000000 : 0xffffffff;
return Float.intBitsToFloat(bits);
} | [
"public",
"static",
"float",
"decodeFloat",
"(",
"byte",
"[",
"]",
"src",
",",
"int",
"srcOffset",
")",
"throws",
"CorruptEncodingException",
"{",
"int",
"bits",
"=",
"decodeFloatBits",
"(",
"src",
",",
"srcOffset",
")",
";",
"bits",
"^=",
"(",
"bits",
"<"... | Decodes a float from exactly 4 bytes.
@param src source of encoded bytes
@param srcOffset offset into source array
@return float value | [
"Decodes",
"a",
"float",
"from",
"exactly",
"4",
"bytes",
"."
] | train | https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/DataDecoder.java#L293-L299 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/string/StringHelper.java | StringHelper.getFromFirstExcl | @Nullable
public static String getFromFirstExcl (@Nullable final String sStr, @Nullable final String sSearch)
{
return _getFromFirst (sStr, sSearch, false);
} | java | @Nullable
public static String getFromFirstExcl (@Nullable final String sStr, @Nullable final String sSearch)
{
return _getFromFirst (sStr, sSearch, false);
} | [
"@",
"Nullable",
"public",
"static",
"String",
"getFromFirstExcl",
"(",
"@",
"Nullable",
"final",
"String",
"sStr",
",",
"@",
"Nullable",
"final",
"String",
"sSearch",
")",
"{",
"return",
"_getFromFirst",
"(",
"sStr",
",",
"sSearch",
",",
"false",
")",
";",
... | Get everything from the string from and excluding the passed string.
@param sStr
The source string. May be <code>null</code>.
@param sSearch
The string to search. May be <code>null</code>.
@return <code>null</code> if the passed string does not contain the search
string. If the search string is empty, the input string... | [
"Get",
"everything",
"from",
"the",
"string",
"from",
"and",
"excluding",
"the",
"passed",
"string",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4998-L5002 |
brianwhu/xillium | data/src/main/java/org/xillium/data/DataBinder.java | DataBinder.put | public <T extends DataObject> DataBinder put(T object, String... names) throws Exception {
Class<?> type = object.getClass();
Object value;
for (String name: names) {
Field field = Beans.getKnownField(type, name);
if (!Modifier.isStatic(field.getModifiers()) && !Modifier.... | java | public <T extends DataObject> DataBinder put(T object, String... names) throws Exception {
Class<?> type = object.getClass();
Object value;
for (String name: names) {
Field field = Beans.getKnownField(type, name);
if (!Modifier.isStatic(field.getModifiers()) && !Modifier.... | [
"public",
"<",
"T",
"extends",
"DataObject",
">",
"DataBinder",
"put",
"(",
"T",
"object",
",",
"String",
"...",
"names",
")",
"throws",
"Exception",
"{",
"Class",
"<",
"?",
">",
"type",
"=",
"object",
".",
"getClass",
"(",
")",
";",
"Object",
"value",... | Fills the data binder with a subset of non-static, non-transient fields of an Object, excluding null values.
@param names - the names of the fields in the subset | [
"Fills",
"the",
"data",
"binder",
"with",
"a",
"subset",
"of",
"non",
"-",
"static",
"non",
"-",
"transient",
"fields",
"of",
"an",
"Object",
"excluding",
"null",
"values",
"."
] | train | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/data/src/main/java/org/xillium/data/DataBinder.java#L191-L201 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java | JavacParser.reportSyntaxError | protected void reportSyntaxError(int pos, String key, Object... args) {
JCDiagnostic.DiagnosticPosition diag = new JCDiagnostic.SimpleDiagnosticPosition(pos);
reportSyntaxError(diag, key, args);
} | java | protected void reportSyntaxError(int pos, String key, Object... args) {
JCDiagnostic.DiagnosticPosition diag = new JCDiagnostic.SimpleDiagnosticPosition(pos);
reportSyntaxError(diag, key, args);
} | [
"protected",
"void",
"reportSyntaxError",
"(",
"int",
"pos",
",",
"String",
"key",
",",
"Object",
"...",
"args",
")",
"{",
"JCDiagnostic",
".",
"DiagnosticPosition",
"diag",
"=",
"new",
"JCDiagnostic",
".",
"SimpleDiagnosticPosition",
"(",
"pos",
")",
";",
"re... | Report a syntax using the given the position parameter and arguments,
unless one was already reported at the same position. | [
"Report",
"a",
"syntax",
"using",
"the",
"given",
"the",
"position",
"parameter",
"and",
"arguments",
"unless",
"one",
"was",
"already",
"reported",
"at",
"the",
"same",
"position",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java#L460-L463 |
alkacon/opencms-core | src/org/opencms/ui/apps/A_CmsAttributeAwareApp.java | A_CmsAttributeAwareApp.openSubView | @Override
public void openSubView(String state, boolean updateState) {
if (updateState) {
CmsAppWorkplaceUi.get().changeCurrentAppState(state);
}
Component comp = getComponentForState(state);
if (comp != null) {
updateMainComponent(comp);
} else {
... | java | @Override
public void openSubView(String state, boolean updateState) {
if (updateState) {
CmsAppWorkplaceUi.get().changeCurrentAppState(state);
}
Component comp = getComponentForState(state);
if (comp != null) {
updateMainComponent(comp);
} else {
... | [
"@",
"Override",
"public",
"void",
"openSubView",
"(",
"String",
"state",
",",
"boolean",
"updateState",
")",
"{",
"if",
"(",
"updateState",
")",
"{",
"CmsAppWorkplaceUi",
".",
"get",
"(",
")",
".",
"changeCurrentAppState",
"(",
"state",
")",
";",
"}",
"Co... | Opens the requested sub view.<p>
@param state the state
@param updateState <code>true</code> to update the state URL token | [
"Opens",
"the",
"requested",
"sub",
"view",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/A_CmsAttributeAwareApp.java#L65-L81 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/string/StringHelper.java | StringHelper.trimStart | @Nullable
@CheckReturnValue
public static String trimStart (@Nullable final String sSrc, @Nullable final String sLead)
{
return startsWith (sSrc, sLead) ? sSrc.substring (sLead.length (), sSrc.length ()) : sSrc;
} | java | @Nullable
@CheckReturnValue
public static String trimStart (@Nullable final String sSrc, @Nullable final String sLead)
{
return startsWith (sSrc, sLead) ? sSrc.substring (sLead.length (), sSrc.length ()) : sSrc;
} | [
"@",
"Nullable",
"@",
"CheckReturnValue",
"public",
"static",
"String",
"trimStart",
"(",
"@",
"Nullable",
"final",
"String",
"sSrc",
",",
"@",
"Nullable",
"final",
"String",
"sLead",
")",
"{",
"return",
"startsWith",
"(",
"sSrc",
",",
"sLead",
")",
"?",
"... | Trim the passed lead from the source value. If the source value does not
start with the passed lead, nothing happens.
@param sSrc
The input source string
@param sLead
The string to be trimmed of the beginning
@return The trimmed string, or the original input string, if the lead was not
found
@see #trimEnd(String, Stri... | [
"Trim",
"the",
"passed",
"lead",
"from",
"the",
"source",
"value",
".",
"If",
"the",
"source",
"value",
"does",
"not",
"start",
"with",
"the",
"passed",
"lead",
"nothing",
"happens",
"."
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L3284-L3289 |
VoltDB/voltdb | src/frontend/org/voltdb/planner/SubPlanAssembler.java | SubPlanAssembler.getScanAccessPlanForTable | private static AbstractScanPlanNode
getScanAccessPlanForTable(StmtTableScan tableScan, AccessPath path)
{
// build the scan node
SeqScanPlanNode scanNode = new SeqScanPlanNode(tableScan);
// build the predicate
scanNode.setPredicate(path.otherExprs);
return scanNode;
... | java | private static AbstractScanPlanNode
getScanAccessPlanForTable(StmtTableScan tableScan, AccessPath path)
{
// build the scan node
SeqScanPlanNode scanNode = new SeqScanPlanNode(tableScan);
// build the predicate
scanNode.setPredicate(path.otherExprs);
return scanNode;
... | [
"private",
"static",
"AbstractScanPlanNode",
"getScanAccessPlanForTable",
"(",
"StmtTableScan",
"tableScan",
",",
"AccessPath",
"path",
")",
"{",
"// build the scan node",
"SeqScanPlanNode",
"scanNode",
"=",
"new",
"SeqScanPlanNode",
"(",
"tableScan",
")",
";",
"// build ... | Get a sequential scan access plan for a table. For multi-site plans/tables,
scans at all partitions.
@param table The table to scan.
@param path The access path to access the data in the table (index/scan/etc).
@return A scan plan node | [
"Get",
"a",
"sequential",
"scan",
"access",
"plan",
"for",
"a",
"table",
".",
"For",
"multi",
"-",
"site",
"plans",
"/",
"tables",
"scans",
"at",
"all",
"partitions",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SubPlanAssembler.java#L2171-L2179 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnszone_binding.java | dnszone_binding.get | public static dnszone_binding get(nitro_service service, String zonename) throws Exception{
dnszone_binding obj = new dnszone_binding();
obj.set_zonename(zonename);
dnszone_binding response = (dnszone_binding) obj.get_resource(service);
return response;
} | java | public static dnszone_binding get(nitro_service service, String zonename) throws Exception{
dnszone_binding obj = new dnszone_binding();
obj.set_zonename(zonename);
dnszone_binding response = (dnszone_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"dnszone_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"zonename",
")",
"throws",
"Exception",
"{",
"dnszone_binding",
"obj",
"=",
"new",
"dnszone_binding",
"(",
")",
";",
"obj",
".",
"set_zonename",
"(",
"zonename",
")",
... | Use this API to fetch dnszone_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"dnszone_binding",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnszone_binding.java#L103-L108 |
FaritorKang/unmz-common-util | src/main/java/net/unmz/java/util/security/MD5Utils.java | MD5Utils.sign | public static String sign(String text, String key, String input_charset) {
text = text + key;
return DigestUtils.md5Hex(getContentBytes(text, input_charset));
} | java | public static String sign(String text, String key, String input_charset) {
text = text + key;
return DigestUtils.md5Hex(getContentBytes(text, input_charset));
} | [
"public",
"static",
"String",
"sign",
"(",
"String",
"text",
",",
"String",
"key",
",",
"String",
"input_charset",
")",
"{",
"text",
"=",
"text",
"+",
"key",
";",
"return",
"DigestUtils",
".",
"md5Hex",
"(",
"getContentBytes",
"(",
"text",
",",
"input_char... | 签名字符串
@param text 需要签名的字符串
@param key 密钥
@param input_charset 编码格式
@return 签名结果 | [
"签名字符串"
] | train | https://github.com/FaritorKang/unmz-common-util/blob/2912b8889b85ed910d536f85b24b6fa68035814a/src/main/java/net/unmz/java/util/security/MD5Utils.java#L135-L138 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/util/ReflectionHelper.java | ReflectionHelper.getAnnotation | public <A extends Annotation> A getAnnotation(Class<A> annotationClass, AnnotatedElement element) {
A annotation;
Map<AnnotatedElement, Annotation> cacheMap = cache.get(annotationClass);
if (cacheMap == null) {
cacheMap = new HashMap<AnnotatedElement, Annotation>();
cache... | java | public <A extends Annotation> A getAnnotation(Class<A> annotationClass, AnnotatedElement element) {
A annotation;
Map<AnnotatedElement, Annotation> cacheMap = cache.get(annotationClass);
if (cacheMap == null) {
cacheMap = new HashMap<AnnotatedElement, Annotation>();
cache... | [
"public",
"<",
"A",
"extends",
"Annotation",
">",
"A",
"getAnnotation",
"(",
"Class",
"<",
"A",
">",
"annotationClass",
",",
"AnnotatedElement",
"element",
")",
"{",
"A",
"annotation",
";",
"Map",
"<",
"AnnotatedElement",
",",
"Annotation",
">",
"cacheMap",
... | Finds the supplied annotation if present on the element, or on its parents.
The parents in this sense are the super types and interfaces if the element is a class.
Or, in case of a Method, the (overridden) method declaration by its super types or interfaces.
@param annotationClass class of annotation looked for.
@param... | [
"Finds",
"the",
"supplied",
"annotation",
"if",
"present",
"on",
"the",
"element",
"or",
"on",
"its",
"parents",
".",
"The",
"parents",
"in",
"this",
"sense",
"are",
"the",
"super",
"types",
"and",
"interfaces",
"if",
"the",
"element",
"is",
"a",
"class",
... | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/ReflectionHelper.java#L25-L43 |
michel-kraemer/citeproc-java | citeproc-java/src/main/java/de/undercouch/citeproc/BibliographyFileReader.java | BibliographyFileReader.readBibliographyFile | public ItemDataProvider readBibliographyFile(InputStream bibstream,
String filename) throws IOException {
BufferedInputStream bis;
if (bibstream instanceof BufferedInputStream) {
bis = (BufferedInputStream)bibstream;
} else {
bis = new BufferedInputStream(bibstream);
}
//determine file format
Fi... | java | public ItemDataProvider readBibliographyFile(InputStream bibstream,
String filename) throws IOException {
BufferedInputStream bis;
if (bibstream instanceof BufferedInputStream) {
bis = (BufferedInputStream)bibstream;
} else {
bis = new BufferedInputStream(bibstream);
}
//determine file format
Fi... | [
"public",
"ItemDataProvider",
"readBibliographyFile",
"(",
"InputStream",
"bibstream",
",",
"String",
"filename",
")",
"throws",
"IOException",
"{",
"BufferedInputStream",
"bis",
";",
"if",
"(",
"bibstream",
"instanceof",
"BufferedInputStream",
")",
"{",
"bis",
"=",
... | Reads all items from an input stream and returns a provider
serving these items. Note that you can supply an additional file
name to help the method to determine the exact bibliography file format.
If you don't know the file name you can pass null, but in this case the
method's result might try to read the input stream... | [
"Reads",
"all",
"items",
"from",
"an",
"input",
"stream",
"and",
"returns",
"a",
"provider",
"serving",
"these",
"items",
".",
"Note",
"that",
"you",
"can",
"supply",
"an",
"additional",
"file",
"name",
"to",
"help",
"the",
"method",
"to",
"determine",
"th... | train | https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/BibliographyFileReader.java#L130-L144 |
SUSE/salt-netapi-client | src/main/java/com/suse/salt/netapi/parser/XorTypeAdapterFactory.java | XorTypeAdapterFactory.xorAdapter | private <L, R> TypeAdapter<Xor<L, R>> xorAdapter(TypeAdapter<L> leftAdapter,
TypeAdapter<R> rightAdapter) {
return new TypeAdapter<Xor<L, R>>() {
@Override
public Xor<L, R> read(JsonReader in) throws IOException {
JsonElement json = TypeAdapters.JSON_ELEMENT.r... | java | private <L, R> TypeAdapter<Xor<L, R>> xorAdapter(TypeAdapter<L> leftAdapter,
TypeAdapter<R> rightAdapter) {
return new TypeAdapter<Xor<L, R>>() {
@Override
public Xor<L, R> read(JsonReader in) throws IOException {
JsonElement json = TypeAdapters.JSON_ELEMENT.r... | [
"private",
"<",
"L",
",",
"R",
">",
"TypeAdapter",
"<",
"Xor",
"<",
"L",
",",
"R",
">",
">",
"xorAdapter",
"(",
"TypeAdapter",
"<",
"L",
">",
"leftAdapter",
",",
"TypeAdapter",
"<",
"R",
">",
"rightAdapter",
")",
"{",
"return",
"new",
"TypeAdapter",
... | Creates a generic Xor adapter by combining two other adapters - one for each side of
the Xor type. It will first try to parse incoming JSON data as the right type and, if
that does not succeed, it will try again with the left type.
All exceptions besides the possible parsing Exception of the left type are not
caught.
... | [
"Creates",
"a",
"generic",
"Xor",
"adapter",
"by",
"combining",
"two",
"other",
"adapters",
"-",
"one",
"for",
"each",
"side",
"of",
"the",
"Xor",
"type",
".",
"It",
"will",
"first",
"try",
"to",
"parse",
"incoming",
"JSON",
"data",
"as",
"the",
"right",... | train | https://github.com/SUSE/salt-netapi-client/blob/a0bdf643c8e34fa4def4b915366594c1491fdad5/src/main/java/com/suse/salt/netapi/parser/XorTypeAdapterFactory.java#L70-L90 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java | AbstractTriangle3F.containsProjectionOf | @Pure
public boolean containsProjectionOf(double x, double y, double z) {
Point3f proj = (Point3f) getPlane().getProjection(x, y, z);
if (proj == null) {
return false;
}
return contains(proj);
} | java | @Pure
public boolean containsProjectionOf(double x, double y, double z) {
Point3f proj = (Point3f) getPlane().getProjection(x, y, z);
if (proj == null) {
return false;
}
return contains(proj);
} | [
"@",
"Pure",
"public",
"boolean",
"containsProjectionOf",
"(",
"double",
"x",
",",
"double",
"y",
",",
"double",
"z",
")",
"{",
"Point3f",
"proj",
"=",
"(",
"Point3f",
")",
"getPlane",
"(",
")",
".",
"getProjection",
"(",
"x",
",",
"y",
",",
"z",
")"... | Checks if the projection of a point on the triangle's plane is inside the triangle.
@param x
@param y
@param z
@return <code>true</code> if the projection of the point is in the triangle, otherwise <code>false</code>. | [
"Checks",
"if",
"the",
"projection",
"of",
"a",
"point",
"on",
"the",
"triangle",
"s",
"plane",
"is",
"inside",
"the",
"triangle",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AbstractTriangle3F.java#L2066-L2073 |
GenesysPureEngage/workspace-client-java | src/main/java/com/genesys/internal/workspace/api/WorkbinsApi.java | WorkbinsApi.unsubscribeToWorkbinNotifications | public ApiSuccessResponse unsubscribeToWorkbinNotifications(String workbinId, UnsubscribeToWorkbinNotificationsData unsubscribeToWorkbinNotificationsData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = unsubscribeToWorkbinNotificationsWithHttpInfo(workbinId, unsubscribeToWorkbinNotificationsData);... | java | public ApiSuccessResponse unsubscribeToWorkbinNotifications(String workbinId, UnsubscribeToWorkbinNotificationsData unsubscribeToWorkbinNotificationsData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = unsubscribeToWorkbinNotificationsWithHttpInfo(workbinId, unsubscribeToWorkbinNotificationsData);... | [
"public",
"ApiSuccessResponse",
"unsubscribeToWorkbinNotifications",
"(",
"String",
"workbinId",
",",
"UnsubscribeToWorkbinNotificationsData",
"unsubscribeToWorkbinNotificationsData",
")",
"throws",
"ApiException",
"{",
"ApiResponse",
"<",
"ApiSuccessResponse",
">",
"resp",
"=",
... | Unsubscribe to the notifications of changes of the content of a Workbin.
@param workbinId Id of the Workbin (required)
@param unsubscribeToWorkbinNotificationsData (required)
@return ApiSuccessResponse
@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body | [
"Unsubscribe",
"to",
"the",
"notifications",
"of",
"changes",
"of",
"the",
"content",
"of",
"a",
"Workbin",
"."
] | train | https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/WorkbinsApi.java#L1029-L1032 |
Samsung/GearVRf | GVRf/Extensions/MixedReality/src/main/java/org/gearvrf/mixedreality/arcore/ARCoreSession.java | ARCoreSession.onResolveCloudAnchor | synchronized protected void onResolveCloudAnchor(String anchorId, CloudAnchorCallback cb) {
Anchor newAnchor = mSession.resolveCloudAnchor(anchorId);
pendingAnchors.put(newAnchor, cb);
} | java | synchronized protected void onResolveCloudAnchor(String anchorId, CloudAnchorCallback cb) {
Anchor newAnchor = mSession.resolveCloudAnchor(anchorId);
pendingAnchors.put(newAnchor, cb);
} | [
"synchronized",
"protected",
"void",
"onResolveCloudAnchor",
"(",
"String",
"anchorId",
",",
"CloudAnchorCallback",
"cb",
")",
"{",
"Anchor",
"newAnchor",
"=",
"mSession",
".",
"resolveCloudAnchor",
"(",
"anchorId",
")",
";",
"pendingAnchors",
".",
"put",
"(",
"ne... | This method resolves an anchor. The {@link IAnchorEvents} will be invoked when the results are
available. | [
"This",
"method",
"resolves",
"an",
"anchor",
".",
"The",
"{"
] | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/MixedReality/src/main/java/org/gearvrf/mixedreality/arcore/ARCoreSession.java#L453-L456 |
Alluxio/alluxio | core/common/src/main/java/alluxio/AbstractClient.java | AbstractClient.retryRPC | protected synchronized <V> V retryRPC(RpcCallable<V> rpc, String rpcName)
throws AlluxioStatusException {
try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(rpcName)).time()) {
return retryRPCInternal(rpc, () -> {
MetricsSystem.counter(getQualifiedRetryMetricName(rpcName)).inc()... | java | protected synchronized <V> V retryRPC(RpcCallable<V> rpc, String rpcName)
throws AlluxioStatusException {
try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(rpcName)).time()) {
return retryRPCInternal(rpc, () -> {
MetricsSystem.counter(getQualifiedRetryMetricName(rpcName)).inc()... | [
"protected",
"synchronized",
"<",
"V",
">",
"V",
"retryRPC",
"(",
"RpcCallable",
"<",
"V",
">",
"rpc",
",",
"String",
"rpcName",
")",
"throws",
"AlluxioStatusException",
"{",
"try",
"(",
"Timer",
".",
"Context",
"ctx",
"=",
"MetricsSystem",
".",
"timer",
"... | Tries to execute an RPC defined as a {@link RpcCallable}. Metrics will be recorded based on
the provided rpc name.
If a {@link UnavailableException} occurs, a reconnection will be tried through
{@link #connect()} and the action will be re-executed.
@param rpc the RPC call to be executed
@param rpcName the human reada... | [
"Tries",
"to",
"execute",
"an",
"RPC",
"defined",
"as",
"a",
"{",
"@link",
"RpcCallable",
"}",
".",
"Metrics",
"will",
"be",
"recorded",
"based",
"on",
"the",
"provided",
"rpc",
"name",
"."
] | train | https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/AbstractClient.java#L349-L360 |
morimekta/providence | providence-core/src/main/java/net/morimekta/providence/util/BaseTypeRegistry.java | BaseTypeRegistry.finalTypename | protected String finalTypename(String typeName, String programContext) {
String qualifiedName = qualifiedTypenameInternal(typeName, programContext);
if (typedefs.containsKey(qualifiedName)) {
String resolved = typedefs.get(qualifiedName);
return finalTypename(resolved, programCo... | java | protected String finalTypename(String typeName, String programContext) {
String qualifiedName = qualifiedTypenameInternal(typeName, programContext);
if (typedefs.containsKey(qualifiedName)) {
String resolved = typedefs.get(qualifiedName);
return finalTypename(resolved, programCo... | [
"protected",
"String",
"finalTypename",
"(",
"String",
"typeName",
",",
"String",
"programContext",
")",
"{",
"String",
"qualifiedName",
"=",
"qualifiedTypenameInternal",
"(",
"typeName",
",",
"programContext",
")",
";",
"if",
"(",
"typedefs",
".",
"containsKey",
... | Get the final typename of the given identifier within the context.
@param typeName The identifier name.
@param programContext The program context.
@return The final typename. | [
"Get",
"the",
"final",
"typename",
"of",
"the",
"given",
"identifier",
"within",
"the",
"context",
"."
] | train | https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/providence-core/src/main/java/net/morimekta/providence/util/BaseTypeRegistry.java#L166-L175 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.getPortableArrayCellPosition | static int getPortableArrayCellPosition(BufferObjectDataInput in, int streamPosition, int cellIndex)
throws IOException {
return in.readInt(streamPosition + cellIndex * Bits.INT_SIZE_IN_BYTES);
} | java | static int getPortableArrayCellPosition(BufferObjectDataInput in, int streamPosition, int cellIndex)
throws IOException {
return in.readInt(streamPosition + cellIndex * Bits.INT_SIZE_IN_BYTES);
} | [
"static",
"int",
"getPortableArrayCellPosition",
"(",
"BufferObjectDataInput",
"in",
",",
"int",
"streamPosition",
",",
"int",
"cellIndex",
")",
"throws",
"IOException",
"{",
"return",
"in",
".",
"readInt",
"(",
"streamPosition",
"+",
"cellIndex",
"*",
"Bits",
"."... | Calculates and reads the position of the Portable object stored in a Portable array under the given index.
@param in data input stream
@param streamPosition streamPosition to begin the reading from
@param cellIndex index of the cell
@return the position of the given portable object in the stream
@thro... | [
"Calculates",
"and",
"reads",
"the",
"position",
"of",
"the",
"Portable",
"object",
"stored",
"in",
"a",
"Portable",
"array",
"under",
"the",
"given",
"index",
"."
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L65-L68 |
roboconf/roboconf-platform | core/roboconf-target-iaas-occi/src/main/java/net/roboconf/target/occi/internal/OcciVMUtils.java | OcciVMUtils.isVMRunning | public static boolean isVMRunning(String hostIpPort, String id)
throws TargetException {
boolean result = false;
String ip = OcciVMUtils.getVMIP(hostIpPort, id);
try {
InetAddress inet = InetAddress.getByName(ip);
result = inet.isReachable(5000);
} catch (Exception e) {
result = false;
final Logge... | java | public static boolean isVMRunning(String hostIpPort, String id)
throws TargetException {
boolean result = false;
String ip = OcciVMUtils.getVMIP(hostIpPort, id);
try {
InetAddress inet = InetAddress.getByName(ip);
result = inet.isReachable(5000);
} catch (Exception e) {
result = false;
final Logge... | [
"public",
"static",
"boolean",
"isVMRunning",
"(",
"String",
"hostIpPort",
",",
"String",
"id",
")",
"throws",
"TargetException",
"{",
"boolean",
"result",
"=",
"false",
";",
"String",
"ip",
"=",
"OcciVMUtils",
".",
"getVMIP",
"(",
"hostIpPort",
",",
"id",
"... | Checks if VM is running.
@param hostIpPort
@param id
@return
@throws TargetException | [
"Checks",
"if",
"VM",
"is",
"running",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-occi/src/main/java/net/roboconf/target/occi/internal/OcciVMUtils.java#L630-L645 |
synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java | JdbcCpoXaAdapter.persistObjects | @Override
public <T> long persistObjects(String name, Collection<T> coll) throws CpoException {
return getCurrentResource().persistObjects(name, coll);
} | java | @Override
public <T> long persistObjects(String name, Collection<T> coll) throws CpoException {
return getCurrentResource().persistObjects(name, coll);
} | [
"@",
"Override",
"public",
"<",
"T",
">",
"long",
"persistObjects",
"(",
"String",
"name",
",",
"Collection",
"<",
"T",
">",
"coll",
")",
"throws",
"CpoException",
"{",
"return",
"getCurrentResource",
"(",
")",
".",
"persistObjects",
"(",
"name",
",",
"col... | Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the
datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created
in the datasource. This method stores the object in the datasource. The objects in the co... | [
"Persists",
"a",
"collection",
"of",
"Objects",
"into",
"the",
"datasource",
".",
"The",
"CpoAdapter",
"will",
"check",
"to",
"see",
"if",
"this",
"object",
"exists",
"in",
"the",
"datasource",
".",
"If",
"it",
"exists",
"the",
"object",
"is",
"updated",
"... | train | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/jta/JdbcCpoXaAdapter.java#L1257-L1260 |
qiujuer/Genius-Android | caprice/graphics/src/main/java/net/qiujuer/genius/graphics/Blur.java | Blur.onStackBlurClip | public static Bitmap onStackBlurClip(Bitmap original, int radius, int parts) {
Bitmap bitmap = checkSource(original, radius);
if (parts < 2 || parts > 12) {
throw new RuntimeException("Blur bitmap parts must >= 2 and <=12.");
}
if (original.getHeight() / parts < radius + rad... | java | public static Bitmap onStackBlurClip(Bitmap original, int radius, int parts) {
Bitmap bitmap = checkSource(original, radius);
if (parts < 2 || parts > 12) {
throw new RuntimeException("Blur bitmap parts must >= 2 and <=12.");
}
if (original.getHeight() / parts < radius + rad... | [
"public",
"static",
"Bitmap",
"onStackBlurClip",
"(",
"Bitmap",
"original",
",",
"int",
"radius",
",",
"int",
"parts",
")",
"{",
"Bitmap",
"bitmap",
"=",
"checkSource",
"(",
"original",
",",
"radius",
")",
";",
"if",
"(",
"parts",
"<",
"2",
"||",
"parts"... | StackBlur By Jni Bitmap
in this we will cut the source bitmap to some parts.
We'll deal(blur) with it one by one. This will reduce the memory consumption.
@param original Original Image
@param radius Blur radius
@param parts Blur cut parts count
@return Image Bitmap | [
"StackBlur",
"By",
"Jni",
"Bitmap",
"in",
"this",
"we",
"will",
"cut",
"the",
"source",
"bitmap",
"to",
"some",
"parts",
".",
"We",
"ll",
"deal",
"(",
"blur",
")",
"with",
"it",
"one",
"by",
"one",
".",
"This",
"will",
"reduce",
"the",
"memory",
"con... | train | https://github.com/qiujuer/Genius-Android/blob/babefaf1321f5883a21cada582b6fa5104adc648/caprice/graphics/src/main/java/net/qiujuer/genius/graphics/Blur.java#L116-L130 |
Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.acceptSessionFromEntityPathAsync | public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) {
Utils.assertNonNull("namespaceEndpointURI", namespaceEndpointURI);
Utils.assertNonNull("entityPath", ... | java | public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(URI namespaceEndpointURI, String entityPath, String sessionId, ClientSettings clientSettings, ReceiveMode receiveMode) {
Utils.assertNonNull("namespaceEndpointURI", namespaceEndpointURI);
Utils.assertNonNull("entityPath", ... | [
"public",
"static",
"CompletableFuture",
"<",
"IMessageSession",
">",
"acceptSessionFromEntityPathAsync",
"(",
"URI",
"namespaceEndpointURI",
",",
"String",
"entityPath",
",",
"String",
"sessionId",
",",
"ClientSettings",
"clientSettings",
",",
"ReceiveMode",
"receiveMode",... | Asynchronously accepts a session from service bus using the client settings. Session Id can be null, if null, service will return the first available session.
@param namespaceEndpointURI endpoint uri of entity namespace
@param entityPath path of entity
@param sessionId session id, if null, service will return the first... | [
"Asynchronously",
"accepts",
"a",
"session",
"from",
"service",
"bus",
"using",
"the",
"client",
"settings",
".",
"Session",
"Id",
"can",
"be",
"null",
"if",
"null",
"service",
"will",
"return",
"the",
"first",
"available",
"session",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L710-L715 |
lessthanoptimal/ejml | main/ejml-simple/src/org/ejml/equation/Operation.java | Operation.extractSimpleExtents | private static boolean extractSimpleExtents(Variable var, Extents e, boolean row, int length) {
int lower;
int upper;
if( var.getType() == VariableType.INTEGER_SEQUENCE ) {
IntegerSequence sequence = ((VariableIntegerSequence)var).sequence;
if( sequence.getType() == Integ... | java | private static boolean extractSimpleExtents(Variable var, Extents e, boolean row, int length) {
int lower;
int upper;
if( var.getType() == VariableType.INTEGER_SEQUENCE ) {
IntegerSequence sequence = ((VariableIntegerSequence)var).sequence;
if( sequence.getType() == Integ... | [
"private",
"static",
"boolean",
"extractSimpleExtents",
"(",
"Variable",
"var",
",",
"Extents",
"e",
",",
"boolean",
"row",
",",
"int",
"length",
")",
"{",
"int",
"lower",
";",
"int",
"upper",
";",
"if",
"(",
"var",
".",
"getType",
"(",
")",
"==",
"Var... | See if a simple sequence can be used to extract the array. A simple extent is a continuous block from
a min to max index
@return true if it is a simple range or false if not | [
"See",
"if",
"a",
"simple",
"sequence",
"can",
"be",
"used",
"to",
"extract",
"the",
"array",
".",
"A",
"simple",
"extent",
"is",
"a",
"continuous",
"block",
"from",
"a",
"min",
"to",
"max",
"index"
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/equation/Operation.java#L1686-L1716 |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/outbound/HttpOSCBodyReadCallback.java | HttpOSCBodyReadCallback.complete | public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "complete() called: vc=" + vc);
}
HttpOutboundServiceContextImpl mySC = (HttpOutboundServiceContextImpl) vc.getStateMap().get(Callb... | java | public void complete(VirtualConnection vc, TCPReadRequestContext rsc) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc, "complete() called: vc=" + vc);
}
HttpOutboundServiceContextImpl mySC = (HttpOutboundServiceContextImpl) vc.getStateMap().get(Callb... | [
"public",
"void",
"complete",
"(",
"VirtualConnection",
"vc",
",",
"TCPReadRequestContext",
"rsc",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"Tr",
".",
"debug",
"(",
... | Called by the channel below us when a read has finished.
@param vc
@param rsc | [
"Called",
"by",
"the",
"channel",
"below",
"us",
"when",
"a",
"read",
"has",
"finished",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/outbound/HttpOSCBodyReadCallback.java#L55-L62 |
querydsl/querydsl | querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java | AbstractMySQLQuery.noCache | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C noCache() {
return addFlag(Position.AFTER_SELECT, SQL_NO_CACHE);
} | java | @WithBridgeMethods(value = MySQLQuery.class, castRequired = true)
public C noCache() {
return addFlag(Position.AFTER_SELECT, SQL_NO_CACHE);
} | [
"@",
"WithBridgeMethods",
"(",
"value",
"=",
"MySQLQuery",
".",
"class",
",",
"castRequired",
"=",
"true",
")",
"public",
"C",
"noCache",
"(",
")",
"{",
"return",
"addFlag",
"(",
"Position",
".",
"AFTER_SELECT",
",",
"SQL_NO_CACHE",
")",
";",
"}"
] | With SQL_NO_CACHE, the server does not use the query cache. It neither checks the query cache
to see whether the result is already cached, nor does it cache the query result.
@return the current object | [
"With",
"SQL_NO_CACHE",
"the",
"server",
"does",
"not",
"use",
"the",
"query",
"cache",
".",
"It",
"neither",
"checks",
"the",
"query",
"cache",
"to",
"see",
"whether",
"the",
"result",
"is",
"already",
"cached",
"nor",
"does",
"it",
"cache",
"the",
"query... | train | https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/mysql/AbstractMySQLQuery.java#L178-L181 |
Red5/red5-io | src/main/java/org/red5/io/mp4/impl/MP4Reader.java | MP4Reader.processVideoBox | private void processVideoBox(SampleTableBox stbl, long scale) {
AvcConfigurationBox avcC = (AvcConfigurationBox) Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/drmi/avcC");
if (avcC != null) {
long videoConfigContentSize = avcC.getContentSize();
log.debug("AVCC size: {}", ... | java | private void processVideoBox(SampleTableBox stbl, long scale) {
AvcConfigurationBox avcC = (AvcConfigurationBox) Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/drmi/avcC");
if (avcC != null) {
long videoConfigContentSize = avcC.getContentSize();
log.debug("AVCC size: {}", ... | [
"private",
"void",
"processVideoBox",
"(",
"SampleTableBox",
"stbl",
",",
"long",
"scale",
")",
"{",
"AvcConfigurationBox",
"avcC",
"=",
"(",
"AvcConfigurationBox",
")",
"Path",
".",
"getPath",
"(",
"isoFile",
",",
"\"/moov/trak/mdia/minf/stbl/stsd/drmi/avcC\"",
")",
... | Process the video information contained in the atoms.
@param stbl
@param scale
timescale | [
"Process",
"the",
"video",
"information",
"contained",
"in",
"the",
"atoms",
"."
] | train | https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/mp4/impl/MP4Reader.java#L601-L615 |
rpau/javalang-compiler | src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java | SymbolType.typeVariableOf | public static SymbolType typeVariableOf(final String typeVariable, final Class<Object> clazz) {
return new SymbolType(clazz, typeVariable);
} | java | public static SymbolType typeVariableOf(final String typeVariable, final Class<Object> clazz) {
return new SymbolType(clazz, typeVariable);
} | [
"public",
"static",
"SymbolType",
"typeVariableOf",
"(",
"final",
"String",
"typeVariable",
",",
"final",
"Class",
"<",
"Object",
">",
"clazz",
")",
"{",
"return",
"new",
"SymbolType",
"(",
"clazz",
",",
"typeVariable",
")",
";",
"}"
] | Builds a symbol for a type variable from a Java class.
@param typeVariable the name of the variable
@param clazz the (upper bound) type of the variable
@return a SymbolType that represents a variable (for generics) | [
"Builds",
"a",
"symbol",
"for",
"a",
"type",
"variable",
"from",
"a",
"Java",
"class",
"."
] | train | https://github.com/rpau/javalang-compiler/blob/d7da81359161feef2bc7ff186c4e1b73c6a5a8ef/src/main/java/org/walkmod/javalang/compiler/symbols/SymbolType.java#L794-L796 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3d.java | Sphere3d.setProperties | public void setProperties(Point3d center, DoubleProperty radius1) {
setProperties(center.xProperty,center.yProperty,center.zProperty, radius1);
} | java | public void setProperties(Point3d center, DoubleProperty radius1) {
setProperties(center.xProperty,center.yProperty,center.zProperty, radius1);
} | [
"public",
"void",
"setProperties",
"(",
"Point3d",
"center",
",",
"DoubleProperty",
"radius1",
")",
"{",
"setProperties",
"(",
"center",
".",
"xProperty",
",",
"center",
".",
"yProperty",
",",
"center",
".",
"zProperty",
",",
"radius1",
")",
";",
"}"
] | Bind the frame of the sphere with center and radisu properties.
@param center
@param radius1 | [
"Bind",
"the",
"frame",
"of",
"the",
"sphere",
"with",
"center",
"and",
"radisu",
"properties",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Sphere3d.java#L145-L147 |
LGoodDatePicker/LGoodDatePicker | Project/src/main/java/com/github/lgooddatepicker/zinternaltools/InternalUtilities.java | InternalUtilities.capitalizeFirstLetterOfString | static String capitalizeFirstLetterOfString(String text, Locale locale) {
if (text == null || text.length() < 1) {
return text;
}
String textCapitalized = text.substring(0, 1).toUpperCase(locale) + text.substring(1);
return textCapitalized;
} | java | static String capitalizeFirstLetterOfString(String text, Locale locale) {
if (text == null || text.length() < 1) {
return text;
}
String textCapitalized = text.substring(0, 1).toUpperCase(locale) + text.substring(1);
return textCapitalized;
} | [
"static",
"String",
"capitalizeFirstLetterOfString",
"(",
"String",
"text",
",",
"Locale",
"locale",
")",
"{",
"if",
"(",
"text",
"==",
"null",
"||",
"text",
".",
"length",
"(",
")",
"<",
"1",
")",
"{",
"return",
"text",
";",
"}",
"String",
"textCapitali... | capitalizeFirstLetterOfString, This capitalizes the first letter of the supplied string, in a
way that is sensitive to the specified locale. | [
"capitalizeFirstLetterOfString",
"This",
"capitalizes",
"the",
"first",
"letter",
"of",
"the",
"supplied",
"string",
"in",
"a",
"way",
"that",
"is",
"sensitive",
"to",
"the",
"specified",
"locale",
"."
] | train | https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/zinternaltools/InternalUtilities.java#L328-L334 |
facebookarchive/hadoop-20 | src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamKeyValUtil.java | StreamKeyValUtil.readLine | public static int readLine(LineReader lineReader, Text out)
throws IOException {
out.clear();
return lineReader.readLine(out);
} | java | public static int readLine(LineReader lineReader, Text out)
throws IOException {
out.clear();
return lineReader.readLine(out);
} | [
"public",
"static",
"int",
"readLine",
"(",
"LineReader",
"lineReader",
",",
"Text",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"clear",
"(",
")",
";",
"return",
"lineReader",
".",
"readLine",
"(",
"out",
")",
";",
"}"
] | Read a utf8 encoded line from a data input stream.
@param lineReader LineReader to read the line from.
@param out Text to read into
@return number of bytes read
@throws IOException | [
"Read",
"a",
"utf8",
"encoded",
"line",
"from",
"a",
"data",
"input",
"stream",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamKeyValUtil.java#L152-L156 |
alkacon/opencms-core | src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java | CmsDomUtil.getCurrentStyleFloat | public static double getCurrentStyleFloat(Element element, Style style) {
String currentStyle = getCurrentStyle(element, style);
return CmsClientStringUtil.parseFloat(currentStyle);
} | java | public static double getCurrentStyleFloat(Element element, Style style) {
String currentStyle = getCurrentStyle(element, style);
return CmsClientStringUtil.parseFloat(currentStyle);
} | [
"public",
"static",
"double",
"getCurrentStyleFloat",
"(",
"Element",
"element",
",",
"Style",
"style",
")",
"{",
"String",
"currentStyle",
"=",
"getCurrentStyle",
"(",
"element",
",",
"style",
")",
";",
"return",
"CmsClientStringUtil",
".",
"parseFloat",
"(",
"... | Returns the computed style of the given element as floating point number.<p>
@param element the element
@param style the CSS property
@return the currently computed style | [
"Returns",
"the",
"computed",
"style",
"of",
"the",
"given",
"element",
"as",
"floating",
"point",
"number",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1218-L1222 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java | SeaGlassLookAndFeel.defineArrowButtons | private void defineArrowButtons(UIDefaults d) {
String c = PAINTER_PREFIX + "ArrowButtonPainter";
String p = "ArrowButton";
d.put(p + ".States", "Enabled,MouseOver,Disabled,Pressed");
d.put(p + "[Disabled].foreground", new ColorUIResource(0x9ba8cf));
d.put(p + "[Enabled].foregro... | java | private void defineArrowButtons(UIDefaults d) {
String c = PAINTER_PREFIX + "ArrowButtonPainter";
String p = "ArrowButton";
d.put(p + ".States", "Enabled,MouseOver,Disabled,Pressed");
d.put(p + "[Disabled].foreground", new ColorUIResource(0x9ba8cf));
d.put(p + "[Enabled].foregro... | [
"private",
"void",
"defineArrowButtons",
"(",
"UIDefaults",
"d",
")",
"{",
"String",
"c",
"=",
"PAINTER_PREFIX",
"+",
"\"ArrowButtonPainter\"",
";",
"String",
"p",
"=",
"\"ArrowButton\"",
";",
"d",
".",
"put",
"(",
"p",
"+",
"\".States\"",
",",
"\"Enabled,Mous... | Initialize the arrow button settings.
@param d the UI defaults map. | [
"Initialize",
"the",
"arrow",
"button",
"settings",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java#L915-L928 |
xwiki/xwiki-commons | xwiki-commons-core/xwiki-commons-text/src/main/java/org/xwiki/text/StringUtils.java | StringUtils.doubleChar | public static String doubleChar(final String str, final char c)
{
if (isEmpty(str)) {
return str;
}
int start = 0;
int end = str.indexOf(c, start);
if (end == INDEX_NOT_FOUND) {
return str;
}
final StringBuilder buf = new StringBuilde... | java | public static String doubleChar(final String str, final char c)
{
if (isEmpty(str)) {
return str;
}
int start = 0;
int end = str.indexOf(c, start);
if (end == INDEX_NOT_FOUND) {
return str;
}
final StringBuilder buf = new StringBuilde... | [
"public",
"static",
"String",
"doubleChar",
"(",
"final",
"String",
"str",
",",
"final",
"char",
"c",
")",
"{",
"if",
"(",
"isEmpty",
"(",
"str",
")",
")",
"{",
"return",
"str",
";",
"}",
"int",
"start",
"=",
"0",
";",
"int",
"end",
"=",
"str",
"... | An attempt to make doubling a character (usually for escaping purposes) as fast as it can be. A lot faster than
the usual <code>mystring.replace("a", "aa")</code> for example.
@param str the string to modify
@param c the character to double
@return the modified string | [
"An",
"attempt",
"to",
"make",
"doubling",
"a",
"character",
"(",
"usually",
"for",
"escaping",
"purposes",
")",
"as",
"fast",
"as",
"it",
"can",
"be",
".",
"A",
"lot",
"faster",
"than",
"the",
"usual",
"<code",
">",
"mystring",
".",
"replace",
"(",
"a... | train | https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-text/src/main/java/org/xwiki/text/StringUtils.java#L42-L67 |
cdk/cdk | storage/pdb/src/main/java/org/openscience/cdk/tools/ProteinBuilderTool.java | ProteinBuilderTool.createProtein | public static IBioPolymer createProtein(String sequence, IChemObjectBuilder builder) throws CDKException {
Map<String, IAminoAcid> templates = AminoAcids.getHashMapBySingleCharCode();
IBioPolymer protein = builder.newInstance(IBioPolymer.class);
IStrand strand = builder.newInstance(IStrand.class... | java | public static IBioPolymer createProtein(String sequence, IChemObjectBuilder builder) throws CDKException {
Map<String, IAminoAcid> templates = AminoAcids.getHashMapBySingleCharCode();
IBioPolymer protein = builder.newInstance(IBioPolymer.class);
IStrand strand = builder.newInstance(IStrand.class... | [
"public",
"static",
"IBioPolymer",
"createProtein",
"(",
"String",
"sequence",
",",
"IChemObjectBuilder",
"builder",
")",
"throws",
"CDKException",
"{",
"Map",
"<",
"String",
",",
"IAminoAcid",
">",
"templates",
"=",
"AminoAcids",
".",
"getHashMapBySingleCharCode",
... | Creates a BioPolymer from a sequence of amino acid as identified by a
the sequence of their one letter codes. It uses the given {@link IChemObjectBuilder}
to create a data model.
<p>For example:
<pre>
BioPolymer protein = ProteinBuilderTool.createProtein(
"GAGA", SilentChemObjectBuilder.getInstance()
);
</pre>
@see #... | [
"Creates",
"a",
"BioPolymer",
"from",
"a",
"sequence",
"of",
"amino",
"acid",
"as",
"identified",
"by",
"a",
"the",
"sequence",
"of",
"their",
"one",
"letter",
"codes",
".",
"It",
"uses",
"the",
"given",
"{",
"@link",
"IChemObjectBuilder",
"}",
"to",
"crea... | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/storage/pdb/src/main/java/org/openscience/cdk/tools/ProteinBuilderTool.java#L128-L165 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/ProjectedCentroid.java | ProjectedCentroid.make | public static ProjectedCentroid make(long[] dims, Relation<? extends NumberVector> relation, DBIDs ids) {
ProjectedCentroid c = new ProjectedCentroid(dims, RelationUtil.dimensionality(relation));
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
c.put(relation.get(iter));
}
return c;... | java | public static ProjectedCentroid make(long[] dims, Relation<? extends NumberVector> relation, DBIDs ids) {
ProjectedCentroid c = new ProjectedCentroid(dims, RelationUtil.dimensionality(relation));
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
c.put(relation.get(iter));
}
return c;... | [
"public",
"static",
"ProjectedCentroid",
"make",
"(",
"long",
"[",
"]",
"dims",
",",
"Relation",
"<",
"?",
"extends",
"NumberVector",
">",
"relation",
",",
"DBIDs",
"ids",
")",
"{",
"ProjectedCentroid",
"c",
"=",
"new",
"ProjectedCentroid",
"(",
"dims",
",",... | Static Constructor from a relation.
@param dims Dimensions to use (indexed with 0)
@param relation Relation to process
@param ids IDs to process
@return Centroid | [
"Static",
"Constructor",
"from",
"a",
"relation",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/ProjectedCentroid.java#L154-L160 |
alipay/sofa-rpc | core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java | RpcConfigs.getEnumValue | public static <T extends Enum<T>> T getEnumValue(String primaryKey, Class<T> enumClazz) {
String val = (String) CFG.get(primaryKey);
if (val == null) {
throw new SofaRpcRuntimeException("Not Found Key: " + primaryKey);
} else {
return Enum.valueOf(enumClazz, val);
... | java | public static <T extends Enum<T>> T getEnumValue(String primaryKey, Class<T> enumClazz) {
String val = (String) CFG.get(primaryKey);
if (val == null) {
throw new SofaRpcRuntimeException("Not Found Key: " + primaryKey);
} else {
return Enum.valueOf(enumClazz, val);
... | [
"public",
"static",
"<",
"T",
"extends",
"Enum",
"<",
"T",
">",
">",
"T",
"getEnumValue",
"(",
"String",
"primaryKey",
",",
"Class",
"<",
"T",
">",
"enumClazz",
")",
"{",
"String",
"val",
"=",
"(",
"String",
")",
"CFG",
".",
"get",
"(",
"primaryKey",... | Gets enum value.
@param <T> the type parameter
@param primaryKey the primary key
@param enumClazz the enum clazz
@return the enum value | [
"Gets",
"enum",
"value",
"."
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java#L236-L243 |
windy1/google-places-api-java | src/main/java/se/walkercrou/places/exception/GooglePlacesException.java | GooglePlacesException.parse | public static GooglePlacesException parse(String statusCode, String errorMessage) {
Class<?> clazz = statusClassMap.get(statusCode);
if (clazz == null)
return null;
try {
if (errorMessage == null || errorMessage.isEmpty())
return (GooglePlacesException) cl... | java | public static GooglePlacesException parse(String statusCode, String errorMessage) {
Class<?> clazz = statusClassMap.get(statusCode);
if (clazz == null)
return null;
try {
if (errorMessage == null || errorMessage.isEmpty())
return (GooglePlacesException) cl... | [
"public",
"static",
"GooglePlacesException",
"parse",
"(",
"String",
"statusCode",
",",
"String",
"errorMessage",
")",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"statusClassMap",
".",
"get",
"(",
"statusCode",
")",
";",
"if",
"(",
"clazz",
"==",
"null",
"... | Returns the correct exception from a server-given status code and error message.
@param statusCode to find exception for
@param errorMessage error message from server
@return exception that matches the specified status code | [
"Returns",
"the",
"correct",
"exception",
"from",
"a",
"server",
"-",
"given",
"status",
"code",
"and",
"error",
"message",
"."
] | train | https://github.com/windy1/google-places-api-java/blob/a5f2a18a7d1ca03fc0480637eae255fe92fc8b86/src/main/java/se/walkercrou/places/exception/GooglePlacesException.java#L81-L96 |
alkacon/opencms-core | src/org/opencms/widgets/dataview/CmsDataViewQuery.java | CmsDataViewQuery.setFilterValues | public void setFilterValues(LinkedHashMap<String, String> filterValues) {
m_filterValues = new LinkedHashMap<String, String>(filterValues);
} | java | public void setFilterValues(LinkedHashMap<String, String> filterValues) {
m_filterValues = new LinkedHashMap<String, String>(filterValues);
} | [
"public",
"void",
"setFilterValues",
"(",
"LinkedHashMap",
"<",
"String",
",",
"String",
">",
"filterValues",
")",
"{",
"m_filterValues",
"=",
"new",
"LinkedHashMap",
"<",
"String",
",",
"String",
">",
"(",
"filterValues",
")",
";",
"}"
] | Sets the selected filter values.<p>
@param filterValues the filter values | [
"Sets",
"the",
"selected",
"filter",
"values",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/dataview/CmsDataViewQuery.java#L99-L102 |
grails/grails-core | grails-core/src/main/groovy/grails/util/GrailsClassUtils.java | GrailsClassUtils.isMatchBetweenPrimativeAndWrapperTypes | @SuppressWarnings("rawtypes")
public static boolean isMatchBetweenPrimativeAndWrapperTypes(Class leftType, Class rightType) {
if (leftType == null) {
throw new NullPointerException("Left type is null!");
}
if (rightType == null) {
throw new NullPointerException("Right... | java | @SuppressWarnings("rawtypes")
public static boolean isMatchBetweenPrimativeAndWrapperTypes(Class leftType, Class rightType) {
if (leftType == null) {
throw new NullPointerException("Left type is null!");
}
if (rightType == null) {
throw new NullPointerException("Right... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"static",
"boolean",
"isMatchBetweenPrimativeAndWrapperTypes",
"(",
"Class",
"leftType",
",",
"Class",
"rightType",
")",
"{",
"if",
"(",
"leftType",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerEx... | Detect if left and right types are matching types. In particular,
test if one is a primitive type and the other is the corresponding
Java wrapper type. Primitive and wrapper classes may be passed to
either arguments.
@param leftType
@param rightType
@return true if one of the classes is a native type and the other the... | [
"Detect",
"if",
"left",
"and",
"right",
"types",
"are",
"matching",
"types",
".",
"In",
"particular",
"test",
"if",
"one",
"is",
"a",
"primitive",
"type",
"and",
"the",
"other",
"is",
"the",
"corresponding",
"Java",
"wrapper",
"type",
".",
"Primitive",
"an... | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L457-L467 |
hal/elemento | template-processor/src/main/java/org/jboss/gwt/elemento/processor/TemplatedProcessor.java | TemplatedProcessor.abortWithError | private void abortWithError(Element element, String msg, Object... args) throws AbortProcessingException {
error(element, msg, args);
throw new AbortProcessingException();
} | java | private void abortWithError(Element element, String msg, Object... args) throws AbortProcessingException {
error(element, msg, args);
throw new AbortProcessingException();
} | [
"private",
"void",
"abortWithError",
"(",
"Element",
"element",
",",
"String",
"msg",
",",
"Object",
"...",
"args",
")",
"throws",
"AbortProcessingException",
"{",
"error",
"(",
"element",
",",
"msg",
",",
"args",
")",
";",
"throw",
"new",
"AbortProcessingExce... | Issue a compilation error and abandon the processing of this template. This does not prevent the
processing of other templates. | [
"Issue",
"a",
"compilation",
"error",
"and",
"abandon",
"the",
"processing",
"of",
"this",
"template",
".",
"This",
"does",
"not",
"prevent",
"the",
"processing",
"of",
"other",
"templates",
"."
] | train | https://github.com/hal/elemento/blob/26da2d5a1fe2ec55b779737dbaeda25a942eee61/template-processor/src/main/java/org/jboss/gwt/elemento/processor/TemplatedProcessor.java#L711-L714 |
redisson/redisson | redisson/src/main/java/org/redisson/misc/HighwayHash.java | HighwayHash.hash64 | public static long hash64(byte[] data, int offset, int length, long[] key) {
HighwayHash h = new HighwayHash(key);
h.processAll(data, offset, length);
return h.finalize64();
} | java | public static long hash64(byte[] data, int offset, int length, long[] key) {
HighwayHash h = new HighwayHash(key);
h.processAll(data, offset, length);
return h.finalize64();
} | [
"public",
"static",
"long",
"hash64",
"(",
"byte",
"[",
"]",
"data",
",",
"int",
"offset",
",",
"int",
"length",
",",
"long",
"[",
"]",
"key",
")",
"{",
"HighwayHash",
"h",
"=",
"new",
"HighwayHash",
"(",
"key",
")",
";",
"h",
".",
"processAll",
"(... | NOTE: The 64-bit HighwayHash algorithm is declared stable and no longer subject to change.
@param data array with data bytes
@param offset position of first byte of data to read from
@param length number of bytes from data to read
@param key array of size 4 with the key to initialize the hash with
@return 64-bit hash ... | [
"NOTE",
":",
"The",
"64",
"-",
"bit",
"HighwayHash",
"algorithm",
"is",
"declared",
"stable",
"and",
"no",
"longer",
"subject",
"to",
"change",
"."
] | train | https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/misc/HighwayHash.java#L290-L294 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java | NetworkInterfacesInner.beginGetEffectiveRouteTable | public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) {
return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
} | java | public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) {
return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body();
} | [
"public",
"EffectiveRouteListResultInner",
"beginGetEffectiveRouteTable",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkInterfaceName",
")",
"{",
"return",
"beginGetEffectiveRouteTableWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"networkInterfaceName",
")"... | Gets all route tables applied to a network interface.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@thr... | [
"Gets",
"all",
"route",
"tables",
"applied",
"to",
"a",
"network",
"interface",
"."
] | 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/NetworkInterfacesInner.java#L1259-L1261 |
VoltDB/voltdb | src/frontend/org/voltdb/exportclient/ExportDecoderBase.java | ExportDecoderBase.decodeRow | protected ExportRowData decodeRow(byte[] rowData) throws IOException {
ExportRow row = ExportRow.decodeRow(m_legacyRow, getPartition(), m_startTS, rowData);
return new ExportRowData(row.values, row.partitionValue, row.partitionId);
} | java | protected ExportRowData decodeRow(byte[] rowData) throws IOException {
ExportRow row = ExportRow.decodeRow(m_legacyRow, getPartition(), m_startTS, rowData);
return new ExportRowData(row.values, row.partitionValue, row.partitionId);
} | [
"protected",
"ExportRowData",
"decodeRow",
"(",
"byte",
"[",
"]",
"rowData",
")",
"throws",
"IOException",
"{",
"ExportRow",
"row",
"=",
"ExportRow",
".",
"decodeRow",
"(",
"m_legacyRow",
",",
"getPartition",
"(",
")",
",",
"m_startTS",
",",
"rowData",
")",
... | Decode a byte array of row data into ExportRowData
@param rowData
@return ExportRowData
@throws IOException | [
"Decode",
"a",
"byte",
"array",
"of",
"row",
"data",
"into",
"ExportRowData"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportDecoderBase.java#L119-L122 |
Azure/azure-sdk-for-java | dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/ZonesInner.java | ZonesInner.beginDeleteAsync | public Observable<ZoneDeleteResultInner> beginDeleteAsync(String resourceGroupName, String zoneName, String ifMatch) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, zoneName, ifMatch).map(new Func1<ServiceResponse<ZoneDeleteResultInner>, ZoneDeleteResultInner>() {
@Override
... | java | public Observable<ZoneDeleteResultInner> beginDeleteAsync(String resourceGroupName, String zoneName, String ifMatch) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, zoneName, ifMatch).map(new Func1<ServiceResponse<ZoneDeleteResultInner>, ZoneDeleteResultInner>() {
@Override
... | [
"public",
"Observable",
"<",
"ZoneDeleteResultInner",
">",
"beginDeleteAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"zoneName",
",",
"String",
"ifMatch",
")",
"{",
"return",
"beginDeleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"zoneName",
... | Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
@param resourceGroupName The name of the resource group.
@param zoneName The name of the DNS zone (without a terminating dot).
@param ifMatch The etag of the DNS zone. Omit this value to always delete the cu... | [
"Deletes",
"a",
"DNS",
"zone",
".",
"WARNING",
":",
"All",
"DNS",
"records",
"in",
"the",
"zone",
"will",
"also",
"be",
"deleted",
".",
"This",
"operation",
"cannot",
"be",
"undone",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/ZonesInner.java#L553-L560 |
Netflix/netflix-graph | src/main/java/com/netflix/nfgraph/NFGraph.java | NFGraph.getConnection | public int getConnection(String nodeType, int ordinal, String propertyName) {
return getConnection(0, nodeType, ordinal, propertyName);
} | java | public int getConnection(String nodeType, int ordinal, String propertyName) {
return getConnection(0, nodeType, ordinal, propertyName);
} | [
"public",
"int",
"getConnection",
"(",
"String",
"nodeType",
",",
"int",
"ordinal",
",",
"String",
"propertyName",
")",
"{",
"return",
"getConnection",
"(",
"0",
",",
"nodeType",
",",
"ordinal",
",",
"propertyName",
")",
";",
"}"
] | Retrieve a single connected ordinal, given the type and ordinal of the originating node, and the property by which this node is connected.
@return the connected ordinal, or -1 if there is no such ordinal | [
"Retrieve",
"a",
"single",
"connected",
"ordinal",
"given",
"the",
"type",
"and",
"ordinal",
"of",
"the",
"originating",
"node",
"and",
"the",
"property",
"by",
"which",
"this",
"node",
"is",
"connected",
"."
] | train | https://github.com/Netflix/netflix-graph/blob/ee129252a08a9f51dd296d6fca2f0b28b7be284e/src/main/java/com/netflix/nfgraph/NFGraph.java#L106-L108 |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java | RDBMEntityGroupStore.contains | @Override
public boolean contains(IEntityGroup group, IGroupMember member) throws GroupsException {
return (member.isGroup())
? containsGroup(group, (IEntityGroup) member)
: containsEntity(group, member);
} | java | @Override
public boolean contains(IEntityGroup group, IGroupMember member) throws GroupsException {
return (member.isGroup())
? containsGroup(group, (IEntityGroup) member)
: containsEntity(group, member);
} | [
"@",
"Override",
"public",
"boolean",
"contains",
"(",
"IEntityGroup",
"group",
",",
"IGroupMember",
"member",
")",
"throws",
"GroupsException",
"{",
"return",
"(",
"member",
".",
"isGroup",
"(",
")",
")",
"?",
"containsGroup",
"(",
"group",
",",
"(",
"IEnti... | Answers if <code>IGroupMember</code> member is a member of <code>group</code>.
@return boolean
@param group IEntityGroup
@param member IGroupMember | [
"Answers",
"if",
"<code",
">",
"IGroupMember<",
"/",
"code",
">",
"member",
"is",
"a",
"member",
"of",
"<code",
">",
"group<",
"/",
"code",
">",
"."
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L169-L174 |
raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | Dynamic.ofInvocation | public static Dynamic ofInvocation(Method method, List<?> rawArguments) {
return ofInvocation(new MethodDescription.ForLoadedMethod(method), rawArguments);
} | java | public static Dynamic ofInvocation(Method method, List<?> rawArguments) {
return ofInvocation(new MethodDescription.ForLoadedMethod(method), rawArguments);
} | [
"public",
"static",
"Dynamic",
"ofInvocation",
"(",
"Method",
"method",
",",
"List",
"<",
"?",
">",
"rawArguments",
")",
"{",
"return",
"ofInvocation",
"(",
"new",
"MethodDescription",
".",
"ForLoadedMethod",
"(",
"method",
")",
",",
"rawArguments",
")",
";",
... | Represents a constant that is resolved by invoking a {@code static} factory method.
@param method The method to invoke to create the represented constant value.
@param rawArguments The method's constant arguments.
@return A dynamic constant that is resolved by the supplied factory method. | [
"Represents",
"a",
"constant",
"that",
"is",
"resolved",
"by",
"invoking",
"a",
"{",
"@code",
"static",
"}",
"factory",
"method",
"."
] | train | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L1531-L1533 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JawrApplicationConfigManager.java | JawrApplicationConfigManager.setStringValue | public void setStringValue(String property, String value) {
try {
if (jsMBean != null) {
setProperty(jsMBean, property, value);
}
if (cssMBean != null) {
setProperty(cssMBean, property, value);
}
if (binaryMBean != null) {
setProperty(binaryMBean, property, value);
}
} catch (IllegalAc... | java | public void setStringValue(String property, String value) {
try {
if (jsMBean != null) {
setProperty(jsMBean, property, value);
}
if (cssMBean != null) {
setProperty(cssMBean, property, value);
}
if (binaryMBean != null) {
setProperty(binaryMBean, property, value);
}
} catch (IllegalAc... | [
"public",
"void",
"setStringValue",
"(",
"String",
"property",
",",
"String",
"value",
")",
"{",
"try",
"{",
"if",
"(",
"jsMBean",
"!=",
"null",
")",
"{",
"setProperty",
"(",
"jsMBean",
",",
"property",
",",
"value",
")",
";",
"}",
"if",
"(",
"cssMBean... | Update the property with the string value in each config manager.
@param property
the property to update
@param value
the value to set | [
"Update",
"the",
"property",
"with",
"the",
"string",
"value",
"in",
"each",
"config",
"manager",
"."
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JawrApplicationConfigManager.java#L557-L571 |
gallandarakhneorg/afc | advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/HeapAttributeCollection.java | HeapAttributeCollection.getStoredAttribute | @Pure
protected Attribute getStoredAttribute(String name, AttributeType expectedType) {
Object val = this.heap.get(name);
if (val != null) {
final AttributeType currentType = AttributeType.fromValue(val);
val = unprotectNull(val);
final Attribute attr = new AttributeImpl(name);
if (expectedType == null... | java | @Pure
protected Attribute getStoredAttribute(String name, AttributeType expectedType) {
Object val = this.heap.get(name);
if (val != null) {
final AttributeType currentType = AttributeType.fromValue(val);
val = unprotectNull(val);
final Attribute attr = new AttributeImpl(name);
if (expectedType == null... | [
"@",
"Pure",
"protected",
"Attribute",
"getStoredAttribute",
"(",
"String",
"name",
",",
"AttributeType",
"expectedType",
")",
"{",
"Object",
"val",
"=",
"this",
".",
"heap",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"val",
"!=",
"null",
")",
"{",
... | Replies the attribute with the given name.
@param name is the name of the attribute to retreive
@param expectedType is the expected type for the attribute.
@return the value or <code>null</code> | [
"Replies",
"the",
"attribute",
"with",
"the",
"given",
"name",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/HeapAttributeCollection.java#L251-L266 |
Azure/azure-sdk-for-java | network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java | VirtualNetworkGatewayConnectionsInner.resetSharedKey | public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().last().body();
} | java | public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) {
return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().last().body();
} | [
"public",
"ConnectionResetSharedKeyInner",
"resetSharedKey",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualNetworkGatewayConnectionName",
",",
"int",
"keyLength",
")",
"{",
"return",
"resetSharedKeyWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"virtualN... | The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.
@param resourceGroupName The name of the resource group.
@param virtualNetworkGatewayConn... | [
"The",
"VirtualNetworkGatewayConnectionResetSharedKey",
"operation",
"resets",
"the",
"virtual",
"network",
"gateway",
"connection",
"shared",
"key",
"for",
"passed",
"virtual",
"network",
"gateway",
"connection",
"in",
"the",
"specified",
"resource",
"group",
"through",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L1223-L1225 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/renderer/icon/provider/IconProviderBuilder.java | IconProviderBuilder.withValue | public IconProviderBuilder withValue(Object value, Icon icon)
{
if (currentProperty == null)
throw new IllegalStateException("You must set the property first.");
if (!currentProperty.getAllowedValues().contains(value))
throw new IllegalStateException("The property " + currentProperty + "(" + currentProperty.... | java | public IconProviderBuilder withValue(Object value, Icon icon)
{
if (currentProperty == null)
throw new IllegalStateException("You must set the property first.");
if (!currentProperty.getAllowedValues().contains(value))
throw new IllegalStateException("The property " + currentProperty + "(" + currentProperty.... | [
"public",
"IconProviderBuilder",
"withValue",
"(",
"Object",
"value",
",",
"Icon",
"icon",
")",
"{",
"if",
"(",
"currentProperty",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"You must set the property first.\"",
")",
";",
"if",
"(",
"!",
... | Sets the {@link Icon} to use for the state value.<br>
{@link #forProperty(IProperty)} must be called before with the corresponding {@link IProperty}.
@param value the value
@param icon the icon
@return the icon provider builder | [
"Sets",
"the",
"{",
"@link",
"Icon",
"}",
"to",
"use",
"for",
"the",
"state",
"value",
".",
"<br",
">",
"{",
"@link",
"#forProperty",
"(",
"IProperty",
")",
"}",
"must",
"be",
"called",
"before",
"with",
"the",
"corresponding",
"{",
"@link",
"IProperty",... | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/provider/IconProviderBuilder.java#L209-L219 |
alkacon/opencms-core | src/org/opencms/file/CmsProperty.java | CmsProperty.replaceDelimiter | private String replaceDelimiter(String value, char delimiter, String delimiterReplacement) {
return CmsStringUtil.substitute(value, String.valueOf(delimiter), delimiterReplacement);
} | java | private String replaceDelimiter(String value, char delimiter, String delimiterReplacement) {
return CmsStringUtil.substitute(value, String.valueOf(delimiter), delimiterReplacement);
} | [
"private",
"String",
"replaceDelimiter",
"(",
"String",
"value",
",",
"char",
"delimiter",
",",
"String",
"delimiterReplacement",
")",
"{",
"return",
"CmsStringUtil",
".",
"substitute",
"(",
"value",
",",
"String",
".",
"valueOf",
"(",
"delimiter",
")",
",",
"... | Replaces the given delimiter character with the replacement string.<p>
@param value the string that is scanned
@param delimiter the delimiter character to replace
@param delimiterReplacement the replacement string for the delimiter character
@return the substituted string | [
"Replaces",
"the",
"given",
"delimiter",
"character",
"with",
"the",
"replacement",
"string",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsProperty.java#L1350-L1353 |
kefirfromperm/kefirbb | src/org/kefirsf/bb/DomConfigurationFactory.java | DomConfigurationFactory.nodeAttribute | private boolean nodeAttribute(Node node, String attributeName, boolean defaultValue) {
boolean value = defaultValue;
if (node.hasAttributes()) {
Node attribute = node.getAttributes().getNamedItem(attributeName);
if (attribute != null) {
value = Boolean.valueOf(att... | java | private boolean nodeAttribute(Node node, String attributeName, boolean defaultValue) {
boolean value = defaultValue;
if (node.hasAttributes()) {
Node attribute = node.getAttributes().getNamedItem(attributeName);
if (attribute != null) {
value = Boolean.valueOf(att... | [
"private",
"boolean",
"nodeAttribute",
"(",
"Node",
"node",
",",
"String",
"attributeName",
",",
"boolean",
"defaultValue",
")",
"{",
"boolean",
"value",
"=",
"defaultValue",
";",
"if",
"(",
"node",
".",
"hasAttributes",
"(",
")",
")",
"{",
"Node",
"attribut... | Return node attribute value, if exists or default attribute value
@param node XML-node
@param attributeName attributeName
@param defaultValue attribute default value
@return attribute value or default value | [
"Return",
"node",
"attribute",
"value",
"if",
"exists",
"or",
"default",
"attribute",
"value"
] | train | https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/DomConfigurationFactory.java#L602-L611 |
fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/DayOpeningHours.java | DayOpeningHours.asAddedChanges | public List<Change> asAddedChanges() {
final List<Change> changes = new ArrayList<>();
for (final HourRange hr : hourRanges) {
changes.add(new Change(ChangeType.ADDED, dayOfTheWeek, hr));
}
return changes;
} | java | public List<Change> asAddedChanges() {
final List<Change> changes = new ArrayList<>();
for (final HourRange hr : hourRanges) {
changes.add(new Change(ChangeType.ADDED, dayOfTheWeek, hr));
}
return changes;
} | [
"public",
"List",
"<",
"Change",
">",
"asAddedChanges",
"(",
")",
"{",
"final",
"List",
"<",
"Change",
">",
"changes",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"HourRange",
"hr",
":",
"hourRanges",
")",
"{",
"changes",
".",
... | Returns all hour ranges of this day as if they were added.
@return Added day changes. | [
"Returns",
"all",
"hour",
"ranges",
"of",
"this",
"day",
"as",
"if",
"they",
"were",
"added",
"."
] | train | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/DayOpeningHours.java#L364-L370 |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/scale/TaiInstant.java | TaiInstant.plus | public TaiInstant plus(Duration duration) {
long secsToAdd = duration.getSeconds();
int nanosToAdd = duration.getNano();
if ((secsToAdd | nanosToAdd) == 0) {
return this;
}
long secs = Math.addExact(seconds, secsToAdd);
long nanoAdjustment = ((long) nanos) + n... | java | public TaiInstant plus(Duration duration) {
long secsToAdd = duration.getSeconds();
int nanosToAdd = duration.getNano();
if ((secsToAdd | nanosToAdd) == 0) {
return this;
}
long secs = Math.addExact(seconds, secsToAdd);
long nanoAdjustment = ((long) nanos) + n... | [
"public",
"TaiInstant",
"plus",
"(",
"Duration",
"duration",
")",
"{",
"long",
"secsToAdd",
"=",
"duration",
".",
"getSeconds",
"(",
")",
";",
"int",
"nanosToAdd",
"=",
"duration",
".",
"getNano",
"(",
")",
";",
"if",
"(",
"(",
"secsToAdd",
"|",
"nanosTo... | Returns a copy of this instant with the specified duration added.
<p>
The duration is added using simple addition of the seconds and nanoseconds
in the duration to the seconds and nanoseconds of this instant.
As a result, the duration is treated as being measured in TAI compatible seconds
for the purpose of this method... | [
"Returns",
"a",
"copy",
"of",
"this",
"instant",
"with",
"the",
"specified",
"duration",
"added",
".",
"<p",
">",
"The",
"duration",
"is",
"added",
"using",
"simple",
"addition",
"of",
"the",
"seconds",
"and",
"nanoseconds",
"in",
"the",
"duration",
"to",
... | train | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/TaiInstant.java#L308-L317 |
infinispan/infinispan | commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java | MarshallUtil.isSafeClass | public static boolean isSafeClass(String className, List<String> whitelist) {
for (String whiteRegExp : whitelist) {
Pattern whitePattern = Pattern.compile(whiteRegExp);
Matcher whiteMatcher = whitePattern.matcher(className);
if (whiteMatcher.find()) {
if (log.isTraceEnabled... | java | public static boolean isSafeClass(String className, List<String> whitelist) {
for (String whiteRegExp : whitelist) {
Pattern whitePattern = Pattern.compile(whiteRegExp);
Matcher whiteMatcher = whitePattern.matcher(className);
if (whiteMatcher.find()) {
if (log.isTraceEnabled... | [
"public",
"static",
"boolean",
"isSafeClass",
"(",
"String",
"className",
",",
"List",
"<",
"String",
">",
"whitelist",
")",
"{",
"for",
"(",
"String",
"whiteRegExp",
":",
"whitelist",
")",
"{",
"Pattern",
"whitePattern",
"=",
"Pattern",
".",
"compile",
"(",... | Checks whether class name is matched by the class name white list regular expressions provided.
@param className class to verify
@param whitelist list of regular expressions to match class name against
@return true if the class matched at least one of the regular expressions,
false otherwise | [
"Checks",
"whether",
"class",
"name",
"is",
"matched",
"by",
"the",
"class",
"name",
"white",
"list",
"regular",
"expressions",
"provided",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L509-L522 |
Stratio/bdt | src/main/java/com/stratio/qa/specs/DatabaseSpec.java | DatabaseSpec.assertRowNumberOfTableOnCassandraKeyspace | @Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$")
public void assertRowNumberOfTableOnCassandraKeyspace(String keyspace, String tableName, String numberRows) {
Long numberRowsLong = Long.parseLong(numberRows);
commonspec.getCassandraClient().useKeyspace(keyspace);
... | java | @Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$")
public void assertRowNumberOfTableOnCassandraKeyspace(String keyspace, String tableName, String numberRows) {
Long numberRowsLong = Long.parseLong(numberRows);
commonspec.getCassandraClient().useKeyspace(keyspace);
... | [
"@",
"Then",
"(",
"\"^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$\"",
")",
"public",
"void",
"assertRowNumberOfTableOnCassandraKeyspace",
"(",
"String",
"keyspace",
",",
"String",
"tableName",
",",
"String",
"numberRows",
")",
"{",
"Long",
"number... | Checks the number of rows in a cassandra table.
@param keyspace
@param tableName
@param numberRows | [
"Checks",
"the",
"number",
"of",
"rows",
"in",
"a",
"cassandra",
"table",
"."
] | train | https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L680-L686 |
groovy/groovy-core | src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java | ResourceGroovyMethods.newWriter | public static BufferedWriter newWriter(File file, String charset, boolean append) throws IOException {
if (append) {
return new EncodingAwareBufferedWriter(new OutputStreamWriter(new FileOutputStream(file, append), charset));
} else {
// first write the Byte Order Mark for Unicod... | java | public static BufferedWriter newWriter(File file, String charset, boolean append) throws IOException {
if (append) {
return new EncodingAwareBufferedWriter(new OutputStreamWriter(new FileOutputStream(file, append), charset));
} else {
// first write the Byte Order Mark for Unicod... | [
"public",
"static",
"BufferedWriter",
"newWriter",
"(",
"File",
"file",
",",
"String",
"charset",
",",
"boolean",
"append",
")",
"throws",
"IOException",
"{",
"if",
"(",
"append",
")",
"{",
"return",
"new",
"EncodingAwareBufferedWriter",
"(",
"new",
"OutputStrea... | Helper method to create a buffered writer for a file. If the given
charset is "UTF-16BE" or "UTF-16LE", the requisite byte order mark is
written to the stream before the writer is returned.
@param file a File
@param charset the name of the encoding used to write in this file
@param append true if in append mode
@... | [
"Helper",
"method",
"to",
"create",
"a",
"buffered",
"writer",
"for",
"a",
"file",
".",
"If",
"the",
"given",
"charset",
"is",
"UTF",
"-",
"16BE",
"or",
"UTF",
"-",
"16LE",
"the",
"requisite",
"byte",
"order",
"mark",
"is",
"written",
"to",
"the",
"str... | train | https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1784-L1793 |
rzwitserloot/lombok | src/core/lombok/javac/JavacNode.java | JavacNode.addWarning | public void addWarning(String message, DiagnosticPosition pos) {
ast.printMessage(Diagnostic.Kind.WARNING, message, null, pos, false);
} | java | public void addWarning(String message, DiagnosticPosition pos) {
ast.printMessage(Diagnostic.Kind.WARNING, message, null, pos, false);
} | [
"public",
"void",
"addWarning",
"(",
"String",
"message",
",",
"DiagnosticPosition",
"pos",
")",
"{",
"ast",
".",
"printMessage",
"(",
"Diagnostic",
".",
"Kind",
".",
"WARNING",
",",
"message",
",",
"null",
",",
"pos",
",",
"false",
")",
";",
"}"
] | Generates a compiler warning focused on the AST node represented by this node object. | [
"Generates",
"a",
"compiler",
"warning",
"focused",
"on",
"the",
"AST",
"node",
"represented",
"by",
"this",
"node",
"object",
"."
] | train | https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/JavacNode.java#L276-L278 |
knowm/XChange | xchange-coinsuper/src/main/java/org/knowm/xchange/coinsuper/CoinsuperAdapters.java | CoinsuperAdapters.adaptOrder | public static CoinsuperGenericOrder adaptOrder(String orderId, OrderList orderList) {
BigDecimal averagePrice = new BigDecimal(orderList.getPriceLimit());
BigDecimal cumulativeAmount = new BigDecimal(orderList.getQuantity());
BigDecimal totalFee = new BigDecimal(orderList.getFee());
BigDecimal amount =... | java | public static CoinsuperGenericOrder adaptOrder(String orderId, OrderList orderList) {
BigDecimal averagePrice = new BigDecimal(orderList.getPriceLimit());
BigDecimal cumulativeAmount = new BigDecimal(orderList.getQuantity());
BigDecimal totalFee = new BigDecimal(orderList.getFee());
BigDecimal amount =... | [
"public",
"static",
"CoinsuperGenericOrder",
"adaptOrder",
"(",
"String",
"orderId",
",",
"OrderList",
"orderList",
")",
"{",
"BigDecimal",
"averagePrice",
"=",
"new",
"BigDecimal",
"(",
"orderList",
".",
"getPriceLimit",
"(",
")",
")",
";",
"BigDecimal",
"cumulat... | There is no method to discern market versus limit order type - so this returns a generic
GenericOrder as a status
@param
@return | [
"There",
"is",
"no",
"method",
"to",
"discern",
"market",
"versus",
"limit",
"order",
"type",
"-",
"so",
"this",
"returns",
"a",
"generic",
"GenericOrder",
"as",
"a",
"status"
] | train | https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinsuper/src/main/java/org/knowm/xchange/coinsuper/CoinsuperAdapters.java#L162-L194 |
liyiorg/weixin-popular | src/main/java/weixin/popular/api/SnsAPI.java | SnsAPI.connectOauth2Authorize | public static String connectOauth2Authorize(String appid,String redirect_uri,boolean snsapi_userinfo,String state,String component_appid){
try {
StringBuilder sb = new StringBuilder();
sb.append(OPEN_URI + "/connect/oauth2/authorize?")
.append("appid=").append(appid)
.append("&redirect_uri=").append(URLEn... | java | public static String connectOauth2Authorize(String appid,String redirect_uri,boolean snsapi_userinfo,String state,String component_appid){
try {
StringBuilder sb = new StringBuilder();
sb.append(OPEN_URI + "/connect/oauth2/authorize?")
.append("appid=").append(appid)
.append("&redirect_uri=").append(URLEn... | [
"public",
"static",
"String",
"connectOauth2Authorize",
"(",
"String",
"appid",
",",
"String",
"redirect_uri",
",",
"boolean",
"snsapi_userinfo",
",",
"String",
"state",
",",
"String",
"component_appid",
")",
"{",
"try",
"{",
"StringBuilder",
"sb",
"=",
"new",
"... | 生成网页授权 URL (第三方平台开发)
@param appid appid
@param redirect_uri 自动URLEncoder
@param snsapi_userinfo snsapi_userinfo
@param state 可以为空
@param component_appid 第三方平台开发,可以为空。
服务方的appid,在申请创建公众号服务成功后,可在公众号服务详情页找到
@return url | [
"生成网页授权",
"URL",
"(",
"第三方平台开发",
")"
] | train | https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SnsAPI.java#L182-L200 |
grpc/grpc-java | api/src/main/java/io/grpc/CallOptions.java | CallOptions.withOption | public <T> CallOptions withOption(Key<T> key, T value) {
Preconditions.checkNotNull(key, "key");
Preconditions.checkNotNull(value, "value");
CallOptions newOptions = new CallOptions(this);
int existingIdx = -1;
for (int i = 0; i < customOptions.length; i++) {
if (key.equals(customOptions[i][0... | java | public <T> CallOptions withOption(Key<T> key, T value) {
Preconditions.checkNotNull(key, "key");
Preconditions.checkNotNull(value, "value");
CallOptions newOptions = new CallOptions(this);
int existingIdx = -1;
for (int i = 0; i < customOptions.length; i++) {
if (key.equals(customOptions[i][0... | [
"public",
"<",
"T",
">",
"CallOptions",
"withOption",
"(",
"Key",
"<",
"T",
">",
"key",
",",
"T",
"value",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"key",
",",
"\"key\"",
")",
";",
"Preconditions",
".",
"checkNotNull",
"(",
"value",
",",
"\... | Sets a custom option. Any existing value for the key is overwritten.
@param key The option key
@param value The option value.
@since 1.13.0 | [
"Sets",
"a",
"custom",
"option",
".",
"Any",
"existing",
"value",
"for",
"the",
"key",
"is",
"overwritten",
"."
] | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/CallOptions.java#L316-L341 |
EsotericSoftware/kryo | src/com/esotericsoftware/kryo/Kryo.java | Kryo.addDefaultSerializer | public void addDefaultSerializer (Class type, Class<? extends Serializer> serializerClass) {
if (type == null) throw new IllegalArgumentException("type cannot be null.");
if (serializerClass == null) throw new IllegalArgumentException("serializerClass cannot be null.");
insertDefaultSerializer(type, new Reflec... | java | public void addDefaultSerializer (Class type, Class<? extends Serializer> serializerClass) {
if (type == null) throw new IllegalArgumentException("type cannot be null.");
if (serializerClass == null) throw new IllegalArgumentException("serializerClass cannot be null.");
insertDefaultSerializer(type, new Reflec... | [
"public",
"void",
"addDefaultSerializer",
"(",
"Class",
"type",
",",
"Class",
"<",
"?",
"extends",
"Serializer",
">",
"serializerClass",
")",
"{",
"if",
"(",
"type",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"type cannot be null.\"",
... | Instances of the specified class will use the specified serializer when {@link #register(Class)} or
{@link #register(Class, int)} are called. Serializer instances are created as needed via
{@link ReflectionSerializerFactory#newSerializer(Kryo, Class, Class)}. By default, the following classes have a default
serializer ... | [
"Instances",
"of",
"the",
"specified",
"class",
"will",
"use",
"the",
"specified",
"serializer",
"when",
"{"
] | train | https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/Kryo.java#L352-L356 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java | ArrayUtil.removeEmpty | public static <T extends CharSequence> T[] removeEmpty(T[] array) {
return filter(array, new Filter<T>() {
@Override
public boolean accept(T t) {
return false == StrUtil.isEmpty(t);
}
});
} | java | public static <T extends CharSequence> T[] removeEmpty(T[] array) {
return filter(array, new Filter<T>() {
@Override
public boolean accept(T t) {
return false == StrUtil.isEmpty(t);
}
});
} | [
"public",
"static",
"<",
"T",
"extends",
"CharSequence",
">",
"T",
"[",
"]",
"removeEmpty",
"(",
"T",
"[",
"]",
"array",
")",
"{",
"return",
"filter",
"(",
"array",
",",
"new",
"Filter",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"boo... | 去除{@code null}或者"" 元素
@param array 数组
@return 处理后的数组
@since 3.2.2 | [
"去除",
"{",
"@code",
"null",
"}",
"或者",
"元素"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L798-L805 |
jronrun/benayn | benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java | Uris.getRawFragment | public static String getRawFragment(final URI uri, final boolean strict) {
return esc(strict).escapeFragment(Strings.emptyToNull(uri.getRawFragment()));
} | java | public static String getRawFragment(final URI uri, final boolean strict) {
return esc(strict).escapeFragment(Strings.emptyToNull(uri.getRawFragment()));
} | [
"public",
"static",
"String",
"getRawFragment",
"(",
"final",
"URI",
"uri",
",",
"final",
"boolean",
"strict",
")",
"{",
"return",
"esc",
"(",
"strict",
")",
".",
"escapeFragment",
"(",
"Strings",
".",
"emptyToNull",
"(",
"uri",
".",
"getRawFragment",
"(",
... | Returns the raw (and normalized) fragment of the given URI, or null if it is empty.
@param uri the URI to extract fragment from
@param strict whether or not to do strict escaping
@return the fragment or null if it is undefined | [
"Returns",
"the",
"raw",
"(",
"and",
"normalized",
")",
"fragment",
"of",
"the",
"given",
"URI",
"or",
"null",
"if",
"it",
"is",
"empty",
"."
] | train | https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L273-L275 |
MenoData/Time4J | base/src/main/java/net/time4j/range/DateInterval.java | DateInterval.streamDaily | public static Stream<PlainDate> streamDaily(
PlainDate start,
PlainDate end
) {
long s = start.getDaysSinceEpochUTC();
long e = end.getDaysSinceEpochUTC();
if (s > e) {
throw new IllegalArgumentException("Start after end: " + start + "/" + end);
}
... | java | public static Stream<PlainDate> streamDaily(
PlainDate start,
PlainDate end
) {
long s = start.getDaysSinceEpochUTC();
long e = end.getDaysSinceEpochUTC();
if (s > e) {
throw new IllegalArgumentException("Start after end: " + start + "/" + end);
}
... | [
"public",
"static",
"Stream",
"<",
"PlainDate",
">",
"streamDaily",
"(",
"PlainDate",
"start",
",",
"PlainDate",
"end",
")",
"{",
"long",
"s",
"=",
"start",
".",
"getDaysSinceEpochUTC",
"(",
")",
";",
"long",
"e",
"=",
"end",
".",
"getDaysSinceEpochUTC",
"... | /*[deutsch]
<p>Erzeugt einen {@code Stream}, der über jedes Kalenderdatum zwischen den angegebenen
Intervallgrenzen geht. </p>
<p>Diese statische Methode vermeidet die Kosten der Intervallerzeugung. </p>
@param start start boundary - inclusive
@param end end boundary - inclusive
@throws Illega... | [
"/",
"*",
"[",
"deutsch",
"]",
"<p",
">",
"Erzeugt",
"einen",
"{",
"@code",
"Stream",
"}",
"der",
"ü",
";",
"ber",
"jedes",
"Kalenderdatum",
"zwischen",
"den",
"angegebenen",
"Intervallgrenzen",
"geht",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/DateInterval.java#L840-L854 |
code4everything/util | src/main/java/com/zhazhapan/util/MailSender.java | MailSender.sendMail | public static void sendMail(String to, String title, String content, String from, String key) throws Exception {
setFrom(from);
setKey(key);
sendMail(to, title, content);
} | java | public static void sendMail(String to, String title, String content, String from, String key) throws Exception {
setFrom(from);
setKey(key);
sendMail(to, title, content);
} | [
"public",
"static",
"void",
"sendMail",
"(",
"String",
"to",
",",
"String",
"title",
",",
"String",
"content",
",",
"String",
"from",
",",
"String",
"key",
")",
"throws",
"Exception",
"{",
"setFrom",
"(",
"from",
")",
";",
"setKey",
"(",
"key",
")",
";... | 发送邮件,调用此方法前请先检查邮件服务器是否已经设置,如果没有设置,请先设置{@link MailSender#setHost(String)}, 如不设置将使用默认的QQ邮件服务器
@param to 收件箱
@param title 标题
@param content 内容
@param from 发件箱
@param key 密码
@throws Exception 异常 | [
"发送邮件,调用此方法前请先检查邮件服务器是否已经设置,如果没有设置,请先设置",
"{",
"@link",
"MailSender#setHost",
"(",
"String",
")",
"}",
",",
"如不设置将使用默认的QQ邮件服务器"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/MailSender.java#L179-L183 |
apache/flink | flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java | HadoopInputs.readHadoopFile | public static <K, V> org.apache.flink.api.java.hadoop.mapreduce.HadoopInputFormat<K, V> readHadoopFile(
org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K, V> mapreduceInputFormat, Class<K> key, Class<V> value, String inputPath, Job job) throws IOException {
// set input path in Job
org.apache.hadoop.mapred... | java | public static <K, V> org.apache.flink.api.java.hadoop.mapreduce.HadoopInputFormat<K, V> readHadoopFile(
org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K, V> mapreduceInputFormat, Class<K> key, Class<V> value, String inputPath, Job job) throws IOException {
// set input path in Job
org.apache.hadoop.mapred... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"org",
".",
"apache",
".",
"flink",
".",
"api",
".",
"java",
".",
"hadoop",
".",
"mapreduce",
".",
"HadoopInputFormat",
"<",
"K",
",",
"V",
">",
"readHadoopFile",
"(",
"org",
".",
"apache",
".",
"hadoop",
... | Creates a Flink {@link InputFormat} that wraps the given Hadoop {@link org.apache.hadoop.mapreduce.lib.input.FileInputFormat}.
@return A Flink InputFormat that wraps the Hadoop FileInputFormat. | [
"Creates",
"a",
"Flink",
"{",
"@link",
"InputFormat",
"}",
"that",
"wraps",
"the",
"given",
"Hadoop",
"{",
"@link",
"org",
".",
"apache",
".",
"hadoop",
".",
"mapreduce",
".",
"lib",
".",
"input",
".",
"FileInputFormat",
"}",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/HadoopInputs.java#L89-L95 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java | CompositeComponentELUtils.saveCompositeComponentForResolver | public static void saveCompositeComponentForResolver(FacesContext facesContext, Location location, int ccLevel)
{
UIComponent cc = ccLevel > 0 ? getCompositeComponentBasedOnLocation(facesContext, location, ccLevel)
: getCompositeComponentBasedOnLocation(facesContext, location);
List<... | java | public static void saveCompositeComponentForResolver(FacesContext facesContext, Location location, int ccLevel)
{
UIComponent cc = ccLevel > 0 ? getCompositeComponentBasedOnLocation(facesContext, location, ccLevel)
: getCompositeComponentBasedOnLocation(facesContext, location);
List<... | [
"public",
"static",
"void",
"saveCompositeComponentForResolver",
"(",
"FacesContext",
"facesContext",
",",
"Location",
"location",
",",
"int",
"ccLevel",
")",
"{",
"UIComponent",
"cc",
"=",
"ccLevel",
">",
"0",
"?",
"getCompositeComponentBasedOnLocation",
"(",
"facesC... | Trys to get the composite component using getCompositeComponentBasedOnLocation()
and saves it in an attribute on the FacesContext, which is then used by
CompositeComponentImplicitObject.
@param facesContext
@param location | [
"Trys",
"to",
"get",
"the",
"composite",
"component",
"using",
"getCompositeComponentBasedOnLocation",
"()",
"and",
"saves",
"it",
"in",
"an",
"attribute",
"on",
"the",
"FacesContext",
"which",
"is",
"then",
"used",
"by",
"CompositeComponentImplicitObject",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java#L436-L447 |
timewalker74/ffmq | core/src/main/java/net/timewalker/ffmq4/local/destination/LocalQueue.java | LocalQueue.redeliverLocked | public boolean redeliverLocked( TransactionItem[] items , MessageLockSet locks ) throws JMSException
{
checkNotClosed();
checkTransactionLock();
int volatileRollbacked = 0;
int persistentRollbacked = 0;
synchronized (storeLock)
{
for (int n = 0 ; n < items.leng... | java | public boolean redeliverLocked( TransactionItem[] items , MessageLockSet locks ) throws JMSException
{
checkNotClosed();
checkTransactionLock();
int volatileRollbacked = 0;
int persistentRollbacked = 0;
synchronized (storeLock)
{
for (int n = 0 ; n < items.leng... | [
"public",
"boolean",
"redeliverLocked",
"(",
"TransactionItem",
"[",
"]",
"items",
",",
"MessageLockSet",
"locks",
")",
"throws",
"JMSException",
"{",
"checkNotClosed",
"(",
")",
";",
"checkTransactionLock",
"(",
")",
";",
"int",
"volatileRollbacked",
"=",
"0",
... | Rollback get operations on this queue (messages are unlocked)..
Consumers are notified of rollbacked messages availability
@return true if a commit is required to ensure data safety | [
"Rollback",
"get",
"operations",
"on",
"this",
"queue",
"(",
"messages",
"are",
"unlocked",
")",
"..",
"Consumers",
"are",
"notified",
"of",
"rollbacked",
"messages",
"availability"
] | train | https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/local/destination/LocalQueue.java#L307-L361 |
deephacks/confit | api-admin/src/main/java/org/deephacks/confit/admin/query/BeanQueryBuilder.java | BeanQueryBuilder.greaterThan | public static <A extends Comparable<A>> BeanRestriction greaterThan(String property, A value) {
return new GreaterThan<>(property, value);
} | java | public static <A extends Comparable<A>> BeanRestriction greaterThan(String property, A value) {
return new GreaterThan<>(property, value);
} | [
"public",
"static",
"<",
"A",
"extends",
"Comparable",
"<",
"A",
">",
">",
"BeanRestriction",
"greaterThan",
"(",
"String",
"property",
",",
"A",
"value",
")",
"{",
"return",
"new",
"GreaterThan",
"<>",
"(",
"property",
",",
"value",
")",
";",
"}"
] | Query which asserts that a property is greater than (but not equal to) a value.
@param property field to query
@param value value to query for
@return restriction to be added to {@link BeanQuery}. | [
"Query",
"which",
"asserts",
"that",
"a",
"property",
"is",
"greater",
"than",
"(",
"but",
"not",
"equal",
"to",
")",
"a",
"value",
"."
] | train | https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/api-admin/src/main/java/org/deephacks/confit/admin/query/BeanQueryBuilder.java#L58-L60 |
sarl/sarl | docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/references/SarlLinkFactory.java | SarlLinkFactory.setBoundsLinkInfo | protected void setBoundsLinkInfo(LinkInfo linkInfo, Type bound) {
Reflect.callProc(this, LinkFactory.class, "setBoundsLinkInfo", //$NON-NLS-1$
new Class<?>[]{LinkInfo.class, Type.class},
linkInfo, bound);
} | java | protected void setBoundsLinkInfo(LinkInfo linkInfo, Type bound) {
Reflect.callProc(this, LinkFactory.class, "setBoundsLinkInfo", //$NON-NLS-1$
new Class<?>[]{LinkInfo.class, Type.class},
linkInfo, bound);
} | [
"protected",
"void",
"setBoundsLinkInfo",
"(",
"LinkInfo",
"linkInfo",
",",
"Type",
"bound",
")",
"{",
"Reflect",
".",
"callProc",
"(",
"this",
",",
"LinkFactory",
".",
"class",
",",
"\"setBoundsLinkInfo\"",
",",
"//$NON-NLS-1$",
"new",
"Class",
"<",
"?",
">",... | Change the bounds into the link info.
@param linkInfo the link info.
@param bound the new bounds. | [
"Change",
"the",
"bounds",
"into",
"the",
"link",
"info",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/references/SarlLinkFactory.java#L145-L149 |
fcrepo3/fcrepo | fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java | ContextUtil.setupSubjects | public List<Subject> setupSubjects(List<Map<URI, List<AttributeValue>>> subjs) {
if (subjs == null || subjs.size() == 0) {
return Collections.singletonList(new Subject(new ArrayList<Attribute>()));
}
List<Subject> subjects = new ArrayList<Subject>(subjs.size());
// Go throu... | java | public List<Subject> setupSubjects(List<Map<URI, List<AttributeValue>>> subjs) {
if (subjs == null || subjs.size() == 0) {
return Collections.singletonList(new Subject(new ArrayList<Attribute>()));
}
List<Subject> subjects = new ArrayList<Subject>(subjs.size());
// Go throu... | [
"public",
"List",
"<",
"Subject",
">",
"setupSubjects",
"(",
"List",
"<",
"Map",
"<",
"URI",
",",
"List",
"<",
"AttributeValue",
">",
">",
">",
"subjs",
")",
"{",
"if",
"(",
"subjs",
"==",
"null",
"||",
"subjs",
".",
"size",
"(",
")",
"==",
"0",
... | Sets up the Subject section of the request. Takes a list of Maps of
URI/AttributeValue pairs. Each list element represents one subject which
contains a map of URI/AttributeValues.
@return a Set of Subject instances for inclusion in a Request | [
"Sets",
"up",
"the",
"Subject",
"section",
"of",
"the",
"request",
".",
"Takes",
"a",
"list",
"of",
"Maps",
"of",
"URI",
"/",
"AttributeValue",
"pairs",
".",
"Each",
"list",
"element",
"represents",
"one",
"subject",
"which",
"contains",
"a",
"map",
"of",
... | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java#L103-L130 |
intive-FDV/DynamicJasper | src/main/java/ar/com/fdvs/dj/util/ExpressionUtils.java | ExpressionUtils.createExpression | @Deprecated
public static JRDesignExpression createExpression(String name, CustomExpression expression) {
return createExpression(name, expression, false);
} | java | @Deprecated
public static JRDesignExpression createExpression(String name, CustomExpression expression) {
return createExpression(name, expression, false);
} | [
"@",
"Deprecated",
"public",
"static",
"JRDesignExpression",
"createExpression",
"(",
"String",
"name",
",",
"CustomExpression",
"expression",
")",
"{",
"return",
"createExpression",
"(",
"name",
",",
"expression",
",",
"false",
")",
";",
"}"
] | Use {@link #createAndRegisterExpression(DynamicJasperDesign, String, CustomExpression)}
This deprecated version may cause wrong field values when expression is executed in a group footer
@param name
@param expression
@return | [
"Use",
"{"
] | train | https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/ExpressionUtils.java#L221-L224 |
ow2-chameleon/fuchsia | importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java | ZWaveController.sendValue | public void sendValue(int nodeId, int endpoint, int value) {
ZWaveNode node = this.getNode(nodeId);
ZWaveSetCommands zwaveCommandClass = null;
SerialMessage serialMessage = null;
for (ZWaveCommandClass.CommandClass commandClass : new ZWaveCommandClass.CommandClass[] { ZWaveCommandClass.CommandClass.SWITCH_MU... | java | public void sendValue(int nodeId, int endpoint, int value) {
ZWaveNode node = this.getNode(nodeId);
ZWaveSetCommands zwaveCommandClass = null;
SerialMessage serialMessage = null;
for (ZWaveCommandClass.CommandClass commandClass : new ZWaveCommandClass.CommandClass[] { ZWaveCommandClass.CommandClass.SWITCH_MU... | [
"public",
"void",
"sendValue",
"(",
"int",
"nodeId",
",",
"int",
"endpoint",
",",
"int",
"value",
")",
"{",
"ZWaveNode",
"node",
"=",
"this",
".",
"getNode",
"(",
"nodeId",
")",
";",
"ZWaveSetCommands",
"zwaveCommandClass",
"=",
"null",
";",
"SerialMessage",... | Send value to node.
@param nodeId the node Id to send the value to.
@param endpoint the endpoint to send the value to.
@param value the value to send | [
"Send",
"value",
"to",
"node",
"."
] | train | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/importers/zwave/src/main/java/org/ow2/chameleon/fuchsia/importer/zwave/internal/protocol/ZWaveController.java#L1000-L1024 |
netplex/json-smart-v2 | accessors-smart/src/main/java/net/minidev/asm/ASMUtil.java | ASMUtil.autoBoxing | public static void autoBoxing(MethodVisitor mv, Class<?> clz) {
autoBoxing(mv, Type.getType(clz));
} | java | public static void autoBoxing(MethodVisitor mv, Class<?> clz) {
autoBoxing(mv, Type.getType(clz));
} | [
"public",
"static",
"void",
"autoBoxing",
"(",
"MethodVisitor",
"mv",
",",
"Class",
"<",
"?",
">",
"clz",
")",
"{",
"autoBoxing",
"(",
"mv",
",",
"Type",
".",
"getType",
"(",
"clz",
")",
")",
";",
"}"
] | Append the call of proper autoboxing method for the given primitif type. | [
"Append",
"the",
"call",
"of",
"proper",
"autoboxing",
"method",
"for",
"the",
"given",
"primitif",
"type",
"."
] | train | https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/accessors-smart/src/main/java/net/minidev/asm/ASMUtil.java#L38-L40 |
defei/codelogger-utils | src/main/java/org/codelogger/utils/ClassUtils.java | ClassUtils.instantiateClass | public static <T> T instantiateClass(final Class<T> clazz, final Class<?>[] parameterTypes,
final Object[] parameterValues) throws BeanInstantiationException {
if (clazz.isInterface()) {
throw new BeanInstantiationException(clazz, CLASS_IS_INTERFACE);
}
try {
Constructor<T> constructor = cl... | java | public static <T> T instantiateClass(final Class<T> clazz, final Class<?>[] parameterTypes,
final Object[] parameterValues) throws BeanInstantiationException {
if (clazz.isInterface()) {
throw new BeanInstantiationException(clazz, CLASS_IS_INTERFACE);
}
try {
Constructor<T> constructor = cl... | [
"public",
"static",
"<",
"T",
">",
"T",
"instantiateClass",
"(",
"final",
"Class",
"<",
"T",
">",
"clazz",
",",
"final",
"Class",
"<",
"?",
">",
"[",
"]",
"parameterTypes",
",",
"final",
"Object",
"[",
"]",
"parameterValues",
")",
"throws",
"BeanInstanti... | Create and initialize a new instance of the given class by given
parameterTypes and parameterValues.
@param clazz can not be null.
@param parameterTypes constructor parameters class type array.
@param parameterValues constructor parameters value array.
@return a newly allocated instance of the class represented by thi... | [
"Create",
"and",
"initialize",
"a",
"new",
"instance",
"of",
"the",
"given",
"class",
"by",
"given",
"parameterTypes",
"and",
"parameterValues",
"."
] | train | https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/ClassUtils.java#L198-L211 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.