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
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipEntryUtil.java
ZipEntryUtil.copyEntry
static void copyEntry(ZipEntry originalEntry, InputStream in, ZipOutputStream out, boolean preserveTimestamps) throws IOException { """ Copies a given ZIP entry to a ZIP file. If this.preserveTimestamps is true, original timestamp is carried over, otherwise uses current time. @param originalEntry a ZIP entry ...
java
static void copyEntry(ZipEntry originalEntry, InputStream in, ZipOutputStream out, boolean preserveTimestamps) throws IOException { ZipEntry copy = copy(originalEntry); if (preserveTimestamps) { TimestampStrategyFactory.getInstance().setTime(copy, originalEntry); } else { copy.setTime(Syste...
[ "static", "void", "copyEntry", "(", "ZipEntry", "originalEntry", ",", "InputStream", "in", ",", "ZipOutputStream", "out", ",", "boolean", "preserveTimestamps", ")", "throws", "IOException", "{", "ZipEntry", "copy", "=", "copy", "(", "originalEntry", ")", ";", "i...
Copies a given ZIP entry to a ZIP file. If this.preserveTimestamps is true, original timestamp is carried over, otherwise uses current time. @param originalEntry a ZIP entry from existing ZIP file. @param in contents of the ZIP entry. @param out target ZIP stream.
[ "Copies", "a", "given", "ZIP", "entry", "to", "a", "ZIP", "file", ".", "If", "this", ".", "preserveTimestamps", "is", "true", "original", "timestamp", "is", "carried", "over", "otherwise", "uses", "current", "time", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipEntryUtil.java#L105-L116
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.enableAutoScale
public void enableAutoScale(String poolId, String autoScaleFormula, Period autoScaleEvaluationInterval) throws BatchErrorException, IOException { """ Enables automatic scaling on the specified pool. @param poolId The ID of the pool. @param autoScaleFormula The formula for the desired number of co...
java
public void enableAutoScale(String poolId, String autoScaleFormula, Period autoScaleEvaluationInterval) throws BatchErrorException, IOException { enableAutoScale(poolId, autoScaleFormula, autoScaleEvaluationInterval, null); }
[ "public", "void", "enableAutoScale", "(", "String", "poolId", ",", "String", "autoScaleFormula", ",", "Period", "autoScaleEvaluationInterval", ")", "throws", "BatchErrorException", ",", "IOException", "{", "enableAutoScale", "(", "poolId", ",", "autoScaleFormula", ",", ...
Enables automatic scaling on the specified pool. @param poolId The ID of the pool. @param autoScaleFormula The formula for the desired number of compute nodes in the pool. @param autoScaleEvaluationInterval The time interval at which to automatically adjust the pool size. @throws BatchErrorException Exception thrown w...
[ "Enables", "automatic", "scaling", "on", "the", "specified", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L711-L714
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.isValuesWithDefault
private boolean isValuesWithDefault(SqlNode source, int column) { """ Returns whether a query uses {@code DEFAULT} to populate a given column. """ switch (source.getKind()) { case VALUES: for (SqlNode operand : ((SqlCall) source).getOperandList()) { if (!isRowWithDefault(operand, column)) { ...
java
private boolean isValuesWithDefault(SqlNode source, int column) { switch (source.getKind()) { case VALUES: for (SqlNode operand : ((SqlCall) source).getOperandList()) { if (!isRowWithDefault(operand, column)) { return false; } } return true; } return false; }
[ "private", "boolean", "isValuesWithDefault", "(", "SqlNode", "source", ",", "int", "column", ")", "{", "switch", "(", "source", ".", "getKind", "(", ")", ")", "{", "case", "VALUES", ":", "for", "(", "SqlNode", "operand", ":", "(", "(", "SqlCall", ")", ...
Returns whether a query uses {@code DEFAULT} to populate a given column.
[ "Returns", "whether", "a", "query", "uses", "{" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L4407-L4418
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/TableJson.java
TableJson.newMoveStart
Delta newMoveStart(Storage src, String destUuid, String destPlacement, int destShardsLog2) { """ First step in a move, creates the destination storage and sets up mirroring. """ return Deltas.mapBuilder() .update(STORAGE.key(), Deltas.mapBuilder() .update(src.get...
java
Delta newMoveStart(Storage src, String destUuid, String destPlacement, int destShardsLog2) { return Deltas.mapBuilder() .update(STORAGE.key(), Deltas.mapBuilder() .update(src.getUuidString(), Deltas.mapBuilder() .put(Storage.MOVE_TO.key(), ...
[ "Delta", "newMoveStart", "(", "Storage", "src", ",", "String", "destUuid", ",", "String", "destPlacement", ",", "int", "destShardsLog2", ")", "{", "return", "Deltas", ".", "mapBuilder", "(", ")", ".", "update", "(", "STORAGE", ".", "key", "(", ")", ",", ...
First step in a move, creates the destination storage and sets up mirroring.
[ "First", "step", "in", "a", "move", "creates", "the", "destination", "storage", "and", "sets", "up", "mirroring", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/TableJson.java#L236-L248
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.del
public static boolean del(Path path) throws IORuntimeException { """ 删除文件或者文件夹<br> 注意:删除文件夹时不会判断文件夹是否为空,如果不空则递归删除子文件或文件夹<br> 某个文件删除失败会终止删除操作 @param path 文件对象 @return 成功与否 @throws IORuntimeException IO异常 @since 4.4.2 """ if (Files.notExists(path)) { return true; } try { if (Files.isDi...
java
public static boolean del(Path path) throws IORuntimeException { if (Files.notExists(path)) { return true; } try { if (Files.isDirectory(path)) { Files.walkFileTree(path, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs...
[ "public", "static", "boolean", "del", "(", "Path", "path", ")", "throws", "IORuntimeException", "{", "if", "(", "Files", ".", "notExists", "(", "path", ")", ")", "{", "return", "true", ";", "}", "try", "{", "if", "(", "Files", ".", "isDirectory", "(", ...
删除文件或者文件夹<br> 注意:删除文件夹时不会判断文件夹是否为空,如果不空则递归删除子文件或文件夹<br> 某个文件删除失败会终止删除操作 @param path 文件对象 @return 成功与否 @throws IORuntimeException IO异常 @since 4.4.2
[ "删除文件或者文件夹<br", ">", "注意:删除文件夹时不会判断文件夹是否为空,如果不空则递归删除子文件或文件夹<br", ">", "某个文件删除失败会终止删除操作" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L728-L760
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.uploadFileChunked
public <E extends Throwable> DbxEntry.File uploadFileChunked(String targetPath, DbxWriteMode writeMode, long numBytes, DbxStreamWriter<E> writer) throws DbxException, E { """ Similar to {@link #uploadFile}, except always uses the chunked upload API. """ Uploader uploader = startUploadFileChunke...
java
public <E extends Throwable> DbxEntry.File uploadFileChunked(String targetPath, DbxWriteMode writeMode, long numBytes, DbxStreamWriter<E> writer) throws DbxException, E { Uploader uploader = startUploadFileChunked(targetPath, writeMode, numBytes); return finishUploadFile(uploader, writer); ...
[ "public", "<", "E", "extends", "Throwable", ">", "DbxEntry", ".", "File", "uploadFileChunked", "(", "String", "targetPath", ",", "DbxWriteMode", "writeMode", ",", "long", "numBytes", ",", "DbxStreamWriter", "<", "E", ">", "writer", ")", "throws", "DbxException",...
Similar to {@link #uploadFile}, except always uses the chunked upload API.
[ "Similar", "to", "{" ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1249-L1254
ThreeTen/threetenbp
src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java
DateTimeFormatterBuilder.appendText
public DateTimeFormatterBuilder appendText(TemporalField field, TextStyle textStyle) { """ Appends the text of a date-time field to the formatter. <p> The text of the field will be output during a print. The value must be within the valid range of the field. If the value cannot be obtained then an exception wi...
java
public DateTimeFormatterBuilder appendText(TemporalField field, TextStyle textStyle) { Jdk8Methods.requireNonNull(field, "field"); Jdk8Methods.requireNonNull(textStyle, "textStyle"); appendInternal(new TextPrinterParser(field, textStyle, DateTimeTextProvider.getInstance())); return this;...
[ "public", "DateTimeFormatterBuilder", "appendText", "(", "TemporalField", "field", ",", "TextStyle", "textStyle", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "field", ",", "\"field\"", ")", ";", "Jdk8Methods", ".", "requireNonNull", "(", "textStyle", ",", ...
Appends the text of a date-time field to the formatter. <p> The text of the field will be output during a print. The value must be within the valid range of the field. If the value cannot be obtained then an exception will be thrown. If the field has no textual representation, then the numeric value will be used. <p> T...
[ "Appends", "the", "text", "of", "a", "date", "-", "time", "field", "to", "the", "formatter", ".", "<p", ">", "The", "text", "of", "the", "field", "will", "be", "output", "during", "a", "print", ".", "The", "value", "must", "be", "within", "the", "val...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/format/DateTimeFormatterBuilder.java#L680-L685
Frostman/dropbox4j
src/main/java/ru/frostman/dropbox/api/DropboxClient.java
DropboxClient.getFile
public EntryDownload getFile(String path) { """ Download file with specified path. @param path to download @return special objects that provides different ways to access file """ OAuthRequest request = new OAuthRequest(Verb.GET, FILES_URL + encode(path)); service.signRequest(accessToken, ...
java
public EntryDownload getFile(String path) { OAuthRequest request = new OAuthRequest(Verb.GET, FILES_URL + encode(path)); service.signRequest(accessToken, request); Response response = checkFiles(request.send()); return new EntryDownload(response, path); }
[ "public", "EntryDownload", "getFile", "(", "String", "path", ")", "{", "OAuthRequest", "request", "=", "new", "OAuthRequest", "(", "Verb", ".", "GET", ",", "FILES_URL", "+", "encode", "(", "path", ")", ")", ";", "service", ".", "signRequest", "(", "accessT...
Download file with specified path. @param path to download @return special objects that provides different ways to access file
[ "Download", "file", "with", "specified", "path", "." ]
train
https://github.com/Frostman/dropbox4j/blob/774c817e5bf294d0139ecb5ac81399be50ada5e0/src/main/java/ru/frostman/dropbox/api/DropboxClient.java#L292-L299
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/ImplementationImpl.java
ImplementationImpl.newDMap
public DMap newDMap() { """ Create a new <code>DMap</code> object. @return The new <code>DMap</code> object. @see DMap """ if ((getCurrentDatabase() == null)) { throw new DatabaseClosedException("Database is NULL, cannot create a DMap with a null database."); } ...
java
public DMap newDMap() { if ((getCurrentDatabase() == null)) { throw new DatabaseClosedException("Database is NULL, cannot create a DMap with a null database."); } return (DMap) DMapFactory.singleton.createCollectionOrMap(getCurrentPBKey()); }
[ "public", "DMap", "newDMap", "(", ")", "{", "if", "(", "(", "getCurrentDatabase", "(", ")", "==", "null", ")", ")", "{", "throw", "new", "DatabaseClosedException", "(", "\"Database is NULL, cannot create a DMap with a null database.\"", ")", ";", "}", "return", "(...
Create a new <code>DMap</code> object. @return The new <code>DMap</code> object. @see DMap
[ "Create", "a", "new", "<code", ">", "DMap<", "/", "code", ">", "object", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/ImplementationImpl.java#L267-L274
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessageBox.java
WMessageBox.setTitleText
public void setTitleText(final String title, final Serializable... args) { """ Sets the message box title. @param title the message box title to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string. """ Serializable currTitle = getComponentModel().title; ...
java
public void setTitleText(final String title, final Serializable... args) { Serializable currTitle = getComponentModel().title; Serializable titleToBeSet = I18nUtilities.asMessage(title, args); if (!Objects.equals(titleToBeSet, currTitle)) { MessageModel model = getOrCreateComponentModel(); model.title = ti...
[ "public", "void", "setTitleText", "(", "final", "String", "title", ",", "final", "Serializable", "...", "args", ")", "{", "Serializable", "currTitle", "=", "getComponentModel", "(", ")", ".", "title", ";", "Serializable", "titleToBeSet", "=", "I18nUtilities", "....
Sets the message box title. @param title the message box title to set, using {@link MessageFormat} syntax. @param args optional arguments for the message format string.
[ "Sets", "the", "message", "box", "title", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WMessageBox.java#L169-L177
UrielCh/ovh-java-sdk
ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java
ApiOvhConnectivity.eligibility_search_buildingDetails_POST
public OvhAsyncTask<OvhBuilding> eligibility_search_buildingDetails_POST(String building) throws IOException { """ Get the details for a building REST: POST /connectivity/eligibility/search/buildingDetails @param building [required] Building identifier, that can be found using /connectivity/eligibility/search/...
java
public OvhAsyncTask<OvhBuilding> eligibility_search_buildingDetails_POST(String building) throws IOException { String qPath = "/connectivity/eligibility/search/buildingDetails"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "building", building); String r...
[ "public", "OvhAsyncTask", "<", "OvhBuilding", ">", "eligibility_search_buildingDetails_POST", "(", "String", "building", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/connectivity/eligibility/search/buildingDetails\"", ";", "StringBuilder", "sb", "=", "path...
Get the details for a building REST: POST /connectivity/eligibility/search/buildingDetails @param building [required] Building identifier, that can be found using /connectivity/eligibility/search/building* methods
[ "Get", "the", "details", "for", "a", "building" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java#L104-L111
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java
ClassReloadingStrategy.of
public static ClassReloadingStrategy of(Instrumentation instrumentation) { """ Creates a class reloading strategy for the given instrumentation. The given instrumentation must either support {@link java.lang.instrument.Instrumentation#isRedefineClassesSupported()} or {@link java.lang.instrument.Instrumentation#i...
java
public static ClassReloadingStrategy of(Instrumentation instrumentation) { if (DISPATCHER.isRetransformClassesSupported(instrumentation)) { return new ClassReloadingStrategy(instrumentation, Strategy.RETRANSFORMATION); } else if (instrumentation.isRedefineClassesSupported()) { re...
[ "public", "static", "ClassReloadingStrategy", "of", "(", "Instrumentation", "instrumentation", ")", "{", "if", "(", "DISPATCHER", ".", "isRetransformClassesSupported", "(", "instrumentation", ")", ")", "{", "return", "new", "ClassReloadingStrategy", "(", "instrumentatio...
Creates a class reloading strategy for the given instrumentation. The given instrumentation must either support {@link java.lang.instrument.Instrumentation#isRedefineClassesSupported()} or {@link java.lang.instrument.Instrumentation#isRetransformClassesSupported()}. If both modes are supported, classes will be transfor...
[ "Creates", "a", "class", "reloading", "strategy", "for", "the", "given", "instrumentation", ".", "The", "given", "instrumentation", "must", "either", "support", "{", "@link", "java", ".", "lang", ".", "instrument", ".", "Instrumentation#isRedefineClassesSupported", ...
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java#L136-L144
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java
policyhttpcallout.get
public static policyhttpcallout get(nitro_service service, String name) throws Exception { """ Use this API to fetch policyhttpcallout resource of given name . """ policyhttpcallout obj = new policyhttpcallout(); obj.set_name(name); policyhttpcallout response = (policyhttpcallout) obj.get_resource(servic...
java
public static policyhttpcallout get(nitro_service service, String name) throws Exception{ policyhttpcallout obj = new policyhttpcallout(); obj.set_name(name); policyhttpcallout response = (policyhttpcallout) obj.get_resource(service); return response; }
[ "public", "static", "policyhttpcallout", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "policyhttpcallout", "obj", "=", "new", "policyhttpcallout", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", ...
Use this API to fetch policyhttpcallout resource of given name .
[ "Use", "this", "API", "to", "fetch", "policyhttpcallout", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/policy/policyhttpcallout.java#L637-L642
Alluxio/alluxio
core/base/src/main/java/alluxio/util/URIUtils.java
URIUtils.appendPathOrDie
public static URI appendPathOrDie(URI base, String path) { """ Appends the given path to the given base URI. It throws an {@link RuntimeException} if the inputs are malformed. @param base the base URI @param path the path to append @return the URI resulting from appending the base and the path """ tr...
java
public static URI appendPathOrDie(URI base, String path) { try { return appendPath(base, path); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
[ "public", "static", "URI", "appendPathOrDie", "(", "URI", "base", ",", "String", "path", ")", "{", "try", "{", "return", "appendPath", "(", "base", ",", "path", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "throw", "new", "RuntimeExc...
Appends the given path to the given base URI. It throws an {@link RuntimeException} if the inputs are malformed. @param base the base URI @param path the path to append @return the URI resulting from appending the base and the path
[ "Appends", "the", "given", "path", "to", "the", "given", "base", "URI", ".", "It", "throws", "an", "{", "@link", "RuntimeException", "}", "if", "the", "inputs", "are", "malformed", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/base/src/main/java/alluxio/util/URIUtils.java#L63-L69
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/trash/Trash.java
Trash.purgeTrashSnapshots
public void purgeTrashSnapshots() throws IOException { """ For each existing trash snapshot, uses a {@link org.apache.gobblin.data.management.trash.SnapshotCleanupPolicy} to determine whether the snapshot should be deleted. If so, delete it permanently. <p> Each existing snapshot will be passed to {@link org....
java
public void purgeTrashSnapshots() throws IOException { List<FileStatus> snapshotsInTrash = Arrays.asList(this.fs.listStatus(this.trashLocation, TRASH_SNAPSHOT_PATH_FILTER)); Collections.sort(snapshotsInTrash, new Comparator<FileStatus>() { @Override public int compare(FileStatus o1, FileSta...
[ "public", "void", "purgeTrashSnapshots", "(", ")", "throws", "IOException", "{", "List", "<", "FileStatus", ">", "snapshotsInTrash", "=", "Arrays", ".", "asList", "(", "this", ".", "fs", ".", "listStatus", "(", "this", ".", "trashLocation", ",", "TRASH_SNAPSHO...
For each existing trash snapshot, uses a {@link org.apache.gobblin.data.management.trash.SnapshotCleanupPolicy} to determine whether the snapshot should be deleted. If so, delete it permanently. <p> Each existing snapshot will be passed to {@link org.apache.gobblin.data.management.trash.SnapshotCleanupPolicy#shouldDel...
[ "For", "each", "existing", "trash", "snapshot", "uses", "a", "{", "@link", "org", ".", "apache", ".", "gobblin", ".", "data", ".", "management", ".", "trash", ".", "SnapshotCleanupPolicy", "}", "to", "determine", "whether", "the", "snapshot", "should", "be",...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/trash/Trash.java#L250-L281
jayantk/jklol
src/com/jayantkrish/jklol/preprocessing/FeatureStandardizer.java
FeatureStandardizer.normalizeVariance
public static DiscreteFactor normalizeVariance(DiscreteFactor featureFactor, int featureVariableNum) { """ Computes the empirical variance of the features in {@code featureFactor} and normalizes each feature such that its empirical variance is 1. @param featureFactor @param featureVariableNum @return """...
java
public static DiscreteFactor normalizeVariance(DiscreteFactor featureFactor, int featureVariableNum) { DiscreteFactor variance = getVariances(featureFactor, featureVariableNum); DiscreteFactor stdDev = new TableFactor(variance.getVars(), variance.getWeights().elementwiseSqrt()); return featureFactor.produc...
[ "public", "static", "DiscreteFactor", "normalizeVariance", "(", "DiscreteFactor", "featureFactor", ",", "int", "featureVariableNum", ")", "{", "DiscreteFactor", "variance", "=", "getVariances", "(", "featureFactor", ",", "featureVariableNum", ")", ";", "DiscreteFactor", ...
Computes the empirical variance of the features in {@code featureFactor} and normalizes each feature such that its empirical variance is 1. @param featureFactor @param featureVariableNum @return
[ "Computes", "the", "empirical", "variance", "of", "the", "features", "in", "{", "@code", "featureFactor", "}", "and", "normalizes", "each", "feature", "such", "that", "its", "empirical", "variance", "is", "1", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/preprocessing/FeatureStandardizer.java#L226-L231
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java
ServiceHandler.isTopologyActive
public boolean isTopologyActive(StormClusterState stormClusterState, String topologyName) throws Exception { """ whether the topology is active by topology name @param stormClusterState see Cluster_clj @param topologyName topology name @return boolean if the storm is active, return true, otherwise return...
java
public boolean isTopologyActive(StormClusterState stormClusterState, String topologyName) throws Exception { boolean rtn = false; if (Cluster.get_topology_id(stormClusterState, topologyName) != null) { rtn = true; } return rtn; }
[ "public", "boolean", "isTopologyActive", "(", "StormClusterState", "stormClusterState", ",", "String", "topologyName", ")", "throws", "Exception", "{", "boolean", "rtn", "=", "false", ";", "if", "(", "Cluster", ".", "get_topology_id", "(", "stormClusterState", ",", ...
whether the topology is active by topology name @param stormClusterState see Cluster_clj @param topologyName topology name @return boolean if the storm is active, return true, otherwise return false
[ "whether", "the", "topology", "is", "active", "by", "topology", "name" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java#L1493-L1499
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcWrapper.java
WSJdbcWrapper.invokeOperation
Object invokeOperation(Object implObject, Method method, Object[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, SQLException { """ Invokes a method on the specified object. The data source must override this method to account for ...
java
Object invokeOperation(Object implObject, Method method, Object[] args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, SQLException { TraceComponent tc = getTracer(); if (tc.isDebugEnabled()) Tr.debug(this, tc, ...
[ "Object", "invokeOperation", "(", "Object", "implObject", ",", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "IllegalAccessException", ",", "IllegalArgumentException", ",", "InvocationTargetException", ",", "SQLException", "{", "TraceComponent", ...
Invokes a method on the specified object. The data source must override this method to account for dynamic configuration changes. @param implObject the instance on which the operation is invoked. @param method the method that is invoked. @param args the parameters to the method. @throws IllegalAccessException if the ...
[ "Invokes", "a", "method", "on", "the", "specified", "object", ".", "The", "data", "source", "must", "override", "this", "method", "to", "account", "for", "dynamic", "configuration", "changes", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcWrapper.java#L325-L334
m-m-m/util
core/src/main/java/net/sf/mmm/util/lang/api/StringTokenizer.java
StringTokenizer.containsSubstring
protected boolean containsSubstring(char[] substring, int startIndex) { """ This method tests if the string to tokenize contains the given {@code substring} starting at the given {@code index}. @param substring is the substring to check for. @param startIndex is the start index in the string to tokenize. @re...
java
protected boolean containsSubstring(char[] substring, int startIndex) { if (substring.length < (this.string.length - startIndex)) { for (int i = 0; i < substring.length; i++) { if (substring[i] != this.string[startIndex + i]) { return false; } } return true; } re...
[ "protected", "boolean", "containsSubstring", "(", "char", "[", "]", "substring", ",", "int", "startIndex", ")", "{", "if", "(", "substring", ".", "length", "<", "(", "this", ".", "string", ".", "length", "-", "startIndex", ")", ")", "{", "for", "(", "i...
This method tests if the string to tokenize contains the given {@code substring} starting at the given {@code index}. @param substring is the substring to check for. @param startIndex is the start index in the string to tokenize. @return {@code true} if the given {@code substring} was found at {@code index}.
[ "This", "method", "tests", "if", "the", "string", "to", "tokenize", "contains", "the", "given", "{", "@code", "substring", "}", "starting", "at", "the", "given", "{", "@code", "index", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/core/src/main/java/net/sf/mmm/util/lang/api/StringTokenizer.java#L264-L275
RestComm/sip-servlets
sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java
ProxyImpl.extractPreviousNodeFromRequest
private String extractPreviousNodeFromRequest(SipServletRequestImpl request) { """ /* This method will find the address of the machine that is the previous dialog path node. If there are proxies before the current one that are adding Record-Route we should visit them, otherwise just send to the client directly....
java
private String extractPreviousNodeFromRequest(SipServletRequestImpl request) { // SipURI uri = null; // https://code.google.com/p/sipservlets/issues/detail?id=275 // we should use the contact header from the originating endpoint ContactHeader contact = (ContactHeader) request.getMessage().getHeader(ContactHe...
[ "private", "String", "extractPreviousNodeFromRequest", "(", "SipServletRequestImpl", "request", ")", "{", "//\t\tSipURI uri = null;\r", "// https://code.google.com/p/sipservlets/issues/detail?id=275\r", "// we should use the contact header from the originating endpoint\r", "ContactHeader", "...
/* This method will find the address of the machine that is the previous dialog path node. If there are proxies before the current one that are adding Record-Route we should visit them, otherwise just send to the client directly. And we don't want to visit proxies that are not Record-Routing, because they are not in th...
[ "/", "*", "This", "method", "will", "find", "the", "address", "of", "the", "machine", "that", "is", "the", "previous", "dialog", "path", "node", ".", "If", "there", "are", "proxies", "before", "the", "current", "one", "that", "are", "adding", "Record", "...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/proxy/ProxyImpl.java#L236-L276
deeplearning4j/deeplearning4j
nd4j/nd4j-serde/nd4j-aeron/src/main/java/org/nd4j/aeron/ipc/response/NDArrayResponseFragmentHandler.java
NDArrayResponseFragmentHandler.onFragment
@Override public void onFragment(DirectBuffer buffer, int offset, int length, Header header) { """ Callback for handling fragments of data being read from a log. @param buffer containing the data. @param offset at which the data begins. @param length of the data in bytes. @param header representing the m...
java
@Override public void onFragment(DirectBuffer buffer, int offset, int length, Header header) { if (buffer != null && length > 0) { ByteBuffer byteBuffer = buffer.byteBuffer().order(ByteOrder.nativeOrder()); byteBuffer.position(offset); byte[] b = new byte[length]; ...
[ "@", "Override", "public", "void", "onFragment", "(", "DirectBuffer", "buffer", ",", "int", "offset", ",", "int", "length", ",", "Header", "header", ")", "{", "if", "(", "buffer", "!=", "null", "&&", "length", ">", "0", ")", "{", "ByteBuffer", "byteBuffe...
Callback for handling fragments of data being read from a log. @param buffer containing the data. @param offset at which the data begins. @param length of the data in bytes. @param header representing the meta data for the data.
[ "Callback", "for", "handling", "fragments", "of", "data", "being", "read", "from", "a", "log", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-serde/nd4j-aeron/src/main/java/org/nd4j/aeron/ipc/response/NDArrayResponseFragmentHandler.java#L59-L92
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/util/NamePreservingRunnable.java
NamePreservingRunnable.setName
private void setName(Thread thread, String name) { """ Wraps {@link Thread#setName(String)} to catch a possible {@link Exception}s such as {@link SecurityException} in sandbox environments, such as applets """ try { thread.setName(name); } catch (SecurityException se) { ...
java
private void setName(Thread thread, String name) { try { thread.setName(name); } catch (SecurityException se) { if (LOGGER.isWarnEnabled()) { LOGGER.warn("Failed to set the thread name.", se); } } }
[ "private", "void", "setName", "(", "Thread", "thread", ",", "String", "name", ")", "{", "try", "{", "thread", ".", "setName", "(", "name", ")", ";", "}", "catch", "(", "SecurityException", "se", ")", "{", "if", "(", "LOGGER", ".", "isWarnEnabled", "(",...
Wraps {@link Thread#setName(String)} to catch a possible {@link Exception}s such as {@link SecurityException} in sandbox environments, such as applets
[ "Wraps", "{" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/util/NamePreservingRunnable.java#L71-L79
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java
IdentityPatchRunner.createTask
static PatchingTask createTask(final PatchingTasks.ContentTaskDefinition definition, final PatchContentProvider provider, final IdentityPatchContext.PatchEntry context) { """ Create the patching task based on the definition. @param definition the task description @param provider the content provider @param ...
java
static PatchingTask createTask(final PatchingTasks.ContentTaskDefinition definition, final PatchContentProvider provider, final IdentityPatchContext.PatchEntry context) { final PatchContentLoader contentLoader = provider.getLoader(definition.getTarget().getPatchId()); final PatchingTaskDescription descr...
[ "static", "PatchingTask", "createTask", "(", "final", "PatchingTasks", ".", "ContentTaskDefinition", "definition", ",", "final", "PatchContentProvider", "provider", ",", "final", "IdentityPatchContext", ".", "PatchEntry", "context", ")", "{", "final", "PatchContentLoader"...
Create the patching task based on the definition. @param definition the task description @param provider the content provider @param context the task context @return the created task
[ "Create", "the", "patching", "task", "based", "on", "the", "definition", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchRunner.java#L699-L703
datacleaner/AnalyzerBeans
components/javascript/src/main/java/org/eobjects/analyzer/beans/script/JavaScriptUtils.java
JavaScriptUtils.addToScope
public static void addToScope(Scriptable scope, Object object, String... names) { """ Adds an object to the JavaScript scope with a set of variable names @param scope @param object @param names """ Object jsObject = Context.javaToJS(object, scope); for (String name : names) { name = name.replaceAll...
java
public static void addToScope(Scriptable scope, Object object, String... names) { Object jsObject = Context.javaToJS(object, scope); for (String name : names) { name = name.replaceAll(" ", "_"); ScriptableObject.putProperty(scope, name, jsObject); } }
[ "public", "static", "void", "addToScope", "(", "Scriptable", "scope", ",", "Object", "object", ",", "String", "...", "names", ")", "{", "Object", "jsObject", "=", "Context", ".", "javaToJS", "(", "object", ",", "scope", ")", ";", "for", "(", "String", "n...
Adds an object to the JavaScript scope with a set of variable names @param scope @param object @param names
[ "Adds", "an", "object", "to", "the", "JavaScript", "scope", "with", "a", "set", "of", "variable", "names" ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/javascript/src/main/java/org/eobjects/analyzer/beans/script/JavaScriptUtils.java#L48-L54
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java
SourceToHTMLConverter.convertPackage
public void convertPackage(PackageElement pkg, DocPath outputdir) throws DocFileIOException, SimpleDocletException { """ Convert the Classes in the given Package to an HTML file. @param pkg the Package to convert. @param outputdir the name of the directory to output to. @throws DocFileIOException ...
java
public void convertPackage(PackageElement pkg, DocPath outputdir) throws DocFileIOException, SimpleDocletException { if (pkg == null) { return; } for (Element te : utils.getAllClasses(pkg)) { // If -nodeprecated option is set and the class is marked as depreca...
[ "public", "void", "convertPackage", "(", "PackageElement", "pkg", ",", "DocPath", "outputdir", ")", "throws", "DocFileIOException", ",", "SimpleDocletException", "{", "if", "(", "pkg", "==", "null", ")", "{", "return", ";", "}", "for", "(", "Element", "te", ...
Convert the Classes in the given Package to an HTML file. @param pkg the Package to convert. @param outputdir the name of the directory to output to. @throws DocFileIOException if there is a problem generating an output file @throws SimpleDocletException if there is a problem reading a source file
[ "Convert", "the", "Classes", "in", "the", "given", "Package", "to", "an", "HTML", "file", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java#L142-L155
AgNO3/jcifs-ng
src/main/java/jcifs/Config.java
Config.getInetAddress
public static InetAddress getInetAddress ( Properties props, String key, InetAddress def ) { """ Retrieve an <code>InetAddress</code>. If the address is not an IP address and cannot be resolved <code>null</code> will be returned. """ String addr = props.getProperty(key); if ( addr != null ) {...
java
public static InetAddress getInetAddress ( Properties props, String key, InetAddress def ) { String addr = props.getProperty(key); if ( addr != null ) { try { def = InetAddress.getByName(addr); } catch ( UnknownHostException uhe ) { log...
[ "public", "static", "InetAddress", "getInetAddress", "(", "Properties", "props", ",", "String", "key", ",", "InetAddress", "def", ")", "{", "String", "addr", "=", "props", ".", "getProperty", "(", "key", ")", ";", "if", "(", "addr", "!=", "null", ")", "{...
Retrieve an <code>InetAddress</code>. If the address is not an IP address and cannot be resolved <code>null</code> will be returned.
[ "Retrieve", "an", "<code", ">", "InetAddress<", "/", "code", ">", ".", "If", "the", "address", "is", "not", "an", "IP", "address", "and", "cannot", "be", "resolved", "<code", ">", "null<", "/", "code", ">", "will", "be", "returned", "." ]
train
https://github.com/AgNO3/jcifs-ng/blob/0311107a077ea372527ae74839eec8042197332f/src/main/java/jcifs/Config.java#L135-L146
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/EigenOps_DDRM.java
EigenOps_DDRM.createMatrixD
public static DMatrixRMaj createMatrixD(EigenDecomposition_F64 eig ) { """ <p> A diagonal matrix where real diagonal element contains a real eigenvalue. If an eigenvalue is imaginary then zero is stored in its place. </p> @param eig An eigenvalue decomposition which has already decomposed a matrix. @return...
java
public static DMatrixRMaj createMatrixD(EigenDecomposition_F64 eig ) { int N = eig.getNumberOfEigenvalues(); DMatrixRMaj D = new DMatrixRMaj( N , N ); for( int i = 0; i < N; i++ ) { Complex_F64 c = eig.getEigenvalue(i); if( c.isReal() ) { D.set(i,i,...
[ "public", "static", "DMatrixRMaj", "createMatrixD", "(", "EigenDecomposition_F64", "eig", ")", "{", "int", "N", "=", "eig", ".", "getNumberOfEigenvalues", "(", ")", ";", "DMatrixRMaj", "D", "=", "new", "DMatrixRMaj", "(", "N", ",", "N", ")", ";", "for", "(...
<p> A diagonal matrix where real diagonal element contains a real eigenvalue. If an eigenvalue is imaginary then zero is stored in its place. </p> @param eig An eigenvalue decomposition which has already decomposed a matrix. @return A diagonal matrix containing the eigenvalues.
[ "<p", ">", "A", "diagonal", "matrix", "where", "real", "diagonal", "element", "contains", "a", "real", "eigenvalue", ".", "If", "an", "eigenvalue", "is", "imaginary", "then", "zero", "is", "stored", "in", "its", "place", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/EigenOps_DDRM.java#L255-L270
prestodb/presto
presto-main/src/main/java/com/facebook/presto/server/RequestHelpers.java
RequestHelpers.setContentTypeHeaders
public static Builder setContentTypeHeaders(boolean isBinaryTransportEnabled, Builder requestBuilder) { """ Sets the request Content-Type/Accept headers for JSON or SMILE encoding based on the given isBinaryTransportEnabled argument. """ if (isBinaryTransportEnabled) { return requestBuilde...
java
public static Builder setContentTypeHeaders(boolean isBinaryTransportEnabled, Builder requestBuilder) { if (isBinaryTransportEnabled) { return requestBuilder .setHeader(CONTENT_TYPE, APPLICATION_JACKSON_SMILE) .setHeader(ACCEPT, APPLICATION_JACKSON_SMILE);...
[ "public", "static", "Builder", "setContentTypeHeaders", "(", "boolean", "isBinaryTransportEnabled", ",", "Builder", "requestBuilder", ")", "{", "if", "(", "isBinaryTransportEnabled", ")", "{", "return", "requestBuilder", ".", "setHeader", "(", "CONTENT_TYPE", ",", "AP...
Sets the request Content-Type/Accept headers for JSON or SMILE encoding based on the given isBinaryTransportEnabled argument.
[ "Sets", "the", "request", "Content", "-", "Type", "/", "Accept", "headers", "for", "JSON", "or", "SMILE", "encoding", "based", "on", "the", "given", "isBinaryTransportEnabled", "argument", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/server/RequestHelpers.java#L33-L43
jenkinsci/jenkins
core/src/main/java/hudson/model/Descriptor.java
Descriptor.doHelp
public void doHelp(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { """ Serves {@code help.html} from the resource of {@link #clazz}. """ String path = req.getRestOfPath(); if(path.contains("..")) throw new ServletException("Illegal path: "+path); path = ...
java
public void doHelp(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { String path = req.getRestOfPath(); if(path.contains("..")) throw new ServletException("Illegal path: "+path); path = path.replace('/','-'); PluginWrapper pw = getPlugin(); if (pw!...
[ "public", "void", "doHelp", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", ",", "ServletException", "{", "String", "path", "=", "req", ".", "getRestOfPath", "(", ")", ";", "if", "(", "path", ".", "contains", "(", ...
Serves {@code help.html} from the resource of {@link #clazz}.
[ "Serves", "{" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/Descriptor.java#L920-L953
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/runtime/AbstractEJBRuntime.java
AbstractEJBRuntime.createNonPersistentExpirationTimer
protected Timer createNonPersistentExpirationTimer(BeanO beanO, Date expiration, long interval, Serializable info) { """ Creates a non-persistent expiration based (single action or interval) EJB timer. @param beanO the bean for which the timer is being created @param expiration the initial expiration for a int...
java
protected Timer createNonPersistentExpirationTimer(BeanO beanO, Date expiration, long interval, Serializable info) { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled(); if (isTraceOn && tc.isDebugEnabled()) Tr.entry(tc, "createNonPersistentExpirationTimer ...
[ "protected", "Timer", "createNonPersistentExpirationTimer", "(", "BeanO", "beanO", ",", "Date", "expiration", ",", "long", "interval", ",", "Serializable", "info", ")", "{", "final", "boolean", "isTraceOn", "=", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")"...
Creates a non-persistent expiration based (single action or interval) EJB timer. @param beanO the bean for which the timer is being created @param expiration the initial expiration for a interval-based timer @param interval the interval for an interval-based timer, or -1 for a single-action timer @param info applicati...
[ "Creates", "a", "non", "-", "persistent", "expiration", "based", "(", "single", "action", "or", "interval", ")", "EJB", "timer", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/runtime/AbstractEJBRuntime.java#L1861-L1884
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java
JschUtil.bindPort
public static boolean bindPort(Session session, String remoteHost, int remotePort, int localPort) throws JschRuntimeException { """ 绑定端口到本地。 一个会话可绑定多个端口 @param session 需要绑定端口的SSH会话 @param remoteHost 远程主机 @param remotePort 远程端口 @param localPort 本地端口 @return 成功与否 @throws JschRuntimeException 端口绑定失败异常 """...
java
public static boolean bindPort(Session session, String remoteHost, int remotePort, int localPort) throws JschRuntimeException { if (session != null && session.isConnected()) { try { session.setPortForwardingL(localPort, remoteHost, remotePort); } catch (JSchException e) { throw new JschRuntimeExcep...
[ "public", "static", "boolean", "bindPort", "(", "Session", "session", ",", "String", "remoteHost", ",", "int", "remotePort", ",", "int", "localPort", ")", "throws", "JschRuntimeException", "{", "if", "(", "session", "!=", "null", "&&", "session", ".", "isConne...
绑定端口到本地。 一个会话可绑定多个端口 @param session 需要绑定端口的SSH会话 @param remoteHost 远程主机 @param remotePort 远程端口 @param localPort 本地端口 @return 成功与否 @throws JschRuntimeException 端口绑定失败异常
[ "绑定端口到本地。", "一个会话可绑定多个端口" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java#L116-L126
Sayi/poi-tl
src/main/java/com/deepoove/poi/XWPFTemplate.java
XWPFTemplate.compile
public static XWPFTemplate compile(InputStream inputStream, Configure config) { """ template file as InputStream @param inputStream @param config @return @version 1.2.0 """ try { XWPFTemplate instance = new XWPFTemplate(); instance.config = config; instance.doc = new NiceXWPFDocument(inputStre...
java
public static XWPFTemplate compile(InputStream inputStream, Configure config) { try { XWPFTemplate instance = new XWPFTemplate(); instance.config = config; instance.doc = new NiceXWPFDocument(inputStream); instance.visitor = new TemplateVisitor(instance.config); instance.eleTemplates = instance.visitor...
[ "public", "static", "XWPFTemplate", "compile", "(", "InputStream", "inputStream", ",", "Configure", "config", ")", "{", "try", "{", "XWPFTemplate", "instance", "=", "new", "XWPFTemplate", "(", ")", ";", "instance", ".", "config", "=", "config", ";", "instance"...
template file as InputStream @param inputStream @param config @return @version 1.2.0
[ "template", "file", "as", "InputStream" ]
train
https://github.com/Sayi/poi-tl/blob/cf502a6aed473c534df4b0cac5e038fcb95d3f06/src/main/java/com/deepoove/poi/XWPFTemplate.java#L108-L120
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java
UTCDateTimeUtils.getTimeBoxValue
public static final Long getTimeBoxValue(TimeZone zone, Date date) { """ Returns an appropriate value for the UTCTimeBox for a specified {@link TimeZone} and {@link Date}. @param zone The {@link TimeZone} in which the Date will be rendered. @param date The Date which should be displayed in the UTCTimeBox...
java
public static final Long getTimeBoxValue(TimeZone zone, Date date) { if (date == null) return null; // use a Calendar in the specified timezone to figure out the // time which is edited in a format independent of TimeZone. Calendar cal = GregorianCalendar.getInstance(zone); cal...
[ "public", "static", "final", "Long", "getTimeBoxValue", "(", "TimeZone", "zone", ",", "Date", "date", ")", "{", "if", "(", "date", "==", "null", ")", "return", "null", ";", "// use a Calendar in the specified timezone to figure out the", "// time which is edited in a fo...
Returns an appropriate value for the UTCTimeBox for a specified {@link TimeZone} and {@link Date}. @param zone The {@link TimeZone} in which the Date will be rendered. @param date The Date which should be displayed in the UTCTimeBox @return the value for the UTCTimeBox or null if the supplied date is null
[ "Returns", "an", "appropriate", "value", "for", "the", "UTCTimeBox", "for", "a", "specified", "{", "@link", "TimeZone", "}", "and", "{", "@link", "Date", "}", "." ]
train
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/server/UTCDateTimeUtils.java#L48-L65
facebook/fresco
native-filters/src/main/java/com/facebook/imagepipeline/nativecode/NativeRoundingFilter.java
NativeRoundingFilter.toCircle
public static void toCircle(Bitmap bitmap, boolean antiAliased) { """ This is a fast, native implementation for rounding a bitmap. It takes the given bitmap and modifies it to be circular. <p>This implementation does not change the underlying bitmap dimensions, it only sets pixels that are outside of the circ...
java
public static void toCircle(Bitmap bitmap, boolean antiAliased) { Preconditions.checkNotNull(bitmap); nativeToCircleFilter(bitmap, antiAliased); }
[ "public", "static", "void", "toCircle", "(", "Bitmap", "bitmap", ",", "boolean", "antiAliased", ")", "{", "Preconditions", ".", "checkNotNull", "(", "bitmap", ")", ";", "nativeToCircleFilter", "(", "bitmap", ",", "antiAliased", ")", ";", "}" ]
This is a fast, native implementation for rounding a bitmap. It takes the given bitmap and modifies it to be circular. <p>This implementation does not change the underlying bitmap dimensions, it only sets pixels that are outside of the circle to a transparent color. @param bitmap the bitmap to modify
[ "This", "is", "a", "fast", "native", "implementation", "for", "rounding", "a", "bitmap", ".", "It", "takes", "the", "given", "bitmap", "and", "modifies", "it", "to", "be", "circular", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/native-filters/src/main/java/com/facebook/imagepipeline/nativecode/NativeRoundingFilter.java#L35-L38
sdl/odata
odata_processor/src/main/java/com/sdl/odata/processor/write/util/WriteMethodUtil.java
WriteMethodUtil.validateKeys
public static void validateKeys(Object entity, EntityType type, ODataUri oDataUri, EntityDataModel entityDataModel) throws ODataClientException, ODataProcessorException { """ Performs the validation of keys. The key(s) in the 'OData URI' should match the existing key(s) in the pass...
java
public static void validateKeys(Object entity, EntityType type, ODataUri oDataUri, EntityDataModel entityDataModel) throws ODataClientException, ODataProcessorException { final Map<String, Object> oDataUriKeyValues = asJavaMap(getEntityKeyMap(oDataUri, entityDataModel)); ...
[ "public", "static", "void", "validateKeys", "(", "Object", "entity", ",", "EntityType", "type", ",", "ODataUri", "oDataUri", ",", "EntityDataModel", "entityDataModel", ")", "throws", "ODataClientException", ",", "ODataProcessorException", "{", "final", "Map", "<", "...
Performs the validation of keys. The key(s) in the 'OData URI' should match the existing key(s) in the passed entity. @param entity The passed entity. @param type The entity type of the passed entity. @throws com.sdl.odata.api.ODataClientException @throws com.sdl.odata.api.processor.ODataProcessorException
[ "Performs", "the", "validation", "of", "keys", ".", "The", "key", "(", "s", ")", "in", "the", "OData", "URI", "should", "match", "the", "existing", "key", "(", "s", ")", "in", "the", "passed", "entity", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_processor/src/main/java/com/sdl/odata/processor/write/util/WriteMethodUtil.java#L117-L134
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/utils/StorageUtils.java
StorageUtils.getOwnCacheDirectory
public static File getOwnCacheDirectory(Context context, String cacheDir) { """ Returns specified application cache directory. Cache directory will be created on SD card by defined path if card is mounted and app has appropriate permission. Else - Android defines cache directory on device's file system. @param...
java
public static File getOwnCacheDirectory(Context context, String cacheDir) { File appCacheDir = null; if (MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && hasExternalStoragePermission(context)) { appCacheDir = new File(Environment.getExternalStorageDirectory(), cacheDir); } if (appCacheDir == nu...
[ "public", "static", "File", "getOwnCacheDirectory", "(", "Context", "context", ",", "String", "cacheDir", ")", "{", "File", "appCacheDir", "=", "null", ";", "if", "(", "MEDIA_MOUNTED", ".", "equals", "(", "Environment", ".", "getExternalStorageState", "(", ")", ...
Returns specified application cache directory. Cache directory will be created on SD card by defined path if card is mounted and app has appropriate permission. Else - Android defines cache directory on device's file system. @param context Application context @param cacheDir Cache directory path (e.g.: "AppCacheDir",...
[ "Returns", "specified", "application", "cache", "directory", ".", "Cache", "directory", "will", "be", "created", "on", "SD", "card", "by", "defined", "path", "if", "card", "is", "mounted", "and", "app", "has", "appropriate", "permission", ".", "Else", "-", "...
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/utils/StorageUtils.java#L130-L139
carewebframework/carewebframework-core
org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpUtil.java
HelpUtil.associateCSH
public static void associateCSH(BaseUIComponent component, HelpContext helpContext, BaseUIComponent commandTarget) { """ Associates context-sensitive help topic with a component. Any existing association is replaced. @param component Component to be associated. @param helpContext The help target. @param comm...
java
public static void associateCSH(BaseUIComponent component, HelpContext helpContext, BaseUIComponent commandTarget) { if (component != null) { component.setAttribute(CSH_TARGET, helpContext); CommandUtil.associateCommand("help", component, commandTarget); } }
[ "public", "static", "void", "associateCSH", "(", "BaseUIComponent", "component", ",", "HelpContext", "helpContext", ",", "BaseUIComponent", "commandTarget", ")", "{", "if", "(", "component", "!=", "null", ")", "{", "component", ".", "setAttribute", "(", "CSH_TARGE...
Associates context-sensitive help topic with a component. Any existing association is replaced. @param component Component to be associated. @param helpContext The help target. @param commandTarget The command target.
[ "Associates", "context", "-", "sensitive", "help", "topic", "with", "a", "component", ".", "Any", "existing", "association", "is", "replaced", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpUtil.java#L279-L284
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java
AbstractSearchStructure.createOrOpenBDBDbs
private void createOrOpenBDBDbs() throws Exception { """ This method creates and/or opens the BDB databases with the appropriate parameters. @throws Exception """ // configuration for the mapping dbs DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setAllowCreate(true); // db will be create...
java
private void createOrOpenBDBDbs() throws Exception { // configuration for the mapping dbs DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setAllowCreate(true); // db will be created if it does not exist dbConfig.setReadOnly(readOnly); dbConfig.setTransactional(transactional); // create/open m...
[ "private", "void", "createOrOpenBDBDbs", "(", ")", "throws", "Exception", "{", "// configuration for the mapping dbs\r", "DatabaseConfig", "dbConfig", "=", "new", "DatabaseConfig", "(", ")", ";", "dbConfig", ".", "setAllowCreate", "(", "true", ")", ";", "// db will be...
This method creates and/or opens the BDB databases with the appropriate parameters. @throws Exception
[ "This", "method", "creates", "and", "/", "or", "opens", "the", "BDB", "databases", "with", "the", "appropriate", "parameters", "." ]
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/datastructures/AbstractSearchStructure.java#L569-L602
lukas-krecan/completion-stage
src/main/java/net/javacrumbs/completionstage/SimpleCompletionStage.java
SimpleCompletionStage.acceptResult
private static <T> void acceptResult(CompletableCompletionStage<T> s, Supplier<? extends T> supplier) { """ Accepts result provided by the Supplier. If an exception is thrown by the supplier, completes exceptionally. @param supplier generates result """ try { // exception can be thrown o...
java
private static <T> void acceptResult(CompletableCompletionStage<T> s, Supplier<? extends T> supplier) { try { // exception can be thrown only by supplier. All callbacks are generated by us and they do not throw any exceptions s.complete(supplier.get()); } catch (Throwable e) { ...
[ "private", "static", "<", "T", ">", "void", "acceptResult", "(", "CompletableCompletionStage", "<", "T", ">", "s", ",", "Supplier", "<", "?", "extends", "T", ">", "supplier", ")", "{", "try", "{", "// exception can be thrown only by supplier. All callbacks are gener...
Accepts result provided by the Supplier. If an exception is thrown by the supplier, completes exceptionally. @param supplier generates result
[ "Accepts", "result", "provided", "by", "the", "Supplier", ".", "If", "an", "exception", "is", "thrown", "by", "the", "supplier", "completes", "exceptionally", "." ]
train
https://github.com/lukas-krecan/completion-stage/blob/9c270d779b5fc98dc958a5fb335f6e2ad9d06962/src/main/java/net/javacrumbs/completionstage/SimpleCompletionStage.java#L269-L276
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java
DevicesInner.getExtendedInformationAsync
public Observable<DataBoxEdgeDeviceExtendedInfoInner> getExtendedInformationAsync(String deviceName, String resourceGroupName) { """ Gets additional information for the specified data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalA...
java
public Observable<DataBoxEdgeDeviceExtendedInfoInner> getExtendedInformationAsync(String deviceName, String resourceGroupName) { return getExtendedInformationWithServiceResponseAsync(deviceName, resourceGroupName).map(new Func1<ServiceResponse<DataBoxEdgeDeviceExtendedInfoInner>, DataBoxEdgeDeviceExtendedInfoIn...
[ "public", "Observable", "<", "DataBoxEdgeDeviceExtendedInfoInner", ">", "getExtendedInformationAsync", "(", "String", "deviceName", ",", "String", "resourceGroupName", ")", "{", "return", "getExtendedInformationWithServiceResponseAsync", "(", "deviceName", ",", "resourceGroupNa...
Gets additional information for the specified data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DataBoxEdgeDeviceExtendedInfoInner object
[ "Gets", "additional", "information", "for", "the", "specified", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L1382-L1389
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/naming/EJBJavaColonNamingHelper.java
EJBJavaColonNamingHelper.removeAppBindings
public void removeAppBindings(ModuleMetaData mmd, List<String> names) { """ Remove names from the application mapping. If all the bindings have been removed for an application, remove the application mapping. @param moduleMetaData Name of the application being used. @param names List of names to remove. "...
java
public void removeAppBindings(ModuleMetaData mmd, List<String> names) { ApplicationMetaData amd = mmd.getApplicationMetaData(); Lock writeLock = javaColonLock.writeLock(); writeLock.lock(); try { JavaColonNamespaceBindings<EJBBinding> bindings = getAppBindingMap(amd); ...
[ "public", "void", "removeAppBindings", "(", "ModuleMetaData", "mmd", ",", "List", "<", "String", ">", "names", ")", "{", "ApplicationMetaData", "amd", "=", "mmd", ".", "getApplicationMetaData", "(", ")", ";", "Lock", "writeLock", "=", "javaColonLock", ".", "wr...
Remove names from the application mapping. If all the bindings have been removed for an application, remove the application mapping. @param moduleMetaData Name of the application being used. @param names List of names to remove.
[ "Remove", "names", "from", "the", "application", "mapping", ".", "If", "all", "the", "bindings", "have", "been", "removed", "for", "an", "application", "remove", "the", "application", "mapping", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/naming/EJBJavaColonNamingHelper.java#L451-L469
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/element/OpenPgpContentElement.java
OpenPgpContentElement.getExtension
@SuppressWarnings("unchecked") public <PE extends ExtensionElement> PE getExtension(String elementName, String namespace) { """ Returns the first extension that matches the specified element name and namespace, or <tt>null</tt> if it doesn't exist. If the provided elementName is null, only the namespace is m...
java
@SuppressWarnings("unchecked") public <PE extends ExtensionElement> PE getExtension(String elementName, String namespace) { if (namespace == null) { return null; } String key = XmppStringUtils.generateKey(elementName, namespace); ExtensionElement packetExtension; ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "PE", "extends", "ExtensionElement", ">", "PE", "getExtension", "(", "String", "elementName", ",", "String", "namespace", ")", "{", "if", "(", "namespace", "==", "null", ")", "{", "return", "...
Returns the first extension that matches the specified element name and namespace, or <tt>null</tt> if it doesn't exist. If the provided elementName is null, only the namespace is matched. Extensions are are arbitrary XML elements in standard XMPP stanzas. @param elementName the XML element name of the extension. (May...
[ "Returns", "the", "first", "extension", "that", "matches", "the", "specified", "element", "name", "and", "namespace", "or", "<tt", ">", "null<", "/", "tt", ">", "if", "it", "doesn", "t", "exist", ".", "If", "the", "provided", "elementName", "is", "null", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/element/OpenPgpContentElement.java#L137-L151
gliga/ekstazi
org.ekstazi.core/src/main/java/org/ekstazi/junit/JUnit4Monitor.java
JUnit4Monitor.isOnStack
private static boolean isOnStack(int moreThan, String canonicalName) { """ Checks if the given name is on stack more than the given number of times. This method uses startsWith to check if the given name is on stack, so one can pass a package name too. Intentionally duplicate. """ StackTraceElemen...
java
private static boolean isOnStack(int moreThan, String canonicalName) { StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); int count = 0; for (StackTraceElement element : stackTrace) { if (element.getClassName().startsWith(canonicalName)) { count+...
[ "private", "static", "boolean", "isOnStack", "(", "int", "moreThan", ",", "String", "canonicalName", ")", "{", "StackTraceElement", "[", "]", "stackTrace", "=", "Thread", ".", "currentThread", "(", ")", ".", "getStackTrace", "(", ")", ";", "int", "count", "=...
Checks if the given name is on stack more than the given number of times. This method uses startsWith to check if the given name is on stack, so one can pass a package name too. Intentionally duplicate.
[ "Checks", "if", "the", "given", "name", "is", "on", "stack", "more", "than", "the", "given", "number", "of", "times", ".", "This", "method", "uses", "startsWith", "to", "check", "if", "the", "given", "name", "is", "on", "stack", "so", "one", "can", "pa...
train
https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/junit/JUnit4Monitor.java#L72-L81
SG-O/miIO
src/main/java/de/sg_o/app/miio/yeelight/Light.java
Light.powerOffAfterTime
public boolean powerOffAfterTime(int minutes) throws CommandExecutionException { """ Power the device off after some time. @param minutes The time until the device is turned off in minutes. @return True if the command was received successfully. @throws CommandExecutionException When there has been a error durin...
java
public boolean powerOffAfterTime(int minutes) throws CommandExecutionException { JSONArray col = new JSONArray(); col.put(0); col.put(minutes); return sendOk("cron_add", col); }
[ "public", "boolean", "powerOffAfterTime", "(", "int", "minutes", ")", "throws", "CommandExecutionException", "{", "JSONArray", "col", "=", "new", "JSONArray", "(", ")", ";", "col", ".", "put", "(", "0", ")", ";", "col", ".", "put", "(", "minutes", ")", "...
Power the device off after some time. @param minutes The time until the device is turned off in minutes. @return True if the command was received successfully. @throws CommandExecutionException When there has been a error during the communication or the response was invalid.
[ "Power", "the", "device", "off", "after", "some", "time", "." ]
train
https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/yeelight/Light.java#L254-L259
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/model/curves/DiscountCurveInterpolation.java
DiscountCurveInterpolation.createDiscountCurveFromZeroRates
public static DiscountCurveInterpolation createDiscountCurveFromZeroRates(String name, double[] times, RandomVariable[] givenZeroRates) { """ Create a discount curve from given times and given zero rates using default interpolation and extrapolation methods. The discount factor is determined by <code> givenDisc...
java
public static DiscountCurveInterpolation createDiscountCurveFromZeroRates(String name, double[] times, RandomVariable[] givenZeroRates) { RandomVariable[] givenDiscountFactors = new RandomVariable[givenZeroRates.length]; for(int timeIndex=0; timeIndex<times.length;timeIndex++) { givenDiscountFactors[timeIndex] ...
[ "public", "static", "DiscountCurveInterpolation", "createDiscountCurveFromZeroRates", "(", "String", "name", ",", "double", "[", "]", "times", ",", "RandomVariable", "[", "]", "givenZeroRates", ")", "{", "RandomVariable", "[", "]", "givenDiscountFactors", "=", "new", ...
Create a discount curve from given times and given zero rates using default interpolation and extrapolation methods. The discount factor is determined by <code> givenDiscountFactors[timeIndex] = Math.exp(- givenZeroRates[timeIndex] * times[timeIndex]); </code> @param name The name of this discount curve. @param times ...
[ "Create", "a", "discount", "curve", "from", "given", "times", "and", "given", "zero", "rates", "using", "default", "interpolation", "and", "extrapolation", "methods", ".", "The", "discount", "factor", "is", "determined", "by", "<code", ">", "givenDiscountFactors",...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/DiscountCurveInterpolation.java#L298-L306
zaproxy/zaproxy
src/org/parosproxy/paros/view/WorkbenchPanel.java
WorkbenchPanel.addPanels
public void addPanels(List<AbstractPanel> panels, PanelType panelType) { """ Adds the given panels to the workbench, hinting with the given panel type. @param panels the panels to add to the workbench @param panelType the type of the panels @throws IllegalArgumentException if any of the parameters is {@code n...
java
public void addPanels(List<AbstractPanel> panels, PanelType panelType) { validateNotNull(panels, "panels"); validateNotNull(panelType, "panelType"); boolean fullLayout = layout == Layout.FULL; addPanels(getTabbedFull(), panels, fullLayout); switch (panelType) { case SELECT: addPanels(getTabb...
[ "public", "void", "addPanels", "(", "List", "<", "AbstractPanel", ">", "panels", ",", "PanelType", "panelType", ")", "{", "validateNotNull", "(", "panels", ",", "\"panels\"", ")", ";", "validateNotNull", "(", "panelType", ",", "\"panelType\"", ")", ";", "boole...
Adds the given panels to the workbench, hinting with the given panel type. @param panels the panels to add to the workbench @param panelType the type of the panels @throws IllegalArgumentException if any of the parameters is {@code null}. @since 2.5.0 @see #removePanels(List, PanelType) @see #addPanel(AbstractPanel, P...
[ "Adds", "the", "given", "panels", "to", "the", "workbench", "hinting", "with", "the", "given", "panel", "type", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/WorkbenchPanel.java#L844-L865
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/ClusterLabeledImage.java
ClusterLabeledImage.process
public void process(GrayS32 input , GrayS32 output , GrowQueue_I32 regionMemberCount ) { """ Relabels the image such that all pixels with the same label are a member of the same graph. @param input Labeled input image. @param output Labeled output image. @param regionMemberCount (Input/Output) Number of pixel...
java
public void process(GrayS32 input , GrayS32 output , GrowQueue_I32 regionMemberCount ) { // initialize data structures this.regionMemberCount = regionMemberCount; regionMemberCount.reset(); setUpEdges(input,output); ImageMiscOps.fill(output,-1); // this is a bit of a hack here. Normally you call the pare...
[ "public", "void", "process", "(", "GrayS32", "input", ",", "GrayS32", "output", ",", "GrowQueue_I32", "regionMemberCount", ")", "{", "// initialize data structures", "this", ".", "regionMemberCount", "=", "regionMemberCount", ";", "regionMemberCount", ".", "reset", "(...
Relabels the image such that all pixels with the same label are a member of the same graph. @param input Labeled input image. @param output Labeled output image. @param regionMemberCount (Input/Output) Number of pixels which belong to each group.
[ "Relabels", "the", "image", "such", "that", "all", "pixels", "with", "the", "same", "label", "are", "a", "member", "of", "the", "same", "graph", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/segmentation/ms/ClusterLabeledImage.java#L125-L143
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java
MongoDBQuery.createRegex
public static String createRegex(String value, boolean ignoreCase) { """ Generates the regular expression for matching string for like operator. @param value the value @param ignoreCase whether to ignore the case @return the string """ if (value == null) { throw new IllegalAr...
java
public static String createRegex(String value, boolean ignoreCase) { if (value == null) { throw new IllegalArgumentException("String cannot be null"); } int len = value.length(); if (len == 0) { return ""; } StringBuilder sb =...
[ "public", "static", "String", "createRegex", "(", "String", "value", ",", "boolean", "ignoreCase", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"String cannot be null\"", ")", ";", "}", "int", "len", ...
Generates the regular expression for matching string for like operator. @param value the value @param ignoreCase whether to ignore the case @return the string
[ "Generates", "the", "regular", "expression", "for", "matching", "string", "for", "like", "operator", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java#L1295-L1328
hortonworks/dstream
dstream-api/src/main/java/io/dstream/AbstractDStreamExecutionDelegate.java
AbstractDStreamExecutionDelegate.mixinWithCloseHandler
private Stream<?> mixinWithCloseHandler(Stream<?> resultStream, Runnable closeHandler) { """ Creates proxy over the result Stream to ensures that close() call is always delegated to the close handler provided by the target ExecutionDelegate. """ resultStream.onClose(closeHandler); InvocationHandler ih = n...
java
private Stream<?> mixinWithCloseHandler(Stream<?> resultStream, Runnable closeHandler){ resultStream.onClose(closeHandler); InvocationHandler ih = new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result = method.invoke(resultStr...
[ "private", "Stream", "<", "?", ">", "mixinWithCloseHandler", "(", "Stream", "<", "?", ">", "resultStream", ",", "Runnable", "closeHandler", ")", "{", "resultStream", ".", "onClose", "(", "closeHandler", ")", ";", "InvocationHandler", "ih", "=", "new", "Invocat...
Creates proxy over the result Stream to ensures that close() call is always delegated to the close handler provided by the target ExecutionDelegate.
[ "Creates", "proxy", "over", "the", "result", "Stream", "to", "ensures", "that", "close", "()", "call", "is", "always", "delegated", "to", "the", "close", "handler", "provided", "by", "the", "target", "ExecutionDelegate", "." ]
train
https://github.com/hortonworks/dstream/blob/3a106c0f14725b028fe7fe2dbc660406d9a5f142/dstream-api/src/main/java/io/dstream/AbstractDStreamExecutionDelegate.java#L104-L119
phax/ph-commons
ph-json/src/main/java/com/helger/json/serialize/JsonReader.java
JsonReader.readFromStream
@Nullable public static IJson readFromStream (@Nonnull final IHasInputStream aISP, @Nonnull final Charset aFallbackCharset) { """ Read the Json from the passed {@link IHasInputStream}. @param aISP The input stream provider to use. May not be <code>null</code>. @param aFallbackCharset The charset to be used...
java
@Nullable public static IJson readFromStream (@Nonnull final IHasInputStream aISP, @Nonnull final Charset aFallbackCharset) { return readFromStream (aISP, aFallbackCharset, null); }
[ "@", "Nullable", "public", "static", "IJson", "readFromStream", "(", "@", "Nonnull", "final", "IHasInputStream", "aISP", ",", "@", "Nonnull", "final", "Charset", "aFallbackCharset", ")", "{", "return", "readFromStream", "(", "aISP", ",", "aFallbackCharset", ",", ...
Read the Json from the passed {@link IHasInputStream}. @param aISP The input stream provider to use. May not be <code>null</code>. @param aFallbackCharset The charset to be used if no BOM is present. May not be <code>null</code>. @return <code>null</code> if reading failed, the Json declarations otherwise.
[ "Read", "the", "Json", "from", "the", "passed", "{", "@link", "IHasInputStream", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-json/src/main/java/com/helger/json/serialize/JsonReader.java#L598-L602
cloudendpoints/endpoints-management-java
endpoints-control/src/main/java/com/google/api/control/model/Distributions.java
Distributions.createExponential
public static Distribution createExponential(int numFiniteBuckets, double growthFactor, double scale) { """ Creates an {@code Distribution} with {@code ExponentialBuckets}. @param numFiniteBuckets initializes the number of finite buckets @param growthFactor initializes the growth factor @param scale ini...
java
public static Distribution createExponential(int numFiniteBuckets, double growthFactor, double scale) { if (numFiniteBuckets <= 0) { throw new IllegalArgumentException(MSG_BAD_NUM_FINITE_BUCKETS); } if (growthFactor <= 1.0) { throw new IllegalArgumentException(String.format(MSG_DOUBLE_TOO_...
[ "public", "static", "Distribution", "createExponential", "(", "int", "numFiniteBuckets", ",", "double", "growthFactor", ",", "double", "scale", ")", "{", "if", "(", "numFiniteBuckets", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "MSG_BAD_...
Creates an {@code Distribution} with {@code ExponentialBuckets}. @param numFiniteBuckets initializes the number of finite buckets @param growthFactor initializes the growth factor @param scale initializes the scale @return a {@code Distribution} with {@code ExponentialBuckets} @throws IllegalArgumentException if a bad...
[ "Creates", "an", "{", "@code", "Distribution", "}", "with", "{", "@code", "ExponentialBuckets", "}", "." ]
train
https://github.com/cloudendpoints/endpoints-management-java/blob/5bbf20ddadbbd51b890049e3c338c28abe2c9f94/endpoints-control/src/main/java/com/google/api/control/model/Distributions.java#L60-L78
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3d.java
Path3d.moveTo
public void moveTo(double x, double y, double z) { """ Adds a point to the path by moving to the specified coordinates specified in double precision. @param x the specified X coordinate @param y the specified Y coordinate @param z the specified Z coordinate """ if (this.numTypesProperty.get()>0 && this...
java
public void moveTo(double x, double y, double z) { if (this.numTypesProperty.get()>0 && this.types[this.numTypesProperty.get()-1]==PathElementType.MOVE_TO) { this.coordsProperty[this.numCoordsProperty.get()-3].set(x); this.coordsProperty[this.numCoordsProperty.get()-2].set(y); this.coordsProperty[this.numCoo...
[ "public", "void", "moveTo", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "if", "(", "this", ".", "numTypesProperty", ".", "get", "(", ")", ">", "0", "&&", "this", ".", "types", "[", "this", ".", "numTypesProperty", ".", "ge...
Adds a point to the path by moving to the specified coordinates specified in double precision. @param x the specified X coordinate @param y the specified Y coordinate @param z the specified Z coordinate
[ "Adds", "a", "point", "to", "the", "path", "by", "moving", "to", "the", "specified", "coordinates", "specified", "in", "double", "precision", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Path3d.java#L2011-L2033
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuTexRefSetAddressMode
public static int cuTexRefSetAddressMode(CUtexref hTexRef, int dim, int am) { """ Sets the addressing mode for a texture reference. <pre> CUresult cuTexRefSetAddressMode ( CUtexref hTexRef, int dim, CUaddress_mode am ) </pre> <div> <p>Sets the addressing mode for a texture reference. Specifies the add...
java
public static int cuTexRefSetAddressMode(CUtexref hTexRef, int dim, int am) { return checkResult(cuTexRefSetAddressModeNative(hTexRef, dim, am)); }
[ "public", "static", "int", "cuTexRefSetAddressMode", "(", "CUtexref", "hTexRef", ",", "int", "dim", ",", "int", "am", ")", "{", "return", "checkResult", "(", "cuTexRefSetAddressModeNative", "(", "hTexRef", ",", "dim", ",", "am", ")", ")", ";", "}" ]
Sets the addressing mode for a texture reference. <pre> CUresult cuTexRefSetAddressMode ( CUtexref hTexRef, int dim, CUaddress_mode am ) </pre> <div> <p>Sets the addressing mode for a texture reference. Specifies the addressing mode <tt>am</tt> for the given dimension <tt>dim</tt> of the texture reference <tt>hTexRe...
[ "Sets", "the", "addressing", "mode", "for", "a", "texture", "reference", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L10012-L10015
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java
IncrementalSAXSource_Filter.startParse
public void startParse(InputSource source) throws SAXException { """ Launch a thread that will run an XMLReader's parse() operation within a thread, feeding events to this IncrementalSAXSource_Filter. Mostly a convenience routine, but has the advantage that -- since we invoked parse() -- we can halt parsing qui...
java
public void startParse(InputSource source) throws SAXException { if(fNoMoreEvents) throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_INCRSAXSRCFILTER_NOT_RESTARTABLE, null)); //"IncrmentalSAXSource_Filter not currently restartable."); if(fXMLReader==null) throw new SAXExcept...
[ "public", "void", "startParse", "(", "InputSource", "source", ")", "throws", "SAXException", "{", "if", "(", "fNoMoreEvents", ")", "throw", "new", "SAXException", "(", "XMLMessages", ".", "createXMLMessage", "(", "XMLErrorResources", ".", "ER_INCRSAXSRCFILTER_NOT_REST...
Launch a thread that will run an XMLReader's parse() operation within a thread, feeding events to this IncrementalSAXSource_Filter. Mostly a convenience routine, but has the advantage that -- since we invoked parse() -- we can halt parsing quickly via a StopException rather than waiting for the SAX stream to end by its...
[ "Launch", "a", "thread", "that", "will", "run", "an", "XMLReader", "s", "parse", "()", "operation", "within", "a", "thread", "feeding", "events", "to", "this", "IncrementalSAXSource_Filter", ".", "Mostly", "a", "convenience", "routine", "but", "has", "the", "a...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java#L603-L615
voldemort/voldemort
src/java/voldemort/store/stats/ClientSocketStats.java
ClientSocketStats.recordResourceRequestTimeUs
public void recordResourceRequestTimeUs(SocketDestination dest, long resourceRequestTimeUs) { """ Record the resource request wait time in us @param dest Destination of the socket for which the resource was requested. Will actually record if null. Otherwise will call this on self and corresponding child with ...
java
public void recordResourceRequestTimeUs(SocketDestination dest, long resourceRequestTimeUs) { if(dest != null) { getOrCreateNodeStats(dest).recordResourceRequestTimeUs(null, resourceRequestTimeUs); recordResourceRequestTimeUs(null, resourceRequestTimeUs); } else { thi...
[ "public", "void", "recordResourceRequestTimeUs", "(", "SocketDestination", "dest", ",", "long", "resourceRequestTimeUs", ")", "{", "if", "(", "dest", "!=", "null", ")", "{", "getOrCreateNodeStats", "(", "dest", ")", ".", "recordResourceRequestTimeUs", "(", "null", ...
Record the resource request wait time in us @param dest Destination of the socket for which the resource was requested. Will actually record if null. Otherwise will call this on self and corresponding child with this param null. @param resourceRequestTimeUs The number of us to wait before getting a socket
[ "Record", "the", "resource", "request", "wait", "time", "in", "us" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/stats/ClientSocketStats.java#L302-L310
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/component/AnimatedModelComponent.java
AnimatedModelComponent.forceStart
public Timer forceStart(BlockPos pos, String animation, Timer timer) { """ Start the animation with the specified {@link Timer}.<br> Restarts the animation if it is already running. @param pos the pos @param animation the animation @param timer the timer @return the timer """ stop(pos, animation); r...
java
public Timer forceStart(BlockPos pos, String animation, Timer timer) { stop(pos, animation); return addTimer(pos, animation, timer); }
[ "public", "Timer", "forceStart", "(", "BlockPos", "pos", ",", "String", "animation", ",", "Timer", "timer", ")", "{", "stop", "(", "pos", ",", "animation", ")", ";", "return", "addTimer", "(", "pos", ",", "animation", ",", "timer", ")", ";", "}" ]
Start the animation with the specified {@link Timer}.<br> Restarts the animation if it is already running. @param pos the pos @param animation the animation @param timer the timer @return the timer
[ "Start", "the", "animation", "with", "the", "specified", "{", "@link", "Timer", "}", ".", "<br", ">", "Restarts", "the", "animation", "if", "it", "is", "already", "running", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/component/AnimatedModelComponent.java#L193-L197
CloudBees-community/syslog-java-client
src/main/java/com/cloudbees/syslog/SDElement.java
SDElement.addSDParam
public SDElement addSDParam(String paramName, String paramValue) { """ Adds a SDParam @param paramName the PARAM-NAME @param paramValue the PARAM-VALUE @return """ return addSDParam(new SDParam(paramName, paramValue)); }
java
public SDElement addSDParam(String paramName, String paramValue) { return addSDParam(new SDParam(paramName, paramValue)); }
[ "public", "SDElement", "addSDParam", "(", "String", "paramName", ",", "String", "paramValue", ")", "{", "return", "addSDParam", "(", "new", "SDParam", "(", "paramName", ",", "paramValue", ")", ")", ";", "}" ]
Adds a SDParam @param paramName the PARAM-NAME @param paramValue the PARAM-VALUE @return
[ "Adds", "a", "SDParam" ]
train
https://github.com/CloudBees-community/syslog-java-client/blob/41e01206e4ce17c6d225ffb443bf19792a3f3c3a/src/main/java/com/cloudbees/syslog/SDElement.java#L90-L92
nguillaumin/slick2d-maven
slick2d-peditor/src/main/java/org/newdawn/slick/tools/peditor/ControlPanel.java
ControlPanel.addValue
protected void addValue(String name, ValuePanel valuePanel) { """ Add a configurable value to the mapping table @param name The name of the control @param valuePanel The panel used to set the value in the emitter """ named.put(name, valuePanel); valuePanel.setBounds(0,10+yPos,280,63); valuePan...
java
protected void addValue(String name, ValuePanel valuePanel) { named.put(name, valuePanel); valuePanel.setBounds(0,10+yPos,280,63); valuePanel.addListener(this); add(valuePanel); yPos+=63; }
[ "protected", "void", "addValue", "(", "String", "name", ",", "ValuePanel", "valuePanel", ")", "{", "named", ".", "put", "(", "name", ",", "valuePanel", ")", ";", "valuePanel", ".", "setBounds", "(", "0", ",", "10", "+", "yPos", ",", "280", ",", "63", ...
Add a configurable value to the mapping table @param name The name of the control @param valuePanel The panel used to set the value in the emitter
[ "Add", "a", "configurable", "value", "to", "the", "mapping", "table" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-peditor/src/main/java/org/newdawn/slick/tools/peditor/ControlPanel.java#L41-L49
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.getColumnInfo
@Override protected VoltTable.ColumnInfo getColumnInfo(String columnTypeName, String colName) { """ Returns a VoltTable.ColumnInfo of appropriate type, based on a <i>columnTypeName</i> and <i>colName</i> (both Strings). This version checks for column types used only by PostgreSQL, and then passes the remain...
java
@Override protected VoltTable.ColumnInfo getColumnInfo(String columnTypeName, String colName) { return super.getColumnInfo(getVoltColumnTypeName(columnTypeName), colName); }
[ "@", "Override", "protected", "VoltTable", ".", "ColumnInfo", "getColumnInfo", "(", "String", "columnTypeName", ",", "String", "colName", ")", "{", "return", "super", ".", "getColumnInfo", "(", "getVoltColumnTypeName", "(", "columnTypeName", ")", ",", "colName", "...
Returns a VoltTable.ColumnInfo of appropriate type, based on a <i>columnTypeName</i> and <i>colName</i> (both Strings). This version checks for column types used only by PostgreSQL, and then passes the remaining work to the base class version.
[ "Returns", "a", "VoltTable", ".", "ColumnInfo", "of", "appropriate", "type", "based", "on", "a", "<i", ">", "columnTypeName<", "/", "i", ">", "and", "<i", ">", "colName<", "/", "i", ">", "(", "both", "Strings", ")", ".", "This", "version", "checks", "f...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L629-L632
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/AbstractRectangularShape1dfx.java
AbstractRectangularShape1dfx.minYProperty
@Pure public DoubleProperty minYProperty() { """ Replies the property that is the minimum y coordinate of the box. @return the minY property. """ if (this.minY == null) { this.minY = new SimpleDoubleProperty(this, MathFXAttributeNames.MINIMUM_Y) { @Override protected void invalidated() { ...
java
@Pure public DoubleProperty minYProperty() { if (this.minY == null) { this.minY = new SimpleDoubleProperty(this, MathFXAttributeNames.MINIMUM_Y) { @Override protected void invalidated() { final double currentMin = get(); final double currentMax = getMaxY(); if (currentMin > currentMax) { ...
[ "@", "Pure", "public", "DoubleProperty", "minYProperty", "(", ")", "{", "if", "(", "this", ".", "minY", "==", "null", ")", "{", "this", ".", "minY", "=", "new", "SimpleDoubleProperty", "(", "this", ",", "MathFXAttributeNames", ".", "MINIMUM_Y", ")", "{", ...
Replies the property that is the minimum y coordinate of the box. @return the minY property.
[ "Replies", "the", "property", "that", "is", "the", "minimum", "y", "coordinate", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d1/dfx/AbstractRectangularShape1dfx.java#L214-L230
groovy/groovy-core
src/examples/groovy/swing/MyTableModel.java
MyTableModel.setValueAt
public void setValueAt(Object value, int row, int col) { """ /* Don't need to implement this method unless your table's data can change. """ if (log.isLoggable(Level.FINE)) { log.fine( "Setting value at " + row + "," + col + " to " + value + " (an instance of " + value.get...
java
public void setValueAt(Object value, int row, int col) { if (log.isLoggable(Level.FINE)) { log.fine( "Setting value at " + row + "," + col + " to " + value + " (an instance of " + value.getClass() + ")"); } if (data[0][col] instanceof Integer && !(value instanceof In...
[ "public", "void", "setValueAt", "(", "Object", "value", ",", "int", "row", ",", "int", "col", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "log", ".", "fine", "(", "\"Setting value at \"", "+", "row", "+", ...
/* Don't need to implement this method unless your table's data can change.
[ "/", "*", "Don", "t", "need", "to", "implement", "this", "method", "unless", "your", "table", "s", "data", "can", "change", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/examples/groovy/swing/MyTableModel.java#L96-L122
aol/cyclops
cyclops/src/main/java/cyclops/control/Future.java
Future.firstSuccess
@SafeVarargs public static <T> Future<T> firstSuccess(Future<T>... fts) { """ Select the first Future to return with a successful result <pre> {@code Future<Integer> ft = Future.future(); Future<Integer> result = Future.firstSuccess(Future.of(()->1),ft); ft.complete(10); result.getValue() //1 } </p...
java
@SafeVarargs public static <T> Future<T> firstSuccess(Future<T>... fts) { Future<T> future = Future.future(); Stream.of(fts) .forEach(f->f.peek(r->future.complete(r))); Future<T> all = allOf(fts).recover(e->{ future.completeExceptionally(e); return null;}); return futur...
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "Future", "<", "T", ">", "firstSuccess", "(", "Future", "<", "T", ">", "...", "fts", ")", "{", "Future", "<", "T", ">", "future", "=", "Future", ".", "future", "(", ")", ";", "Stream", ".", "...
Select the first Future to return with a successful result <pre> {@code Future<Integer> ft = Future.future(); Future<Integer> result = Future.firstSuccess(Future.of(()->1),ft); ft.complete(10); result.getValue() //1 } </pre> @param fts Futures to race @return First Future to return with a result
[ "Select", "the", "first", "Future", "to", "return", "with", "a", "successful", "result" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/control/Future.java#L211-L219
eclipse/xtext-core
org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/CompletionPrefixProvider.java
CompletionPrefixProvider.getLastCompleteNodeByOffset
public INode getLastCompleteNodeByOffset(INode node, int offsetPosition, int completionOffset) { """ Returns the last node that appears to be part of the prefix. This will be used to determine the current model object that'll be the most special context instance in the proposal provider. """ return internal...
java
public INode getLastCompleteNodeByOffset(INode node, int offsetPosition, int completionOffset) { return internalGetLastCompleteNodeByOffset(node.getRootNode(), offsetPosition); }
[ "public", "INode", "getLastCompleteNodeByOffset", "(", "INode", "node", ",", "int", "offsetPosition", ",", "int", "completionOffset", ")", "{", "return", "internalGetLastCompleteNodeByOffset", "(", "node", ".", "getRootNode", "(", ")", ",", "offsetPosition", ")", ";...
Returns the last node that appears to be part of the prefix. This will be used to determine the current model object that'll be the most special context instance in the proposal provider.
[ "Returns", "the", "last", "node", "that", "appears", "to", "be", "part", "of", "the", "prefix", ".", "This", "will", "be", "used", "to", "determine", "the", "current", "model", "object", "that", "ll", "be", "the", "most", "special", "context", "instance", ...
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.ide/src/org/eclipse/xtext/ide/editor/contentassist/CompletionPrefixProvider.java#L36-L38
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.setLocale
protected void setLocale( HttpServletRequest request, Locale locale ) { """ Set the user's currently selected Locale. @param request The request we are processing @param locale The user's selected Locale to be set, or null to select the server's default Locale @deprecated Use {@link #setLocale(Locale)}. ...
java
protected void setLocale( HttpServletRequest request, Locale locale ) { HttpSession session = request.getSession(); if ( locale == null ) { locale = getDefaultLocale(); } session.setAttribute( Globals.LOCALE_KEY, locale ); }
[ "protected", "void", "setLocale", "(", "HttpServletRequest", "request", ",", "Locale", "locale", ")", "{", "HttpSession", "session", "=", "request", ".", "getSession", "(", ")", ";", "if", "(", "locale", "==", "null", ")", "{", "locale", "=", "getDefaultLoca...
Set the user's currently selected Locale. @param request The request we are processing @param locale The user's selected Locale to be set, or null to select the server's default Locale @deprecated Use {@link #setLocale(Locale)}.
[ "Set", "the", "user", "s", "currently", "selected", "Locale", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L1934-L1944
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/walk/TypesWalker.java
TypesWalker.isCompatibleClasses
private static boolean isCompatibleClasses(final Class<?> one, final Class<?> two) { """ Classes are compatible if one can be casted to another (or they are equal). @param one first class @param two second class @return true is classes are compatible, false otherwise """ return one.isAssignableFro...
java
private static boolean isCompatibleClasses(final Class<?> one, final Class<?> two) { return one.isAssignableFrom(two) || two.isAssignableFrom(one); }
[ "private", "static", "boolean", "isCompatibleClasses", "(", "final", "Class", "<", "?", ">", "one", ",", "final", "Class", "<", "?", ">", "two", ")", "{", "return", "one", ".", "isAssignableFrom", "(", "two", ")", "||", "two", ".", "isAssignableFrom", "(...
Classes are compatible if one can be casted to another (or they are equal). @param one first class @param two second class @return true is classes are compatible, false otherwise
[ "Classes", "are", "compatible", "if", "one", "can", "be", "casted", "to", "another", "(", "or", "they", "are", "equal", ")", "." ]
train
https://github.com/xvik/generics-resolver/blob/d7d9d2783265df1178230e8f0b7cb6d853b67a7b/src/main/java/ru/vyarus/java/generics/resolver/util/walk/TypesWalker.java#L206-L208
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/render/AbstractRenderer.java
AbstractRenderer.createLabel
public Label createLabel(BaseComponent parent, Object value, String prefix) { """ Creates a label for a string value. @param parent BaseComponent that will be the parent of the label. @param value Value to be used as label text. @param prefix Value to be used as a prefix for the label text. @return The newly...
java
public Label createLabel(BaseComponent parent, Object value, String prefix) { return createLabel(parent, value, prefix, null); }
[ "public", "Label", "createLabel", "(", "BaseComponent", "parent", ",", "Object", "value", ",", "String", "prefix", ")", "{", "return", "createLabel", "(", "parent", ",", "value", ",", "prefix", ",", "null", ")", ";", "}" ]
Creates a label for a string value. @param parent BaseComponent that will be the parent of the label. @param value Value to be used as label text. @param prefix Value to be used as a prefix for the label text. @return The newly created label.
[ "Creates", "a", "label", "for", "a", "string", "value", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/render/AbstractRenderer.java#L87-L89
Falydoor/limesurvey-rc
src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java
LimesurveyRC.createIncompleteResponse
public int createIncompleteResponse(int surveyId, String token) throws LimesurveyRCException { """ Create an incomplete response, its field "completed" is set to "N" and the response doesn't have a submitdate. @param surveyId the survey id of the survey you want to create the response @param token the token...
java
public int createIncompleteResponse(int surveyId, String token) throws LimesurveyRCException { LsApiBody.LsApiParams params = getParamsWithKey(surveyId); HashMap<String, String> responseData = new HashMap<>(); responseData.put("submitdate", ""); String date = ZonedDateTime.now().format(D...
[ "public", "int", "createIncompleteResponse", "(", "int", "surveyId", ",", "String", "token", ")", "throws", "LimesurveyRCException", "{", "LsApiBody", ".", "LsApiParams", "params", "=", "getParamsWithKey", "(", "surveyId", ")", ";", "HashMap", "<", "String", ",", ...
Create an incomplete response, its field "completed" is set to "N" and the response doesn't have a submitdate. @param surveyId the survey id of the survey you want to create the response @param token the token used for the response, no token will be set if the value is empty @return the id of the response @throws L...
[ "Create", "an", "incomplete", "response", "its", "field", "completed", "is", "set", "to", "N", "and", "the", "response", "doesn", "t", "have", "a", "submitdate", "." ]
train
https://github.com/Falydoor/limesurvey-rc/blob/b8d573389086395e46a0bdeeddeef4d1c2c0a488/src/main/java/com/github/falydoor/limesurveyrc/LimesurveyRC.java#L132-L144
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.retryUntil
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> retryUntil(final BooleanSupplier stop) { """ Retries until the given stop function returns true. <dl> <dt><b>Backpressure:</b></dt> <dd>The operator honors downstream backp...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> retryUntil(final BooleanSupplier stop) { ObjectHelper.requireNonNull(stop, "stop is null"); return retry(Long.MAX_VALUE, Functions.predicateReverseFor(stop)); }
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "FULL", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Flowable", "<", "T", ">", "retryUntil", "(", "final", "BooleanSupplier", "stop",...
Retries until the given stop function returns true. <dl> <dt><b>Backpressure:</b></dt> <dd>The operator honors downstream backpressure and expects the source {@code Publisher} to honor backpressure as well. If this expectation is violated, the operator <em>may</em> throw an {@code IllegalStateException}.</dd> <dt><b>Sc...
[ "Retries", "until", "the", "given", "stop", "function", "returns", "true", ".", "<dl", ">", "<dt", ">", "<b", ">", "Backpressure", ":", "<", "/", "b", ">", "<", "/", "dt", ">", "<dd", ">", "The", "operator", "honors", "downstream", "backpressure", "and...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L13143-L13149
clanie/clanie-core
src/main/java/dk/clanie/io/IOUtil.java
IOUtil.copyFile
public static void copyFile(File from, File to) throws RuntimeIOException { """ Creates a copy of a file. Shorthand for <code>copyFile(from, to, false)</code>, <code>false</code> meaning don't overwrite existing file. @param from - source File @param to - destination File @throws RuntimeIOException ...
java
public static void copyFile(File from, File to) throws RuntimeIOException { copyFile(from, to, false); }
[ "public", "static", "void", "copyFile", "(", "File", "from", ",", "File", "to", ")", "throws", "RuntimeIOException", "{", "copyFile", "(", "from", ",", "to", ",", "false", ")", ";", "}" ]
Creates a copy of a file. Shorthand for <code>copyFile(from, to, false)</code>, <code>false</code> meaning don't overwrite existing file. @param from - source File @param to - destination File @throws RuntimeIOException
[ "Creates", "a", "copy", "of", "a", "file", "." ]
train
https://github.com/clanie/clanie-core/blob/ac8a655b93127f0e281b741c4d53f429be2816ad/src/main/java/dk/clanie/io/IOUtil.java#L65-L67
PunchThrough/bean-sdk-android
sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Chunk.java
Chunk.chunkFrom
public static <T extends Chunkable> byte[] chunkFrom(T chunkable, int chunkLength, int chunkNum) { """ Retrieve a chunk of raw bytes. Chunks are created by slicing the array at even intervals. The final chunk may be shorter than the other chunks if it's bee...
java
public static <T extends Chunkable> byte[] chunkFrom(T chunkable, int chunkLength, int chunkNum) { int start = chunkNum * chunkLength; return bytesFrom(chunkable, start, chunkLength); }
[ "public", "static", "<", "T", "extends", "Chunkable", ">", "byte", "[", "]", "chunkFrom", "(", "T", "chunkable", ",", "int", "chunkLength", ",", "int", "chunkNum", ")", "{", "int", "start", "=", "chunkNum", "*", "chunkLength", ";", "return", "bytesFrom", ...
Retrieve a chunk of raw bytes. Chunks are created by slicing the array at even intervals. The final chunk may be shorter than the other chunks if it's been truncated. @param chunkLength The length of each chunk @param chunkNum The chunk at which to start, zero-indexed @return The chunk (array of by...
[ "Retrieve", "a", "chunk", "of", "raw", "bytes", ".", "Chunks", "are", "created", "by", "slicing", "the", "array", "at", "even", "intervals", ".", "The", "final", "chunk", "may", "be", "shorter", "than", "the", "other", "chunks", "if", "it", "s", "been", ...
train
https://github.com/PunchThrough/bean-sdk-android/blob/dc33e8cc9258d6e028e0788d74735c75b54d1133/sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Chunk.java#L53-L57
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/service/RowService.java
RowService.addScoreColumn
protected Row addScoreColumn(Row row, long timestamp, Float score) { """ Adds to the specified {@link Row} the specified Lucene score column. @param row A {@link Row}. @param timestamp The score column timestamp. @param score The score column value. @return The {@link Row} with the score. """ ...
java
protected Row addScoreColumn(Row row, long timestamp, Float score) { ColumnFamily cf = row.cf; CellName cellName = rowMapper.makeCellName(cf); ByteBuffer cellValue = UTF8Type.instance.decompose(score.toString()); ColumnFamily dcf = ArrayBackedSortedColumns.factory.create(baseCfs.metadat...
[ "protected", "Row", "addScoreColumn", "(", "Row", "row", ",", "long", "timestamp", ",", "Float", "score", ")", "{", "ColumnFamily", "cf", "=", "row", ".", "cf", ";", "CellName", "cellName", "=", "rowMapper", ".", "makeCellName", "(", "cf", ")", ";", "Byt...
Adds to the specified {@link Row} the specified Lucene score column. @param row A {@link Row}. @param timestamp The score column timestamp. @param score The score column value. @return The {@link Row} with the score.
[ "Adds", "to", "the", "specified", "{", "@link", "Row", "}", "the", "specified", "Lucene", "score", "column", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/RowService.java#L397-L407
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java
MapElement.boundsContains
@Pure protected final boolean boundsContains(double x, double y, double delta) { """ Replies if the specified point (<var>x</var>,<var>y</var>) was inside the bounds of this MapElement. @param x is a geo-referenced coordinate @param y is a geo-referenced coordinate @param delta is the geo-referenced distanc...
java
@Pure protected final boolean boundsContains(double x, double y, double delta) { final Rectangle2d bounds = getBoundingBox(); assert bounds != null; double dlt = delta; if (dlt < 0) { dlt = -dlt; } final Point2d p = new Point2d(x, y); if (dlt == 0) { return bounds.contains(p); } p.subX(dlt); ...
[ "@", "Pure", "protected", "final", "boolean", "boundsContains", "(", "double", "x", ",", "double", "y", ",", "double", "delta", ")", "{", "final", "Rectangle2d", "bounds", "=", "getBoundingBox", "(", ")", ";", "assert", "bounds", "!=", "null", ";", "double...
Replies if the specified point (<var>x</var>,<var>y</var>) was inside the bounds of this MapElement. @param x is a geo-referenced coordinate @param y is a geo-referenced coordinate @param delta is the geo-referenced distance that corresponds to a approximation distance in the screen coordinate system @return <code>tru...
[ "Replies", "if", "the", "specified", "point", "(", "<var", ">", "x<", "/", "var", ">", "<var", ">", "y<", "/", "var", ">", ")", "was", "inside", "the", "bounds", "of", "this", "MapElement", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapElement.java#L418-L434
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementProxy.java
ElementProxy.setPropertyValue
@Override public void setPropertyValue(PropertyInfo propInfo, Object value) { """ Overridden to set property value in proxy's property cache. @see org.carewebframework.shell.property.IPropertyAccessor#setPropertyValue """ setPropertyValue(propInfo.getId(), value); }
java
@Override public void setPropertyValue(PropertyInfo propInfo, Object value) { setPropertyValue(propInfo.getId(), value); }
[ "@", "Override", "public", "void", "setPropertyValue", "(", "PropertyInfo", "propInfo", ",", "Object", "value", ")", "{", "setPropertyValue", "(", "propInfo", ".", "getId", "(", ")", ",", "value", ")", ";", "}" ]
Overridden to set property value in proxy's property cache. @see org.carewebframework.shell.property.IPropertyAccessor#setPropertyValue
[ "Overridden", "to", "set", "property", "value", "in", "proxy", "s", "property", "cache", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementProxy.java#L83-L86
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.doEvaluation
public IEvaluation[] doEvaluation(JavaRDD<String> data, DataSetLoader loader, IEvaluation... emptyEvaluations) { """ Perform evaluation on serialized DataSet objects on disk, (potentially in any format), that are loaded using an {@link DataSetLoader}.<br> Uses the default number of workers (model replicas per JVM...
java
public IEvaluation[] doEvaluation(JavaRDD<String> data, DataSetLoader loader, IEvaluation... emptyEvaluations) { return doEvaluation(data, DEFAULT_EVAL_WORKERS, DEFAULT_EVAL_SCORE_BATCH_SIZE, loader, emptyEvaluations); }
[ "public", "IEvaluation", "[", "]", "doEvaluation", "(", "JavaRDD", "<", "String", ">", "data", ",", "DataSetLoader", "loader", ",", "IEvaluation", "...", "emptyEvaluations", ")", "{", "return", "doEvaluation", "(", "data", ",", "DEFAULT_EVAL_WORKERS", ",", "DEFA...
Perform evaluation on serialized DataSet objects on disk, (potentially in any format), that are loaded using an {@link DataSetLoader}.<br> Uses the default number of workers (model replicas per JVM) of {@link #DEFAULT_EVAL_WORKERS} with the default minibatch size of {@link #DEFAULT_EVAL_SCORE_BATCH_SIZE} @param data ...
[ "Perform", "evaluation", "on", "serialized", "DataSet", "objects", "on", "disk", "(", "potentially", "in", "any", "format", ")", "that", "are", "loaded", "using", "an", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L867-L869
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java
ColumnBuilder.addFieldProperty
public ColumnBuilder addFieldProperty(String propertyName, String value) { """ When the JRField needs properties, use this method. @param propertyName @param value @return """ fieldProperties.put(propertyName, value); return this; }
java
public ColumnBuilder addFieldProperty(String propertyName, String value) { fieldProperties.put(propertyName, value); return this; }
[ "public", "ColumnBuilder", "addFieldProperty", "(", "String", "propertyName", ",", "String", "value", ")", "{", "fieldProperties", ".", "put", "(", "propertyName", ",", "value", ")", ";", "return", "this", ";", "}" ]
When the JRField needs properties, use this method. @param propertyName @param value @return
[ "When", "the", "JRField", "needs", "properties", "use", "this", "method", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/ColumnBuilder.java#L342-L345
Metatavu/edelphi
rest/src/main/java/fi/metatavu/edelphi/comments/QueryQuestionCommentController.java
QueryQuestionCommentController.isPanelsComment
public boolean isPanelsComment(QueryQuestionComment comment, Panel panel) { """ Returns whether comment belongs to given panel @param comment comment @param panel panel @return whether comment belongs to given panel """ Panel queryPanel = resourceController.getResourcePanel(comment.getQueryPage().getQ...
java
public boolean isPanelsComment(QueryQuestionComment comment, Panel panel) { Panel queryPanel = resourceController.getResourcePanel(comment.getQueryPage().getQuerySection().getQuery()); if (queryPanel == null || panel == null) { return false; } return queryPanel.getId().equals(panel.getId()); ...
[ "public", "boolean", "isPanelsComment", "(", "QueryQuestionComment", "comment", ",", "Panel", "panel", ")", "{", "Panel", "queryPanel", "=", "resourceController", ".", "getResourcePanel", "(", "comment", ".", "getQueryPage", "(", ")", ".", "getQuerySection", "(", ...
Returns whether comment belongs to given panel @param comment comment @param panel panel @return whether comment belongs to given panel
[ "Returns", "whether", "comment", "belongs", "to", "given", "panel" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/rest/src/main/java/fi/metatavu/edelphi/comments/QueryQuestionCommentController.java#L145-L152
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java
Bbox.getCenterPoint
public Coordinate getCenterPoint() { """ Get the center of the bounding box as a Coordinate. @return center point """ double centerX = (width == 0 ? x : x + width / 2); double centerY = (height == 0 ? y : y + height / 2); return new Coordinate(centerX, centerY); }
java
public Coordinate getCenterPoint() { double centerX = (width == 0 ? x : x + width / 2); double centerY = (height == 0 ? y : y + height / 2); return new Coordinate(centerX, centerY); }
[ "public", "Coordinate", "getCenterPoint", "(", ")", "{", "double", "centerX", "=", "(", "width", "==", "0", "?", "x", ":", "x", "+", "width", "/", "2", ")", ";", "double", "centerY", "=", "(", "height", "==", "0", "?", "y", ":", "y", "+", "height...
Get the center of the bounding box as a Coordinate. @return center point
[ "Get", "the", "center", "of", "the", "bounding", "box", "as", "a", "Coordinate", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/spatial/Bbox.java#L141-L145
ironjacamar/ironjacamar
web/src/main/java/org/ironjacamar/web/console/Server.java
Server.invokeOpByName
public static OpResultInfo invokeOpByName(String name, String opName, String[] argTypes, String[] args) throws JMException { """ Invoke an operation by name @param name The bean name @param opName The operation name @param argTypes The argument types @param args The arguments @return The result @except...
java
public static OpResultInfo invokeOpByName(String name, String opName, String[] argTypes, String[] args) throws JMException { MBeanServer server = getMBeanServer(); ObjectName objName = new ObjectName(name); int length = argTypes != null ? argTypes.length : 0; Object[] typedArgs = new Ob...
[ "public", "static", "OpResultInfo", "invokeOpByName", "(", "String", "name", ",", "String", "opName", ",", "String", "[", "]", "argTypes", ",", "String", "[", "]", "args", ")", "throws", "JMException", "{", "MBeanServer", "server", "=", "getMBeanServer", "(", ...
Invoke an operation by name @param name The bean name @param opName The operation name @param argTypes The argument types @param args The arguments @return The result @exception JMException Thrown if an error occurs
[ "Invoke", "an", "operation", "by", "name" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/web/src/main/java/org/ironjacamar/web/console/Server.java#L343-L379
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutGatewayResponseResult.java
PutGatewayResponseResult.withResponseParameters
public PutGatewayResponseResult withResponseParameters(java.util.Map<String, String> responseParameters) { """ <p> Response parameters (paths, query strings and headers) of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. </p> @param responseParameters Response parameters (paths, que...
java
public PutGatewayResponseResult withResponseParameters(java.util.Map<String, String> responseParameters) { setResponseParameters(responseParameters); return this; }
[ "public", "PutGatewayResponseResult", "withResponseParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseParameters", ")", "{", "setResponseParameters", "(", "responseParameters", ")", ";", "return", "this", ";", "}" ]
<p> Response parameters (paths, query strings and headers) of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. </p> @param responseParameters Response parameters (paths, query strings and headers) of the <a>GatewayResponse</a> as a string-to-string map of key-value pairs. @return Returns a refe...
[ "<p", ">", "Response", "parameters", "(", "paths", "query", "strings", "and", "headers", ")", "of", "the", "<a", ">", "GatewayResponse<", "/", "a", ">", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", ".", "<...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutGatewayResponseResult.java#L483-L486
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/jhlabs/image/GammaFilter.java
GammaFilter.setGamma
public void setGamma(float rGamma, float gGamma, float bGamma) { """ Set the gamma levels. @param rGamma the gamma level for the red channel @param gGamma the gamma level for the blue channel @param bGamma the gamma level for the green channel @see #getGamma """ this.rGamma = rGamma; this.gGamma = gGam...
java
public void setGamma(float rGamma, float gGamma, float bGamma) { this.rGamma = rGamma; this.gGamma = gGamma; this.bGamma = bGamma; initialized = false; }
[ "public", "void", "setGamma", "(", "float", "rGamma", ",", "float", "gGamma", ",", "float", "bGamma", ")", "{", "this", ".", "rGamma", "=", "rGamma", ";", "this", ".", "gGamma", "=", "gGamma", ";", "this", ".", "bGamma", "=", "bGamma", ";", "initialize...
Set the gamma levels. @param rGamma the gamma level for the red channel @param gGamma the gamma level for the blue channel @param bGamma the gamma level for the green channel @see #getGamma
[ "Set", "the", "gamma", "levels", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/jhlabs/image/GammaFilter.java#L58-L63
JDBDT/jdbdt
src/main/java/org/jdbdt/Log.java
Log.write
void write(CallInfo callInfo, DeltaAssertion assertion) { """ Log delta assertion. @param callInfo Call info. @param assertion Delta assertion. """ Element rootNode = root(callInfo); DataSource ds = assertion.getSource(); write(rootNode, ds); Element daNode = createNode(rootNode, DELTA_A...
java
void write(CallInfo callInfo, DeltaAssertion assertion) { Element rootNode = root(callInfo); DataSource ds = assertion.getSource(); write(rootNode, ds); Element daNode = createNode(rootNode, DELTA_ASSERTION_TAG); List<MetaData.ColumnInfo> mdCols = ds.getMetaData().columns(); Element expecte...
[ "void", "write", "(", "CallInfo", "callInfo", ",", "DeltaAssertion", "assertion", ")", "{", "Element", "rootNode", "=", "root", "(", "callInfo", ")", ";", "DataSource", "ds", "=", "assertion", ".", "getSource", "(", ")", ";", "write", "(", "rootNode", ",",...
Log delta assertion. @param callInfo Call info. @param assertion Delta assertion.
[ "Log", "delta", "assertion", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/Log.java#L253-L291
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/io/async/AsyncSocketChannelHelper.java
AsyncSocketChannelHelper.createTimeout
private void createTimeout(IAbstractAsyncFuture future, long delay, boolean isRead) { """ Create the delayed timeout work item for this request. @param future @param delay @param isRead """ if (AsyncProperties.disableTimeouts) { return; } // create the timeout time, whi...
java
private void createTimeout(IAbstractAsyncFuture future, long delay, boolean isRead) { if (AsyncProperties.disableTimeouts) { return; } // create the timeout time, while not holding the lock long timeoutTime = (System.currentTimeMillis() + delay + Timer...
[ "private", "void", "createTimeout", "(", "IAbstractAsyncFuture", "future", ",", "long", "delay", ",", "boolean", "isRead", ")", "{", "if", "(", "AsyncProperties", ".", "disableTimeouts", ")", "{", "return", ";", "}", "// create the timeout time, while not holding the ...
Create the delayed timeout work item for this request. @param future @param delay @param isRead
[ "Create", "the", "delayed", "timeout", "work", "item", "for", "this", "request", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/AsyncSocketChannelHelper.java#L574-L589
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java
SimpleDocTreeVisitor.visitEntity
@Override public R visitEntity(EntityTree node, P p) { """ {@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(node, p); }
java
@Override public R visitEntity(EntityTree node, P p) { return defaultAction(node, p); }
[ "@", "Override", "public", "R", "visitEntity", "(", "EntityTree", "node", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "node", ",", "p", ")", ";", "}" ]
{@inheritDoc} This implementation calls {@code defaultAction}. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "{", "@inheritDoc", "}", "This", "implementation", "calls", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/SimpleDocTreeVisitor.java#L189-L192
ZieIony/Carbon
carbon/src/main/java/carbon/internal/Menu.java
Menu.findItemWithShortcutForKey
@SuppressWarnings("deprecation") MenuItem findItemWithShortcutForKey(int keyCode, KeyEvent event) { """ /* We want to return the menu item associated with the key, but if there is no ambiguity (i.e. there is only one menu item corresponding to the key) we want to return it even if it's not an exact match; t...
java
@SuppressWarnings("deprecation") MenuItem findItemWithShortcutForKey(int keyCode, KeyEvent event) { // Get all items that can be associated directly or indirectly with the keyCode ArrayList<MenuItem> items = mTempShortcutItemList; items.clear(); findItemsWithShortcutForKey(items, key...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "MenuItem", "findItemWithShortcutForKey", "(", "int", "keyCode", ",", "KeyEvent", "event", ")", "{", "// Get all items that can be associated directly or indirectly with the keyCode", "ArrayList", "<", "MenuItem", ">", "it...
/* We want to return the menu item associated with the key, but if there is no ambiguity (i.e. there is only one menu item corresponding to the key) we want to return it even if it's not an exact match; this allow the user to _not_ use the ALT key for example, making the use of shortcuts slightly more user-friendly. An...
[ "/", "*", "We", "want", "to", "return", "the", "menu", "item", "associated", "with", "the", "key", "but", "if", "there", "is", "no", "ambiguity", "(", "i", ".", "e", ".", "there", "is", "only", "one", "menu", "item", "corresponding", "to", "the", "ke...
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/internal/Menu.java#L667-L706
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.asyncAction
public static FuncN<Observable<Void>> asyncAction(final ActionN action, final Scheduler scheduler) { """ Convert a synchronous action call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/asyncAction.ns.png" alt="...
java
public static FuncN<Observable<Void>> asyncAction(final ActionN action, final Scheduler scheduler) { return toAsync(action, scheduler); }
[ "public", "static", "FuncN", "<", "Observable", "<", "Void", ">", ">", "asyncAction", "(", "final", "ActionN", "action", ",", "final", "Scheduler", "scheduler", ")", "{", "return", "toAsync", "(", "action", ",", "scheduler", ")", ";", "}" ]
Convert a synchronous action call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/asyncAction.ns.png" alt=""> <p> Alias for toAsync(ActionN, Scheduler) intended for dynamic languages. @param action the action to conver...
[ "Convert", "a", "synchronous", "action", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki", ...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L1715-L1717
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java
ReflectionUtils.getRequiredInternalConstructor
@Internal public static <T> Constructor<T> getRequiredInternalConstructor(Class<T> type, Class... argumentTypes) { """ Finds an internal constructor defined by the Micronaut API and throws a {@link NoSuchMethodError} if it doesn't exist. @param type The type @param argumentTypes The argument types...
java
@Internal public static <T> Constructor<T> getRequiredInternalConstructor(Class<T> type, Class... argumentTypes) { try { return type.getDeclaredConstructor(argumentTypes); } catch (NoSuchMethodException e) { throw newNoSuchConstructorInternalError(type, argumentTypes); ...
[ "@", "Internal", "public", "static", "<", "T", ">", "Constructor", "<", "T", ">", "getRequiredInternalConstructor", "(", "Class", "<", "T", ">", "type", ",", "Class", "...", "argumentTypes", ")", "{", "try", "{", "return", "type", ".", "getDeclaredConstructo...
Finds an internal constructor defined by the Micronaut API and throws a {@link NoSuchMethodError} if it doesn't exist. @param type The type @param argumentTypes The argument types @param <T> The type @return An {@link Optional} contains the method or empty @throws NoSuchMethodError If the method doe...
[ "Finds", "an", "internal", "constructor", "defined", "by", "the", "Micronaut", "API", "and", "throws", "a", "{", "@link", "NoSuchMethodError", "}", "if", "it", "doesn", "t", "exist", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/ReflectionUtils.java#L273-L280
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java
DocBookBuilder.doLinkPass
protected void doLinkPass(final BuildData buildData, final Set<String> bookIdAttributes) throws BuildProcessingException { """ Go through each topic and ensure that the links are valid, and then sets the duplicate ids for the SpecTopics/Levels @param buildData @param bookIdAttributes The set of ids that have b...
java
protected void doLinkPass(final BuildData buildData, final Set<String> bookIdAttributes) throws BuildProcessingException { log.info("Doing " + buildData.getBuildLocale() + " Topic Link Pass"); validateTopicLinks(buildData, bookIdAttributes); // Apply the duplicate ids for the spec topics ...
[ "protected", "void", "doLinkPass", "(", "final", "BuildData", "buildData", ",", "final", "Set", "<", "String", ">", "bookIdAttributes", ")", "throws", "BuildProcessingException", "{", "log", ".", "info", "(", "\"Doing \"", "+", "buildData", ".", "getBuildLocale", ...
Go through each topic and ensure that the links are valid, and then sets the duplicate ids for the SpecTopics/Levels @param buildData @param bookIdAttributes The set of ids that have been used in the set of topics in the content spec. @throws BuildProcessingException
[ "Go", "through", "each", "topic", "and", "ensure", "that", "the", "links", "are", "valid", "and", "then", "sets", "the", "duplicate", "ids", "for", "the", "SpecTopics", "/", "Levels" ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L1380-L1387
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHmmForwardEvaluator.java
AbbvGapsHmmForwardEvaluator.getEndedWord
protected static String getEndedWord(String str, int pos) { """ If pos is ending a word in str: returns this word. Else: returns null; """ assert(pos < str.length() && pos >= 0); if( posIsAtWordEnd(str, pos) ){ int prevSpace = findLastNonLetterOrDigit(str, pos); return str.substring(prevSpace+1, p...
java
protected static String getEndedWord(String str, int pos){ assert(pos < str.length() && pos >= 0); if( posIsAtWordEnd(str, pos) ){ int prevSpace = findLastNonLetterOrDigit(str, pos); return str.substring(prevSpace+1, pos+1); } return null; }
[ "protected", "static", "String", "getEndedWord", "(", "String", "str", ",", "int", "pos", ")", "{", "assert", "(", "pos", "<", "str", ".", "length", "(", ")", "&&", "pos", ">=", "0", ")", ";", "if", "(", "posIsAtWordEnd", "(", "str", ",", "pos", ")...
If pos is ending a word in str: returns this word. Else: returns null;
[ "If", "pos", "is", "ending", "a", "word", "in", "str", ":", "returns", "this", "word", ".", "Else", ":", "returns", "null", ";" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/abbvGapsHmm/AbbvGapsHmmForwardEvaluator.java#L144-L153
UrielCh/ovh-java-sdk
ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java
ApiOvhEmailpro.service_domain_POST
public OvhTask service_domain_POST(String service, Boolean configureAutodiscover, Boolean configureMx, String mxRelay, String name, OvhDomainTypeEnum type) throws IOException { """ Create new domain in pro services REST: POST /email/pro/{service}/domain @param mxRelay [required] If specified, emails to not exi...
java
public OvhTask service_domain_POST(String service, Boolean configureAutodiscover, Boolean configureMx, String mxRelay, String name, OvhDomainTypeEnum type) throws IOException { String qPath = "/email/pro/{service}/domain"; StringBuilder sb = path(qPath, service); HashMap<String, Object>o = new HashMap<String, Obj...
[ "public", "OvhTask", "service_domain_POST", "(", "String", "service", ",", "Boolean", "configureAutodiscover", ",", "Boolean", "configureMx", ",", "String", "mxRelay", ",", "String", "name", ",", "OvhDomainTypeEnum", "type", ")", "throws", "IOException", "{", "Strin...
Create new domain in pro services REST: POST /email/pro/{service}/domain @param mxRelay [required] If specified, emails to not existing address will be redirected to that domain @param configureAutodiscover [required] If you host domain in OVH we can configure autodiscover record automatically @param configureMx [requ...
[ "Create", "new", "domain", "in", "pro", "services" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java#L749-L760
alibaba/otter
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/zookeeper/ZkClientx.java
ZkClientx.createPersistent
public void createPersistent(String path, Object data, boolean createParents) throws ZkInterruptedException, IllegalArgumentException, ZkException, RuntimeExc...
java
public void createPersistent(String path, Object data, boolean createParents) throws ZkInterruptedException, IllegalArgumentException, ZkException, RuntimeExc...
[ "public", "void", "createPersistent", "(", "String", "path", ",", "Object", "data", ",", "boolean", "createParents", ")", "throws", "ZkInterruptedException", ",", "IllegalArgumentException", ",", "ZkException", ",", "RuntimeException", "{", "try", "{", "create", "("...
Create a persistent Sequential node. @param path @param data @param createParents if true all parent dirs are created as well and no {@link ZkNodeExistsException} is thrown in case the path already exists @throws ZkInterruptedException if operation was interrupted, or a required reconnection got interrupted @throws Il...
[ "Create", "a", "persistent", "Sequential", "node", "." ]
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/common/src/main/java/com/alibaba/otter/shared/common/utils/zookeeper/ZkClientx.java#L181-L198
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java
WorkflowClient.skipTaskFromWorkflow
public void skipTaskFromWorkflow(String workflowId, String taskReferenceName) { """ Skips a given task from a current RUNNING workflow @param workflowId the id of the workflow instance @param taskReferenceName the reference name of the task to be skipped """ Preconditions.checkArgument(Strin...
java
public void skipTaskFromWorkflow(String workflowId, String taskReferenceName) { Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(taskReferenceName), "Task reference name cannot be blank"); put("wor...
[ "public", "void", "skipTaskFromWorkflow", "(", "String", "workflowId", ",", "String", "taskReferenceName", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "workflowId", ")", ",", "\"workflow id cannot be blank\"", ")", ";",...
Skips a given task from a current RUNNING workflow @param workflowId the id of the workflow instance @param taskReferenceName the reference name of the task to be skipped
[ "Skips", "a", "given", "task", "from", "a", "current", "RUNNING", "workflow" ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/WorkflowClient.java#L264-L269
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_cholsol.java
DZcs_cholsol.cs_cholsol
public static boolean cs_cholsol(int order, DZcs A, DZcsa b) { """ Solves Ax=b where A is symmetric positive definite; b is overwritten with solution. @param order ordering method to use (0 or 1) @param A column-compressed matrix, symmetric positive definite, only upper triangular part is used @param b r...
java
public static boolean cs_cholsol(int order, DZcs A, DZcsa b) { DZcsa x; DZcss S; DZcsn N; int n; boolean ok; if (!CS_CSC (A) || b == null) return (false); /* check inputs */ n = A.n ; S = cs_schol (order, A) ; /* ordering and symbolic analysis */ N = cs_chol (A, S) ; /* numeric Cholesky ...
[ "public", "static", "boolean", "cs_cholsol", "(", "int", "order", ",", "DZcs", "A", ",", "DZcsa", "b", ")", "{", "DZcsa", "x", ";", "DZcss", "S", ";", "DZcsn", "N", ";", "int", "n", ";", "boolean", "ok", ";", "if", "(", "!", "CS_CSC", "(", "A", ...
Solves Ax=b where A is symmetric positive definite; b is overwritten with solution. @param order ordering method to use (0 or 1) @param A column-compressed matrix, symmetric positive definite, only upper triangular part is used @param b right hand side, b is overwritten with solution @return true if successful, false ...
[ "Solves", "Ax", "=", "b", "where", "A", "is", "symmetric", "positive", "definite", ";", "b", "is", "overwritten", "with", "solution", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_cholsol.java#L62-L82
mercadopago/dx-java
src/main/java/com/mercadopago/core/MPBase.java
MPBase.processMethod
protected <T extends MPBase> T processMethod(String methodName, Boolean useCache) throws MPException { """ Process the method to call the api, usually used for create, update and delete methods @param methodName a String with the decorated method to be processed @param useCache a Boolean flag t...
java
protected <T extends MPBase> T processMethod(String methodName, Boolean useCache) throws MPException { HashMap<String, String> mapParams = null; T resource = processMethod(this.getClass(), (T)this, methodName, mapParams, useCache); fillResource(resource, this); return (T)this; }
[ "protected", "<", "T", "extends", "MPBase", ">", "T", "processMethod", "(", "String", "methodName", ",", "Boolean", "useCache", ")", "throws", "MPException", "{", "HashMap", "<", "String", ",", "String", ">", "mapParams", "=", "null", ";", "T", "resource", ...
Process the method to call the api, usually used for create, update and delete methods @param methodName a String with the decorated method to be processed @param useCache a Boolean flag that indicates if the cache must be used @return a resourse obj fill with the api response @throws ...
[ "Process", "the", "method", "to", "call", "the", "api", "usually", "used", "for", "create", "update", "and", "delete", "methods" ]
train
https://github.com/mercadopago/dx-java/blob/9df65a6bfb4db0c1fddd7699a5b109643961b03f/src/main/java/com/mercadopago/core/MPBase.java#L90-L95
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identifiers.java
Identifiers.createIp
public static IpAddress createIp(IpAddressType type, String value, String admDom) { """ Create an ip-address identifier with the given parameters. @param type the type of the ip-address identifier @param value a {@link String} that represents a valid IPv4/6 address @param admDom the administrative-domain @re...
java
public static IpAddress createIp(IpAddressType type, String value, String admDom) { return new IpAddress(type, value, admDom); }
[ "public", "static", "IpAddress", "createIp", "(", "IpAddressType", "type", ",", "String", "value", ",", "String", "admDom", ")", "{", "return", "new", "IpAddress", "(", "type", ",", "value", ",", "admDom", ")", ";", "}" ]
Create an ip-address identifier with the given parameters. @param type the type of the ip-address identifier @param value a {@link String} that represents a valid IPv4/6 address @param admDom the administrative-domain @return the new ip-address identifier
[ "Create", "an", "ip", "-", "address", "identifier", "with", "the", "given", "parameters", "." ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identifiers.java#L649-L651
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java
WNExtendedSemanticGlossComparison.getRelationFromRels
private char getRelationFromRels(char builtForRel, char glossRel) { """ Decides which relation to return as a function of relation for which extended gloss was built. @param builtForRel relation for which the gloss was built @param glossRel relation @return less general, more general or IDK relation ""...
java
private char getRelationFromRels(char builtForRel, char glossRel) { if (builtForRel == IMappingElement.EQUIVALENCE) { return glossRel; } if (builtForRel == IMappingElement.LESS_GENERAL) { if ((glossRel == IMappingElement.LESS_GENERAL) || (glossRel == IMappingElement....
[ "private", "char", "getRelationFromRels", "(", "char", "builtForRel", ",", "char", "glossRel", ")", "{", "if", "(", "builtForRel", "==", "IMappingElement", ".", "EQUIVALENCE", ")", "{", "return", "glossRel", ";", "}", "if", "(", "builtForRel", "==", "IMappingE...
Decides which relation to return as a function of relation for which extended gloss was built. @param builtForRel relation for which the gloss was built @param glossRel relation @return less general, more general or IDK relation
[ "Decides", "which", "relation", "to", "return", "as", "a", "function", "of", "relation", "for", "which", "extended", "gloss", "was", "built", "." ]
train
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java#L153-L168
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/databases/information/TableInformation.java
TableInformation.addColInfo
public void addColInfo(final String _colName, final Set<AbstractDatabase.ColumnType> _colTypes, final int _size, final int _scale, final boolean _isNullable) { """ Appends the column information ...
java
public void addColInfo(final String _colName, final Set<AbstractDatabase.ColumnType> _colTypes, final int _size, final int _scale, final boolean _isNullable) { this.colMap.put(_colName.toU...
[ "public", "void", "addColInfo", "(", "final", "String", "_colName", ",", "final", "Set", "<", "AbstractDatabase", ".", "ColumnType", ">", "_colTypes", ",", "final", "int", "_size", ",", "final", "int", "_scale", ",", "final", "boolean", "_isNullable", ")", "...
Appends the column information for given values for column <code>_colName</code>. @param _colName name of the column @param _colTypes eFaps types of the column @param _size size (for character) @param _scale scale (for number) @param _isNullable is the column nullable? @see #colMap
[ "Appends", "the", "column", "information", "for", "given", "values", "for", "column", "<code", ">", "_colName<", "/", "code", ">", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/databases/information/TableInformation.java#L110-L118
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java
PlatformBitmapFactory.setPropertyFromSourceBitmap
private static void setPropertyFromSourceBitmap(Bitmap source, Bitmap destination) { """ Set some property of the source bitmap to the destination bitmap @param source the source bitmap @param destination the destination bitmap """ // The new bitmap was created from a known bitmap source so assume that...
java
private static void setPropertyFromSourceBitmap(Bitmap source, Bitmap destination) { // The new bitmap was created from a known bitmap source so assume that // they use the same density destination.setDensity(source.getDensity()); if (Build.VERSION.SDK_INT >= 12) { destination.setHasAlpha(source.h...
[ "private", "static", "void", "setPropertyFromSourceBitmap", "(", "Bitmap", "source", ",", "Bitmap", "destination", ")", "{", "// The new bitmap was created from a known bitmap source so assume that", "// they use the same density", "destination", ".", "setDensity", "(", "source",...
Set some property of the source bitmap to the destination bitmap @param source the source bitmap @param destination the destination bitmap
[ "Set", "some", "property", "of", "the", "source", "bitmap", "to", "the", "destination", "bitmap" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L750-L761
pravega/pravega
common/src/main/java/io/pravega/common/Exceptions.java
Exceptions.checkArrayRange
public static void checkArrayRange(long startIndex, int length, long arrayLength, String startIndexArgName, String lengthArgName) throws ArrayIndexOutOfBoundsException, IllegalArgumentException { """ Throws an appropriate exception if the given range is not included in the given array interval. @param startInde...
java
public static void checkArrayRange(long startIndex, int length, long arrayLength, String startIndexArgName, String lengthArgName) throws ArrayIndexOutOfBoundsException, IllegalArgumentException { // Check for non-negative length. if (length < 0) { throw new IllegalArgumentException(badArgume...
[ "public", "static", "void", "checkArrayRange", "(", "long", "startIndex", ",", "int", "length", ",", "long", "arrayLength", ",", "String", "startIndexArgName", ",", "String", "lengthArgName", ")", "throws", "ArrayIndexOutOfBoundsException", ",", "IllegalArgumentExceptio...
Throws an appropriate exception if the given range is not included in the given array interval. @param startIndex The First index in the range. @param length The number of items in the range. @param arrayLength The length of the array. @param startIndexArgName The name of the start index argume...
[ "Throws", "an", "appropriate", "exception", "if", "the", "given", "range", "is", "not", "included", "in", "the", "given", "array", "interval", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/Exceptions.java#L226-L244
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/print/AdvancedPageNumberEvents.java
AdvancedPageNumberEvents.onOpenDocument
@Override public void onOpenDocument(final PdfWriter writer, final Document document) { """ we override the onOpenDocument method. @param writer PdfWriter @param document Document """ try { bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); cb = writer.getD...
java
@Override public void onOpenDocument(final PdfWriter writer, final Document document) { try { bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); cb = writer.getDirectContent(); template = cb.createTemplate(50, 50); } catch (final DocumentException de) { throw n...
[ "@", "Override", "public", "void", "onOpenDocument", "(", "final", "PdfWriter", "writer", ",", "final", "Document", "document", ")", "{", "try", "{", "bf", "=", "BaseFont", ".", "createFont", "(", "BaseFont", ".", "HELVETICA", ",", "BaseFont", ".", "CP1252",...
we override the onOpenDocument method. @param writer PdfWriter @param document Document
[ "we", "override", "the", "onOpenDocument", "method", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/AdvancedPageNumberEvents.java#L73-L84
landawn/AbacusUtil
src/com/landawn/abacus/util/CSVUtil.java
CSVUtil.importCSV
@SuppressWarnings("rawtypes") public static long importCSV(final File file, final Connection conn, final String insertSQL, final Map<String, ? extends Type> columnTypeMap) throws UncheckedSQLException, UncheckedIOException { """ Imports the data from CSV to database. @param file @param conn ...
java
@SuppressWarnings("rawtypes") public static long importCSV(final File file, final Connection conn, final String insertSQL, final Map<String, ? extends Type> columnTypeMap) throws UncheckedSQLException, UncheckedIOException { return importCSV(file, 0, Long.MAX_VALUE, conn, insertSQL, 200, 0, c...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "long", "importCSV", "(", "final", "File", "file", ",", "final", "Connection", "conn", ",", "final", "String", "insertSQL", ",", "final", "Map", "<", "String", ",", "?", "extends", "Type"...
Imports the data from CSV to database. @param file @param conn @param insertSQL the column order in the sql must be consistent with the column order in the CSV file. @param columnTypeMap @return
[ "Imports", "the", "data", "from", "CSV", "to", "database", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/CSVUtil.java#L1297-L1301