repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/EntryInfo.java | EntryInfo.createEntryInfoPool | static public EntryInfoPool createEntryInfoPool(String poolName, int size) {
"""
/*
This allocates an EntryInfo pool.
@param poolName The name to be associated with the new pool being created
@param size size of the new pool
@return The newly created EntryInfoPool object
@ibm-private-in-use
"""
f... | java | static public EntryInfoPool createEntryInfoPool(String poolName, int size){
final String methodName = "createEntryInfoPool()";
EntryInfoPool pool = new EntryInfoPool(poolName, size);
//pools.add(pool);
if (tc.isDebugEnabled())
Tr.debug(tc, methodName+" poolName=" + poolName);
... | [
"static",
"public",
"EntryInfoPool",
"createEntryInfoPool",
"(",
"String",
"poolName",
",",
"int",
"size",
")",
"{",
"final",
"String",
"methodName",
"=",
"\"createEntryInfoPool()\"",
";",
"EntryInfoPool",
"pool",
"=",
"new",
"EntryInfoPool",
"(",
"poolName",
",",
... | /*
This allocates an EntryInfo pool.
@param poolName The name to be associated with the new pool being created
@param size size of the new pool
@return The newly created EntryInfoPool object
@ibm-private-in-use | [
"/",
"*",
"This",
"allocates",
"an",
"EntryInfo",
"pool",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/EntryInfo.java#L832-L839 |
hypercube1024/firefly | firefly/src/main/java/com/firefly/codec/http2/model/InputStreamContentProvider.java | InputStreamContentProvider.onRead | protected ByteBuffer onRead(byte[] buffer, int offset, int length) {
"""
Callback method invoked just after having read from the stream,
but before returning the iteration element (a {@link ByteBuffer}
to the caller.
<p>
Subclasses may override this method to copy the content read from
the stream to another l... | java | protected ByteBuffer onRead(byte[] buffer, int offset, int length) {
if (length <= 0)
return BufferUtils.EMPTY_BUFFER;
return ByteBuffer.wrap(buffer, offset, length);
} | [
"protected",
"ByteBuffer",
"onRead",
"(",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"if",
"(",
"length",
"<=",
"0",
")",
"return",
"BufferUtils",
".",
"EMPTY_BUFFER",
";",
"return",
"ByteBuffer",
".",
"wrap",
"(",
... | Callback method invoked just after having read from the stream,
but before returning the iteration element (a {@link ByteBuffer}
to the caller.
<p>
Subclasses may override this method to copy the content read from
the stream to another location (a file, or in memory if the content
is known to fit).
@param buffer the b... | [
"Callback",
"method",
"invoked",
"just",
"after",
"having",
"read",
"from",
"the",
"stream",
"but",
"before",
"returning",
"the",
"iteration",
"element",
"(",
"a",
"{",
"@link",
"ByteBuffer",
"}",
"to",
"the",
"caller",
".",
"<p",
">",
"Subclasses",
"may",
... | train | https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/http2/model/InputStreamContentProvider.java#L76-L80 |
wcm-io/wcm-io-handler | media/src/main/java/io/wcm/handler/media/spi/MediaSource.java | MediaSource.getMediaRef | @Deprecated
protected final @Nullable String getMediaRef(@NotNull MediaRequest mediaRequest) {
"""
Get media request path to media library
@param mediaRequest Media request
@return Path or null if not present
@deprecated Use {@link #getMediaRef(MediaRequest, MediaHandlerConfig)}
"""
return getMediaRef... | java | @Deprecated
protected final @Nullable String getMediaRef(@NotNull MediaRequest mediaRequest) {
return getMediaRef(mediaRequest, null);
} | [
"@",
"Deprecated",
"protected",
"final",
"@",
"Nullable",
"String",
"getMediaRef",
"(",
"@",
"NotNull",
"MediaRequest",
"mediaRequest",
")",
"{",
"return",
"getMediaRef",
"(",
"mediaRequest",
",",
"null",
")",
";",
"}"
] | Get media request path to media library
@param mediaRequest Media request
@return Path or null if not present
@deprecated Use {@link #getMediaRef(MediaRequest, MediaHandlerConfig)} | [
"Get",
"media",
"request",
"path",
"to",
"media",
"library"
] | train | https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/spi/MediaSource.java#L129-L132 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/proxyservice/impl/ProxyRegistry.java | ProxyRegistry.createProxy | public DistributedObjectFuture createProxy(String name, boolean publishEvent, boolean initialize) {
"""
Creates a DistributedObject proxy if it is not created yet
@param name The name of the distributedObject proxy object.
@param publishEvent true if a DistributedObjectEvent should be fired.
@param in... | java | public DistributedObjectFuture createProxy(String name, boolean publishEvent, boolean initialize) {
if (proxies.containsKey(name)) {
return null;
}
if (!proxyService.nodeEngine.isRunning()) {
throw new HazelcastInstanceNotActiveException();
}
Distributed... | [
"public",
"DistributedObjectFuture",
"createProxy",
"(",
"String",
"name",
",",
"boolean",
"publishEvent",
",",
"boolean",
"initialize",
")",
"{",
"if",
"(",
"proxies",
".",
"containsKey",
"(",
"name",
")",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
... | Creates a DistributedObject proxy if it is not created yet
@param name The name of the distributedObject proxy object.
@param publishEvent true if a DistributedObjectEvent should be fired.
@param initialize true if he DistributedObject proxy object should be initialized.
@return The DistributedObject instanc... | [
"Creates",
"a",
"DistributedObject",
"proxy",
"if",
"it",
"is",
"not",
"created",
"yet"
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/proxyservice/impl/ProxyRegistry.java#L195-L210 |
apigee/usergrid-java-sdk | src/main/java/org/usergrid/java/client/Client.java | Client.addUserToGroup | public ApiResponse addUserToGroup(String userId, String groupId) {
"""
Adds a user to the specified groups.
@param userId
@param groupId
@return
"""
return apiRequest(HttpMethod.POST, null, null, organizationId, applicationId, "groups",
groupId, "users", userId);
} | java | public ApiResponse addUserToGroup(String userId, String groupId) {
return apiRequest(HttpMethod.POST, null, null, organizationId, applicationId, "groups",
groupId, "users", userId);
} | [
"public",
"ApiResponse",
"addUserToGroup",
"(",
"String",
"userId",
",",
"String",
"groupId",
")",
"{",
"return",
"apiRequest",
"(",
"HttpMethod",
".",
"POST",
",",
"null",
",",
"null",
",",
"organizationId",
",",
"applicationId",
",",
"\"groups\"",
",",
"grou... | Adds a user to the specified groups.
@param userId
@param groupId
@return | [
"Adds",
"a",
"user",
"to",
"the",
"specified",
"groups",
"."
] | train | https://github.com/apigee/usergrid-java-sdk/blob/6202745f184754defff13962dfc3d830bc7d8c63/src/main/java/org/usergrid/java/client/Client.java#L876-L879 |
mangstadt/biweekly | src/main/java/biweekly/component/Observance.java | Observance.setDateStart | public DateStart setDateStart(DateTimeComponents rawComponents) {
"""
Sets the date that the timezone observance starts.
@param rawComponents the start date or null to remove
@return the property that was created
@see <a href="http://tools.ietf.org/html/rfc5545#page-97">RFC 5545
p.97-8</a>
@see <a href="http:... | java | public DateStart setDateStart(DateTimeComponents rawComponents) {
return setDateStart((rawComponents == null) ? null : new ICalDate(rawComponents, true));
} | [
"public",
"DateStart",
"setDateStart",
"(",
"DateTimeComponents",
"rawComponents",
")",
"{",
"return",
"setDateStart",
"(",
"(",
"rawComponents",
"==",
"null",
")",
"?",
"null",
":",
"new",
"ICalDate",
"(",
"rawComponents",
",",
"true",
")",
")",
";",
"}"
] | Sets the date that the timezone observance starts.
@param rawComponents the start date or null to remove
@return the property that was created
@see <a href="http://tools.ietf.org/html/rfc5545#page-97">RFC 5545
p.97-8</a>
@see <a href="http://tools.ietf.org/html/rfc2445#page-93">RFC 2445
p.93-4</a> | [
"Sets",
"the",
"date",
"that",
"the",
"timezone",
"observance",
"starts",
"."
] | train | https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/component/Observance.java#L121-L123 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java | FileUtil.convertLineSeparator | public static File convertLineSeparator(File file, Charset charset, LineSeparator lineSeparator) {
"""
转换换行符<br>
将给定文件的换行符转换为指定换行符
@param file 文件
@param charset 编码
@param lineSeparator 换行符枚举{@link LineSeparator}
@return 被修改的文件
@since 3.1.0
"""
final List<String> lines = readLines(file, charset);
... | java | public static File convertLineSeparator(File file, Charset charset, LineSeparator lineSeparator) {
final List<String> lines = readLines(file, charset);
return FileWriter.create(file, charset).writeLines(lines, lineSeparator, false);
} | [
"public",
"static",
"File",
"convertLineSeparator",
"(",
"File",
"file",
",",
"Charset",
"charset",
",",
"LineSeparator",
"lineSeparator",
")",
"{",
"final",
"List",
"<",
"String",
">",
"lines",
"=",
"readLines",
"(",
"file",
",",
"charset",
")",
";",
"retur... | 转换换行符<br>
将给定文件的换行符转换为指定换行符
@param file 文件
@param charset 编码
@param lineSeparator 换行符枚举{@link LineSeparator}
@return 被修改的文件
@since 3.1.0 | [
"转换换行符<br",
">",
"将给定文件的换行符转换为指定换行符"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3243-L3246 |
apache/flink | flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java | RecoverableMultiPartUploadImpl.snapshotAndGetRecoverable | @Override
public S3Recoverable snapshotAndGetRecoverable(@Nullable final RefCountedFSOutputStream incompletePartFile) throws IOException {
"""
Creates a snapshot of this MultiPartUpload, from which the upload can be resumed.
<p>Data buffered locally which is less than
{@link org.apache.flink.fs.s3.common.Flin... | java | @Override
public S3Recoverable snapshotAndGetRecoverable(@Nullable final RefCountedFSOutputStream incompletePartFile) throws IOException {
final String incompletePartObjectName = safelyUploadSmallPart(incompletePartFile);
// make sure all other uploads are complete
// this currently makes the method blocking,
... | [
"@",
"Override",
"public",
"S3Recoverable",
"snapshotAndGetRecoverable",
"(",
"@",
"Nullable",
"final",
"RefCountedFSOutputStream",
"incompletePartFile",
")",
"throws",
"IOException",
"{",
"final",
"String",
"incompletePartObjectName",
"=",
"safelyUploadSmallPart",
"(",
"in... | Creates a snapshot of this MultiPartUpload, from which the upload can be resumed.
<p>Data buffered locally which is less than
{@link org.apache.flink.fs.s3.common.FlinkS3FileSystem#S3_MULTIPART_MIN_PART_SIZE S3_MULTIPART_MIN_PART_SIZE},
and cannot be uploaded as part of the MPU and set to S3 as independent objects.
<... | [
"Creates",
"a",
"snapshot",
"of",
"this",
"MultiPartUpload",
"from",
"which",
"the",
"upload",
"can",
"be",
"resumed",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java#L143-L163 |
GCRC/nunaliit | nunaliit2-couch-onUpload/src/main/java/ca/carleton/gcrc/couch/onUpload/UploadWorkerThread.java | UploadWorkerThread.performSubmittedInlineWork | private void performSubmittedInlineWork(Work work) throws Exception {
"""
This function is called when a media file was added on a different
node, such as a mobile device. In that case, the media is marked
as 'submitted_inline' since the media is already attached to the document
but as not yet gone through the ... | java | private void performSubmittedInlineWork(Work work) throws Exception {
String attachmentName = work.getAttachmentName();
FileConversionContext conversionContext =
new FileConversionContextImpl(work,documentDbDesign,mediaDir);
DocumentDescriptor docDescriptor = conversionContext.getDocument();
Attachment... | [
"private",
"void",
"performSubmittedInlineWork",
"(",
"Work",
"work",
")",
"throws",
"Exception",
"{",
"String",
"attachmentName",
"=",
"work",
".",
"getAttachmentName",
"(",
")",
";",
"FileConversionContext",
"conversionContext",
"=",
"new",
"FileConversionContextImpl"... | This function is called when a media file was added on a different
node, such as a mobile device. In that case, the media is marked
as 'submitted_inline' since the media is already attached to the document
but as not yet gone through the process that the robot implements.
@param docId
@param attachmentName
@throws Exce... | [
"This",
"function",
"is",
"called",
"when",
"a",
"media",
"file",
"was",
"added",
"on",
"a",
"different",
"node",
"such",
"as",
"a",
"mobile",
"device",
".",
"In",
"that",
"case",
"the",
"media",
"is",
"marked",
"as",
"submitted_inline",
"since",
"the",
... | train | https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-couch-onUpload/src/main/java/ca/carleton/gcrc/couch/onUpload/UploadWorkerThread.java#L454-L498 |
couchbase/couchbase-lite-java | src/main/java/com/couchbase/lite/MutableDocument.java | MutableDocument.setDictionary | @NonNull
@Override
public MutableDocument setDictionary(@NonNull String key, Dictionary value) {
"""
Set a Dictionary value for the given key
@param key the key.
@param key the Dictionary value.
@return this MutableDocument instance
"""
return setValue(key, value);
} | java | @NonNull
@Override
public MutableDocument setDictionary(@NonNull String key, Dictionary value) {
return setValue(key, value);
} | [
"@",
"NonNull",
"@",
"Override",
"public",
"MutableDocument",
"setDictionary",
"(",
"@",
"NonNull",
"String",
"key",
",",
"Dictionary",
"value",
")",
"{",
"return",
"setValue",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Set a Dictionary value for the given key
@param key the key.
@param key the Dictionary value.
@return this MutableDocument instance | [
"Set",
"a",
"Dictionary",
"value",
"for",
"the",
"given",
"key"
] | train | https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableDocument.java#L288-L292 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java | J2CSecurityHelper.stripRealm | private static String stripRealm(String uniqueUserId, String realm) {
"""
Some registries return user:realm/uniqueId on the invocation of the getUniqueUserId
method but do not accept it as the uniqueUserId for other methods like getUniqueGroupIds.
This method is used to strip of the user:realm/ portion and get t... | java | private static String stripRealm(String uniqueUserId, String realm) {
if (uniqueUserId == null || realm == null)
return uniqueUserId;
int index = uniqueUserId.indexOf(realm + REALM_SEPARATOR);
if (index > -1) {
uniqueUserId = uniqueUserId.substring(index + realm.length() ... | [
"private",
"static",
"String",
"stripRealm",
"(",
"String",
"uniqueUserId",
",",
"String",
"realm",
")",
"{",
"if",
"(",
"uniqueUserId",
"==",
"null",
"||",
"realm",
"==",
"null",
")",
"return",
"uniqueUserId",
";",
"int",
"index",
"=",
"uniqueUserId",
".",
... | Some registries return user:realm/uniqueId on the invocation of the getUniqueUserId
method but do not accept it as the uniqueUserId for other methods like getUniqueGroupIds.
This method is used to strip of the user:realm/ portion and get the uniqueId
@param uniqueUserId The uniqueId of the user
@param realm The realm ... | [
"Some",
"registries",
"return",
"user",
":",
"realm",
"/",
"uniqueId",
"on",
"the",
"invocation",
"of",
"the",
"getUniqueUserId",
"method",
"but",
"do",
"not",
"accept",
"it",
"as",
"the",
"uniqueUserId",
"for",
"other",
"methods",
"like",
"getUniqueGroupIds",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.inbound.security/src/com/ibm/ws/jca/security/internal/J2CSecurityHelper.java#L668-L676 |
orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java | GeoJsonReaderDriver.parseData | private void parseData() throws IOException, SQLException {
"""
Parses the GeoJSON data and set the values to the table.
@throws IOException
@throws SQLException
"""
FileInputStream fis = null;
try {
fis = new FileInputStream(fileName);
try (JsonParser jp = jsFactory... | java | private void parseData() throws IOException, SQLException {
FileInputStream fis = null;
try {
fis = new FileInputStream(fileName);
try (JsonParser jp = jsFactory.createParser(fis)) {
jp.nextToken();//START_OBJECT
jp.nextToken(); // field_name (type... | [
"private",
"void",
"parseData",
"(",
")",
"throws",
"IOException",
",",
"SQLException",
"{",
"FileInputStream",
"fis",
"=",
"null",
";",
"try",
"{",
"fis",
"=",
"new",
"FileInputStream",
"(",
"fileName",
")",
";",
"try",
"(",
"JsonParser",
"jp",
"=",
"jsFa... | Parses the GeoJSON data and set the values to the table.
@throws IOException
@throws SQLException | [
"Parses",
"the",
"GeoJSON",
"data",
"and",
"set",
"the",
"values",
"to",
"the",
"table",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonReaderDriver.java#L1243-L1270 |
lessthanoptimal/ejml | main/ejml-ddense/src/org/ejml/dense/block/decomposition/qr/QRDecompositionHouseholder_DDRB.java | QRDecompositionHouseholder_DDRB.applyQ | public void applyQ(DMatrixRBlock B , boolean isIdentity ) {
"""
Specialized version of applyQ() that allows the zeros in an identity matrix
to be taken advantage of depending on if isIdentity is true or not.
@param B
@param isIdentity If B is an identity matrix.
"""
int minDimen = Math.min(dataA.n... | java | public void applyQ(DMatrixRBlock B , boolean isIdentity ) {
int minDimen = Math.min(dataA.numCols,dataA.numRows);
DSubmatrixD1 subB = new DSubmatrixD1(B);
W.col0 = W.row0 = 0;
Y.row1 = W.row1 = dataA.numRows;
WTA.row0 = WTA.col0 = 0;
int start = minDimen - minDimen % b... | [
"public",
"void",
"applyQ",
"(",
"DMatrixRBlock",
"B",
",",
"boolean",
"isIdentity",
")",
"{",
"int",
"minDimen",
"=",
"Math",
".",
"min",
"(",
"dataA",
".",
"numCols",
",",
"dataA",
".",
"numRows",
")",
";",
"DSubmatrixD1",
"subB",
"=",
"new",
"DSubmatr... | Specialized version of applyQ() that allows the zeros in an identity matrix
to be taken advantage of depending on if isIdentity is true or not.
@param B
@param isIdentity If B is an identity matrix. | [
"Specialized",
"version",
"of",
"applyQ",
"()",
"that",
"allows",
"the",
"zeros",
"in",
"an",
"identity",
"matrix",
"to",
"be",
"taken",
"advantage",
"of",
"depending",
"on",
"if",
"isIdentity",
"is",
"true",
"or",
"not",
"."
] | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/qr/QRDecompositionHouseholder_DDRB.java#L177-L215 |
dmurph/jgoogleanalyticstracker | src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java | JGoogleAnalyticsTracker.makeCustomRequest | public synchronized void makeCustomRequest(AnalyticsRequestData argData) {
"""
Makes a custom tracking request based from the given data.
@param argData
@throws NullPointerException
if argData is null or if the URL builder is null
"""
if (!enabled) {
logger.debug("Ignoring tracking req... | java | public synchronized void makeCustomRequest(AnalyticsRequestData argData) {
if (!enabled) {
logger.debug("Ignoring tracking request, enabled is false");
return;
}
if (argData == null) {
throw new NullPointerException("Data cannot be null");
}
if... | [
"public",
"synchronized",
"void",
"makeCustomRequest",
"(",
"AnalyticsRequestData",
"argData",
")",
"{",
"if",
"(",
"!",
"enabled",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Ignoring tracking request, enabled is false\"",
")",
";",
"return",
";",
"}",
"if",
"(",
... | Makes a custom tracking request based from the given data.
@param argData
@throws NullPointerException
if argData is null or if the URL builder is null | [
"Makes",
"a",
"custom",
"tracking",
"request",
"based",
"from",
"the",
"given",
"data",
"."
] | train | https://github.com/dmurph/jgoogleanalyticstracker/blob/69f68caf8e09a53e6f6076477bf05b84bc80e386/src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java#L410-L455 |
landawn/AbacusUtil | src/com/landawn/abacus/util/JdbcUtil.java | JdbcUtil.importData | @SuppressWarnings("rawtypes")
public static int importData(final DataSet dataset, final Connection conn, final String insertSQL, final Map<String, ? extends Type> columnTypeMap)
throws UncheckedSQLException {
"""
Imports the data from <code>DataSet</code> to database.
@param dataset
@param co... | java | @SuppressWarnings("rawtypes")
public static int importData(final DataSet dataset, final Connection conn, final String insertSQL, final Map<String, ? extends Type> columnTypeMap)
throws UncheckedSQLException {
return importData(dataset, 0, dataset.size(), conn, insertSQL, columnTypeMap);
... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"static",
"int",
"importData",
"(",
"final",
"DataSet",
"dataset",
",",
"final",
"Connection",
"conn",
",",
"final",
"String",
"insertSQL",
",",
"final",
"Map",
"<",
"String",
",",
"?",
"extends",
... | Imports the data from <code>DataSet</code> to database.
@param dataset
@param conn
@param insertSQL the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql:
<pre><code>
List<String> columnNameList = new ArrayList<>(dataset.columnNameList());
colum... | [
"Imports",
"the",
"data",
"from",
"<code",
">",
"DataSet<",
"/",
"code",
">",
"to",
"database",
"."
] | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/JdbcUtil.java#L1975-L1979 |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java | EJSHome.createRemoteBusinessObject | public Object createRemoteBusinessObject(int interfaceIndex, ManagedObjectContext context)
throws RemoteException,
CreateException {
"""
Method to create a remote business reference object. Once the index
of the interface is found, it is then passed through the EJSWrapperCo... | java | public Object createRemoteBusinessObject(int interfaceIndex, ManagedObjectContext context)
throws RemoteException,
CreateException
{
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(tc,... | [
"public",
"Object",
"createRemoteBusinessObject",
"(",
"int",
"interfaceIndex",
",",
"ManagedObjectContext",
"context",
")",
"throws",
"RemoteException",
",",
"CreateException",
"{",
"final",
"boolean",
"isTraceOn",
"=",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
... | Method to create a remote business reference object. Once the index
of the interface is found, it is then passed through the EJSWrapperCommon
for the rest of the logic.
@param interfaceIndex the remote business interface index
@param context the context for creating the object, or null | [
"Method",
"to",
"create",
"a",
"remote",
"business",
"reference",
"object",
".",
"Once",
"the",
"index",
"of",
"the",
"interface",
"is",
"found",
"it",
"is",
"then",
"passed",
"through",
"the",
"EJSWrapperCommon",
"for",
"the",
"rest",
"of",
"the",
"logic",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java#L1660-L1679 |
micronaut-projects/micronaut-core | inject/src/main/java/io/micronaut/context/DefaultBeanContext.java | DefaultBeanContext.getBeanProvider | protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType) {
"""
Get provided beans of the given type.
@param resolutionContext The bean resolution context
@param beanType The bean type
@param <T> The bean type param... | java | protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType) {
return getBeanProvider(resolutionContext, beanType, null);
} | [
"protected",
"@",
"Nonnull",
"<",
"T",
">",
"Provider",
"<",
"T",
">",
"getBeanProvider",
"(",
"@",
"Nullable",
"BeanResolutionContext",
"resolutionContext",
",",
"@",
"Nonnull",
"Class",
"<",
"T",
">",
"beanType",
")",
"{",
"return",
"getBeanProvider",
"(",
... | Get provided beans of the given type.
@param resolutionContext The bean resolution context
@param beanType The bean type
@param <T> The bean type parameter
@return The found beans | [
"Get",
"provided",
"beans",
"of",
"the",
"given",
"type",
"."
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/DefaultBeanContext.java#L881-L883 |
dlemmermann/CalendarFX | CalendarFXView/src/main/java/com/calendarfx/view/DateControl.java | DateControl.setUsagePolicy | public final void setUsagePolicy(Callback<Integer, Usage> policy) {
"""
Sets the value of {@link #usagePolicyProperty()}.
@param policy the new usage policy
"""
Objects.requireNonNull(policy);
this.usagePolicy.set(policy);
} | java | public final void setUsagePolicy(Callback<Integer, Usage> policy) {
Objects.requireNonNull(policy);
this.usagePolicy.set(policy);
} | [
"public",
"final",
"void",
"setUsagePolicy",
"(",
"Callback",
"<",
"Integer",
",",
"Usage",
">",
"policy",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"policy",
")",
";",
"this",
".",
"usagePolicy",
".",
"set",
"(",
"policy",
")",
";",
"}"
] | Sets the value of {@link #usagePolicyProperty()}.
@param policy the new usage policy | [
"Sets",
"the",
"value",
"of",
"{",
"@link",
"#usagePolicyProperty",
"()",
"}",
"."
] | train | https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/DateControl.java#L2575-L2578 |
jbundle/jbundle | base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/html/HTMLServlet.java | HTMLServlet.doProcess | public void doProcess(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
"""
Process an HTML get or post.
@exception ServletException From inherited class.
@exception IOException From inherited class.
"""
ServletTask servletTask = new ServletTask(this, Ba... | java | public void doProcess(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
ServletTask servletTask = new ServletTask(this, BasicServlet.SERVLET_TYPE.HTML);
try {
this.addBrowserProperties(req, servletTask);
servletTask.doProcess(thi... | [
"public",
"void",
"doProcess",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"res",
")",
"throws",
"ServletException",
",",
"IOException",
"{",
"ServletTask",
"servletTask",
"=",
"new",
"ServletTask",
"(",
"this",
",",
"BasicServlet",
".",
"SERVLET_T... | Process an HTML get or post.
@exception ServletException From inherited class.
@exception IOException From inherited class. | [
"Process",
"an",
"HTML",
"get",
"or",
"post",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/html/HTMLServlet.java#L134-L148 |
Azure/azure-sdk-for-java | storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java | StorageAccountsInner.createOrUpdateManagementPolicies | public StorageAccountManagementPoliciesInner createOrUpdateManagementPolicies(String resourceGroupName, String accountName, Object policy) {
"""
Sets the data policy rules associated with the specified storage account.
@param resourceGroupName The name of the resource group within the user's subscription. The n... | java | public StorageAccountManagementPoliciesInner createOrUpdateManagementPolicies(String resourceGroupName, String accountName, Object policy) {
return createOrUpdateManagementPoliciesWithServiceResponseAsync(resourceGroupName, accountName, policy).toBlocking().single().body();
} | [
"public",
"StorageAccountManagementPoliciesInner",
"createOrUpdateManagementPolicies",
"(",
"String",
"resourceGroupName",
",",
"String",
"accountName",
",",
"Object",
"policy",
")",
"{",
"return",
"createOrUpdateManagementPoliciesWithServiceResponseAsync",
"(",
"resourceGroupName"... | Sets the data policy rules associated with the specified storage account.
@param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
@param accountName The name of the storage account within the specified resource group. Storage account names must be between 3... | [
"Sets",
"the",
"data",
"policy",
"rules",
"associated",
"with",
"the",
"specified",
"storage",
"account",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L1373-L1375 |
cdk/cdk | legacy/src/main/java/org/openscience/cdk/iupac/parser/MoleculeBuilder.java | MoleculeBuilder.buildChain | private IAtomContainer buildChain(int length, boolean isMainCyclic) {
"""
Builds the main chain which may act as a foundation for futher working groups.
@param mainChain The parsed prefix which depicts the chain's length.
@param isMainCyclic A flag to show if the molecule is a ring. 0 means not a ring, 1 means... | java | private IAtomContainer buildChain(int length, boolean isMainCyclic) {
IAtomContainer currentChain;
if (length > 0) {
//If is cyclic
if (isMainCyclic) {
//Rely on CDK's ring class constructor to generate our cyclic molecules.
currentChain = currentM... | [
"private",
"IAtomContainer",
"buildChain",
"(",
"int",
"length",
",",
"boolean",
"isMainCyclic",
")",
"{",
"IAtomContainer",
"currentChain",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"//If is cyclic",
"if",
"(",
"isMainCyclic",
")",
"{",
"//Rely on CDK's rin... | Builds the main chain which may act as a foundation for futher working groups.
@param mainChain The parsed prefix which depicts the chain's length.
@param isMainCyclic A flag to show if the molecule is a ring. 0 means not a ring, 1 means is a ring.
@return A Molecule containing the requested chain. | [
"Builds",
"the",
"main",
"chain",
"which",
"may",
"act",
"as",
"a",
"foundation",
"for",
"futher",
"working",
"groups",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/iupac/parser/MoleculeBuilder.java#L80-L97 |
gallandarakhneorg/afc | core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java | Transform1D.toTransform2D | @Pure
public final Transform2D toTransform2D(Point2D<?, ?> startPoint, Point2D<?, ?> endPoint) {
"""
Replies a 2D transformation that is corresponding to this transformation.
@param startPoint is the 2D position of the start point of the segment.
@param endPoint is the 2D position of the end point of the segm... | java | @Pure
public final Transform2D toTransform2D(Point2D<?, ?> startPoint, Point2D<?, ?> endPoint) {
assert startPoint != null : AssertMessages.notNullParameter(0);
assert endPoint != null : AssertMessages.notNullParameter(1);
return toTransform2D(startPoint.getX(), startPoint.getY(), endPoint.getX(), endPoint.getY(... | [
"@",
"Pure",
"public",
"final",
"Transform2D",
"toTransform2D",
"(",
"Point2D",
"<",
"?",
",",
"?",
">",
"startPoint",
",",
"Point2D",
"<",
"?",
",",
"?",
">",
"endPoint",
")",
"{",
"assert",
"startPoint",
"!=",
"null",
":",
"AssertMessages",
".",
"notNu... | Replies a 2D transformation that is corresponding to this transformation.
@param startPoint is the 2D position of the start point of the segment.
@param endPoint is the 2D position of the end point of the segment
@return the 2D transformation. | [
"Replies",
"a",
"2D",
"transformation",
"that",
"is",
"corresponding",
"to",
"this",
"transformation",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d1/Transform1D.java#L634-L639 |
joestelmach/natty | src/main/java/com/joestelmach/natty/WalkerState.java | WalkerState.seasonalDateFromIcs | private Date seasonalDateFromIcs(String icsFileName, String eventSummary, int year) {
"""
Finds and returns the date for the given event summary and year within the given ics file,
or null if not present.
"""
Map<Integer, Date> dates = getDatesFromIcs(icsFileName, eventSummary, year, year);
return dat... | java | private Date seasonalDateFromIcs(String icsFileName, String eventSummary, int year) {
Map<Integer, Date> dates = getDatesFromIcs(icsFileName, eventSummary, year, year);
return dates.get(year - (eventSummary.equals(Holiday.NEW_YEARS_EVE.getSummary()) ? 1 : 0));
} | [
"private",
"Date",
"seasonalDateFromIcs",
"(",
"String",
"icsFileName",
",",
"String",
"eventSummary",
",",
"int",
"year",
")",
"{",
"Map",
"<",
"Integer",
",",
"Date",
">",
"dates",
"=",
"getDatesFromIcs",
"(",
"icsFileName",
",",
"eventSummary",
",",
"year",... | Finds and returns the date for the given event summary and year within the given ics file,
or null if not present. | [
"Finds",
"and",
"returns",
"the",
"date",
"for",
"the",
"given",
"event",
"summary",
"and",
"year",
"within",
"the",
"given",
"ics",
"file",
"or",
"null",
"if",
"not",
"present",
"."
] | train | https://github.com/joestelmach/natty/blob/74389feb4c9372e51cd51eb0800a0177fec3e5a0/src/main/java/com/joestelmach/natty/WalkerState.java#L619-L622 |
synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java | JdbcCpoAdapter.processExecuteGroup | protected <T, C> T processExecuteGroup(String name, C criteria, T result) throws CpoException {
"""
Executes an Object whose MetaData contains a stored procedure. An assumption is that the object exists in the
datasource.
@param name The filter name which tells the datasource which objects should be return... | java | protected <T, C> T processExecuteGroup(String name, C criteria, T result) throws CpoException {
Connection c = null;
T obj = null;
try {
c = getWriteConnection();
obj = processExecuteGroup(name, criteria, result, c);
commitLocalConnection(c);
} catch (Exception e) {
// Any excep... | [
"protected",
"<",
"T",
",",
"C",
">",
"T",
"processExecuteGroup",
"(",
"String",
"name",
",",
"C",
"criteria",
",",
"T",
"result",
")",
"throws",
"CpoException",
"{",
"Connection",
"c",
"=",
"null",
";",
"T",
"obj",
"=",
"null",
";",
"try",
"{",
"c",... | Executes an Object whose MetaData contains a stored procedure. An assumption is that the object exists in the
datasource.
@param name The filter name which tells the datasource which objects should be returned. The name also signifies
what data in the object will be populated.
@param criteria This is an object tha... | [
"Executes",
"an",
"Object",
"whose",
"MetaData",
"contains",
"a",
"stored",
"procedure",
".",
"An",
"assumption",
"is",
"that",
"the",
"object",
"exists",
"in",
"the",
"datasource",
"."
] | train | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L2160-L2177 |
alkacon/opencms-core | src-modules/org/opencms/workplace/tools/content/CmsElementRename.java | CmsElementRename.isValidElement | private boolean isValidElement(CmsXmlPage page, String element) {
"""
Checks if the selected new element is valid for the selected template.<p>
@param page the xml page
@param element the element name
@return true if ALL_TEMPLATES selected or the element is valid for the selected template; otherwise false
... | java | private boolean isValidElement(CmsXmlPage page, String element) {
CmsFile file = page.getFile();
String template;
try {
template = getCms().readPropertyObject(
getCms().getSitePath(file),
CmsPropertyDefinition.PROPERTY_TEMPLATE,
true).... | [
"private",
"boolean",
"isValidElement",
"(",
"CmsXmlPage",
"page",
",",
"String",
"element",
")",
"{",
"CmsFile",
"file",
"=",
"page",
".",
"getFile",
"(",
")",
";",
"String",
"template",
";",
"try",
"{",
"template",
"=",
"getCms",
"(",
")",
".",
"readPr... | Checks if the selected new element is valid for the selected template.<p>
@param page the xml page
@param element the element name
@return true if ALL_TEMPLATES selected or the element is valid for the selected template; otherwise false | [
"Checks",
"if",
"the",
"selected",
"new",
"element",
"is",
"valid",
"for",
"the",
"selected",
"template",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/content/CmsElementRename.java#L742-L756 |
wcm-io/wcm-io-sling | commons/src/main/java/io/wcm/sling/commons/resource/ImmutableValueMap.java | ImmutableValueMap.of | public static @NotNull ImmutableValueMap of(
@NotNull String k1, @NotNull Object v1,
@NotNull String k2, @NotNull Object v2,
@NotNull String k3, @NotNull Object v3) {
"""
Returns an immutable map containing the given entries, in order.
@param k1 Key 1
@param v1 Value 1
@param k2 Key 2
@param ... | java | public static @NotNull ImmutableValueMap of(
@NotNull String k1, @NotNull Object v1,
@NotNull String k2, @NotNull Object v2,
@NotNull String k3, @NotNull Object v3) {
return new ImmutableValueMap(ImmutableMap.<String, Object>of(k1, v1, k2, v2, k3, v3));
} | [
"public",
"static",
"@",
"NotNull",
"ImmutableValueMap",
"of",
"(",
"@",
"NotNull",
"String",
"k1",
",",
"@",
"NotNull",
"Object",
"v1",
",",
"@",
"NotNull",
"String",
"k2",
",",
"@",
"NotNull",
"Object",
"v2",
",",
"@",
"NotNull",
"String",
"k3",
",",
... | Returns an immutable map containing the given entries, in order.
@param k1 Key 1
@param v1 Value 1
@param k2 Key 2
@param v2 Value 2
@param k3 Key 3
@param v3 Value 3
@return ImmutableValueMap
@throws IllegalArgumentException if duplicate keys are provided | [
"Returns",
"an",
"immutable",
"map",
"containing",
"the",
"given",
"entries",
"in",
"order",
"."
] | train | https://github.com/wcm-io/wcm-io-sling/blob/90adbe432469378794b5695c72e9cdfa2b7d36f1/commons/src/main/java/io/wcm/sling/commons/resource/ImmutableValueMap.java#L222-L227 |
undertow-io/undertow | core/src/main/java/io/undertow/websockets/core/WebSockets.java | WebSockets.sendPong | public static <T> void sendPong(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) {
"""
Sends a complete pong message, invoking the callback when complete
Automatically frees the pooled byte buffer when done.
@param pooledData The data to send,... | java | public static <T> void sendPong(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) {
sendInternal(pooledData, WebSocketFrameType.PONG, wsChannel, callback, context, -1);
} | [
"public",
"static",
"<",
"T",
">",
"void",
"sendPong",
"(",
"final",
"PooledByteBuffer",
"pooledData",
",",
"final",
"WebSocketChannel",
"wsChannel",
",",
"final",
"WebSocketCallback",
"<",
"T",
">",
"callback",
",",
"T",
"context",
")",
"{",
"sendInternal",
"... | Sends a complete pong message, invoking the callback when complete
Automatically frees the pooled byte buffer when done.
@param pooledData The data to send, it will be freed when done
@param wsChannel The web socket channel
@param callback The callback to invoke on completion
@param context The context object that wil... | [
"Sends",
"a",
"complete",
"pong",
"message",
"invoking",
"the",
"callback",
"when",
"complete",
"Automatically",
"frees",
"the",
"pooled",
"byte",
"buffer",
"when",
"done",
"."
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L520-L522 |
xwiki/xwiki-rendering | xwiki-rendering-syntaxes/xwiki-rendering-syntax-wikimodel/src/main/java/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener.java | DefaultXWikiGeneratorListener.onMacroBlock | @Override
public void onMacroBlock(String macroName, WikiParameters params, String content) {
"""
A macro block was found and it's separated at least by one new line from the next block. If there's no new line
with the next block then wikimodel calls
{@link #onMacroInline(String, org.xwiki.rendering.wikimode... | java | @Override
public void onMacroBlock(String macroName, WikiParameters params, String content)
{
getListener().onMacro(macroName, convertParameters(params), content, false);
} | [
"@",
"Override",
"public",
"void",
"onMacroBlock",
"(",
"String",
"macroName",
",",
"WikiParameters",
"params",
",",
"String",
"content",
")",
"{",
"getListener",
"(",
")",
".",
"onMacro",
"(",
"macroName",
",",
"convertParameters",
"(",
"params",
")",
",",
... | A macro block was found and it's separated at least by one new line from the next block. If there's no new line
with the next block then wikimodel calls
{@link #onMacroInline(String, org.xwiki.rendering.wikimodel.WikiParameters, String)} instead.
<p>
In wikimodel block elements can be:
<ul>
<li>at the very beginning of... | [
"A",
"macro",
"block",
"was",
"found",
"and",
"it",
"s",
"separated",
"at",
"least",
"by",
"one",
"new",
"line",
"from",
"the",
"next",
"block",
".",
"If",
"there",
"s",
"no",
"new",
"line",
"with",
"the",
"next",
"block",
"then",
"wikimodel",
"calls",... | train | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-wikimodel/src/main/java/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener.java#L774-L778 |
rampatra/jbot | jbot-example/src/main/java/example/jbot/slack/SlackBot.java | SlackBot.onFileShared | @Controller(events = EventType.FILE_SHARED)
public void onFileShared(WebSocketSession session, Event event) {
"""
Invoked when bot receives an event of type file shared.
NOTE: You can't reply to this event as slack doesn't send
a channel id for this event type. You can learn more about
<a href="https://api.... | java | @Controller(events = EventType.FILE_SHARED)
public void onFileShared(WebSocketSession session, Event event) {
logger.info("File shared: {}", event);
} | [
"@",
"Controller",
"(",
"events",
"=",
"EventType",
".",
"FILE_SHARED",
")",
"public",
"void",
"onFileShared",
"(",
"WebSocketSession",
"session",
",",
"Event",
"event",
")",
"{",
"logger",
".",
"info",
"(",
"\"File shared: {}\"",
",",
"event",
")",
";",
"}"... | Invoked when bot receives an event of type file shared.
NOTE: You can't reply to this event as slack doesn't send
a channel id for this event type. You can learn more about
<a href="https://api.slack.com/events/file_shared">file_shared</a>
event from Slack's Api documentation.
@param session
@param event | [
"Invoked",
"when",
"bot",
"receives",
"an",
"event",
"of",
"type",
"file",
"shared",
".",
"NOTE",
":",
"You",
"can",
"t",
"reply",
"to",
"this",
"event",
"as",
"slack",
"doesn",
"t",
"send",
"a",
"channel",
"id",
"for",
"this",
"event",
"type",
".",
... | train | https://github.com/rampatra/jbot/blob/0f42e1a6ec4dcbc5d1257e1307704903e771f7b5/jbot-example/src/main/java/example/jbot/slack/SlackBot.java#L98-L101 |
alkacon/opencms-core | src/org/opencms/ui/CmsVaadinUtils.java | CmsVaadinUtils.buildContainerFromMap | public static IndexedContainer buildContainerFromMap(String captionProperty, Map<String, String> map) {
"""
Builds a container for use in combo boxes from a map of key/value pairs, where the keys are options and the values are captions.<p>
@param captionProperty the property name to use for captions
@param map... | java | public static IndexedContainer buildContainerFromMap(String captionProperty, Map<String, String> map) {
IndexedContainer container = new IndexedContainer();
for (Map.Entry<String, String> entry : map.entrySet()) {
container.addItem(entry.getKey()).getItemProperty(captionProperty).setValue(e... | [
"public",
"static",
"IndexedContainer",
"buildContainerFromMap",
"(",
"String",
"captionProperty",
",",
"Map",
"<",
"String",
",",
"String",
">",
"map",
")",
"{",
"IndexedContainer",
"container",
"=",
"new",
"IndexedContainer",
"(",
")",
";",
"for",
"(",
"Map",
... | Builds a container for use in combo boxes from a map of key/value pairs, where the keys are options and the values are captions.<p>
@param captionProperty the property name to use for captions
@param map the map
@return the new container | [
"Builds",
"a",
"container",
"for",
"use",
"in",
"combo",
"boxes",
"from",
"a",
"map",
"of",
"key",
"/",
"value",
"pairs",
"where",
"the",
"keys",
"are",
"options",
"and",
"the",
"values",
"are",
"captions",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/CmsVaadinUtils.java#L267-L274 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/KvStateService.java | KvStateService.fromConfiguration | public static KvStateService fromConfiguration(TaskManagerServicesConfiguration taskManagerServicesConfiguration) {
"""
Creates and returns the KvState service.
@param taskManagerServicesConfiguration task manager configuration
@return service for kvState related components
"""
KvStateRegistry kvStateReg... | java | public static KvStateService fromConfiguration(TaskManagerServicesConfiguration taskManagerServicesConfiguration) {
KvStateRegistry kvStateRegistry = new KvStateRegistry();
QueryableStateConfiguration qsConfig = taskManagerServicesConfiguration.getQueryableStateConfig();
KvStateClientProxy kvClientProxy = null;... | [
"public",
"static",
"KvStateService",
"fromConfiguration",
"(",
"TaskManagerServicesConfiguration",
"taskManagerServicesConfiguration",
")",
"{",
"KvStateRegistry",
"kvStateRegistry",
"=",
"new",
"KvStateRegistry",
"(",
")",
";",
"QueryableStateConfiguration",
"qsConfig",
"=",
... | Creates and returns the KvState service.
@param taskManagerServicesConfiguration task manager configuration
@return service for kvState related components | [
"Creates",
"and",
"returns",
"the",
"KvState",
"service",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/KvStateService.java#L159-L193 |
alibaba/jstorm | jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/ShutdownWork.java | ShutdownWork.tryCleanupWorkerDir | public static void tryCleanupWorkerDir(Map conf, String workerId) {
"""
clean the directory , sub-directories of STORM-LOCAL-DIR/workers/workerId
@param conf storm conf
@param workerId worker id
"""
try {
// delete heartbeat dir LOCAL_DIR/workers/workid/heartbeats
PathUt... | java | public static void tryCleanupWorkerDir(Map conf, String workerId) {
try {
// delete heartbeat dir LOCAL_DIR/workers/workid/heartbeats
PathUtils.rmr(StormConfig.worker_heartbeats_root(conf, workerId));
// delete pid dir, LOCAL_DIR/workers/workerid/pids
PathUtils.rm... | [
"public",
"static",
"void",
"tryCleanupWorkerDir",
"(",
"Map",
"conf",
",",
"String",
"workerId",
")",
"{",
"try",
"{",
"// delete heartbeat dir LOCAL_DIR/workers/workid/heartbeats",
"PathUtils",
".",
"rmr",
"(",
"StormConfig",
".",
"worker_heartbeats_root",
"(",
"conf"... | clean the directory , sub-directories of STORM-LOCAL-DIR/workers/workerId
@param conf storm conf
@param workerId worker id | [
"clean",
"the",
"directory",
"sub",
"-",
"directories",
"of",
"STORM",
"-",
"LOCAL",
"-",
"DIR",
"/",
"workers",
"/",
"workerId"
] | train | https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/ShutdownWork.java#L150-L161 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/bean/copier/CopyOptions.java | CopyOptions.create | public static CopyOptions create(Class<?> editable, boolean ignoreNullValue, String... ignoreProperties) {
"""
创建拷贝选项
@param editable 限制的类或接口,必须为目标对象的实现接口或父类,用于限制拷贝的属性
@param ignoreNullValue 是否忽略空值,当源对象的值为null时,true: 忽略而不注入此值,false: 注入null
@param ignoreProperties 忽略的属性列表,设置一个属性列表,不拷贝这些属性值
@return 拷贝选项
""... | java | public static CopyOptions create(Class<?> editable, boolean ignoreNullValue, String... ignoreProperties) {
return new CopyOptions(editable, ignoreNullValue, ignoreProperties);
} | [
"public",
"static",
"CopyOptions",
"create",
"(",
"Class",
"<",
"?",
">",
"editable",
",",
"boolean",
"ignoreNullValue",
",",
"String",
"...",
"ignoreProperties",
")",
"{",
"return",
"new",
"CopyOptions",
"(",
"editable",
",",
"ignoreNullValue",
",",
"ignoreProp... | 创建拷贝选项
@param editable 限制的类或接口,必须为目标对象的实现接口或父类,用于限制拷贝的属性
@param ignoreNullValue 是否忽略空值,当源对象的值为null时,true: 忽略而不注入此值,false: 注入null
@param ignoreProperties 忽略的属性列表,设置一个属性列表,不拷贝这些属性值
@return 拷贝选项 | [
"创建拷贝选项"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/bean/copier/CopyOptions.java#L47-L49 |
EsotericSoftware/yamlbeans | src/com/esotericsoftware/yamlbeans/YamlConfig.java | YamlConfig.setClassTag | public void setClassTag (String tag, Class type) {
"""
Allows the specified tag to be used in YAML instead of the full class name.
"""
if (tag == null) throw new IllegalArgumentException("tag cannot be null.");
if (type == null) throw new IllegalArgumentException("type cannot be null.");
classNameToTa... | java | public void setClassTag (String tag, Class type) {
if (tag == null) throw new IllegalArgumentException("tag cannot be null.");
if (type == null) throw new IllegalArgumentException("type cannot be null.");
classNameToTag.put(type.getName(), tag);
tagToClass.put(tag, type);
} | [
"public",
"void",
"setClassTag",
"(",
"String",
"tag",
",",
"Class",
"type",
")",
"{",
"if",
"(",
"tag",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"tag cannot be null.\"",
")",
";",
"if",
"(",
"type",
"==",
"null",
")",
"throw",... | Allows the specified tag to be used in YAML instead of the full class name. | [
"Allows",
"the",
"specified",
"tag",
"to",
"be",
"used",
"in",
"YAML",
"instead",
"of",
"the",
"full",
"class",
"name",
"."
] | train | https://github.com/EsotericSoftware/yamlbeans/blob/f5610997edbc5534fc7e9f0a91654d14742345ca/src/com/esotericsoftware/yamlbeans/YamlConfig.java#L69-L74 |
canoo/dolphin-platform | platform/dolphin-platform-remoting-client-javafx/src/main/java/com/canoo/platform/remoting/client/javafx/DolphinPlatformApplication.java | DolphinPlatformApplication.init | @Override
public final void init() throws Exception {
"""
Creates the connection to the Dolphin Platform server. If this method will be overridden always call the super method.
@throws Exception a exception if the connection can't be created
"""
FxToolkit.init();
applicationInit();
... | java | @Override
public final void init() throws Exception {
FxToolkit.init();
applicationInit();
PlatformClient.getClientConfiguration().setUncaughtExceptionHandler((Thread thread, Throwable exception) -> {
PlatformClient.getClientConfiguration().getUiExecutor().execute(() -> {
... | [
"@",
"Override",
"public",
"final",
"void",
"init",
"(",
")",
"throws",
"Exception",
"{",
"FxToolkit",
".",
"init",
"(",
")",
";",
"applicationInit",
"(",
")",
";",
"PlatformClient",
".",
"getClientConfiguration",
"(",
")",
".",
"setUncaughtExceptionHandler",
... | Creates the connection to the Dolphin Platform server. If this method will be overridden always call the super method.
@throws Exception a exception if the connection can't be created | [
"Creates",
"the",
"connection",
"to",
"the",
"Dolphin",
"Platform",
"server",
".",
"If",
"this",
"method",
"will",
"be",
"overridden",
"always",
"call",
"the",
"super",
"method",
"."
] | train | https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-client-javafx/src/main/java/com/canoo/platform/remoting/client/javafx/DolphinPlatformApplication.java#L100-L132 |
marklogic/java-client-api | marklogic-client-api/src/main/java/com/marklogic/client/example/cookbook/datamovement/MoveDataBetweenMarklogicDBs.java | MoveDataBetweenMarklogicDBs.installTransform | private void installTransform(DatabaseClient client) {
"""
/*
Install the transform on the server which would find all the orders made by
the customer and append all the orders information to the corresponding
customer document.
"""
// this transform seeks orders associated with a single customer
//... | java | private void installTransform(DatabaseClient client) {
// this transform seeks orders associated with a single customer
// record and injects the orders into the customer record
String transform =
"function transform_function(context, params, content) { " +
" var uri = context.uri; " +
" ... | [
"private",
"void",
"installTransform",
"(",
"DatabaseClient",
"client",
")",
"{",
"// this transform seeks orders associated with a single customer",
"// record and injects the orders into the customer record",
"String",
"transform",
"=",
"\"function transform_function(context, params, con... | /*
Install the transform on the server which would find all the orders made by
the customer and append all the orders information to the corresponding
customer document. | [
"/",
"*",
"Install",
"the",
"transform",
"on",
"the",
"server",
"which",
"would",
"find",
"all",
"the",
"orders",
"made",
"by",
"the",
"customer",
"and",
"append",
"all",
"the",
"orders",
"information",
"to",
"the",
"corresponding",
"customer",
"document",
"... | train | https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/example/cookbook/datamovement/MoveDataBetweenMarklogicDBs.java#L183-L208 |
wb14123/bard | bard-core/src/main/java/com/bardframework/bard/core/Context.java | Context.putCustom | public <T> void putCustom(String key, T value) {
"""
Put a custom value into context.
@param key The key to get value.
@param value The value.
@param <T> The type of value.
"""
custom.put(key, value);
} | java | public <T> void putCustom(String key, T value) {
custom.put(key, value);
} | [
"public",
"<",
"T",
">",
"void",
"putCustom",
"(",
"String",
"key",
",",
"T",
"value",
")",
"{",
"custom",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Put a custom value into context.
@param key The key to get value.
@param value The value.
@param <T> The type of value. | [
"Put",
"a",
"custom",
"value",
"into",
"context",
"."
] | train | https://github.com/wb14123/bard/blob/98618ae31fd80000c794661b4c130af1b1298d9b/bard-core/src/main/java/com/bardframework/bard/core/Context.java#L61-L63 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/document/Jsp2Dom.java | Jsp2Dom.getJspDocument | public Document getJspDocument() throws JspCoreException {
"""
Method getJspDocument.
According to the spec a JSP document can be identified as such in three ways:
1. If there is a <jsp-property-group> that explicitly indicates, through the <is-xml>
element, whether a given file is a JSP document, then that i... | java | public Document getJspDocument() throws JspCoreException {
Document document = null;
/* The isXmlSpecified flag should only be set for top level jsps. */
/* statically included jsps and tag files will alway have this set to false */
if (jspInputSource.isXmlDocument()) {
docum... | [
"public",
"Document",
"getJspDocument",
"(",
")",
"throws",
"JspCoreException",
"{",
"Document",
"document",
"=",
"null",
";",
"/* The isXmlSpecified flag should only be set for top level jsps. */",
"/* statically included jsps and tag files will alway have this set to false */",
"if",... | Method getJspDocument.
According to the spec a JSP document can be identified as such in three ways:
1. If there is a <jsp-property-group> that explicitly indicates, through the <is-xml>
element, whether a given file is a JSP document, then that indication overrides
any other determination. Otherwise,
2. If there is ... | [
"Method",
"getJspDocument",
".",
"According",
"to",
"the",
"spec",
"a",
"JSP",
"document",
"can",
"be",
"identified",
"as",
"such",
"in",
"three",
"ways",
":"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/document/Jsp2Dom.java#L158-L202 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.purgeDeletedSecretAsync | public Observable<Void> purgeDeletedSecretAsync(String vaultBaseUrl, String secretName) {
"""
Permanently deletes the specified secret.
The purge deleted secret operation removes the secret permanently, without the possibility of recovery. This operation can only be enabled on a soft-delete enabled vault. This op... | java | public Observable<Void> purgeDeletedSecretAsync(String vaultBaseUrl, String secretName) {
return purgeDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
... | [
"public",
"Observable",
"<",
"Void",
">",
"purgeDeletedSecretAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"secretName",
")",
"{",
"return",
"purgeDeletedSecretWithServiceResponseAsync",
"(",
"vaultBaseUrl",
",",
"secretName",
")",
".",
"map",
"(",
"new",
"F... | Permanently deletes the specified secret.
The purge deleted secret operation removes the secret permanently, without the possibility of recovery. This operation can only be enabled on a soft-delete enabled vault. This operation requires the secrets/purge permission.
@param vaultBaseUrl The vault name, for example http... | [
"Permanently",
"deletes",
"the",
"specified",
"secret",
".",
"The",
"purge",
"deleted",
"secret",
"operation",
"removes",
"the",
"secret",
"permanently",
"without",
"the",
"possibility",
"of",
"recovery",
".",
"This",
"operation",
"can",
"only",
"be",
"enabled",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L4757-L4764 |
OpenLiberty/open-liberty | dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java | RecoveryDirectorImpl.removeInitializationRecord | private boolean removeInitializationRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) {
"""
<p>
Internal method to remove the record of an outstanding 'serialRecoveryComplete'
call from the supplied RecoveryAgent for the given failure scope.
</p>
<p>
This call will wake up all threads waiting f... | java | private boolean removeInitializationRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) {
if (tc.isEntryEnabled())
Tr.entry(tc, "removeInitializationRecord", new Object[] { recoveryAgent, failureScope, this });
boolean found = false;
synchronized (_outstandingInitializat... | [
"private",
"boolean",
"removeInitializationRecord",
"(",
"RecoveryAgent",
"recoveryAgent",
",",
"FailureScope",
"failureScope",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"removeInitializationRecord\"",
"... | <p>
Internal method to remove the record of an outstanding 'serialRecoveryComplete'
call from the supplied RecoveryAgent for the given failure scope.
</p>
<p>
This call will wake up all threads waiting for serial recovery to be completed.
</p>
<p>
Just prior to requesting a RecoveryAgent to "initiateRecovery" of a
Fa... | [
"<p",
">",
"Internal",
"method",
"to",
"remove",
"the",
"record",
"of",
"an",
"outstanding",
"serialRecoveryComplete",
"call",
"from",
"the",
"supplied",
"RecoveryAgent",
"for",
"the",
"given",
"failure",
"scope",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java#L938-L966 |
phax/ph-pdf-layout | src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java | PDPageContentStreamExt.moveTo | public void moveTo (final float x, final float y) throws IOException {
"""
Move the current position to the given coordinates.
@param x
The x coordinate.
@param y
The y coordinate.
@throws IOException
If the content stream could not be written.
@throws IllegalStateException
If the method was called withi... | java | public void moveTo (final float x, final float y) throws IOException
{
if (inTextMode)
{
throw new IllegalStateException ("Error: moveTo is not allowed within a text block.");
}
writeOperand (x);
writeOperand (y);
writeOperator ((byte) 'm');
} | [
"public",
"void",
"moveTo",
"(",
"final",
"float",
"x",
",",
"final",
"float",
"y",
")",
"throws",
"IOException",
"{",
"if",
"(",
"inTextMode",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Error: moveTo is not allowed within a text block.\"",
")",
";... | Move the current position to the given coordinates.
@param x
The x coordinate.
@param y
The y coordinate.
@throws IOException
If the content stream could not be written.
@throws IllegalStateException
If the method was called within a text block. | [
"Move",
"the",
"current",
"position",
"to",
"the",
"given",
"coordinates",
"."
] | train | https://github.com/phax/ph-pdf-layout/blob/777d9f3a131cbe8f592c0de1cf554084e541bb54/src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java#L1222-L1231 |
facebookarchive/hadoop-20 | src/hdfs/org/apache/hadoop/hdfs/server/datanode/VolumeMap.java | VolumeMap.copyOngoingCreates | void copyOngoingCreates(int namespaceId, Block block) throws CloneNotSupportedException {
"""
If there is an ActiveFile object for the block, create a copy of the
old one and replace the old one. This is to make sure that the VisibleLength
applied to the old object will have no impact to the local map. In
that ... | java | void copyOngoingCreates(int namespaceId, Block block) throws CloneNotSupportedException {
checkBlock(block);
NamespaceMap nm = getNamespaceMap(namespaceId);
if (nm != null) {
nm.copyOngoingCreates(block);
}
} | [
"void",
"copyOngoingCreates",
"(",
"int",
"namespaceId",
",",
"Block",
"block",
")",
"throws",
"CloneNotSupportedException",
"{",
"checkBlock",
"(",
"block",
")",
";",
"NamespaceMap",
"nm",
"=",
"getNamespaceMap",
"(",
"namespaceId",
")",
";",
"if",
"(",
"nm",
... | If there is an ActiveFile object for the block, create a copy of the
old one and replace the old one. This is to make sure that the VisibleLength
applied to the old object will have no impact to the local map. In
that way, BlockReceiver can directly update visible length without
holding the lock.
@param namespaceId
@p... | [
"If",
"there",
"is",
"an",
"ActiveFile",
"object",
"for",
"the",
"block",
"create",
"a",
"copy",
"of",
"the",
"old",
"one",
"and",
"replace",
"the",
"old",
"one",
".",
"This",
"is",
"to",
"make",
"sure",
"that",
"the",
"VisibleLength",
"applied",
"to",
... | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/VolumeMap.java#L247-L253 |
HubSpot/Singularity | SingularityService/src/main/java/com/hubspot/singularity/async/AsyncSemaphore.java | AsyncSemaphore.newBuilder | public static AsyncSemaphoreBuilder newBuilder(Supplier<Integer> concurrentRequestLimit, ScheduledExecutorService flushingExecutor) {
"""
Create an AsyncSemaphore with the given limit.
@param concurrentRequestLimit - A supplier saying how many concurrent requests are allowed
"""
return new AsyncSemaphor... | java | public static AsyncSemaphoreBuilder newBuilder(Supplier<Integer> concurrentRequestLimit, ScheduledExecutorService flushingExecutor) {
return new AsyncSemaphoreBuilder(new PermitSource(concurrentRequestLimit), flushingExecutor);
} | [
"public",
"static",
"AsyncSemaphoreBuilder",
"newBuilder",
"(",
"Supplier",
"<",
"Integer",
">",
"concurrentRequestLimit",
",",
"ScheduledExecutorService",
"flushingExecutor",
")",
"{",
"return",
"new",
"AsyncSemaphoreBuilder",
"(",
"new",
"PermitSource",
"(",
"concurrent... | Create an AsyncSemaphore with the given limit.
@param concurrentRequestLimit - A supplier saying how many concurrent requests are allowed | [
"Create",
"an",
"AsyncSemaphore",
"with",
"the",
"given",
"limit",
"."
] | train | https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityService/src/main/java/com/hubspot/singularity/async/AsyncSemaphore.java#L47-L49 |
deeplearning4j/deeplearning4j | datavec/datavec-data/datavec-data-nlp/src/main/java/org/datavec/nlp/movingwindow/Windows.java | Windows.windowForWordInPosition | public static Window windowForWordInPosition(int windowSize, int wordPos, List<String> sentence) {
"""
Creates a sliding window from text
@param windowSize the window size to use
@param wordPos the position of the word to center
@param sentence the sentence to createComplex a window for
@return a window based ... | java | public static Window windowForWordInPosition(int windowSize, int wordPos, List<String> sentence) {
List<String> window = new ArrayList<>();
List<String> onlyTokens = new ArrayList<>();
int contextSize = (int) Math.floor((windowSize - 1) / 2);
for (int i = wordPos - contextSize; i <= wor... | [
"public",
"static",
"Window",
"windowForWordInPosition",
"(",
"int",
"windowSize",
",",
"int",
"wordPos",
",",
"List",
"<",
"String",
">",
"sentence",
")",
"{",
"List",
"<",
"String",
">",
"window",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"List",
"... | Creates a sliding window from text
@param windowSize the window size to use
@param wordPos the position of the word to center
@param sentence the sentence to createComplex a window for
@return a window based on the given sentence | [
"Creates",
"a",
"sliding",
"window",
"from",
"text"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-data/datavec-data-nlp/src/main/java/org/datavec/nlp/movingwindow/Windows.java#L146-L169 |
overview/mime-types | src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java | MimeTypeDetector.subArraysEqualWithMask | private boolean subArraysEqualWithMask(byte[] a, int aStart, byte[] b, int bStart, byte[] mask, int maskStart, int len) {
"""
Returns true if subarrays are equal, with the given mask.
<p>
The mask must have length <tt>len</tt>.
</p>
"""
for (int i = aStart, j = bStart, k = maskStart; len > 0; i++,... | java | private boolean subArraysEqualWithMask(byte[] a, int aStart, byte[] b, int bStart, byte[] mask, int maskStart, int len) {
for (int i = aStart, j = bStart, k = maskStart; len > 0; i++, j++, k++, len--) {
if ((a[i] & mask[k]) != (b[j] & mask[k])) {
return false;
}
}... | [
"private",
"boolean",
"subArraysEqualWithMask",
"(",
"byte",
"[",
"]",
"a",
",",
"int",
"aStart",
",",
"byte",
"[",
"]",
"b",
",",
"int",
"bStart",
",",
"byte",
"[",
"]",
"mask",
",",
"int",
"maskStart",
",",
"int",
"len",
")",
"{",
"for",
"(",
"in... | Returns true if subarrays are equal, with the given mask.
<p>
The mask must have length <tt>len</tt>.
</p> | [
"Returns",
"true",
"if",
"subarrays",
"are",
"equal",
"with",
"the",
"given",
"mask",
"."
] | train | https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L421-L429 |
jcuda/jcuda | JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java | JCudaDriver.cuDeviceGetLuid | public static int cuDeviceGetLuid(byte luid[], int deviceNodeMask[], CUdevice dev) {
"""
Return an LUID and device node mask for the device.
Return identifying information (\p luid and \p deviceNodeMask) to allow
matching device with graphics APIs.
@param luid - Returned LUID
@param deviceNodeMask - Return... | java | public static int cuDeviceGetLuid(byte luid[], int deviceNodeMask[], CUdevice dev)
{
return checkResult(cuDeviceGetLuidNative(luid, deviceNodeMask, dev));
} | [
"public",
"static",
"int",
"cuDeviceGetLuid",
"(",
"byte",
"luid",
"[",
"]",
",",
"int",
"deviceNodeMask",
"[",
"]",
",",
"CUdevice",
"dev",
")",
"{",
"return",
"checkResult",
"(",
"cuDeviceGetLuidNative",
"(",
"luid",
",",
"deviceNodeMask",
",",
"dev",
")",... | Return an LUID and device node mask for the device.
Return identifying information (\p luid and \p deviceNodeMask) to allow
matching device with graphics APIs.
@param luid - Returned LUID
@param deviceNodeMask - Returned device node mask
@param dev - Device to get identifier string for
@return CUDA_SUCCESS,
CUDA_ER... | [
"Return",
"an",
"LUID",
"and",
"device",
"node",
"mask",
"for",
"the",
"device",
"."
] | train | https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L712-L715 |
joaovicente/Tracy | src/main/java/com/apm4all/tracy/Tracy.java | Tracy.setContext | public static void setContext(String taskId, String parentOptId, String componentName) {
"""
Tracy allows to trace execution flow and later represent it as a Directed Acyclic Graph (DAG)
A Tracy identifier (taskId) starts at the most outbound endpoint exposed by a system<br>
The taskId is to be propagated across... | java | public static void setContext(String taskId, String parentOptId, String componentName) {
if (null == taskId) {
taskId = TracyThreadContext.generateRandomTaskId();
}
if (null == parentOptId) {
parentOptId = TRACY_DEFAULT_PARENT_OPT_ID;
}
if (null == comp... | [
"public",
"static",
"void",
"setContext",
"(",
"String",
"taskId",
",",
"String",
"parentOptId",
",",
"String",
"componentName",
")",
"{",
"if",
"(",
"null",
"==",
"taskId",
")",
"{",
"taskId",
"=",
"TracyThreadContext",
".",
"generateRandomTaskId",
"(",
")",
... | Tracy allows to trace execution flow and later represent it as a Directed Acyclic Graph (DAG)
A Tracy identifier (taskId) starts at the most outbound endpoint exposed by a system<br>
The taskId is to be propagated across components, JVMs and hosts
If the endpoint is outside this JVM/component you should have received a... | [
"Tracy",
"allows",
"to",
"trace",
"execution",
"flow",
"and",
"later",
"represent",
"it",
"as",
"a",
"Directed",
"Acyclic",
"Graph",
"(",
"DAG",
")",
"A",
"Tracy",
"identifier",
"(",
"taskId",
")",
"starts",
"at",
"the",
"most",
"outbound",
"endpoint",
"ex... | train | https://github.com/joaovicente/Tracy/blob/822d3aa335c1801df25ae6e67c22466368de3747/src/main/java/com/apm4all/tracy/Tracy.java#L48-L59 |
HiddenStage/divide | Shared/src/main/java/io/divide/shared/util/DaoUtils.java | DaoUtils.getUserById | public static Credentials getUserById(DAO serverDao, String userId) throws DAO.DAOException {
"""
Convience method to do a Credentials query against an user id.
@param serverDao dao object to query against.
@param userId user id used in query.
@return Credentials object found or null.
@throws io.divide.shared.... | java | public static Credentials getUserById(DAO serverDao, String userId) throws DAO.DAOException {
Query query = new QueryBuilder()
.select()
.from(Credentials.class)
.where(Credentials.OWNER_ID_KEY,OPERAND.EQ,userId)
.build();
TransientObject ... | [
"public",
"static",
"Credentials",
"getUserById",
"(",
"DAO",
"serverDao",
",",
"String",
"userId",
")",
"throws",
"DAO",
".",
"DAOException",
"{",
"Query",
"query",
"=",
"new",
"QueryBuilder",
"(",
")",
".",
"select",
"(",
")",
".",
"from",
"(",
"Credenti... | Convience method to do a Credentials query against an user id.
@param serverDao dao object to query against.
@param userId user id used in query.
@return Credentials object found or null.
@throws io.divide.shared.server.DAO.DAOException | [
"Convience",
"method",
"to",
"do",
"a",
"Credentials",
"query",
"against",
"an",
"user",
"id",
"."
] | train | https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Shared/src/main/java/io/divide/shared/util/DaoUtils.java#L60-L73 |
pressgang-ccms/PressGangCCMSBuilder | src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java | PublicanPODocBookBuilder.addStringsForConstant | protected void addStringsForConstant(final POBuildData buildData, final String key, final String tagName,
final Map<String, TranslationDetails> translations) {
"""
Add the required source/translation strings for a build constant.
@param buildData Information and data structures for the build.
@p... | java | protected void addStringsForConstant(final POBuildData buildData, final String key, final String tagName,
final Map<String, TranslationDetails> translations) {
final String originalString = buildData.getConstants().getString(key);
final String translationString = buildData.getTranslationCons... | [
"protected",
"void",
"addStringsForConstant",
"(",
"final",
"POBuildData",
"buildData",
",",
"final",
"String",
"key",
",",
"final",
"String",
"tagName",
",",
"final",
"Map",
"<",
"String",
",",
"TranslationDetails",
">",
"translations",
")",
"{",
"final",
"Stri... | Add the required source/translation strings for a build constant.
@param buildData Information and data structures for the build.
@param key The constant key to use.
@param translations The mapping of original strings to translation strings, that will be used to build the po/pot files. | [
"Add",
"the",
"required",
"source",
"/",
"translation",
"strings",
"for",
"a",
"build",
"constant",
"."
] | train | https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/PublicanPODocBookBuilder.java#L1377-L1387 |
RobotiumTech/robotium | robotium-solo/src/main/java/com/robotium/solo/Solo.java | Solo.clickInList | public void clickInList(int line, int index, int id) {
"""
Clicks a View with a specified resource id on the specified line in the list matching the specified index
@param line the line where the View exists
@param index the index of the List. {@code 0} if only one is available
@param id the resource id of th... | java | public void clickInList(int line, int index, int id) {
if(config.commandLogging){
Log.d(config.commandLoggingTag, "clickInList("+line+", "+index+", " + id +")");
}
clicker.clickInList(line, index, id, false, 0);
} | [
"public",
"void",
"clickInList",
"(",
"int",
"line",
",",
"int",
"index",
",",
"int",
"id",
")",
"{",
"if",
"(",
"config",
".",
"commandLogging",
")",
"{",
"Log",
".",
"d",
"(",
"config",
".",
"commandLoggingTag",
",",
"\"clickInList(\"",
"+",
"line",
... | Clicks a View with a specified resource id on the specified line in the list matching the specified index
@param line the line where the View exists
@param index the index of the List. {@code 0} if only one is available
@param id the resource id of the View to click | [
"Clicks",
"a",
"View",
"with",
"a",
"specified",
"resource",
"id",
"on",
"the",
"specified",
"line",
"in",
"the",
"list",
"matching",
"the",
"specified",
"index"
] | train | https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L1724-L1730 |
alkacon/opencms-core | src-modules/org/opencms/workplace/tools/content/languagecopy/CmsLanguageCopySelectionList.java | CmsLanguageCopySelectionList.fillItem | private void fillItem(final CmsResource resource, final CmsListItem item, final int id) {
"""
Fills a single item.
<p>
@param resource the corresponding resource.
@param item the item to fill.
@param id used for the ID column.
"""
CmsObject cms = getCms();
CmsXmlContent xmlContent;
... | java | private void fillItem(final CmsResource resource, final CmsListItem item, final int id) {
CmsObject cms = getCms();
CmsXmlContent xmlContent;
I_CmsResourceType type;
String iconPath;
// fill path column:
String sitePath = cms.getSitePath(resource);
item.set(LIS... | [
"private",
"void",
"fillItem",
"(",
"final",
"CmsResource",
"resource",
",",
"final",
"CmsListItem",
"item",
",",
"final",
"int",
"id",
")",
"{",
"CmsObject",
"cms",
"=",
"getCms",
"(",
")",
";",
"CmsXmlContent",
"xmlContent",
";",
"I_CmsResourceType",
"type",... | Fills a single item.
<p>
@param resource the corresponding resource.
@param item the item to fill.
@param id used for the ID column. | [
"Fills",
"a",
"single",
"item",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/content/languagecopy/CmsLanguageCopySelectionList.java#L494-L551 |
alkacon/opencms-core | src-modules/org/opencms/workplace/tools/searchindex/CmsDeleteFieldDialog.java | CmsDeleteFieldDialog.createDialogHtml | @Override
protected String createDialogHtml(String dialog) {
"""
Creates the dialog HTML for all defined widgets of the named dialog (page).<p>
This overwrites the method from the super class to create a layout variation for the widgets.<p>
@param dialog the dialog (page) to get the HTML for
@return the... | java | @Override
protected String createDialogHtml(String dialog) {
StringBuffer result = new StringBuffer(512);
result.append(createWidgetTableStart());
// show error header once if there were validation errors
result.append(createWidgetErrorHeader());
if (dialog.equals(PAGES[0]... | [
"@",
"Override",
"protected",
"String",
"createDialogHtml",
"(",
"String",
"dialog",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
"512",
")",
";",
"result",
".",
"append",
"(",
"createWidgetTableStart",
"(",
")",
")",
";",
"// show erro... | Creates the dialog HTML for all defined widgets of the named dialog (page).<p>
This overwrites the method from the super class to create a layout variation for the widgets.<p>
@param dialog the dialog (page) to get the HTML for
@return the dialog HTML for all defined widgets of the named dialog (page) | [
"Creates",
"the",
"dialog",
"HTML",
"for",
"all",
"defined",
"widgets",
"of",
"the",
"named",
"dialog",
"(",
"page",
")",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsDeleteFieldDialog.java#L107-L131 |
fhoeben/hsac-fitnesse-fixtures | src/main/java/nl/hsac/fitnesse/fixture/util/ReflectionHelper.java | ReflectionHelper.getField | public Object getField(Object o, String fieldName) {
"""
Gets (private) field of o (the field may be defined by o's class, or one of its superclasses).
@param o instance to set field of.
@param fieldName name of field.
@return value of field.
"""
if (o == null) {
throw new Ille... | java | public Object getField(Object o, String fieldName) {
if (o == null) {
throw new IllegalArgumentException("No object to get from provided");
}
Field field = findField(o, fieldName);
if (field == null) {
throw new IllegalArgumentException(o.getClass() + " does not h... | [
"public",
"Object",
"getField",
"(",
"Object",
"o",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"o",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"No object to get from provided\"",
")",
";",
"}",
"Field",
"field",
"=",
"fi... | Gets (private) field of o (the field may be defined by o's class, or one of its superclasses).
@param o instance to set field of.
@param fieldName name of field.
@return value of field. | [
"Gets",
"(",
"private",
")",
"field",
"of",
"o",
"(",
"the",
"field",
"may",
"be",
"defined",
"by",
"o",
"s",
"class",
"or",
"one",
"of",
"its",
"superclasses",
")",
"."
] | train | https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/ReflectionHelper.java#L118-L135 |
nlalevee/jsourcemap | jsourcemap/src/java/org/hibnet/jsourcemap/SourceNode.java | SourceNode.replaceRight | public void replaceRight(Pattern aPattern, String aReplacement) {
"""
Call String.prototype.replace on the very right-most source snippet. Useful for trimming whitespace from the end of a source node, etc.
@param aPattern
The pattern to replace.
@param aReplacement
The thing to replace the pattern with.
... | java | public void replaceRight(Pattern aPattern, String aReplacement) {
Object lastChild = this.children.get(this.children.size() - 1);
if (lastChild instanceof SourceNode) {
((SourceNode) lastChild).replaceRight(aPattern, aReplacement);
} else if (lastChild instanceof String) {
... | [
"public",
"void",
"replaceRight",
"(",
"Pattern",
"aPattern",
",",
"String",
"aReplacement",
")",
"{",
"Object",
"lastChild",
"=",
"this",
".",
"children",
".",
"get",
"(",
"this",
".",
"children",
".",
"size",
"(",
")",
"-",
"1",
")",
";",
"if",
"(",
... | Call String.prototype.replace on the very right-most source snippet. Useful for trimming whitespace from the end of a source node, etc.
@param aPattern
The pattern to replace.
@param aReplacement
The thing to replace the pattern with. | [
"Call",
"String",
".",
"prototype",
".",
"replace",
"on",
"the",
"very",
"right",
"-",
"most",
"source",
"snippet",
".",
"Useful",
"for",
"trimming",
"whitespace",
"from",
"the",
"end",
"of",
"a",
"source",
"node",
"etc",
"."
] | train | https://github.com/nlalevee/jsourcemap/blob/361a99c73d51c11afa5579dd83d477c4d0345599/jsourcemap/src/java/org/hibnet/jsourcemap/SourceNode.java#L307-L316 |
JRebirth/JRebirth | org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java | AbstractService.updateMessage | public void updateMessage(final Wave wave, final String message) {
"""
Update the current message of the service task related to the given wave.
@param wave the wave that trigger the service task call
@param message the current message of the service task processed
"""
// Update the current task m... | java | public void updateMessage(final Wave wave, final String message) {
// Update the current task message
JRebirth.runIntoJAT("Service Task Mesage => " + message,
() -> wave.get(JRebirthWaves.SERVICE_TASK).updateMessage(message));
} | [
"public",
"void",
"updateMessage",
"(",
"final",
"Wave",
"wave",
",",
"final",
"String",
"message",
")",
"{",
"// Update the current task message",
"JRebirth",
".",
"runIntoJAT",
"(",
"\"Service Task Mesage => \"",
"+",
"message",
",",
"(",
")",
"->",
"wave",
".",... | Update the current message of the service task related to the given wave.
@param wave the wave that trigger the service task call
@param message the current message of the service task processed | [
"Update",
"the",
"current",
"message",
"of",
"the",
"service",
"task",
"related",
"to",
"the",
"given",
"wave",
"."
] | train | https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/service/AbstractService.java#L346-L351 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.client/src/com/ibm/ws/security/client/internal/authentication/ClientAuthenticationService.java | ClientAuthenticationService.createBasicAuthSubject | protected Subject createBasicAuthSubject(AuthenticationData authenticationData, Subject subject) throws WSLoginFailedException, CredentialException {
"""
Create the basic auth subject using the given authentication data
@param authenticationData the user, password and realm to create the subject
@param subject... | java | protected Subject createBasicAuthSubject(AuthenticationData authenticationData, Subject subject) throws WSLoginFailedException, CredentialException {
Subject basicAuthSubject = subject != null ? subject : new Subject();
String loginRealm = (String) authenticationData.get(AuthenticationData.REALM);
... | [
"protected",
"Subject",
"createBasicAuthSubject",
"(",
"AuthenticationData",
"authenticationData",
",",
"Subject",
"subject",
")",
"throws",
"WSLoginFailedException",
",",
"CredentialException",
"{",
"Subject",
"basicAuthSubject",
"=",
"subject",
"!=",
"null",
"?",
"subje... | Create the basic auth subject using the given authentication data
@param authenticationData the user, password and realm to create the subject
@param subject the partial subject, can be null
@return a basic auth subject that has not been authenticated yet
@throws WSLoginFailedException if the user or password are <nul... | [
"Create",
"the",
"basic",
"auth",
"subject",
"using",
"the",
"given",
"authentication",
"data"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.client/src/com/ibm/ws/security/client/internal/authentication/ClientAuthenticationService.java#L126-L145 |
openxc/openxc-android | library/src/main/java/com/openxc/interfaces/VehicleInterfaceFactory.java | VehicleInterfaceFactory.build | public static VehicleInterface build(
Class<? extends VehicleInterface> interfaceType,
Context context, String resource) throws VehicleInterfaceException {
"""
Retrieve the Class for a given name and construct an instance of it.
@param interfaceType the desired class to load and instanti... | java | public static VehicleInterface build(
Class<? extends VehicleInterface> interfaceType,
Context context, String resource) throws VehicleInterfaceException {
Log.d(TAG, "Constructing new instance of " + interfaceType
+ " with resource " + resource);
Constructor<? ex... | [
"public",
"static",
"VehicleInterface",
"build",
"(",
"Class",
"<",
"?",
"extends",
"VehicleInterface",
">",
"interfaceType",
",",
"Context",
"context",
",",
"String",
"resource",
")",
"throws",
"VehicleInterfaceException",
"{",
"Log",
".",
"d",
"(",
"TAG",
",",... | Retrieve the Class for a given name and construct an instance of it.
@param interfaceType the desired class to load and instantiate.
@param context The Android application or service context to be passed to
the new instance of the VehicleInterface.
@param resource A reference to a resource the new instance should use ... | [
"Retrieve",
"the",
"Class",
"for",
"a",
"given",
"name",
"and",
"construct",
"an",
"instance",
"of",
"it",
"."
] | train | https://github.com/openxc/openxc-android/blob/799adbdcd107a72fe89737bbf19c039dc2881665/library/src/main/java/com/openxc/interfaces/VehicleInterfaceFactory.java#L67-L98 |
prestodb/presto | presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/Row.java | Row.fromString | public static Row fromString(RowSchema schema, String str, char delimiter) {
"""
Creates a new {@link Row} from the given delimited string based on the given {@link RowSchema}
@param schema Row's schema
@param str String to parse
@param delimiter Delimiter of the string
@return A new Row
@throws PrestoExcep... | java | public static Row fromString(RowSchema schema, String str, char delimiter)
{
Row row = new Row();
ImmutableList.Builder<String> builder = ImmutableList.builder();
List<String> fields = builder.addAll(Splitter.on(delimiter).split(str)).build();
if (fields.size() != schema.getLength(... | [
"public",
"static",
"Row",
"fromString",
"(",
"RowSchema",
"schema",
",",
"String",
"str",
",",
"char",
"delimiter",
")",
"{",
"Row",
"row",
"=",
"new",
"Row",
"(",
")",
";",
"ImmutableList",
".",
"Builder",
"<",
"String",
">",
"builder",
"=",
"Immutable... | Creates a new {@link Row} from the given delimited string based on the given {@link RowSchema}
@param schema Row's schema
@param str String to parse
@param delimiter Delimiter of the string
@return A new Row
@throws PrestoException If the length of the split string is not equal to the length of the schema
@throws Pres... | [
"Creates",
"a",
"new",
"{",
"@link",
"Row",
"}",
"from",
"the",
"given",
"delimited",
"string",
"based",
"on",
"the",
"given",
"{",
"@link",
"RowSchema",
"}"
] | train | https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/Row.java#L144-L161 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedInstanceKeysInner.java | ManagedInstanceKeysInner.getAsync | public Observable<ManagedInstanceKeyInner> getAsync(String resourceGroupName, String managedInstanceName, String keyName) {
"""
Gets a managed instance key.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the po... | java | public Observable<ManagedInstanceKeyInner> getAsync(String resourceGroupName, String managedInstanceName, String keyName) {
return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, keyName).map(new Func1<ServiceResponse<ManagedInstanceKeyInner>, ManagedInstanceKeyInner>() {
@Overri... | [
"public",
"Observable",
"<",
"ManagedInstanceKeyInner",
">",
"getAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"managedInstanceName",
",",
"String",
"keyName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"managedInstanceN... | Gets a managed instance key.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param managedInstanceName The name of the managed instance.
@param keyName The name of the managed instance key to be retrieved.... | [
"Gets",
"a",
"managed",
"instance",
"key",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedInstanceKeysInner.java#L377-L384 |
aws/aws-sdk-java | aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java | StepFactory.newRunPigScriptStep | public HadoopJarStepConfig newRunPigScriptStep(String script,
String pigVersion, String... scriptArgs) {
"""
Step that runs a Pig script on your job flow using the specified Pig version.
@param script
The script to run.
@param pigVersion
The Pig version to use.
@param scriptArgs
Arguments that get ... | java | public HadoopJarStepConfig newRunPigScriptStep(String script,
String pigVersion, String... scriptArgs) {
List<String> pigArgs = new ArrayList<String>();
pigArgs.add("--pig-versions");
pigArgs.add(pigVersion);
pigArgs.add("--run-pig-script");
pigArgs.add("--args");
... | [
"public",
"HadoopJarStepConfig",
"newRunPigScriptStep",
"(",
"String",
"script",
",",
"String",
"pigVersion",
",",
"String",
"...",
"scriptArgs",
")",
"{",
"List",
"<",
"String",
">",
"pigArgs",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"pi... | Step that runs a Pig script on your job flow using the specified Pig version.
@param script
The script to run.
@param pigVersion
The Pig version to use.
@param scriptArgs
Arguments that get passed to the script.
@return HadoopJarStepConfig that can be passed to your job flow. | [
"Step",
"that",
"runs",
"a",
"Pig",
"script",
"on",
"your",
"job",
"flow",
"using",
"the",
"specified",
"Pig",
"version",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java#L266-L277 |
fusepoolP3/p3-transformer-library | src/main/java/eu/fusepool/p3/transformer/server/handler/AbstractTransformingServlet.java | AbstractTransformingServlet.getServiceNode | static GraphNode getServiceNode(HttpServletRequest request) {
"""
Returns a GraphNode representing the requested resources in an empty Graph
@param request
@return a GraphNode representing the resource
"""
final IRI serviceUri = new IRI(getFullRequestUrl(request));
final Graph resultGraph = n... | java | static GraphNode getServiceNode(HttpServletRequest request) {
final IRI serviceUri = new IRI(getFullRequestUrl(request));
final Graph resultGraph = new SimpleGraph();
return new GraphNode(serviceUri, resultGraph);
} | [
"static",
"GraphNode",
"getServiceNode",
"(",
"HttpServletRequest",
"request",
")",
"{",
"final",
"IRI",
"serviceUri",
"=",
"new",
"IRI",
"(",
"getFullRequestUrl",
"(",
"request",
")",
")",
";",
"final",
"Graph",
"resultGraph",
"=",
"new",
"SimpleGraph",
"(",
... | Returns a GraphNode representing the requested resources in an empty Graph
@param request
@return a GraphNode representing the resource | [
"Returns",
"a",
"GraphNode",
"representing",
"the",
"requested",
"resources",
"in",
"an",
"empty",
"Graph"
] | train | https://github.com/fusepoolP3/p3-transformer-library/blob/7f2f0ff7594dc4db021f2edcea17960ba337e02b/src/main/java/eu/fusepool/p3/transformer/server/handler/AbstractTransformingServlet.java#L95-L99 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/SealedObject.java | SealedObject.getObject | public final Object getObject(Key key, String provider)
throws IOException, ClassNotFoundException, NoSuchAlgorithmException,
NoSuchProviderException, InvalidKeyException {
"""
Retrieves the original (encapsulated) object.
<p>This method creates a cipher for the algorithm that had been used ... | java | public final Object getObject(Key key, String provider)
throws IOException, ClassNotFoundException, NoSuchAlgorithmException,
NoSuchProviderException, InvalidKeyException
{
if (key == null) {
throw new NullPointerException("key is null");
}
if (provider == nul... | [
"public",
"final",
"Object",
"getObject",
"(",
"Key",
"key",
",",
"String",
"provider",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
",",
"NoSuchAlgorithmException",
",",
"NoSuchProviderException",
",",
"InvalidKeyException",
"{",
"if",
"(",
"key",
"... | Retrieves the original (encapsulated) object.
<p>This method creates a cipher for the algorithm that had been used in
the sealing operation, using an implementation of that algorithm from
the given <code>provider</code>.
The Cipher object is initialized for decryption, using the given
<code>key</code> and the paramete... | [
"Retrieves",
"the",
"original",
"(",
"encapsulated",
")",
"object",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/SealedObject.java#L341-L357 |
jeremylong/DependencyCheck | utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java | Settings.setBoolean | public void setBoolean(@NotNull final String key, boolean value) {
"""
Sets a property value.
@param key the key for the property
@param value the value for the property
"""
setString(key, Boolean.toString(value));
} | java | public void setBoolean(@NotNull final String key, boolean value) {
setString(key, Boolean.toString(value));
} | [
"public",
"void",
"setBoolean",
"(",
"@",
"NotNull",
"final",
"String",
"key",
",",
"boolean",
"value",
")",
"{",
"setString",
"(",
"key",
",",
"Boolean",
".",
"toString",
"(",
"value",
")",
")",
";",
"}"
] | Sets a property value.
@param key the key for the property
@param value the value for the property | [
"Sets",
"a",
"property",
"value",
"."
] | train | https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java#L724-L726 |
Azure/azure-sdk-for-java | logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java | IntegrationAccountsInner.regenerateAccessKey | public IntegrationAccountInner regenerateAccessKey(String resourceGroupName, String integrationAccountName, KeyType keyType) {
"""
Regenerates the integration account access key.
@param resourceGroupName The resource group name.
@param integrationAccountName The integration account name.
@param keyType The ke... | java | public IntegrationAccountInner regenerateAccessKey(String resourceGroupName, String integrationAccountName, KeyType keyType) {
return regenerateAccessKeyWithServiceResponseAsync(resourceGroupName, integrationAccountName, keyType).toBlocking().single().body();
} | [
"public",
"IntegrationAccountInner",
"regenerateAccessKey",
"(",
"String",
"resourceGroupName",
",",
"String",
"integrationAccountName",
",",
"KeyType",
"keyType",
")",
"{",
"return",
"regenerateAccessKeyWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"integrationAcco... | Regenerates the integration account access key.
@param resourceGroupName The resource group name.
@param integrationAccountName The integration account name.
@param keyType The key type. Possible values include: 'NotSpecified', 'Primary', 'Secondary'
@throws IllegalArgumentException thrown if parameters fail the valid... | [
"Regenerates",
"the",
"integration",
"account",
"access",
"key",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java#L1306-L1308 |
lessthanoptimal/BoofCV | main/boofcv-types/src/main/java/boofcv/struct/image/InterleavedS32.java | InterleavedS32.setBand | @Override
public void setBand(int x, int y, int band, int value) {
"""
Returns the value of the specified band in the specified pixel.
@param x pixel coordinate.
@param y pixel coordinate.
@param band which color band in the pixel
@param value The new value of the element.
"""
if (!isInBounds(x, y)... | java | @Override
public void setBand(int x, int y, int band, int value) {
if (!isInBounds(x, y))
throw new ImageAccessException("Requested pixel is out of bounds.");
if (band < 0 || band >= numBands)
throw new ImageAccessException("Invalid band requested.");
data[getIndex(x, y, band)] = value;
} | [
"@",
"Override",
"public",
"void",
"setBand",
"(",
"int",
"x",
",",
"int",
"y",
",",
"int",
"band",
",",
"int",
"value",
")",
"{",
"if",
"(",
"!",
"isInBounds",
"(",
"x",
",",
"y",
")",
")",
"throw",
"new",
"ImageAccessException",
"(",
"\"Requested p... | Returns the value of the specified band in the specified pixel.
@param x pixel coordinate.
@param y pixel coordinate.
@param band which color band in the pixel
@param value The new value of the element. | [
"Returns",
"the",
"value",
"of",
"the",
"specified",
"band",
"in",
"the",
"specified",
"pixel",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-types/src/main/java/boofcv/struct/image/InterleavedS32.java#L106-L114 |
GwtMaterialDesign/gwt-material-table | src/main/java/gwt/material/design/client/ui/table/cell/Column.java | Column.setStyleProperty | public final void setStyleProperty(StyleName styleName, String value) {
"""
Set a style property using its name as the key. Please ensure the style name and value
are appropriately configured or it may result in unexpected behavior.
@param styleName the style name as seen here {@link Style#STYLE_Z_INDEX} for e... | java | public final void setStyleProperty(StyleName styleName, String value) {
if(styleProps == null) {
styleProps = new HashMap<>();
}
styleProps.put(styleName, value);
} | [
"public",
"final",
"void",
"setStyleProperty",
"(",
"StyleName",
"styleName",
",",
"String",
"value",
")",
"{",
"if",
"(",
"styleProps",
"==",
"null",
")",
"{",
"styleProps",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"}",
"styleProps",
".",
"put",
"(",... | Set a style property using its name as the key. Please ensure the style name and value
are appropriately configured or it may result in unexpected behavior.
@param styleName the style name as seen here {@link Style#STYLE_Z_INDEX} for example.
@param value the string value required for the given style property. | [
"Set",
"a",
"style",
"property",
"using",
"its",
"name",
"as",
"the",
"key",
".",
"Please",
"ensure",
"the",
"style",
"name",
"and",
"value",
"are",
"appropriately",
"configured",
"or",
"it",
"may",
"result",
"in",
"unexpected",
"behavior",
"."
] | train | https://github.com/GwtMaterialDesign/gwt-material-table/blob/1352cafdcbff747bc1f302e709ed376df6642ef5/src/main/java/gwt/material/design/client/ui/table/cell/Column.java#L277-L282 |
tempodb/tempodb-java | src/main/java/com/tempodb/Client.java | Client.readSingleValue | public Result<SingleValue> readSingleValue(Series series, DateTime timestamp) {
"""
Reads a single value for a series at a specific timestamp (exact match).
<p>The returned value (datapoint) can be null if there are no
datapoints in the series or in the specified direction. The system default
timezone is used.
... | java | public Result<SingleValue> readSingleValue(Series series, DateTime timestamp) {
return readSingleValue(series, timestamp, DateTimeZone.getDefault(), Direction.EXACT);
} | [
"public",
"Result",
"<",
"SingleValue",
">",
"readSingleValue",
"(",
"Series",
"series",
",",
"DateTime",
"timestamp",
")",
"{",
"return",
"readSingleValue",
"(",
"series",
",",
"timestamp",
",",
"DateTimeZone",
".",
"getDefault",
"(",
")",
",",
"Direction",
"... | Reads a single value for a series at a specific timestamp (exact match).
<p>The returned value (datapoint) can be null if there are no
datapoints in the series or in the specified direction. The system default
timezone is used.
@param series The series to read from
@param timestamp The timestamp to read a value at
@re... | [
"Reads",
"a",
"single",
"value",
"for",
"a",
"series",
"at",
"a",
"specific",
"timestamp",
"(",
"exact",
"match",
")",
".",
"<p",
">",
"The",
"returned",
"value",
"(",
"datapoint",
")",
"can",
"be",
"null",
"if",
"there",
"are",
"no",
"datapoints",
"in... | train | https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L400-L402 |
eFaps/eFaps-Kernel | src/main/java/org/efaps/update/version/Application.java | Application.getApplication | public static Application getApplication(final URL _versionUrl,
final URL _rootUrl,
final List<String> _classpathElements)
throws InstallationException {
"""
<code>null</code> is returned, of the version file could no... | java | public static Application getApplication(final URL _versionUrl,
final URL _rootUrl,
final List<String> _classpathElements)
throws InstallationException
{
Application appl = null;
try {
final... | [
"public",
"static",
"Application",
"getApplication",
"(",
"final",
"URL",
"_versionUrl",
",",
"final",
"URL",
"_rootUrl",
",",
"final",
"List",
"<",
"String",
">",
"_classpathElements",
")",
"throws",
"InstallationException",
"{",
"Application",
"appl",
"=",
"null... | <code>null</code> is returned, of the version file could not be opened
and read.
@param _versionUrl URL of the version file which defines the application
@param _rootUrl root URL where the source files are located (for local
files); URL of the class file (if source is in a Jar file)
@param _classpathElements elements ... | [
"<code",
">",
"null<",
"/",
"code",
">",
"is",
"returned",
"of",
"the",
"version",
"file",
"could",
"not",
"be",
"opened",
"and",
"read",
"."
] | train | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/update/version/Application.java#L224-L266 |
alkacon/opencms-core | src/org/opencms/ade/containerpage/CmsContainerpageService.java | CmsContainerpageService.internalGetRemovedElementStatus | public CmsRemovedElementStatus internalGetRemovedElementStatus(CmsUUID structureId, CmsUUID containerpageId)
throws CmsException {
"""
Internal helper method to get the status of a removed element.<p>
@param structureId the structure id of the removed element
@param containerpageId the id of the page to ex... | java | public CmsRemovedElementStatus internalGetRemovedElementStatus(CmsUUID structureId, CmsUUID containerpageId)
throws CmsException {
CmsObject cms = getCmsObject();
CmsResource elementResource = cms.readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION);
boolean hasWritePermissions = ... | [
"public",
"CmsRemovedElementStatus",
"internalGetRemovedElementStatus",
"(",
"CmsUUID",
"structureId",
",",
"CmsUUID",
"containerpageId",
")",
"throws",
"CmsException",
"{",
"CmsObject",
"cms",
"=",
"getCmsObject",
"(",
")",
";",
"CmsResource",
"elementResource",
"=",
"... | Internal helper method to get the status of a removed element.<p>
@param structureId the structure id of the removed element
@param containerpageId the id of the page to exclude from the relation check, or null if no page should be excluded
@return the status of the removed element
@throws CmsException in case readi... | [
"Internal",
"helper",
"method",
"to",
"get",
"the",
"status",
"of",
"a",
"removed",
"element",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsContainerpageService.java#L1212-L1250 |
redkale/redkale | src/org/redkale/net/http/MultiPart.java | MultiPart.getContentBytes | public byte[] getContentBytes(long max) throws IOException {
"""
将文件流读进bytes, 如果超出max指定的值则返回null
@param max 最大长度限制
@return 内容
@throws IOException 异常
"""
ByteArrayOutputStream out = new ByteArrayOutputStream();
return save(max, out) ? out.toByteArray() : null;
} | java | public byte[] getContentBytes(long max) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
return save(max, out) ? out.toByteArray() : null;
} | [
"public",
"byte",
"[",
"]",
"getContentBytes",
"(",
"long",
"max",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"out",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"return",
"save",
"(",
"max",
",",
"out",
")",
"?",
"out",
".",
"toByt... | 将文件流读进bytes, 如果超出max指定的值则返回null
@param max 最大长度限制
@return 内容
@throws IOException 异常 | [
"将文件流读进bytes,",
"如果超出max指定的值则返回null"
] | train | https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/MultiPart.java#L63-L66 |
Azure/azure-sdk-for-java | datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java | AccountsInner.getDataLakeStoreAccountAsync | public Observable<DataLakeStoreAccountInfoInner> getDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) {
"""
Gets the specified Data Lake Store account details in the specified Data Lake Analytics account.
@param resourceGroupName The name of the Azure resou... | java | public Observable<DataLakeStoreAccountInfoInner> getDataLakeStoreAccountAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName) {
return getDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).map(new Func1<ServiceResponse<DataLakeSt... | [
"public",
"Observable",
"<",
"DataLakeStoreAccountInfoInner",
">",
"getDataLakeStoreAccountAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"accountName",
",",
"String",
"dataLakeStoreAccountName",
")",
"{",
"return",
"getDataLakeStoreAccountWithServiceResponseAsync",
... | Gets the specified Data Lake Store account details in the specified Data Lake Analytics account.
@param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
@param accountName The name of the Data Lake Analytics account from which to retrieve the Data Lake Store account... | [
"Gets",
"the",
"specified",
"Data",
"Lake",
"Store",
"account",
"details",
"in",
"the",
"specified",
"Data",
"Lake",
"Analytics",
"account",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L974-L981 |
mediathekview/MLib | src/main/java/de/mediathekview/mlib/filmlisten/FilmlisteLesen.java | FilmlisteLesen.processFromFile | private void processFromFile(String source, ListeFilme listeFilme) {
"""
Read a locally available filmlist.
@param source file path as string
@param listeFilme the list to read to
"""
notifyProgress(source, PROGRESS_MAX);
try (InputStream in = selectDecompressor(source, new FileInputStr... | java | private void processFromFile(String source, ListeFilme listeFilme) {
notifyProgress(source, PROGRESS_MAX);
try (InputStream in = selectDecompressor(source, new FileInputStream(source));
JsonParser jp = new JsonFactory().createParser(in)) {
readData(jp, listeFilme);
} cat... | [
"private",
"void",
"processFromFile",
"(",
"String",
"source",
",",
"ListeFilme",
"listeFilme",
")",
"{",
"notifyProgress",
"(",
"source",
",",
"PROGRESS_MAX",
")",
";",
"try",
"(",
"InputStream",
"in",
"=",
"selectDecompressor",
"(",
"source",
",",
"new",
"Fi... | Read a locally available filmlist.
@param source file path as string
@param listeFilme the list to read to | [
"Read",
"a",
"locally",
"available",
"filmlist",
"."
] | train | https://github.com/mediathekview/MLib/blob/01fd5791d87390fea7536275b8a2d4407fc00908/src/main/java/de/mediathekview/mlib/filmlisten/FilmlisteLesen.java#L177-L189 |
xvik/guice-persist-orient | src/main/java/ru/vyarus/guice/persist/orient/db/user/UserManager.java | UserManager.executeWithTxUser | public <T> T executeWithTxUser(final OSecurityUser user, final SpecificUserAction<T> userAction) {
"""
Changes current connection user. Affects only current transaction and can't be used outside of transaction
({@link ODatabaseDocumentInternal#setUser(com.orientechnologies.orient.core.metadata.security.OSecurityU... | java | public <T> T executeWithTxUser(final OSecurityUser user, final SpecificUserAction<T> userAction) {
final boolean userChanged = checkSpecificUserConditions(user.getName());
final ODatabaseDocumentInternal db = (ODatabaseDocumentInternal) connectionProvider.get();
final OSecurityUser original = db... | [
"public",
"<",
"T",
">",
"T",
"executeWithTxUser",
"(",
"final",
"OSecurityUser",
"user",
",",
"final",
"SpecificUserAction",
"<",
"T",
">",
"userAction",
")",
"{",
"final",
"boolean",
"userChanged",
"=",
"checkSpecificUserConditions",
"(",
"user",
".",
"getName... | Changes current connection user. Affects only current transaction and can't be used outside of transaction
({@link ODatabaseDocumentInternal#setUser(com.orientechnologies.orient.core.metadata.security.OSecurityUser)}).
<p>
Recursive user changes are not allowed, so attempt to change user under already changed user will... | [
"Changes",
"current",
"connection",
"user",
".",
"Affects",
"only",
"current",
"transaction",
"and",
"can",
"t",
"be",
"used",
"outside",
"of",
"transaction",
"(",
"{",
"@link",
"ODatabaseDocumentInternal#setUser",
"(",
"com",
".",
"orientechnologies",
".",
"orien... | train | https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/user/UserManager.java#L162-L185 |
allcolor/YaHP-Converter | YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java | CDocumentCut.getPbDocs | private static PbDocument [] getPbDocs(final NodeList nl) {
"""
Return the pagebreaks
@param nl pagebreaks nodelist
@return an array of subdoc composed of space between pb.
"""
List list = new ArrayList();
Element prevpb = null;
for (int i = 0; i < nl.getLength(); i++) {
Element pb =... | java | private static PbDocument [] getPbDocs(final NodeList nl) {
List list = new ArrayList();
Element prevpb = null;
for (int i = 0; i < nl.getLength(); i++) {
Element pb = (Element) nl.item(i);
PbDocument pbdoc = new PbDocument(prevpb, pb);
list.add(pbdoc);
prevpb = pb;
if (i == (nl.getLen... | [
"private",
"static",
"PbDocument",
"[",
"]",
"getPbDocs",
"(",
"final",
"NodeList",
"nl",
")",
"{",
"List",
"list",
"=",
"new",
"ArrayList",
"(",
")",
";",
"Element",
"prevpb",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nl"... | Return the pagebreaks
@param nl pagebreaks nodelist
@return an array of subdoc composed of space between pb. | [
"Return",
"the",
"pagebreaks"
] | train | https://github.com/allcolor/YaHP-Converter/blob/d72745281766a784a6b319f3787aa1d8de7cd0fe/YaHPConverter/src/org/allcolor/yahp/cl/converter/CDocumentCut.java#L443-L466 |
lucee/Lucee | core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java | CFMLExpressionInterpreter.impOp | private Ref impOp() throws PageException {
"""
Transfomiert eine Implication (imp) Operation. <br />
EBNF:<br />
<code>eqvOp {"imp" spaces eqvOp};</code>
@return CFXD Element
@throws PageException
"""
Ref ref = eqvOp();
while (cfml.forwardIfCurrentAndNoWordAfter("imp")) {
cfml.removeSpace();
... | java | private Ref impOp() throws PageException {
Ref ref = eqvOp();
while (cfml.forwardIfCurrentAndNoWordAfter("imp")) {
cfml.removeSpace();
ref = new Imp(ref, eqvOp(), limited);
}
return ref;
} | [
"private",
"Ref",
"impOp",
"(",
")",
"throws",
"PageException",
"{",
"Ref",
"ref",
"=",
"eqvOp",
"(",
")",
";",
"while",
"(",
"cfml",
".",
"forwardIfCurrentAndNoWordAfter",
"(",
"\"imp\"",
")",
")",
"{",
"cfml",
".",
"removeSpace",
"(",
")",
";",
"ref",
... | Transfomiert eine Implication (imp) Operation. <br />
EBNF:<br />
<code>eqvOp {"imp" spaces eqvOp};</code>
@return CFXD Element
@throws PageException | [
"Transfomiert",
"eine",
"Implication",
"(",
"imp",
")",
"Operation",
".",
"<br",
"/",
">",
"EBNF",
":",
"<br",
"/",
">",
"<code",
">",
"eqvOp",
"{",
"imp",
"spaces",
"eqvOp",
"}",
";",
"<",
"/",
"code",
">"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java#L346-L353 |
rometools/rome | rome-propono/src/main/java/com/rometools/propono/atom/client/ClientCollection.java | ClientCollection.getEntry | public ClientEntry getEntry(final String uri) throws ProponoException {
"""
Get full entry specified by entry edit URI. Note that entry may or may not be associated with
this collection.
@return ClientEntry or ClientMediaEntry specified by URI.
"""
final GetMethod method = new GetMethod(uri);
... | java | public ClientEntry getEntry(final String uri) throws ProponoException {
final GetMethod method = new GetMethod(uri);
authStrategy.addAuthentication(httpClient, method);
try {
httpClient.executeMethod(method);
if (method.getStatusCode() != 200) {
throw new ... | [
"public",
"ClientEntry",
"getEntry",
"(",
"final",
"String",
"uri",
")",
"throws",
"ProponoException",
"{",
"final",
"GetMethod",
"method",
"=",
"new",
"GetMethod",
"(",
"uri",
")",
";",
"authStrategy",
".",
"addAuthentication",
"(",
"httpClient",
",",
"method",... | Get full entry specified by entry edit URI. Note that entry may or may not be associated with
this collection.
@return ClientEntry or ClientMediaEntry specified by URI. | [
"Get",
"full",
"entry",
"specified",
"by",
"entry",
"edit",
"URI",
".",
"Note",
"that",
"entry",
"may",
"or",
"may",
"not",
"be",
"associated",
"with",
"this",
"collection",
"."
] | train | https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/client/ClientCollection.java#L100-L119 |
groovy/groovy-core | src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java | StaticTypeCheckingSupport.allParametersAndArgumentsMatch | public static int allParametersAndArgumentsMatch(Parameter[] params, ClassNode[] args) {
"""
Checks that arguments and parameter types match.
@param params method parameters
@param args type arguments
@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is
... | java | public static int allParametersAndArgumentsMatch(Parameter[] params, ClassNode[] args) {
if (params==null) {
params = Parameter.EMPTY_ARRAY;
}
int dist = 0;
if (args.length<params.length) return -1;
// we already know the lengths are equal
for (int i = 0; i < ... | [
"public",
"static",
"int",
"allParametersAndArgumentsMatch",
"(",
"Parameter",
"[",
"]",
"params",
",",
"ClassNode",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"params",
"==",
"null",
")",
"{",
"params",
"=",
"Parameter",
".",
"EMPTY_ARRAY",
";",
"}",
"int",
... | Checks that arguments and parameter types match.
@param params method parameters
@param args type arguments
@return -1 if arguments do not match, 0 if arguments are of the exact type and >0 when one or more argument is
not of the exact type but still match | [
"Checks",
"that",
"arguments",
"and",
"parameter",
"types",
"match",
"."
] | train | https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java#L216-L232 |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/ConcurrentServiceReferenceSetMap.java | ConcurrentServiceReferenceSetMap.putReference | public boolean putReference(K key, ServiceReference<V> reference) {
"""
Associates the reference with the key.
@param key Key associated with this reference
@param reference ServiceReference for the target service
@return true if this is replacing a previous (non-null) service reference
"""
if (ke... | java | public boolean putReference(K key, ServiceReference<V> reference) {
if (key == null || reference == null)
return false;
ConcurrentServiceReferenceSet<V> csrs = elementMap.get(key);
if (csrs == null) {
// No set for this key: allocate a new set that shares a context refer... | [
"public",
"boolean",
"putReference",
"(",
"K",
"key",
",",
"ServiceReference",
"<",
"V",
">",
"reference",
")",
"{",
"if",
"(",
"key",
"==",
"null",
"||",
"reference",
"==",
"null",
")",
"return",
"false",
";",
"ConcurrentServiceReferenceSet",
"<",
"V",
">... | Associates the reference with the key.
@param key Key associated with this reference
@param reference ServiceReference for the target service
@return true if this is replacing a previous (non-null) service reference | [
"Associates",
"the",
"reference",
"with",
"the",
"key",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/ConcurrentServiceReferenceSetMap.java#L118-L133 |
Azure/azure-sdk-for-java | applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java | ComponentsInner.updateTagsAsync | public Observable<ApplicationInsightsComponentInner> updateTagsAsync(String resourceGroupName, String resourceName, Map<String, String> tags) {
"""
Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
@param resourceGroupName The name of the resource group.
@param resourc... | java | public Observable<ApplicationInsightsComponentInner> updateTagsAsync(String resourceGroupName, String resourceName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).map(new Func1<ServiceResponse<ApplicationInsightsComponentInner>, ApplicationInsightsCo... | [
"public",
"Observable",
"<",
"ApplicationInsightsComponentInner",
">",
"updateTagsAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"return",
"updateTagsWithServiceResponseAsync",
... | Updates an existing component's tags. To update other fields use the CreateOrUpdate method.
@param resourceGroupName The name of the resource group.
@param resourceName The name of the Application Insights component resource.
@param tags Resource tags
@throws IllegalArgumentException thrown if parameters fail the vali... | [
"Updates",
"an",
"existing",
"component",
"s",
"tags",
".",
"To",
"update",
"other",
"fields",
"use",
"the",
"CreateOrUpdate",
"method",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/ComponentsInner.java#L722-L729 |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/interactions/Actions.java | Actions.doubleClick | public Actions doubleClick() {
"""
Performs a double-click at the current mouse location.
@return A self reference.
"""
if (isBuildingActions()) {
action.addAction(new DoubleClickAction(jsonMouse, null));
}
return clickInTicks(LEFT).clickInTicks(LEFT);
} | java | public Actions doubleClick() {
if (isBuildingActions()) {
action.addAction(new DoubleClickAction(jsonMouse, null));
}
return clickInTicks(LEFT).clickInTicks(LEFT);
} | [
"public",
"Actions",
"doubleClick",
"(",
")",
"{",
"if",
"(",
"isBuildingActions",
"(",
")",
")",
"{",
"action",
".",
"addAction",
"(",
"new",
"DoubleClickAction",
"(",
"jsonMouse",
",",
"null",
")",
")",
";",
"}",
"return",
"clickInTicks",
"(",
"LEFT",
... | Performs a double-click at the current mouse location.
@return A self reference. | [
"Performs",
"a",
"double",
"-",
"click",
"at",
"the",
"current",
"mouse",
"location",
"."
] | train | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L344-L350 |
primefaces-extensions/core | src/main/java/org/primefaces/extensions/model/dynaform/DynaFormRow.java | DynaFormRow.addLabel | public DynaFormLabel addLabel(final String value, final boolean escape, final int colspan, final int rowspan) {
"""
Adds a label with given text, escape flag, colspan and rowspan.
@param value label text
@param escape boolean flag if the label text should escaped or not
@param colspan colspan
@param rowspan ... | java | public DynaFormLabel addLabel(final String value, final boolean escape, final int colspan, final int rowspan) {
final DynaFormLabel dynaFormLabel = new DynaFormLabel(value, escape, colspan, rowspan, row, elements.size() + 1, extended);
elements.add(dynaFormLabel);
dynaFormModel.getLabels().add(... | [
"public",
"DynaFormLabel",
"addLabel",
"(",
"final",
"String",
"value",
",",
"final",
"boolean",
"escape",
",",
"final",
"int",
"colspan",
",",
"final",
"int",
"rowspan",
")",
"{",
"final",
"DynaFormLabel",
"dynaFormLabel",
"=",
"new",
"DynaFormLabel",
"(",
"v... | Adds a label with given text, escape flag, colspan and rowspan.
@param value label text
@param escape boolean flag if the label text should escaped or not
@param colspan colspan
@param rowspan rowspan
@return DynaFormLabel added label | [
"Adds",
"a",
"label",
"with",
"given",
"text",
"escape",
"flag",
"colspan",
"and",
"rowspan",
"."
] | train | https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/model/dynaform/DynaFormRow.java#L177-L185 |
mfornos/humanize | humanize-slim/src/main/java/humanize/Humanize.java | Humanize.naturalTime | public static String naturalTime(Date reference, Date duration) {
"""
Computes both past and future relative dates.
<p>
E.g. 'one day ago', 'one day from now', '10 years ago', '3 minutes from
now', 'right now' and so on.
@param reference
The reference
@param duration
The duration
@return String repre... | java | public static String naturalTime(Date reference, Date duration)
{
return context.get().formatRelativeDate(reference, duration);
} | [
"public",
"static",
"String",
"naturalTime",
"(",
"Date",
"reference",
",",
"Date",
"duration",
")",
"{",
"return",
"context",
".",
"get",
"(",
")",
".",
"formatRelativeDate",
"(",
"reference",
",",
"duration",
")",
";",
"}"
] | Computes both past and future relative dates.
<p>
E.g. 'one day ago', 'one day from now', '10 years ago', '3 minutes from
now', 'right now' and so on.
@param reference
The reference
@param duration
The duration
@return String representing the relative date | [
"Computes",
"both",
"past",
"and",
"future",
"relative",
"dates",
"."
] | train | https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L1558-L1561 |
mangstadt/biweekly | src/main/java/biweekly/util/StringUtils.java | StringUtils.afterPrefixIgnoreCase | public static String afterPrefixIgnoreCase(String string, String prefix) {
"""
<p>
Returns a substring of the given string that comes after the given
prefix. Prefix matching is case-insensitive.
</p>
<p>
<b>Example:</b>
</p>
<pre class="brush:java">
String result = StringUtils.afterPrefixIgnoreCase("MAIL... | java | public static String afterPrefixIgnoreCase(String string, String prefix) {
if (string.length() < prefix.length()) {
return null;
}
for (int i = 0; i < prefix.length(); i++) {
char a = Character.toUpperCase(prefix.charAt(i));
char b = Character.toUpperCase(string.charAt(i));
if (a != b) {
return n... | [
"public",
"static",
"String",
"afterPrefixIgnoreCase",
"(",
"String",
"string",
",",
"String",
"prefix",
")",
"{",
"if",
"(",
"string",
".",
"length",
"(",
")",
"<",
"prefix",
".",
"length",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
... | <p>
Returns a substring of the given string that comes after the given
prefix. Prefix matching is case-insensitive.
</p>
<p>
<b>Example:</b>
</p>
<pre class="brush:java">
String result = StringUtils.afterPrefixIgnoreCase("MAILTO:email@example.com", "mailto:");
assertEquals("email@example.com", result);
result = Strin... | [
"<p",
">",
"Returns",
"a",
"substring",
"of",
"the",
"given",
"string",
"that",
"comes",
"after",
"the",
"given",
"prefix",
".",
"Prefix",
"matching",
"is",
"case",
"-",
"insensitive",
".",
"<",
"/",
"p",
">",
"<p",
">",
"<b",
">",
"Example",
":",
"<... | train | https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/StringUtils.java#L61-L75 |
JOML-CI/JOML | src/org/joml/Vector2i.java | Vector2i.setComponent | public Vector2i setComponent(int component, int value) throws IllegalArgumentException {
"""
Set the value of the specified component of this vector.
@param component
the component whose value to set, within <code>[0..1]</code>
@param value
the value to set
@return this
@throws IllegalArgumentException if ... | java | public Vector2i setComponent(int component, int value) throws IllegalArgumentException {
switch (component) {
case 0:
x = value;
break;
case 1:
y = value;
break;
default:
throw new IllegalArgument... | [
"public",
"Vector2i",
"setComponent",
"(",
"int",
"component",
",",
"int",
"value",
")",
"throws",
"IllegalArgumentException",
"{",
"switch",
"(",
"component",
")",
"{",
"case",
"0",
":",
"x",
"=",
"value",
";",
"break",
";",
"case",
"1",
":",
"y",
"=",
... | Set the value of the specified component of this vector.
@param component
the component whose value to set, within <code>[0..1]</code>
@param value
the value to set
@return this
@throws IllegalArgumentException if <code>component</code> is not within <code>[0..1]</code> | [
"Set",
"the",
"value",
"of",
"the",
"specified",
"component",
"of",
"this",
"vector",
"."
] | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector2i.java#L370-L382 |
j-easy/easy-random | easy-random-core/src/main/java/org/jeasy/random/util/CharacterUtils.java | CharacterUtils.collectPrintableCharactersOf | public static List<Character> collectPrintableCharactersOf(Charset charset) {
"""
Returns a list of all printable charaters of the given charset.
@param charset
Charset to use
@return list of printable characters
"""
List<Character> chars = new ArrayList<>();
for (int i = Character.MIN_VAL... | java | public static List<Character> collectPrintableCharactersOf(Charset charset) {
List<Character> chars = new ArrayList<>();
for (int i = Character.MIN_VALUE; i < Character.MAX_VALUE; i++) {
char character = (char) i;
if (isPrintable(character)) {
String characterAsSt... | [
"public",
"static",
"List",
"<",
"Character",
">",
"collectPrintableCharactersOf",
"(",
"Charset",
"charset",
")",
"{",
"List",
"<",
"Character",
">",
"chars",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"Character",
".",
"... | Returns a list of all printable charaters of the given charset.
@param charset
Charset to use
@return list of printable characters | [
"Returns",
"a",
"list",
"of",
"all",
"printable",
"charaters",
"of",
"the",
"given",
"charset",
"."
] | train | https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/util/CharacterUtils.java#L49-L63 |
konvergeio/cofoja | src/main/java/com/google/java/contract/core/apt/ContractJavaFileManager.java | ContractJavaFileManager.setLocation | @Requires("location != null")
public void setLocation(Location location, List<? extends File> path)
throws IOException {
"""
Sets the list of paths associated with {@code location}.
@param location the affected location
@param path a list of paths, or {@code null} to reset to default
"""
fileMa... | java | @Requires("location != null")
public void setLocation(Location location, List<? extends File> path)
throws IOException {
fileManager.setLocation(location, path);
} | [
"@",
"Requires",
"(",
"\"location != null\"",
")",
"public",
"void",
"setLocation",
"(",
"Location",
"location",
",",
"List",
"<",
"?",
"extends",
"File",
">",
"path",
")",
"throws",
"IOException",
"{",
"fileManager",
".",
"setLocation",
"(",
"location",
",",
... | Sets the list of paths associated with {@code location}.
@param location the affected location
@param path a list of paths, or {@code null} to reset to default | [
"Sets",
"the",
"list",
"of",
"paths",
"associated",
"with",
"{",
"@code",
"location",
"}",
"."
] | train | https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/core/apt/ContractJavaFileManager.java#L121-L125 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java | JDBCStorageConnection.traverseQPathSQ | protected QPath traverseQPathSQ(String cpid) throws SQLException, InvalidItemStateException, IllegalNameException {
"""
The method <code>traverseQPath</code> implemented thanks to simple queries. It allows
to use Simple Queries instead of Complex Queries when complex queries are much slower such
as with HSQLDB f... | java | protected QPath traverseQPathSQ(String cpid) throws SQLException, InvalidItemStateException, IllegalNameException
{
// get item by Identifier usecase
List<QPathEntry> qrpath = new ArrayList<QPathEntry>(); // reverted path
String caid = cpid; // container ancestor id
do
{
Resul... | [
"protected",
"QPath",
"traverseQPathSQ",
"(",
"String",
"cpid",
")",
"throws",
"SQLException",
",",
"InvalidItemStateException",
",",
"IllegalNameException",
"{",
"// get item by Identifier usecase ",
"List",
"<",
"QPathEntry",
">",
"qrpath",
"=",
"new",
"ArrayList",
"<... | The method <code>traverseQPath</code> implemented thanks to simple queries. It allows
to use Simple Queries instead of Complex Queries when complex queries are much slower such
as with HSQLDB for example. | [
"The",
"method",
"<code",
">",
"traverseQPath<",
"/",
"code",
">",
"implemented",
"thanks",
"to",
"simple",
"queries",
".",
"It",
"allows",
"to",
"use",
"Simple",
"Queries",
"instead",
"of",
"Complex",
"Queries",
"when",
"complex",
"queries",
"are",
"much",
... | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java#L1851-L1897 |
google/auto | service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java | AutoServiceProcessor.checkImplementer | private boolean checkImplementer(TypeElement providerImplementer, TypeElement providerType) {
"""
Verifies {@link ServiceProvider} constraints on the concrete provider class.
Note that these constraints are enforced at runtime via the ServiceLoader,
we're just checking them at compile time to be extra nice to ou... | java | private boolean checkImplementer(TypeElement providerImplementer, TypeElement providerType) {
String verify = processingEnv.getOptions().get("verify");
if (verify == null || !Boolean.valueOf(verify)) {
return true;
}
// TODO: We're currently only enforcing the subtype relationship
// constra... | [
"private",
"boolean",
"checkImplementer",
"(",
"TypeElement",
"providerImplementer",
",",
"TypeElement",
"providerType",
")",
"{",
"String",
"verify",
"=",
"processingEnv",
".",
"getOptions",
"(",
")",
".",
"get",
"(",
"\"verify\"",
")",
";",
"if",
"(",
"verify"... | Verifies {@link ServiceProvider} constraints on the concrete provider class.
Note that these constraints are enforced at runtime via the ServiceLoader,
we're just checking them at compile time to be extra nice to our users. | [
"Verifies",
"{"
] | train | https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java#L216-L229 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java | VariableStack.getLocalVariable | public XObject getLocalVariable(XPathContext xctxt, int index, boolean destructiveOK)
throws TransformerException {
"""
Get a local variable or parameter in the current stack frame.
@param xctxt The XPath context, which must be passed in order to
lazy evaluate variables.
@param index Local varia... | java | public XObject getLocalVariable(XPathContext xctxt, int index, boolean destructiveOK)
throws TransformerException
{
index += _currentFrameBottom;
XObject val = _stackFrames[index];
if(null == val)
throw new TransformerException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_V... | [
"public",
"XObject",
"getLocalVariable",
"(",
"XPathContext",
"xctxt",
",",
"int",
"index",
",",
"boolean",
"destructiveOK",
")",
"throws",
"TransformerException",
"{",
"index",
"+=",
"_currentFrameBottom",
";",
"XObject",
"val",
"=",
"_stackFrames",
"[",
"index",
... | Get a local variable or parameter in the current stack frame.
@param xctxt The XPath context, which must be passed in order to
lazy evaluate variables.
@param index Local variable index relative to the current stack
frame bottom.
@return The value of the variable.
@throws TransformerException | [
"Get",
"a",
"local",
"variable",
"or",
"parameter",
"in",
"the",
"current",
"stack",
"frame",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java#L361-L379 |
OpenLiberty/open-liberty | dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/notification/ClientNotificationArea.java | ClientNotificationArea.getObject | public Object getObject(Integer key, Object newValue, JSONConverter converter) {
"""
Fetch the object (or put if absent) corresponding to the given ID
"""
if (newValue == null && key == Integer.MIN_VALUE) {
return null;
}
Object previousValue = objectLibrary.get(key);
... | java | public Object getObject(Integer key, Object newValue, JSONConverter converter) {
if (newValue == null && key == Integer.MIN_VALUE) {
return null;
}
Object previousValue = objectLibrary.get(key);
if (previousValue == null) {
if (newValue == null) {
... | [
"public",
"Object",
"getObject",
"(",
"Integer",
"key",
",",
"Object",
"newValue",
",",
"JSONConverter",
"converter",
")",
"{",
"if",
"(",
"newValue",
"==",
"null",
"&&",
"key",
"==",
"Integer",
".",
"MIN_VALUE",
")",
"{",
"return",
"null",
";",
"}",
"Ob... | Fetch the object (or put if absent) corresponding to the given ID | [
"Fetch",
"the",
"object",
"(",
"or",
"put",
"if",
"absent",
")",
"corresponding",
"to",
"the",
"given",
"ID"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/notification/ClientNotificationArea.java#L326-L349 |
realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.lessEqual | public TableRef lessEqual(String attributeName, ItemAttribute value) {
"""
Applies a filter to the table. When fetched, it will return the items lesser or equals to the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_tab... | java | public TableRef lessEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.LESSEREQUAL, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"lessEqual",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"LESSEREQUAL",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";",... | Applies a filter to the table. When fetched, it will return the items lesser or equals to the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items that have their "itemProperty" value lesser or equal 10
... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"lesser",
"or",
"equals",
"to",
"the",
"filter",
"property",
"value",
"."
] | train | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L728-L731 |
line/armeria | core/src/main/java/com/linecorp/armeria/client/ClientFactoryBuilder.java | ClientFactoryBuilder.workerGroup | public ClientFactoryBuilder workerGroup(EventLoopGroup workerGroup, boolean shutdownOnClose) {
"""
Sets the worker {@link EventLoopGroup} which is responsible for performing socket I/O and running
{@link Client#execute(ClientRequestContext, Request)}.
If not set, {@linkplain CommonPools#workerGroup() the common ... | java | public ClientFactoryBuilder workerGroup(EventLoopGroup workerGroup, boolean shutdownOnClose) {
this.workerGroup = requireNonNull(workerGroup, "workerGroup");
shutdownWorkerGroupOnClose = shutdownOnClose;
return this;
} | [
"public",
"ClientFactoryBuilder",
"workerGroup",
"(",
"EventLoopGroup",
"workerGroup",
",",
"boolean",
"shutdownOnClose",
")",
"{",
"this",
".",
"workerGroup",
"=",
"requireNonNull",
"(",
"workerGroup",
",",
"\"workerGroup\"",
")",
";",
"shutdownWorkerGroupOnClose",
"="... | Sets the worker {@link EventLoopGroup} which is responsible for performing socket I/O and running
{@link Client#execute(ClientRequestContext, Request)}.
If not set, {@linkplain CommonPools#workerGroup() the common worker group} is used.
@param shutdownOnClose whether to shut down the worker {@link EventLoopGroup}
when... | [
"Sets",
"the",
"worker",
"{",
"@link",
"EventLoopGroup",
"}",
"which",
"is",
"responsible",
"for",
"performing",
"socket",
"I",
"/",
"O",
"and",
"running",
"{",
"@link",
"Client#execute",
"(",
"ClientRequestContext",
"Request",
")",
"}",
".",
"If",
"not",
"s... | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/client/ClientFactoryBuilder.java#L130-L134 |
operasoftware/operaprestodriver | src/com/opera/core/systems/OperaDesktopDriver.java | OperaDesktopDriver.findWidgetByName | public QuickWidget findWidgetByName(QuickWidgetType type, int windowId, String widgetName) {
"""
Finds widget by name in the window specified by windowId.
@param windowId window id of parent window
@param widgetName name of widget to find
@return QuickWidget with the given name in the window with id windowI... | java | public QuickWidget findWidgetByName(QuickWidgetType type, int windowId, String widgetName) {
return desktopWindowManager.getQuickWidget(type, windowId, QuickWidgetSearchType.NAME,
widgetName);
} | [
"public",
"QuickWidget",
"findWidgetByName",
"(",
"QuickWidgetType",
"type",
",",
"int",
"windowId",
",",
"String",
"widgetName",
")",
"{",
"return",
"desktopWindowManager",
".",
"getQuickWidget",
"(",
"type",
",",
"windowId",
",",
"QuickWidgetSearchType",
".",
"NAM... | Finds widget by name in the window specified by windowId.
@param windowId window id of parent window
@param widgetName name of widget to find
@return QuickWidget with the given name in the window with id windowId, or null if no such
widget exists. | [
"Finds",
"widget",
"by",
"name",
"in",
"the",
"window",
"specified",
"by",
"windowId",
"."
] | train | https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/OperaDesktopDriver.java#L322-L325 |
drewnoakes/metadata-extractor | Source/com/drew/metadata/exif/ExifSubIFDDirectory.java | ExifSubIFDDirectory.getDateOriginal | @Nullable
public Date getDateOriginal(@Nullable TimeZone timeZone) {
"""
Parses the date/time tag, the subsecond tag and the time offset tag to obtain a single Date
object with milliseconds representing the date and time when this image was captured. If
the time offset tag does not exist, attempts will be m... | java | @Nullable
public Date getDateOriginal(@Nullable TimeZone timeZone)
{
TimeZone timeZoneOriginal = getTimeZone(TAG_OFFSET_TIME_ORIGINAL);
return getDate(TAG_DATETIME_ORIGINAL, getString(TAG_SUBSECOND_TIME_ORIGINAL),
(timeZoneOriginal != null) ? timeZoneOriginal : timeZone);
} | [
"@",
"Nullable",
"public",
"Date",
"getDateOriginal",
"(",
"@",
"Nullable",
"TimeZone",
"timeZone",
")",
"{",
"TimeZone",
"timeZoneOriginal",
"=",
"getTimeZone",
"(",
"TAG_OFFSET_TIME_ORIGINAL",
")",
";",
"return",
"getDate",
"(",
"TAG_DATETIME_ORIGINAL",
",",
"getS... | Parses the date/time tag, the subsecond tag and the time offset tag to obtain a single Date
object with milliseconds representing the date and time when this image was captured. If
the time offset tag does not exist, attempts will be made to parse the values as though it is
in the {@link TimeZone} represented by the {... | [
"Parses",
"the",
"date",
"/",
"time",
"tag",
"the",
"subsecond",
"tag",
"and",
"the",
"time",
"offset",
"tag",
"to",
"obtain",
"a",
"single",
"Date",
"object",
"with",
"milliseconds",
"representing",
"the",
"date",
"and",
"time",
"when",
"this",
"image",
"... | train | https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/exif/ExifSubIFDDirectory.java#L128-L134 |
esigate/esigate | esigate-core/src/main/java/org/esigate/DriverFactory.java | DriverFactory.put | public static void put(String instanceName, Driver instance) {
"""
Add/replace instance in current instance map. Work on a copy of the current map and replace it atomically.
@param instanceName
The name of the provider
@param instance
The instance
"""
// Copy current instances
Map<String,... | java | public static void put(String instanceName, Driver instance) {
// Copy current instances
Map<String, Driver> newInstances = new HashMap<>();
synchronized (instances) {
Set<String> keys = instances.getInstances().keySet();
for (String key : keys) {
newInst... | [
"public",
"static",
"void",
"put",
"(",
"String",
"instanceName",
",",
"Driver",
"instance",
")",
"{",
"// Copy current instances",
"Map",
"<",
"String",
",",
"Driver",
">",
"newInstances",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"synchronized",
"(",
"in... | Add/replace instance in current instance map. Work on a copy of the current map and replace it atomically.
@param instanceName
The name of the provider
@param instance
The instance | [
"Add",
"/",
"replace",
"instance",
"in",
"current",
"instance",
"map",
".",
"Work",
"on",
"a",
"copy",
"of",
"the",
"current",
"map",
"and",
"replace",
"it",
"atomically",
"."
] | train | https://github.com/esigate/esigate/blob/50421fb224f16e1ec42715425109a72b3b55527b/esigate-core/src/main/java/org/esigate/DriverFactory.java#L297-L312 |
jbossas/jboss-invocation | src/main/java/org/jboss/invocation/proxy/AbstractSubclassFactory.java | AbstractSubclassFactory.overrideEquals | protected boolean overrideEquals(MethodBodyCreator creator) {
"""
Override the equals method using the given {@link MethodBodyCreator}.
@param creator the method body creator to use
@return true if the method was not already overridden
"""
Method equals = null;
ClassMetadataSource data = re... | java | protected boolean overrideEquals(MethodBodyCreator creator) {
Method equals = null;
ClassMetadataSource data = reflectionMetadataSource.getClassMetadata(Object.class);
try {
equals = data.getMethod("equals", Boolean.TYPE, Object.class);
} catch (Exception e) {
thr... | [
"protected",
"boolean",
"overrideEquals",
"(",
"MethodBodyCreator",
"creator",
")",
"{",
"Method",
"equals",
"=",
"null",
";",
"ClassMetadataSource",
"data",
"=",
"reflectionMetadataSource",
".",
"getClassMetadata",
"(",
"Object",
".",
"class",
")",
";",
"try",
"{... | Override the equals method using the given {@link MethodBodyCreator}.
@param creator the method body creator to use
@return true if the method was not already overridden | [
"Override",
"the",
"equals",
"method",
"using",
"the",
"given",
"{",
"@link",
"MethodBodyCreator",
"}",
"."
] | train | https://github.com/jbossas/jboss-invocation/blob/f72586a554264cbc78fcdad9fdd3e84b833249c9/src/main/java/org/jboss/invocation/proxy/AbstractSubclassFactory.java#L246-L255 |
tvesalainen/util | util/src/main/java/org/vesalainen/math/matrix/AbstractMatrix.java | AbstractMatrix.getInstance | public static AbstractMatrix getInstance(int rows, int cols, Class<?> cls) {
"""
Returns new DoubleMatrix initialized to zeroes.
@param rows
@param cols
@return
"""
return new AbstractMatrix(rows, Array.newInstance(cls, rows*cols));
} | java | public static AbstractMatrix getInstance(int rows, int cols, Class<?> cls)
{
return new AbstractMatrix(rows, Array.newInstance(cls, rows*cols));
} | [
"public",
"static",
"AbstractMatrix",
"getInstance",
"(",
"int",
"rows",
",",
"int",
"cols",
",",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"return",
"new",
"AbstractMatrix",
"(",
"rows",
",",
"Array",
".",
"newInstance",
"(",
"cls",
",",
"rows",
"*",
"... | Returns new DoubleMatrix initialized to zeroes.
@param rows
@param cols
@return | [
"Returns",
"new",
"DoubleMatrix",
"initialized",
"to",
"zeroes",
"."
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/matrix/AbstractMatrix.java#L65-L68 |
grpc/grpc-java | api/src/main/java/io/grpc/ServiceProviders.java | ServiceProviders.loadAll | public static <T> List<T> loadAll(
Class<T> klass,
Iterable<Class<?>> hardcoded,
ClassLoader cl,
final PriorityAccessor<T> priorityAccessor) {
"""
If this is not Android, returns all available implementations discovered via
{@link ServiceLoader}.
If this is Android, returns all available ... | java | public static <T> List<T> loadAll(
Class<T> klass,
Iterable<Class<?>> hardcoded,
ClassLoader cl,
final PriorityAccessor<T> priorityAccessor) {
Iterable<T> candidates;
if (isAndroid(cl)) {
candidates = getCandidatesViaHardCoded(klass, hardcoded);
} else {
candidates = getC... | [
"public",
"static",
"<",
"T",
">",
"List",
"<",
"T",
">",
"loadAll",
"(",
"Class",
"<",
"T",
">",
"klass",
",",
"Iterable",
"<",
"Class",
"<",
"?",
">",
">",
"hardcoded",
",",
"ClassLoader",
"cl",
",",
"final",
"PriorityAccessor",
"<",
"T",
">",
"p... | If this is not Android, returns all available implementations discovered via
{@link ServiceLoader}.
If this is Android, returns all available implementations in {@code hardcoded}.
The list is sorted in descending priority order. | [
"If",
"this",
"is",
"not",
"Android",
"returns",
"all",
"available",
"implementations",
"discovered",
"via",
"{"
] | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/ServiceProviders.java#L55-L87 |
hawkular/hawkular-alerts | engine/src/main/java/org/hawkular/alerts/engine/impl/AlertsEngineImpl.java | AlertsEngineImpl.onPartitionChange | @Override
public void onPartitionChange(Map<String, List<String>> partition, Map<String, List<String>> removed,
Map<String, List<String>> added) {
"""
/*
This listener method is invoked on distributed scenarios.
When topology changes, new nodes added or removed, PartitionManager recalculate globa... | java | @Override
public void onPartitionChange(Map<String, List<String>> partition, Map<String, List<String>> removed,
Map<String, List<String>> added) {
log.debug("Executing: PartitionChange ");
log.debugf("Local partition: %s", partition);
log.debugf("Removed: %s", removed);
l... | [
"@",
"Override",
"public",
"void",
"onPartitionChange",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"partition",
",",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"removed",
",",
"Map",
"<",
"String",
",",
"List",
... | /*
This listener method is invoked on distributed scenarios.
When topology changes, new nodes added or removed, PartitionManager recalculate global triggers partition.
On each node, PartitionManager invokes this method to indicate triggers should hold, and the "delta" of
additions/removals.
With this delta, the process... | [
"/",
"*",
"This",
"listener",
"method",
"is",
"invoked",
"on",
"distributed",
"scenarios",
".",
"When",
"topology",
"changes",
"new",
"nodes",
"added",
"or",
"removed",
"PartitionManager",
"recalculate",
"global",
"triggers",
"partition",
".",
"On",
"each",
"nod... | train | https://github.com/hawkular/hawkular-alerts/blob/b4a0c2909b38e03e72cc1828219562ee8fcbf426/engine/src/main/java/org/hawkular/alerts/engine/impl/AlertsEngineImpl.java#L826-L863 |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/TableColdCell.java | TableColdCell.setTooltip | public void setTooltip(final String tooltip, final Length width, final Length height, final boolean visible) {
"""
Set a tooltip of a given size
@param tooltip the content
@param width the width of the tooltip
@param height the height of the tooltip
@param visible true if the tooltip is visible
"""
this.... | java | public void setTooltip(final String tooltip, final Length width, final Length height, final boolean visible) {
this.setTooltip(tooltip);
this.tooltipParameter = TooltipParameter.create(width, height, visible);
} | [
"public",
"void",
"setTooltip",
"(",
"final",
"String",
"tooltip",
",",
"final",
"Length",
"width",
",",
"final",
"Length",
"height",
",",
"final",
"boolean",
"visible",
")",
"{",
"this",
".",
"setTooltip",
"(",
"tooltip",
")",
";",
"this",
".",
"tooltipPa... | Set a tooltip of a given size
@param tooltip the content
@param width the width of the tooltip
@param height the height of the tooltip
@param visible true if the tooltip is visible | [
"Set",
"a",
"tooltip",
"of",
"a",
"given",
"size"
] | train | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableColdCell.java#L111-L114 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.