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
podio/podio-java
src/main/java/com/podio/status/StatusAPI.java
StatusAPI.updateStatus
public void updateStatus(int statusId, StatusUpdate update) { """ This will update an existing status message. This will normally only be used to correct spelling and grammatical mistakes. @param statusId The id of the status to be updated @param update The new data for the status """ getResourceFacto...
java
public void updateStatus(int statusId, StatusUpdate update) { getResourceFactory().getApiResource("/status/" + statusId) .entity(update, MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "updateStatus", "(", "int", "statusId", ",", "StatusUpdate", "update", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/status/\"", "+", "statusId", ")", ".", "entity", "(", "update", ",", "MediaType", ".", "APPLICATI...
This will update an existing status message. This will normally only be used to correct spelling and grammatical mistakes. @param statusId The id of the status to be updated @param update The new data for the status
[ "This", "will", "update", "an", "existing", "status", "message", ".", "This", "will", "normally", "only", "be", "used", "to", "correct", "spelling", "and", "grammatical", "mistakes", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/status/StatusAPI.java#L73-L76
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.writeBytes
public static File writeBytes(byte[] data, File dest, int off, int len, boolean isAppend) throws IORuntimeException { """ 写入数据到文件 @param data 数据 @param dest 目标文件 @param off 数据开始位置 @param len 数据长度 @param isAppend 是否追加模式 @return 目标文件 @throws IORuntimeException IO异常 """ return FileWriter.create(dest)....
java
public static File writeBytes(byte[] data, File dest, int off, int len, boolean isAppend) throws IORuntimeException { return FileWriter.create(dest).write(data, off, len, isAppend); }
[ "public", "static", "File", "writeBytes", "(", "byte", "[", "]", "data", ",", "File", "dest", ",", "int", "off", ",", "int", "len", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "FileWriter", ".", "create", "(", "dest", ...
写入数据到文件 @param data 数据 @param dest 目标文件 @param off 数据开始位置 @param len 数据长度 @param isAppend 是否追加模式 @return 目标文件 @throws IORuntimeException IO异常
[ "写入数据到文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L3141-L3143
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.createOrUpdate
public VirtualMachineScaleSetInner createOrUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { """ Create or update a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set to create or update. @pa...
java
public VirtualMachineScaleSetInner createOrUpdate(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).toBlocking().last().body(); }
[ "public", "VirtualMachineScaleSetInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "VirtualMachineScaleSetInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScal...
Create or update a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set to create or update. @param parameters The scale set object. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the reques...
[ "Create", "or", "update", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L205-L207
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_portability_id_document_POST
public OvhPortabilityDocument billingAccount_portability_id_document_POST(String billingAccount, Long id, String description, String name) throws IOException { """ Create a portability document REST: POST /telephony/{billingAccount}/portability/{id}/document @param description [required] Description of the doc...
java
public OvhPortabilityDocument billingAccount_portability_id_document_POST(String billingAccount, Long id, String description, String name) throws IOException { String qPath = "/telephony/{billingAccount}/portability/{id}/document"; StringBuilder sb = path(qPath, billingAccount, id); HashMap<String, Object>o = new...
[ "public", "OvhPortabilityDocument", "billingAccount_portability_id_document_POST", "(", "String", "billingAccount", ",", "Long", "id", ",", "String", "description", ",", "String", "name", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAcc...
Create a portability document REST: POST /telephony/{billingAccount}/portability/{id}/document @param description [required] Description of the document @param name [required] Document's name @param billingAccount [required] The name of your billingAccount @param id [required] The ID of the portability
[ "Create", "a", "portability", "document" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L253-L261
dita-ot/dita-ot
src/main/java/org/dita/dost/writer/AbstractChunkTopicParser.java
AbstractChunkTopicParser.writeStartElement
void writeStartElement(final Writer output, final String name, final Attributes atts) throws SAXException { """ Convenience method to write an end element. @param name element name """ try { output.write(LESS_THAN); output.write(name); for (int i = 0; i < atts.get...
java
void writeStartElement(final Writer output, final String name, final Attributes atts) throws SAXException { try { output.write(LESS_THAN); output.write(name); for (int i = 0; i < atts.getLength(); i++) { output.write(STRING_BLANK); output.write...
[ "void", "writeStartElement", "(", "final", "Writer", "output", ",", "final", "String", "name", ",", "final", "Attributes", "atts", ")", "throws", "SAXException", "{", "try", "{", "output", ".", "write", "(", "LESS_THAN", ")", ";", "output", ".", "write", "...
Convenience method to write an end element. @param name element name
[ "Convenience", "method", "to", "write", "an", "end", "element", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/AbstractChunkTopicParser.java#L456-L472
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/CollisionConfig.java
CollisionConfig.exports
public static void exports(Xml root, Collision collision) { """ Create an XML node from a collision. @param root The node root (must not be <code>null</code>). @param collision The collision reference (must not be <code>null</code>). """ Check.notNull(root); Check.notNull(collision); ...
java
public static void exports(Xml root, Collision collision) { Check.notNull(root); Check.notNull(collision); final Xml node = root.createChild(NODE_COLLISION); node.writeString(ATT_NAME, collision.getName()); node.writeInteger(ATT_OFFSETX, collision.getOffsetX()); ...
[ "public", "static", "void", "exports", "(", "Xml", "root", ",", "Collision", "collision", ")", "{", "Check", ".", "notNull", "(", "root", ")", ";", "Check", ".", "notNull", "(", "collision", ")", ";", "final", "Xml", "node", "=", "root", ".", "createCh...
Create an XML node from a collision. @param root The node root (must not be <code>null</code>). @param collision The collision reference (must not be <code>null</code>).
[ "Create", "an", "XML", "node", "from", "a", "collision", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/CollisionConfig.java#L109-L121
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbGenres.java
TmdbGenres.getGenreTVList
public ResultList<Genre> getGenreTVList(String language) throws MovieDbException { """ Get the list of TV genres. @param language @return @throws MovieDbException """ return getGenreList(language, MethodSub.TV_LIST); }
java
public ResultList<Genre> getGenreTVList(String language) throws MovieDbException { return getGenreList(language, MethodSub.TV_LIST); }
[ "public", "ResultList", "<", "Genre", ">", "getGenreTVList", "(", "String", "language", ")", "throws", "MovieDbException", "{", "return", "getGenreList", "(", "language", ",", "MethodSub", ".", "TV_LIST", ")", ";", "}" ]
Get the list of TV genres. @param language @return @throws MovieDbException
[ "Get", "the", "list", "of", "TV", "genres", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbGenres.java#L73-L75
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java
TextRowProtocol.getInternalBigInteger
public BigInteger getInternalBigInteger(ColumnInformation columnInfo) { """ Get BigInteger format from raw text format. @param columnInfo column information @return BigInteger value """ if (lastValueWasNull()) { return null; } return new BigInteger(new String(buf, pos, length, StandardCha...
java
public BigInteger getInternalBigInteger(ColumnInformation columnInfo) { if (lastValueWasNull()) { return null; } return new BigInteger(new String(buf, pos, length, StandardCharsets.UTF_8)); }
[ "public", "BigInteger", "getInternalBigInteger", "(", "ColumnInformation", "columnInfo", ")", "{", "if", "(", "lastValueWasNull", "(", ")", ")", "{", "return", "null", ";", "}", "return", "new", "BigInteger", "(", "new", "String", "(", "buf", ",", "pos", ","...
Get BigInteger format from raw text format. @param columnInfo column information @return BigInteger value
[ "Get", "BigInteger", "format", "from", "raw", "text", "format", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java#L870-L875
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java
HealthStatusHttpMapper.addStatusMapping
public void addStatusMapping(String statusCode, Integer httpStatus) { """ Add a status mapping to the existing set. @param statusCode the status code to map @param httpStatus the http status """ Assert.notNull(statusCode, "StatusCode must not be null"); Assert.notNull(httpStatus, "HttpStatus must not be ...
java
public void addStatusMapping(String statusCode, Integer httpStatus) { Assert.notNull(statusCode, "StatusCode must not be null"); Assert.notNull(httpStatus, "HttpStatus must not be null"); this.statusMapping.put(statusCode, httpStatus); }
[ "public", "void", "addStatusMapping", "(", "String", "statusCode", ",", "Integer", "httpStatus", ")", "{", "Assert", ".", "notNull", "(", "statusCode", ",", "\"StatusCode must not be null\"", ")", ";", "Assert", ".", "notNull", "(", "httpStatus", ",", "\"HttpStatu...
Add a status mapping to the existing set. @param statusCode the status code to map @param httpStatus the http status
[ "Add", "a", "status", "mapping", "to", "the", "existing", "set", "." ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java#L83-L87
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.extractRows
public static DMatrixSparseCSC extractRows(DMatrixSparseCSC A , int row0 , int row1 , DMatrixSparseCSC out ) { """ Creates a submatrix by extracting the specified rows from A. rows = {row0 %le; i %le; row1}. @param A (Input) matrix @param row0 First row. Inclusive @param row1 Last row+1. @param out (Output, Op...
java
public static DMatrixSparseCSC extractRows(DMatrixSparseCSC A , int row0 , int row1 , DMatrixSparseCSC out ) { if( out == null ) out = new DMatrixSparseCSC(1,1,1); out.reshape(row1-row0,A.numCols,A.nz_length); // out.col_idx[0] = 0; // out.nz_length = 0; for (int col...
[ "public", "static", "DMatrixSparseCSC", "extractRows", "(", "DMatrixSparseCSC", "A", ",", "int", "row0", ",", "int", "row1", ",", "DMatrixSparseCSC", "out", ")", "{", "if", "(", "out", "==", "null", ")", "out", "=", "new", "DMatrixSparseCSC", "(", "1", ","...
Creates a submatrix by extracting the specified rows from A. rows = {row0 %le; i %le; row1}. @param A (Input) matrix @param row0 First row. Inclusive @param row1 Last row+1. @param out (Output, Option) Storage for output matrix @return The submatrix
[ "Creates", "a", "submatrix", "by", "extracting", "the", "specified", "rows", "from", "A", ".", "rows", "=", "{", "row0", "%le", ";", "i", "%le", ";", "row1", "}", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L1165-L1189
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.uploadBatchServiceLogs
public UploadBatchServiceLogsResult uploadBatchServiceLogs(String poolId, String nodeId, UploadBatchServiceLogsConfiguration uploadBatchServiceLogsConfiguration) { """ Upload Azure Batch service log files from the specified compute node to Azure Blob Storage. This is for gathering Azure Batch service log files in...
java
public UploadBatchServiceLogsResult uploadBatchServiceLogs(String poolId, String nodeId, UploadBatchServiceLogsConfiguration uploadBatchServiceLogsConfiguration) { return uploadBatchServiceLogsWithServiceResponseAsync(poolId, nodeId, uploadBatchServiceLogsConfiguration).toBlocking().single().body(); }
[ "public", "UploadBatchServiceLogsResult", "uploadBatchServiceLogs", "(", "String", "poolId", ",", "String", "nodeId", ",", "UploadBatchServiceLogsConfiguration", "uploadBatchServiceLogsConfiguration", ")", "{", "return", "uploadBatchServiceLogsWithServiceResponseAsync", "(", "poolI...
Upload Azure Batch service log files from the specified compute node to Azure Blob Storage. This is for gathering Azure Batch service log files in an automated fashion from nodes if you are experiencing an error and wish to escalate to Azure support. The Azure Batch service log files should be shared with Azure support...
[ "Upload", "Azure", "Batch", "service", "log", "files", "from", "the", "specified", "compute", "node", "to", "Azure", "Blob", "Storage", ".", "This", "is", "for", "gathering", "Azure", "Batch", "service", "log", "files", "in", "an", "automated", "fashion", "f...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L2382-L2384
PinaeOS/timon
src/main/java/org/pinae/timon/cache/CacheFactory.java
CacheFactory.createCache
public Cache createCache(String name, CacheConfiguration config) throws CacheException { """ 生成缓存 @param name 缓存名称 @param config 缓存配置 @return 生成的缓存对象 @throws CacheException 缓存异常 """ // 默认使用同步缓存 int type = Cache.SYN_CACHE; if (config instanceof EhCacheConfiguration) { type = Cach...
java
public Cache createCache(String name, CacheConfiguration config) throws CacheException { // 默认使用同步缓存 int type = Cache.SYN_CACHE; if (config instanceof EhCacheConfiguration) { type = Cache.EHCACHE_CACHE; } else if (config instanceof MemcachedCacheConfiguration) { type = Cache.MEMCACHED_CACHE...
[ "public", "Cache", "createCache", "(", "String", "name", ",", "CacheConfiguration", "config", ")", "throws", "CacheException", "{", "// 默认使用同步缓存\r", "int", "type", "=", "Cache", ".", "SYN_CACHE", ";", "if", "(", "config", "instanceof", "EhCacheConfiguration", ")",...
生成缓存 @param name 缓存名称 @param config 缓存配置 @return 生成的缓存对象 @throws CacheException 缓存异常
[ "生成缓存" ]
train
https://github.com/PinaeOS/timon/blob/b8c66868624e3eb1b36f6ecda3c556c456a30cd3/src/main/java/org/pinae/timon/cache/CacheFactory.java#L114-L125
berkesa/datatree-promise
src/main/java/io/datatree/Promise.java
Promise.catchError
public Promise catchError(CheckedConsumer<Throwable> action) { """ The catchError() method returns a Promise and deals with rejected cases only. Sample: <pre> Promise.resolve().then(() -&gt; { return 123; <b>}).catchError(error -&gt; {</b> // ...do something, without a return value... }); </pre> @para...
java
public Promise catchError(CheckedConsumer<Throwable> action) { return new Promise(future.handle((data, error) -> { if (error != null) { try { action.accept(error); } catch (Throwable cause) { return cause; } } return data; }), root); }
[ "public", "Promise", "catchError", "(", "CheckedConsumer", "<", "Throwable", ">", "action", ")", "{", "return", "new", "Promise", "(", "future", ".", "handle", "(", "(", "data", ",", "error", ")", "->", "{", "if", "(", "error", "!=", "null", ")", "{", ...
The catchError() method returns a Promise and deals with rejected cases only. Sample: <pre> Promise.resolve().then(() -&gt; { return 123; <b>}).catchError(error -&gt; {</b> // ...do something, without a return value... }); </pre> @param action error handler of the previous "next" handlers @return output Promise
[ "The", "catchError", "()", "method", "returns", "a", "Promise", "and", "deals", "with", "rejected", "cases", "only", ".", "Sample", ":" ]
train
https://github.com/berkesa/datatree-promise/blob/d9093bdb549f69b83b3eff5e29cd511f2014f177/src/main/java/io/datatree/Promise.java#L492-L503
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_binding.java
linkset_binding.get
public static linkset_binding get(nitro_service service, String id) throws Exception { """ Use this API to fetch linkset_binding resource of given name . """ linkset_binding obj = new linkset_binding(); obj.set_id(id); linkset_binding response = (linkset_binding) obj.get_resource(service); return respo...
java
public static linkset_binding get(nitro_service service, String id) throws Exception{ linkset_binding obj = new linkset_binding(); obj.set_id(id); linkset_binding response = (linkset_binding) obj.get_resource(service); return response; }
[ "public", "static", "linkset_binding", "get", "(", "nitro_service", "service", ",", "String", "id", ")", "throws", "Exception", "{", "linkset_binding", "obj", "=", "new", "linkset_binding", "(", ")", ";", "obj", ".", "set_id", "(", "id", ")", ";", "linkset_b...
Use this API to fetch linkset_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "linkset_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/network/linkset_binding.java#L114-L119
alkacon/opencms-core
src/org/opencms/ui/components/CmsToolBar.java
CmsToolBar.createDropDown
public static Component createDropDown(String buttonHtml, Component content, String title) { """ Creates a drop down menu.<p> @param buttonHtml the button HTML @param content the drop down content @param title the button title @return the component """ PopupView pv = new PopupView(buttonHtml, ...
java
public static Component createDropDown(String buttonHtml, Component content, String title) { PopupView pv = new PopupView(buttonHtml, content); pv.setDescription(title); pv.addStyleName(OpenCmsTheme.NAVIGATOR_DROPDOWN); pv.setHideOnMouseOut(false); return pv; }
[ "public", "static", "Component", "createDropDown", "(", "String", "buttonHtml", ",", "Component", "content", ",", "String", "title", ")", "{", "PopupView", "pv", "=", "new", "PopupView", "(", "buttonHtml", ",", "content", ")", ";", "pv", ".", "setDescription",...
Creates a drop down menu.<p> @param buttonHtml the button HTML @param content the drop down content @param title the button title @return the component
[ "Creates", "a", "drop", "down", "menu", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsToolBar.java#L280-L287
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java
OverpassFilterQuery.tagMultiple
public OverpassFilterQuery tagMultiple(String name, Set<String> values) { """ Adds a <i>["name"~{value1}|{value2}|{value3}|...|{valueN}]</i> filter tag to the current query to add a filter matching for any of the given values. @param name the filter name @param values the filter value @return the current q...
java
public OverpassFilterQuery tagMultiple(String name, Set<String> values) { builder.multipleValues(name, values); return this; }
[ "public", "OverpassFilterQuery", "tagMultiple", "(", "String", "name", ",", "Set", "<", "String", ">", "values", ")", "{", "builder", ".", "multipleValues", "(", "name", ",", "values", ")", ";", "return", "this", ";", "}" ]
Adds a <i>["name"~{value1}|{value2}|{value3}|...|{valueN}]</i> filter tag to the current query to add a filter matching for any of the given values. @param name the filter name @param values the filter value @return the current query object
[ "Adds", "a", "<i", ">", "[", "name", "~", "{", "value1", "}", "|", "{", "value2", "}", "|", "{", "value3", "}", "|", "...", "|", "{", "valueN", "}", "]", "<", "/", "i", ">", "filter", "tag", "to", "the", "current", "query", "to", "add", "a", ...
train
https://github.com/zsoltk/overpasser/blob/0464d3844e75c5f9393d2458d3a3aedf3e40f30d/library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java#L163-L167
JOML-CI/JOML
src/org/joml/Quaterniond.java
Quaterniond.premul
public Quaterniond premul(double qx, double qy, double qz, double qw) { """ Pre-multiply this quaternion by the quaternion represented via <code>(qx, qy, qz, qw)</code>. <p> If <code>T</code> is <code>this</code> and <code>Q</code> is the given quaternion, then the resulting quaternion <code>R</code> is: <p> <...
java
public Quaterniond premul(double qx, double qy, double qz, double qw) { return premul(qx, qy, qz, qw, this); }
[ "public", "Quaterniond", "premul", "(", "double", "qx", ",", "double", "qy", ",", "double", "qz", ",", "double", "qw", ")", "{", "return", "premul", "(", "qx", ",", "qy", ",", "qz", ",", "qw", ",", "this", ")", ";", "}" ]
Pre-multiply this quaternion by the quaternion represented via <code>(qx, qy, qz, qw)</code>. <p> If <code>T</code> is <code>this</code> and <code>Q</code> is the given quaternion, then the resulting quaternion <code>R</code> is: <p> <code>R = Q * T</code> <p> So, this method uses pre-multiplication, resulting in a vec...
[ "Pre", "-", "multiply", "this", "quaternion", "by", "the", "quaternion", "represented", "via", "<code", ">", "(", "qx", "qy", "qz", "qw", ")", "<", "/", "code", ">", ".", "<p", ">", "If", "<code", ">", "T<", "/", "code", ">", "is", "<code", ">", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaterniond.java#L825-L827
mijecu25/dsa
src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java
LinearSearch.searchLast
public static <E> int searchLast(List<E> list, E value) { """ Search for the value in the list and return the index of the first occurrence from the end of the list. The run time of this algorithm depends on the implementation of the list. It is advised to use an array based implementation to achieve O(n) runti...
java
public static <E> int searchLast(List<E> list, E value) { return LinearSearch.searchLast(list, value, 1); }
[ "public", "static", "<", "E", ">", "int", "searchLast", "(", "List", "<", "E", ">", "list", ",", "E", "value", ")", "{", "return", "LinearSearch", ".", "searchLast", "(", "list", ",", "value", ",", "1", ")", ";", "}" ]
Search for the value in the list and return the index of the first occurrence from the end of the list. The run time of this algorithm depends on the implementation of the list. It is advised to use an array based implementation to achieve O(n) runtime. @param <E> the type of elements in this list. @param list list t...
[ "Search", "for", "the", "value", "in", "the", "list", "and", "return", "the", "index", "of", "the", "first", "occurrence", "from", "the", "end", "of", "the", "list", ".", "The", "run", "time", "of", "this", "algorithm", "depends", "on", "the", "implement...
train
https://github.com/mijecu25/dsa/blob/a22971b746833e78a3939ae4de65e8f6bf2e3fd4/src/main/java/com/mijecu25/dsa/algorithms/search/linear/LinearSearch.java#L177-L179
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/WhitelistingApi.java
WhitelistingApi.deleteVdid
public WhitelistEnvelope deleteVdid(String dtid, String vdid) throws ApiException { """ Delete a vdid from the devicetype whitelist. Delete a vdid from the devicetype whitelist. @param dtid Device Type ID. (required) @param vdid Vendor Device ID. (required) @return WhitelistEnvelope @throws ApiException If fa...
java
public WhitelistEnvelope deleteVdid(String dtid, String vdid) throws ApiException { ApiResponse<WhitelistEnvelope> resp = deleteVdidWithHttpInfo(dtid, vdid); return resp.getData(); }
[ "public", "WhitelistEnvelope", "deleteVdid", "(", "String", "dtid", ",", "String", "vdid", ")", "throws", "ApiException", "{", "ApiResponse", "<", "WhitelistEnvelope", ">", "resp", "=", "deleteVdidWithHttpInfo", "(", "dtid", ",", "vdid", ")", ";", "return", "res...
Delete a vdid from the devicetype whitelist. Delete a vdid from the devicetype whitelist. @param dtid Device Type ID. (required) @param vdid Vendor Device ID. (required) @return WhitelistEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Delete", "a", "vdid", "from", "the", "devicetype", "whitelist", ".", "Delete", "a", "vdid", "from", "the", "devicetype", "whitelist", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/WhitelistingApi.java#L137-L140
qmx/jitescript
src/main/java/me/qmx/jitescript/JiteClass.java
JiteClass.defineMethod
public void defineMethod(String methodName, int modifiers, String signature, CodeBlock methodBody) { """ Defines a new method on the target class @param methodName the method name @param modifiers the modifier bitmask, made by OR'ing constants from ASM's {@link Opcodes} interface @param signature the method...
java
public void defineMethod(String methodName, int modifiers, String signature, CodeBlock methodBody) { this.methods.add(new MethodDefinition(methodName, modifiers, signature, methodBody)); }
[ "public", "void", "defineMethod", "(", "String", "methodName", ",", "int", "modifiers", ",", "String", "signature", ",", "CodeBlock", "methodBody", ")", "{", "this", ".", "methods", ".", "add", "(", "new", "MethodDefinition", "(", "methodName", ",", "modifiers...
Defines a new method on the target class @param methodName the method name @param modifiers the modifier bitmask, made by OR'ing constants from ASM's {@link Opcodes} interface @param signature the method signature, on standard JVM notation @param methodBody the method body
[ "Defines", "a", "new", "method", "on", "the", "target", "class" ]
train
https://github.com/qmx/jitescript/blob/bda6d02f37a8083248d9a0c80ea76bb5a63151ae/src/main/java/me/qmx/jitescript/JiteClass.java#L142-L144
roboconf/roboconf-platform
core/roboconf-dm-templating/src/main/java/net/roboconf/dm/templating/internal/TemplatingManager.java
TemplatingManager.resetWatcher
private void resetWatcher() { """ Updates the template watcher after a change in the templating manager configuration. """ // Stop the current watcher. stopWatcher(); // Update the template & target directories, based on the provided configuration directory. if( this.templatesDIR == null ) { this....
java
private void resetWatcher() { // Stop the current watcher. stopWatcher(); // Update the template & target directories, based on the provided configuration directory. if( this.templatesDIR == null ) { this.logger.warning( "The templates directory was not specified. DM templating is temporarily disabled." );...
[ "private", "void", "resetWatcher", "(", ")", "{", "// Stop the current watcher.", "stopWatcher", "(", ")", ";", "// Update the template & target directories, based on the provided configuration directory.", "if", "(", "this", ".", "templatesDIR", "==", "null", ")", "{", "th...
Updates the template watcher after a change in the templating manager configuration.
[ "Updates", "the", "template", "watcher", "after", "a", "change", "in", "the", "templating", "manager", "configuration", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-templating/src/main/java/net/roboconf/dm/templating/internal/TemplatingManager.java#L290-L306
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/ECKey.java
ECKey.fromPrivate
public static ECKey fromPrivate(BigInteger privKey) { """ Creates an ECKey given the private key only. @param privKey - @return - """ return new ECKey(privKey, CURVE.getG().multiply(privKey)); }
java
public static ECKey fromPrivate(BigInteger privKey) { return new ECKey(privKey, CURVE.getG().multiply(privKey)); }
[ "public", "static", "ECKey", "fromPrivate", "(", "BigInteger", "privKey", ")", "{", "return", "new", "ECKey", "(", "privKey", ",", "CURVE", ".", "getG", "(", ")", ".", "multiply", "(", "privKey", ")", ")", ";", "}" ]
Creates an ECKey given the private key only. @param privKey - @return -
[ "Creates", "an", "ECKey", "given", "the", "private", "key", "only", "." ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ECKey.java#L312-L314
jayantk/jklol
src/com/jayantkrish/jklol/ccg/chart/AbstractCcgChart.java
AbstractCcgChart.decodeParseFromSpan
public CcgParse decodeParseFromSpan(int spanStart, int spanEnd, int beamIndex, CcgParser parser) { """ Decodes the CCG parse which is the {@code beamIndex}'th parse in the beam for the given span. @param spanStart @param spanEnd @param beamIndex @param parser @return """ DiscreteVariable syntaxVarT...
java
public CcgParse decodeParseFromSpan(int spanStart, int spanEnd, int beamIndex, CcgParser parser) { DiscreteVariable syntaxVarType = parser.getSyntaxVarType(); ChartEntry entry = getChartEntriesForSpan(spanStart, spanEnd)[beamIndex]; HeadedSyntacticCategory syntax = (HeadedSyntacticCategory) syntaxVarType.ge...
[ "public", "CcgParse", "decodeParseFromSpan", "(", "int", "spanStart", ",", "int", "spanEnd", ",", "int", "beamIndex", ",", "CcgParser", "parser", ")", "{", "DiscreteVariable", "syntaxVarType", "=", "parser", ".", "getSyntaxVarType", "(", ")", ";", "ChartEntry", ...
Decodes the CCG parse which is the {@code beamIndex}'th parse in the beam for the given span. @param spanStart @param spanEnd @param beamIndex @param parser @return
[ "Decodes", "the", "CCG", "parse", "which", "is", "the", "{", "@code", "beamIndex", "}", "th", "parse", "in", "the", "beam", "for", "the", "given", "span", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/chart/AbstractCcgChart.java#L230-L273
google/closure-compiler
src/com/google/javascript/jscomp/TypeInference.java
TypeInference.traverseDestructuringPattern
private FlowScope traverseDestructuringPattern( Node pattern, FlowScope scope, JSType patternType, AssignmentType assignmentType) { """ Traverses a destructuring pattern in an assignment or declaration """ return traverseDestructuringPatternHelper( pattern, scope, patternType,...
java
private FlowScope traverseDestructuringPattern( Node pattern, FlowScope scope, JSType patternType, AssignmentType assignmentType) { return traverseDestructuringPatternHelper( pattern, scope, patternType, (FlowScope flowScope, Node targetNode, JSType targetType) -> { t...
[ "private", "FlowScope", "traverseDestructuringPattern", "(", "Node", "pattern", ",", "FlowScope", "scope", ",", "JSType", "patternType", ",", "AssignmentType", "assignmentType", ")", "{", "return", "traverseDestructuringPatternHelper", "(", "pattern", ",", "scope", ",",...
Traverses a destructuring pattern in an assignment or declaration
[ "Traverses", "a", "destructuring", "pattern", "in", "an", "assignment", "or", "declaration" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeInference.java#L1206-L1216
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.getAllLifetimeStatisticsAsync
public Observable<JobStatistics> getAllLifetimeStatisticsAsync(JobGetAllLifetimeStatisticsOptions jobGetAllLifetimeStatisticsOptions) { """ Gets lifetime summary statistics for all of the jobs in the specified account. Statistics are aggregated across all jobs that have ever existed in the account, from account c...
java
public Observable<JobStatistics> getAllLifetimeStatisticsAsync(JobGetAllLifetimeStatisticsOptions jobGetAllLifetimeStatisticsOptions) { return getAllLifetimeStatisticsWithServiceResponseAsync(jobGetAllLifetimeStatisticsOptions).map(new Func1<ServiceResponseWithHeaders<JobStatistics, JobGetAllLifetimeStatisticsH...
[ "public", "Observable", "<", "JobStatistics", ">", "getAllLifetimeStatisticsAsync", "(", "JobGetAllLifetimeStatisticsOptions", "jobGetAllLifetimeStatisticsOptions", ")", "{", "return", "getAllLifetimeStatisticsWithServiceResponseAsync", "(", "jobGetAllLifetimeStatisticsOptions", ")", ...
Gets lifetime summary statistics for all of the jobs in the specified account. Statistics are aggregated across all jobs that have ever existed in the account, from account creation to the last update time of the statistics. The statistics may not be immediately available. The Batch service performs periodic roll-up of...
[ "Gets", "lifetime", "summary", "statistics", "for", "all", "of", "the", "jobs", "in", "the", "specified", "account", ".", "Statistics", "are", "aggregated", "across", "all", "jobs", "that", "have", "ever", "existed", "in", "the", "account", "from", "account", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L287-L294
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.updateProjectMember
public GitlabProjectMember updateProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel, String expiresAt) throws IOException { """ Updates a project member. @param projectId the project id @param userId the user id @param accessLevel the updated access level for the specified u...
java
public GitlabProjectMember updateProjectMember(Integer projectId, Integer userId, GitlabAccessLevel accessLevel, String expiresAt) throws IOException { Query query = new Query() .appendIf("access_level", accessLevel) .appendIf("expires_at", expiresAt); String tailUrl = Gi...
[ "public", "GitlabProjectMember", "updateProjectMember", "(", "Integer", "projectId", ",", "Integer", "userId", ",", "GitlabAccessLevel", "accessLevel", ",", "String", "expiresAt", ")", "throws", "IOException", "{", "Query", "query", "=", "new", "Query", "(", ")", ...
Updates a project member. @param projectId the project id @param userId the user id @param accessLevel the updated access level for the specified user @param expiresAt the date at which the user's membership expires at in the form YEAR-MONTH-DAY @return GitLabProjectMember with updated access level on success...
[ "Updates", "a", "project", "member", "." ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L3096-L3102
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java
SourceTreeManager.getSourceTree
public int getSourceTree(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { """ Get the source tree from the input source. @param source The Source object that should identify the desired node. @param locator The location of the caller, for diagnostic purposes. ...
java
public int getSourceTree(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { int n = getNode(source); if (DTM.NULL != n) return n; n = parseToNode(source, locator, xctxt); if (DTM.NULL != n) putDocumentInCache(n, source); return n; }
[ "public", "int", "getSourceTree", "(", "Source", "source", ",", "SourceLocator", "locator", ",", "XPathContext", "xctxt", ")", "throws", "TransformerException", "{", "int", "n", "=", "getNode", "(", "source", ")", ";", "if", "(", "DTM", ".", "NULL", "!=", ...
Get the source tree from the input source. @param source The Source object that should identify the desired node. @param locator The location of the caller, for diagnostic purposes. @return non-null reference to a node. @throws TransformerException if the Source argument can't be resolved to a node.
[ "Get", "the", "source", "tree", "from", "the", "input", "source", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L272-L287
alkacon/opencms-core
src/org/opencms/ade/containerpage/CmsDetailOnlyContainerUtil.java
CmsDetailOnlyContainerUtil.getDetailContainerLocale
public static String getDetailContainerLocale(CmsObject cms, String contentLocale, CmsResource resource) { """ Returns the detail container resource locale appropriate for the given detail page.<p> @param cms the cms context @param contentLocale the content locale @param resource the detail page resource @...
java
public static String getDetailContainerLocale(CmsObject cms, String contentLocale, CmsResource resource) { boolean singleLocale = useSingleLocaleDetailContainers(cms.getRequestContext().getSiteRoot()); if (!singleLocale) { try { CmsProperty prop = cms.readPropertyObject( ...
[ "public", "static", "String", "getDetailContainerLocale", "(", "CmsObject", "cms", ",", "String", "contentLocale", ",", "CmsResource", "resource", ")", "{", "boolean", "singleLocale", "=", "useSingleLocaleDetailContainers", "(", "cms", ".", "getRequestContext", "(", "...
Returns the detail container resource locale appropriate for the given detail page.<p> @param cms the cms context @param contentLocale the content locale @param resource the detail page resource @return the locale String
[ "Returns", "the", "detail", "container", "resource", "locale", "appropriate", "for", "the", "given", "detail", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsDetailOnlyContainerUtil.java#L101-L116
Impetus/Kundera
src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/OracleNoSQLClient.java
OracleNoSQLClient.eligibleToFetch
private boolean eligibleToFetch(List<String> columnsToSelect, String columnName) { """ Eligible to fetch. @param columnsToSelect the columns to select @param columnName the column name @return true, if successful """ return (columnsToSelect != null && !columnsToSelect.isEmpty() && columnsToSelec...
java
private boolean eligibleToFetch(List<String> columnsToSelect, String columnName) { return (columnsToSelect != null && !columnsToSelect.isEmpty() && columnsToSelect.contains(columnName)) || (columnsToSelect == null || columnsToSelect.isEmpty()); }
[ "private", "boolean", "eligibleToFetch", "(", "List", "<", "String", ">", "columnsToSelect", ",", "String", "columnName", ")", "{", "return", "(", "columnsToSelect", "!=", "null", "&&", "!", "columnsToSelect", ".", "isEmpty", "(", ")", "&&", "columnsToSelect", ...
Eligible to fetch. @param columnsToSelect the columns to select @param columnName the column name @return true, if successful
[ "Eligible", "to", "fetch", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-oracle-nosql/src/main/java/com/impetus/client/oraclenosql/OracleNoSQLClient.java#L1569-L1573
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.removeIncompleteUpload
public void removeIncompleteUpload(String bucketName, String objectName) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { """ R...
java
public void removeIncompleteUpload(String bucketName, String objectName) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException { for (R...
[ "public", "void", "removeIncompleteUpload", "(", "String", "bucketName", ",", "String", "objectName", ")", "throws", "InvalidBucketNameException", ",", "NoSuchAlgorithmException", ",", "InsufficientDataException", ",", "IOException", ",", "InvalidKeyException", ",", "NoResp...
Removes incomplete multipart upload of given object. </p><b>Example:</b><br> <pre>{@code minioClient.removeIncompleteUpload("my-bucketname", "my-objectname"); System.out.println("successfully removed all incomplete upload session of my-bucketname/my-objectname"); }</pre> @param bucketName Bucket name. @param objectNa...
[ "Removes", "incomplete", "multipart", "upload", "of", "given", "object", "." ]
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L4940-L4951
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedKeyAsync
public ServiceFuture<DeletedKeyBundle> getDeletedKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback<DeletedKeyBundle> serviceCallback) { """ Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any...
java
public ServiceFuture<DeletedKeyBundle> getDeletedKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback<DeletedKeyBundle> serviceCallback) { return ServiceFuture.fromResponse(getDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName), serviceCallback); }
[ "public", "ServiceFuture", "<", "DeletedKeyBundle", ">", "getDeletedKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "final", "ServiceCallback", "<", "DeletedKeyBundle", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", ".", "fromRes...
Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission. @param vaultBaseUrl The vault name,...
[ "Gets", "the", "public", "part", "of", "a", "deleted", "key", ".", "The", "Get", "Deleted", "Key", "operation", "is", "applicable", "for", "soft", "-", "delete", "enabled", "vaults", ".", "While", "the", "operation", "can", "be", "invoked", "on", "any", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3072-L3074
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/parser/json/KeywordParser.java
KeywordParser.getKeyword
private JSONObject getKeyword(final JSONArray keywords, final int index) { """ Return a json object from the provided array. Return an empty object if there is any problems fetching the keyword data. @param keywords array of keyword data @param index of the object to fetch @return json object from the pro...
java
private JSONObject getKeyword(final JSONArray keywords, final int index) { JSONObject object = new JSONObject(); try { object = (JSONObject) keywords.get(index); } catch(JSONException e) { e.printStackTrace(); } return object; }
[ "private", "JSONObject", "getKeyword", "(", "final", "JSONArray", "keywords", ",", "final", "int", "index", ")", "{", "JSONObject", "object", "=", "new", "JSONObject", "(", ")", ";", "try", "{", "object", "=", "(", "JSONObject", ")", "keywords", ".", "get"...
Return a json object from the provided array. Return an empty object if there is any problems fetching the keyword data. @param keywords array of keyword data @param index of the object to fetch @return json object from the provided array
[ "Return", "a", "json", "object", "from", "the", "provided", "array", ".", "Return", "an", "empty", "object", "if", "there", "is", "any", "problems", "fetching", "the", "keyword", "data", "." ]
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/parser/json/KeywordParser.java#L61-L70
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/module/ScriptModuleLoader.java
ScriptModuleLoader.notifyModuleUpdate
protected void notifyModuleUpdate(@Nullable ScriptModule newModule, @Nullable ScriptModule oldModule) { """ Convenience method to notify the listeners that there was an update to the script module @param newModule newly loaded module @param oldModule module that was displaced by the new module """ fo...
java
protected void notifyModuleUpdate(@Nullable ScriptModule newModule, @Nullable ScriptModule oldModule) { for (ScriptModuleListener listener : listeners) { listener.moduleUpdated(newModule, oldModule); } }
[ "protected", "void", "notifyModuleUpdate", "(", "@", "Nullable", "ScriptModule", "newModule", ",", "@", "Nullable", "ScriptModule", "oldModule", ")", "{", "for", "(", "ScriptModuleListener", "listener", ":", "listeners", ")", "{", "listener", ".", "moduleUpdated", ...
Convenience method to notify the listeners that there was an update to the script module @param newModule newly loaded module @param oldModule module that was displaced by the new module
[ "Convenience", "method", "to", "notify", "the", "listeners", "that", "there", "was", "an", "update", "to", "the", "script", "module" ]
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/module/ScriptModuleLoader.java#L489-L493
dashbuilder/dashbuilder
dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-google/src/main/java/org/dashbuilder/renderer/google/client/GoogleTableDisplayer.java
GoogleTableDisplayer.onFilterEnabled
@Override public void onFilterEnabled(Displayer displayer, DataSetGroup groupOp) { """ Reset the current navigation status on filter requests from external displayers. """ currentPage = 1; super.onFilterEnabled(displayer, groupOp); }
java
@Override public void onFilterEnabled(Displayer displayer, DataSetGroup groupOp) { currentPage = 1; super.onFilterEnabled(displayer, groupOp); }
[ "@", "Override", "public", "void", "onFilterEnabled", "(", "Displayer", "displayer", ",", "DataSetGroup", "groupOp", ")", "{", "currentPage", "=", "1", ";", "super", ".", "onFilterEnabled", "(", "displayer", ",", "groupOp", ")", ";", "}" ]
Reset the current navigation status on filter requests from external displayers.
[ "Reset", "the", "current", "navigation", "status", "on", "filter", "requests", "from", "external", "displayers", "." ]
train
https://github.com/dashbuilder/dashbuilder/blob/50ef88210726b4f2f33f1a82eaf0f542e38dedd9/dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-google/src/main/java/org/dashbuilder/renderer/google/client/GoogleTableDisplayer.java#L207-L211
algolia/instantsearch-android
core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java
Searcher.getNumericRefinement
@SuppressWarnings( { """ Gets the current numeric refinement for an attribute and an operator. @param attribute the attribute to refine on. @param operator one of the {@link NumericRefinement#OPERATOR_EQ operators} defined in {@link NumericRefinement}. @return a {@link NumericRefinement} describing the curre...
java
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users @Nullable public NumericRefinement getNumericRefinement(@NonNull String attribute, int operator) { NumericRefinement.checkOperatorIsValid(operator); final SparseArray<NumericRefinement> attributeRefinements = numericRefinements.g...
[ "@", "SuppressWarnings", "(", "{", "\"WeakerAccess\"", ",", "\"unused\"", "}", ")", "// For library users", "@", "Nullable", "public", "NumericRefinement", "getNumericRefinement", "(", "@", "NonNull", "String", "attribute", ",", "int", "operator", ")", "{", "Numeric...
Gets the current numeric refinement for an attribute and an operator. @param attribute the attribute to refine on. @param operator one of the {@link NumericRefinement#OPERATOR_EQ operators} defined in {@link NumericRefinement}. @return a {@link NumericRefinement} describing the current refinement for these parameters...
[ "Gets", "the", "current", "numeric", "refinement", "for", "an", "attribute", "and", "an", "operator", "." ]
train
https://github.com/algolia/instantsearch-android/blob/12092ec30140df9ffc2bf916339b433372034616/core/src/main/java/com/algolia/instantsearch/core/helpers/Searcher.java#L685-L691
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesInner.java
DatabaseTableAuditingPoliciesInner.getAsync
public Observable<DatabaseTableAuditingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { """ Gets a database's table auditing policy. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resourc...
java
public Observable<DatabaseTableAuditingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<DatabaseTableAuditingPolicyInner>, DatabaseTableAuditingPolicyInner>() { ...
[ "public", "Observable", "<", "DatabaseTableAuditingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName"...
Gets a database's table auditing policy. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseNam...
[ "Gets", "a", "database", "s", "table", "auditing", "policy", ".", "Table", "auditing", "is", "deprecated", "use", "blob", "auditing", "instead", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesInner.java#L109-L116
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
PubSubManager.tryToPublishAndPossibleAutoCreate
public <I extends Item> LeafNode tryToPublishAndPossibleAutoCreate(String id, I item) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Try to publish an item and, if the node with the given ID does not exists, auto-create the node. <p> Not ever...
java
public <I extends Item> LeafNode tryToPublishAndPossibleAutoCreate(String id, I item) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { LeafNode leafNode = new LeafNode(this, id); leafNode.publish(item); // If LeafNode.publish() di...
[ "public", "<", "I", "extends", "Item", ">", "LeafNode", "tryToPublishAndPossibleAutoCreate", "(", "String", "id", ",", "I", "item", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "LeafNo...
Try to publish an item and, if the node with the given ID does not exists, auto-create the node. <p> Not every PubSub service supports automatic node creation. You can discover if this service supports it by using {@link #supportsAutomaticNodeCreation()}. </p> @param id The unique id of the node. @param item The item ...
[ "Try", "to", "publish", "an", "item", "and", "if", "the", "node", "with", "the", "given", "ID", "does", "not", "exists", "auto", "-", "create", "the", "node", ".", "<p", ">", "Not", "every", "PubSub", "service", "supports", "automatic", "node", "creation...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java#L433-L443
apereo/cas
core/cas-server-core/src/main/java/org/apereo/cas/AbstractCentralAuthenticationService.java
AbstractCentralAuthenticationService.evaluateProxiedServiceIfNeeded
protected void evaluateProxiedServiceIfNeeded(final Service service, final TicketGrantingTicket ticketGrantingTicket, final RegisteredService registeredService) { """ Evaluate proxied service if needed. @param service the service @param ticketGrantingTicket the ticket granting ticket @param regis...
java
protected void evaluateProxiedServiceIfNeeded(final Service service, final TicketGrantingTicket ticketGrantingTicket, final RegisteredService registeredService) { val proxiedBy = ticketGrantingTicket.getProxiedBy(); if (proxiedBy != null) { LOGGER.debug("Ticket-granting ticket is proxied by ...
[ "protected", "void", "evaluateProxiedServiceIfNeeded", "(", "final", "Service", "service", ",", "final", "TicketGrantingTicket", "ticketGrantingTicket", ",", "final", "RegisteredService", "registeredService", ")", "{", "val", "proxiedBy", "=", "ticketGrantingTicket", ".", ...
Evaluate proxied service if needed. @param service the service @param ticketGrantingTicket the ticket granting ticket @param registeredService the registered service
[ "Evaluate", "proxied", "service", "if", "needed", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core/src/main/java/org/apereo/cas/AbstractCentralAuthenticationService.java#L183-L201
landawn/AbacusUtil
src/com/landawn/abacus/util/DoubleList.java
DoubleList.anyMatch
public <E extends Exception> boolean anyMatch(Try.DoublePredicate<E> filter) throws E { """ Returns whether any elements of this List match the provided predicate. @param filter @return """ return anyMatch(0, size(), filter); }
java
public <E extends Exception> boolean anyMatch(Try.DoublePredicate<E> filter) throws E { return anyMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "anyMatch", "(", "Try", ".", "DoublePredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "anyMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether any elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "any", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DoubleList.java#L927-L929
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/id/impl/OgmTableGenerator.java
OgmTableGenerator.determineGeneratorTableName
protected QualifiedName determineGeneratorTableName(Properties params, Dialect dialect) { """ NOTE: Copied from TableGenerator <p> Determine the table name to use for the generator values. <p> Called during {@link #configure configuration}. @see #getTableName() @param params The params supplied in the gene...
java
protected QualifiedName determineGeneratorTableName(Properties params, Dialect dialect) { String schemaName = params.getProperty( PersistentIdentifierGenerator.SCHEMA ); if ( schemaName != null ) { log.schemaOptionNotSupportedForTableGenerator( schemaName ); } String catalogName = params.getProperty( Persis...
[ "protected", "QualifiedName", "determineGeneratorTableName", "(", "Properties", "params", ",", "Dialect", "dialect", ")", "{", "String", "schemaName", "=", "params", ".", "getProperty", "(", "PersistentIdentifierGenerator", ".", "SCHEMA", ")", ";", "if", "(", "schem...
NOTE: Copied from TableGenerator <p> Determine the table name to use for the generator values. <p> Called during {@link #configure configuration}. @see #getTableName() @param params The params supplied in the generator config (plus some standard useful extras). @param dialect The dialect in effect @return The table na...
[ "NOTE", ":", "Copied", "from", "TableGenerator", "<p", ">", "Determine", "the", "table", "name", "to", "use", "for", "the", "generator", "values", ".", "<p", ">", "Called", "during", "{", "@link", "#configure", "configuration", "}", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/id/impl/OgmTableGenerator.java#L188-L204
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpDateFormatImpl.java
HttpDateFormatImpl.attemptParse
private Date attemptParse(SimpleDateFormat format, String input) { """ Parse the input value against the formatter but do not throw an exception if it fails to match, instead just return null. <br> @param format @param input @return Date """ ParsePosition pos = new ParsePosition(0); Date...
java
private Date attemptParse(SimpleDateFormat format, String input) { ParsePosition pos = new ParsePosition(0); Date d = format.parse(input, pos); if (0 == pos.getIndex() || pos.getIndex() != input.length()) { // invalid format matching return null; } return ...
[ "private", "Date", "attemptParse", "(", "SimpleDateFormat", "format", ",", "String", "input", ")", "{", "ParsePosition", "pos", "=", "new", "ParsePosition", "(", "0", ")", ";", "Date", "d", "=", "format", ".", "parse", "(", "input", ",", "pos", ")", ";",...
Parse the input value against the formatter but do not throw an exception if it fails to match, instead just return null. <br> @param format @param input @return Date
[ "Parse", "the", "input", "value", "against", "the", "formatter", "but", "do", "not", "throw", "an", "exception", "if", "it", "fails", "to", "match", "instead", "just", "return", "null", ".", "<br", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/internal/HttpDateFormatImpl.java#L279-L287
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.CustomArray
public JBBPDslBuilder CustomArray(final String type, final String size) { """ Create anonymous custom type array with fixed size. @param type custom type, must not be null @param size expression to calculate size of the array, must not be null. @return the builder instance, must not be null """ return...
java
public JBBPDslBuilder CustomArray(final String type, final String size) { return this.CustomArray(type, null, size, null); }
[ "public", "JBBPDslBuilder", "CustomArray", "(", "final", "String", "type", ",", "final", "String", "size", ")", "{", "return", "this", ".", "CustomArray", "(", "type", ",", "null", ",", "size", ",", "null", ")", ";", "}" ]
Create anonymous custom type array with fixed size. @param type custom type, must not be null @param size expression to calculate size of the array, must not be null. @return the builder instance, must not be null
[ "Create", "anonymous", "custom", "type", "array", "with", "fixed", "size", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L496-L498
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.createJobSchedule
public void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Adds a job schedule to the Batch account. @param jobScheduleId A string that uniquely identifies the job sche...
java
public void createJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobScheduleAddParameter param = new JobScheduleAddParameter() .withJobSpecification(jobSpecificat...
[ "public", "void", "createJobSchedule", "(", "String", "jobScheduleId", ",", "Schedule", "schedule", ",", "JobSpecification", "jobSpecification", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOExceptio...
Adds a job schedule to the Batch account. @param jobScheduleId A string that uniquely identifies the job schedule within the account. @param schedule The schedule according to which jobs will be created. @param jobSpecification Details about the jobs to be created on this schedule. @param additionalBehaviors A collect...
[ "Adds", "a", "job", "schedule", "to", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L378-L384
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/SharesInner.java
SharesInner.beginCreateOrUpdateAsync
public Observable<ShareInner> beginCreateOrUpdateAsync(String deviceName, String name, String resourceGroupName, ShareInner share) { """ Creates a new share or updates an existing share on the device. @param deviceName The device name. @param name The share name. @param resourceGroupName The resource group na...
java
public Observable<ShareInner> beginCreateOrUpdateAsync(String deviceName, String name, String resourceGroupName, ShareInner share) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, share).map(new Func1<ServiceResponse<ShareInner>, ShareInner>() { @Override ...
[ "public", "Observable", "<", "ShareInner", ">", "beginCreateOrUpdateAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "ShareInner", "share", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "devic...
Creates a new share or updates an existing share on the device. @param deviceName The device name. @param name The share name. @param resourceGroupName The resource group name. @param share The share properties. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Sha...
[ "Creates", "a", "new", "share", "or", "updates", "an", "existing", "share", "on", "the", "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/SharesInner.java#L444-L451
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/Parallelogram2dfx.java
Parallelogram2dfx.secondAxisProperty
public UnitVectorProperty secondAxisProperty() { """ Replies the property for the second axis. @return the property. """ if (this.saxis == null) { this.saxis = new UnitVectorProperty(this, MathFXAttributeNames.SECOND_AXIS, getGeomFactory()); } return this.saxis; }
java
public UnitVectorProperty secondAxisProperty() { if (this.saxis == null) { this.saxis = new UnitVectorProperty(this, MathFXAttributeNames.SECOND_AXIS, getGeomFactory()); } return this.saxis; }
[ "public", "UnitVectorProperty", "secondAxisProperty", "(", ")", "{", "if", "(", "this", ".", "saxis", "==", "null", ")", "{", "this", ".", "saxis", "=", "new", "UnitVectorProperty", "(", "this", ",", "MathFXAttributeNames", ".", "SECOND_AXIS", ",", "getGeomFac...
Replies the property for the second axis. @return the property.
[ "Replies", "the", "property", "for", "the", "second", "axis", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/dfx/Parallelogram2dfx.java#L280-L285
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/Preconditions.java
Preconditions.checkAsyncBackupCount
public static int checkAsyncBackupCount(int currentBackupCount, int newAsyncBackupCount) { """ Tests if the newAsyncBackupCount count is valid. @param currentBackupCount the current number of backups @param newAsyncBackupCount the new number of async backups @return the newAsyncBackupCount @throws java.lang...
java
public static int checkAsyncBackupCount(int currentBackupCount, int newAsyncBackupCount) { if (currentBackupCount < 0) { throw new IllegalArgumentException("backup-count can't be smaller than 0"); } if (newAsyncBackupCount < 0) { throw new IllegalArgumentException("async...
[ "public", "static", "int", "checkAsyncBackupCount", "(", "int", "currentBackupCount", ",", "int", "newAsyncBackupCount", ")", "{", "if", "(", "currentBackupCount", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"backup-count can't be smaller than...
Tests if the newAsyncBackupCount count is valid. @param currentBackupCount the current number of backups @param newAsyncBackupCount the new number of async backups @return the newAsyncBackupCount @throws java.lang.IllegalArgumentException if asyncBackupCount is smaller than 0, or larger than the maximum number of bac...
[ "Tests", "if", "the", "newAsyncBackupCount", "count", "is", "valid", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/Preconditions.java#L242-L261
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
IOUtil.copyFile
public static void copyFile(File source, File target, long sourceCount) { """ Copies source file to target and creates the target if necessary. The target can be a directory or file. If the target is a file, nests the new file under the target directory, otherwise copies to the given target. @param source ...
java
public static void copyFile(File source, File target, long sourceCount) { if (!source.exists()) { throw new IllegalArgumentException("Source does not exist " + source.getAbsolutePath()); } if (!source.isFile()) { throw new IllegalArgumentException("Source is not a file " ...
[ "public", "static", "void", "copyFile", "(", "File", "source", ",", "File", "target", ",", "long", "sourceCount", ")", "{", "if", "(", "!", "source", ".", "exists", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Source does not exist...
Copies source file to target and creates the target if necessary. The target can be a directory or file. If the target is a file, nests the new file under the target directory, otherwise copies to the given target. @param source the source file @param target the destination file or directory @param sourceCou...
[ "Copies", "source", "file", "to", "target", "and", "creates", "the", "target", "if", "necessary", ".", "The", "target", "can", "be", "a", "directory", "or", "file", ".", "If", "the", "target", "is", "a", "file", "nests", "the", "new", "file", "under", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java#L587-L613
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java
AbstractLayoutManager.createChart
protected JRDesignChart createChart(ar.com.fdvs.dj.domain.chart.DJChart djChart, String name) { """ Creates the JRDesignChart from the DJChart. To do so it also creates needed variables and data-set @param djChart @return """ JRDesignGroup jrGroupChart = getChartColumnsGroup(djChart); JRDes...
java
protected JRDesignChart createChart(ar.com.fdvs.dj.domain.chart.DJChart djChart, String name) { JRDesignGroup jrGroupChart = getChartColumnsGroup(djChart); JRDesignGroup parentGroup = getParent(jrGroupChart); Map chartVariables = registerChartVariable(djChart); return djChart.transform((...
[ "protected", "JRDesignChart", "createChart", "(", "ar", ".", "com", ".", "fdvs", ".", "dj", ".", "domain", ".", "chart", ".", "DJChart", "djChart", ",", "String", "name", ")", "{", "JRDesignGroup", "jrGroupChart", "=", "getChartColumnsGroup", "(", "djChart", ...
Creates the JRDesignChart from the DJChart. To do so it also creates needed variables and data-set @param djChart @return
[ "Creates", "the", "JRDesignChart", "from", "the", "DJChart", ".", "To", "do", "so", "it", "also", "creates", "needed", "variables", "and", "data", "-", "set" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/layout/AbstractLayoutManager.java#L1244-L1249
liyiorg/weixin-popular
src/main/java/weixin/popular/api/BizwifiAPI.java
BizwifiAPI.deviceDelete
public static BaseResult deviceDelete(String accessToken, DeviceDelete deviceDelete) { """ Wi-Fi设备管理-删除设备 @param accessToken accessToken @param deviceDelete deviceDelete @return BaseResult """ return deviceDelete(accessToken, JsonUtil.toJSONString(deviceDelete)); }
java
public static BaseResult deviceDelete(String accessToken, DeviceDelete deviceDelete) { return deviceDelete(accessToken, JsonUtil.toJSONString(deviceDelete)); }
[ "public", "static", "BaseResult", "deviceDelete", "(", "String", "accessToken", ",", "DeviceDelete", "deviceDelete", ")", "{", "return", "deviceDelete", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "deviceDelete", ")", ")", ";", "}" ]
Wi-Fi设备管理-删除设备 @param accessToken accessToken @param deviceDelete deviceDelete @return BaseResult
[ "Wi", "-", "Fi设备管理", "-", "删除设备" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L411-L413
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/Strings.java
Strings.intersectSeq
public static String intersectSeq(final String first, final String second) { """ <p> intersectSeq. </p> @param first a {@link java.lang.String} object. @param second a {@link java.lang.String} object. @return a {@link java.lang.String} object. """ return intersectSeq(first, second, DELIMITER); }
java
public static String intersectSeq(final String first, final String second) { return intersectSeq(first, second, DELIMITER); }
[ "public", "static", "String", "intersectSeq", "(", "final", "String", "first", ",", "final", "String", "second", ")", "{", "return", "intersectSeq", "(", "first", ",", "second", ",", "DELIMITER", ")", ";", "}" ]
<p> intersectSeq. </p> @param first a {@link java.lang.String} object. @param second a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "<p", ">", "intersectSeq", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/Strings.java#L272-L274
line/armeria
spring/boot-autoconfigure/src/main/java/com/linecorp/armeria/spring/AbstractServiceRegistrationBean.java
AbstractServiceRegistrationBean.setDecorator
@Deprecated public final U setDecorator( Function<Service<HttpRequest, HttpResponse>, ? extends Service<HttpRequest, HttpResponse>> decorator) { """ Sets the decorator of the annotated service object. {@code decorator} are applied to {@code service} in order. @deprecated Use {...
java
@Deprecated public final U setDecorator( Function<Service<HttpRequest, HttpResponse>, ? extends Service<HttpRequest, HttpResponse>> decorator) { return setDecorators(requireNonNull(decorator, "decorator")); }
[ "@", "Deprecated", "public", "final", "U", "setDecorator", "(", "Function", "<", "Service", "<", "HttpRequest", ",", "HttpResponse", ">", ",", "?", "extends", "Service", "<", "HttpRequest", ",", "HttpResponse", ">", ">", "decorator", ")", "{", "return", "set...
Sets the decorator of the annotated service object. {@code decorator} are applied to {@code service} in order. @deprecated Use {@link #setDecorators(Function[])} or {@link #setDecorators(List)} instead.
[ "Sets", "the", "decorator", "of", "the", "annotated", "service", "object", ".", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/spring/boot-autoconfigure/src/main/java/com/linecorp/armeria/spring/AbstractServiceRegistrationBean.java#L105-L110
hexagonframework/spring-data-ebean
src/main/java/org/springframework/data/ebean/repository/query/EbeanQueryCreator.java
EbeanQueryCreator.complete
@Override protected final Query complete(Expression expression, Sort sort) { """ Finalizes the given {@link ExpressionList} and applies the given sort. """ return root.add(expression).query(); }
java
@Override protected final Query complete(Expression expression, Sort sort) { return root.add(expression).query(); }
[ "@", "Override", "protected", "final", "Query", "complete", "(", "Expression", "expression", ",", "Sort", "sort", ")", "{", "return", "root", ".", "add", "(", "expression", ")", ".", "query", "(", ")", ";", "}" ]
Finalizes the given {@link ExpressionList} and applies the given sort.
[ "Finalizes", "the", "given", "{" ]
train
https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/repository/query/EbeanQueryCreator.java#L104-L107
Stratio/bdt
src/main/java/com/stratio/qa/specs/FileSpec.java
FileSpec.convertJsonToYaml
@When("^I convert the json file '(.+?)' to yaml file '(.+?)'$") public void convertJsonToYaml(String fileToConvert, String fileName) throws Exception { """ Method to convert one json to yaml file - backup&restore functionality <p> File will be placed on path /target/test-classes """ // Retrieve ...
java
@When("^I convert the json file '(.+?)' to yaml file '(.+?)'$") public void convertJsonToYaml(String fileToConvert, String fileName) throws Exception { // Retrieve data String retrievedData = commonspec.asYaml(fileToConvert); // Create file (temporary) and set path to be accessible within ...
[ "@", "When", "(", "\"^I convert the json file '(.+?)' to yaml file '(.+?)'$\"", ")", "public", "void", "convertJsonToYaml", "(", "String", "fileToConvert", ",", "String", "fileName", ")", "throws", "Exception", "{", "// Retrieve data", "String", "retrievedData", "=", "com...
Method to convert one json to yaml file - backup&restore functionality <p> File will be placed on path /target/test-classes
[ "Method", "to", "convert", "one", "json", "to", "yaml", "file", "-", "backup&restore", "functionality", "<p", ">", "File", "will", "be", "placed", "on", "path", "/", "target", "/", "test", "-", "classes" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/FileSpec.java#L206-L228
apache/groovy
subprojects/groovy-xml/src/main/java/groovy/xml/MarkupBuilderHelper.java
MarkupBuilderHelper.xmlDeclaration
public void xmlDeclaration(Map<String, Object> args) { """ Produce an XML declaration in the output. For example: <pre> mkp.xmlDeclaration(version:'1.0') </pre> @param args the attributes for the declaration """ Map<String, Map<String, Object>> map = new HashMap<String, Map<String, Object>>(); ...
java
public void xmlDeclaration(Map<String, Object> args) { Map<String, Map<String, Object>> map = new HashMap<String, Map<String, Object>>(); map.put("xml", args); pi(map); }
[ "public", "void", "xmlDeclaration", "(", "Map", "<", "String", ",", "Object", ">", "args", ")", "{", "Map", "<", "String", ",", "Map", "<", "String", ",", "Object", ">", ">", "map", "=", "new", "HashMap", "<", "String", ",", "Map", "<", "String", "...
Produce an XML declaration in the output. For example: <pre> mkp.xmlDeclaration(version:'1.0') </pre> @param args the attributes for the declaration
[ "Produce", "an", "XML", "declaration", "in", "the", "output", ".", "For", "example", ":", "<pre", ">", "mkp", ".", "xmlDeclaration", "(", "version", ":", "1", ".", "0", ")", "<", "/", "pre", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-xml/src/main/java/groovy/xml/MarkupBuilderHelper.java#L119-L123
alibaba/canal
client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaOffsetCanalConnector.java
KafkaOffsetCanalConnector.getListWithoutAck
public List<KafkaMessage> getListWithoutAck(Long timeout, TimeUnit unit, long offset) throws CanalClientException { """ 获取Kafka消息,不确认 @param timeout @param unit @param offset 消息偏移地址(-1为不偏移) @return @throws CanalClientException """ waitClientRunning(); if (!running) { return ...
java
public List<KafkaMessage> getListWithoutAck(Long timeout, TimeUnit unit, long offset) throws CanalClientException { waitClientRunning(); if (!running) { return Lists.newArrayList(); } if (offset > -1) { TopicPartition tp = new TopicPartition(topic, partition == n...
[ "public", "List", "<", "KafkaMessage", ">", "getListWithoutAck", "(", "Long", "timeout", ",", "TimeUnit", "unit", ",", "long", "offset", ")", "throws", "CanalClientException", "{", "waitClientRunning", "(", ")", ";", "if", "(", "!", "running", ")", "{", "ret...
获取Kafka消息,不确认 @param timeout @param unit @param offset 消息偏移地址(-1为不偏移) @return @throws CanalClientException
[ "获取Kafka消息,不确认" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client/src/main/java/com/alibaba/otter/canal/client/kafka/KafkaOffsetCanalConnector.java#L43-L65
geomajas/geomajas-project-geometry
core/src/main/java/org/geomajas/geometry/service/GeometryService.java
GeometryService.toLineString
public static Geometry toLineString(Coordinate c1, Coordinate c2) { """ Create a new linestring based on the specified coordinates. @param c1 first coordinate @param c2 second coordinate @return the linestring @since 1.2.0 """ Geometry lineString = new Geometry(Geometry.LINE_STRING, 0, -1); lineStrin...
java
public static Geometry toLineString(Coordinate c1, Coordinate c2) { Geometry lineString = new Geometry(Geometry.LINE_STRING, 0, -1); lineString.setCoordinates(new Coordinate[] { (Coordinate) c1.clone(), (Coordinate) c2.clone() }); return lineString; }
[ "public", "static", "Geometry", "toLineString", "(", "Coordinate", "c1", ",", "Coordinate", "c2", ")", "{", "Geometry", "lineString", "=", "new", "Geometry", "(", "Geometry", ".", "LINE_STRING", ",", "0", ",", "-", "1", ")", ";", "lineString", ".", "setCoo...
Create a new linestring based on the specified coordinates. @param c1 first coordinate @param c2 second coordinate @return the linestring @since 1.2.0
[ "Create", "a", "new", "linestring", "based", "on", "the", "specified", "coordinates", "." ]
train
https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/GeometryService.java#L163-L167
brettonw/Bag
src/main/java/com/brettonw/bag/Bag.java
Bag.getBagObject
public BagObject getBagObject (String key, Supplier<BagObject> notFound) { """ Retrieve a mapped element and return it as a BagObject. @param key A string value used to index the element. @param notFound A function to create a new BagObject if the requested key was not found @return The element as a BagObject...
java
public BagObject getBagObject (String key, Supplier<BagObject> notFound) { Object object = getObject (key); return (object instanceof BagObject) ? (BagObject) object : notFound.get (); }
[ "public", "BagObject", "getBagObject", "(", "String", "key", ",", "Supplier", "<", "BagObject", ">", "notFound", ")", "{", "Object", "object", "=", "getObject", "(", "key", ")", ";", "return", "(", "object", "instanceof", "BagObject", ")", "?", "(", "BagOb...
Retrieve a mapped element and return it as a BagObject. @param key A string value used to index the element. @param notFound A function to create a new BagObject if the requested key was not found @return The element as a BagObject, or notFound if the element is not found.
[ "Retrieve", "a", "mapped", "element", "and", "return", "it", "as", "a", "BagObject", "." ]
train
https://github.com/brettonw/Bag/blob/25c0ff74893b6c9a2c61bf0f97189ab82e0b2f56/src/main/java/com/brettonw/bag/Bag.java#L108-L111
mojohaus/webstart
webstart-jnlp-servlet/src/main/java/jnlp/sample/servlet/Logger.java
Logger.applyPattern
private String applyPattern( String key, Object[] messageArguments ) { """ Helper function that applies the messageArguments to a message from the resource object """ String message = getString( key ); // MessageFormat formatter = new MessageFormat( message ); String output = MessageForm...
java
private String applyPattern( String key, Object[] messageArguments ) { String message = getString( key ); // MessageFormat formatter = new MessageFormat( message ); String output = MessageFormat.format( message, messageArguments ); return output; }
[ "private", "String", "applyPattern", "(", "String", "key", ",", "Object", "[", "]", "messageArguments", ")", "{", "String", "message", "=", "getString", "(", "key", ")", ";", "// MessageFormat formatter = new MessageFormat( message );", "String", "output", "=",...
Helper function that applies the messageArguments to a message from the resource object
[ "Helper", "function", "that", "applies", "the", "messageArguments", "to", "a", "message", "from", "the", "resource", "object" ]
train
https://github.com/mojohaus/webstart/blob/38fdd1d21f063f21716cfcd61ebeabd963487576/webstart-jnlp-servlet/src/main/java/jnlp/sample/servlet/Logger.java#L249-L255
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/joliet/impl/JolietConfig.java
JolietConfig.setUCS2Level
public void setUCS2Level(int level) throws ConfigException { """ Set UCS-2 Level @param level 1, 2 or 3 @throws ConfigException Invalid UCS-2 level @see http://www.nada.kth.se/i18n/ucs/unicode-iso10646-oview.html """ if (level != 1 && level != 2 && level != 3) { throw new ConfigExcep...
java
public void setUCS2Level(int level) throws ConfigException { if (level != 1 && level != 2 && level != 3) { throw new ConfigException(this, "Invalid UCS-2 level: " + level); } this.ucs2_level = level; }
[ "public", "void", "setUCS2Level", "(", "int", "level", ")", "throws", "ConfigException", "{", "if", "(", "level", "!=", "1", "&&", "level", "!=", "2", "&&", "level", "!=", "3", ")", "{", "throw", "new", "ConfigException", "(", "this", ",", "\"Invalid UCS...
Set UCS-2 Level @param level 1, 2 or 3 @throws ConfigException Invalid UCS-2 level @see http://www.nada.kth.se/i18n/ucs/unicode-iso10646-oview.html
[ "Set", "UCS", "-", "2", "Level" ]
train
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/joliet/impl/JolietConfig.java#L64-L69
OpenLiberty/open-liberty
dev/com.ibm.ws.jndi/src/com/ibm/ws/jndi/internal/WSContextFactory.java
WSContextFactory.getInitialContext
@SuppressWarnings( { """ Sanction the implicit cast from Hashtable to Hashtable<String, Object> """ "rawtypes", "unchecked" }) @Override public WSContext getInitialContext(Hashtable env) throws NamingException { return new WSContext(userContext, JNDIServiceBinderHolder.HELPER.root, env); }
java
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public WSContext getInitialContext(Hashtable env) throws NamingException { return new WSContext(userContext, JNDIServiceBinderHolder.HELPER.root, env); }
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "@", "Override", "public", "WSContext", "getInitialContext", "(", "Hashtable", "env", ")", "throws", "NamingException", "{", "return", "new", "WSContext", "(", "userContext", ",", ...
Sanction the implicit cast from Hashtable to Hashtable<String, Object>
[ "Sanction", "the", "implicit", "cast", "from", "Hashtable", "to", "Hashtable<String", "Object", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jndi/src/com/ibm/ws/jndi/internal/WSContextFactory.java#L60-L64
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/SecureClassLoader.java
SecureClassLoader.defineClass
protected final Class<?> defineClass(String name, byte[] b, int off, int len, CodeSource cs) { """ Converts an array of bytes into an instance of class Class, with an optional CodeSource. Before the class can be used it must be res...
java
protected final Class<?> defineClass(String name, byte[] b, int off, int len, CodeSource cs) { return defineClass(name, b, off, len, getProtectionDomain(cs)); }
[ "protected", "final", "Class", "<", "?", ">", "defineClass", "(", "String", "name", ",", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ",", "CodeSource", "cs", ")", "{", "return", "defineClass", "(", "name", ",", "b", ",", "off", ","...
Converts an array of bytes into an instance of class Class, with an optional CodeSource. Before the class can be used it must be resolved. <p> If a non-null CodeSource is supplied a ProtectionDomain is constructed and associated with the class being defined. <p> @param name the expected name of the class, or {@cod...
[ "Converts", "an", "array", "of", "bytes", "into", "an", "instance", "of", "class", "Class", "with", "an", "optional", "CodeSource", ".", "Before", "the", "class", "can", "be", "used", "it", "must", "be", "resolved", ".", "<p", ">", "If", "a", "non", "-...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/SecureClassLoader.java#L138-L143
unbescape/unbescape
src/main/java/org/unbescape/csv/CsvEscape.java
CsvEscape.unescapeCsv
public static void unescapeCsv(final Reader reader, final Writer writer) throws IOException { """ <p> Perform a CSV <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> This method is <strong>thread-safe</strong>. </p> @param reader the...
java
public static void unescapeCsv(final Reader reader, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } CsvEscapeUtil.unescape(reader, writer); }
[ "public", "static", "void", "unescapeCsv", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'writer' c...
<p> Perform a CSV <strong>unescape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> This method is <strong>thread-safe</strong>. </p> @param reader the <tt>Reader</tt> reading the text to be unescaped. @param writer the <tt>java.io.Writer</tt> to which the unescaped result ...
[ "<p", ">", "Perform", "a", "CSV", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", "p", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/csv/CsvEscape.java#L303-L312
OpenTSDB/opentsdb
src/tsd/RpcManager.java
RpcManager.createAndInitialize
@VisibleForTesting protected <T> T createAndInitialize(final String pluginClassName, final Class<T> pluginClass) { """ Helper method to load and initialize a given plugin class. This uses reflection because plugins share no common interfaces. (They could though!) @param pluginClassName the class name of the pl...
java
@VisibleForTesting protected <T> T createAndInitialize(final String pluginClassName, final Class<T> pluginClass) { final T instance = PluginLoader.loadSpecificPlugin(pluginClassName, pluginClass); Preconditions.checkState(instance != null, "Unable to locate %s using name '%s", pluginClass, pluginClass...
[ "@", "VisibleForTesting", "protected", "<", "T", ">", "T", "createAndInitialize", "(", "final", "String", "pluginClassName", ",", "final", "Class", "<", "T", ">", "pluginClass", ")", "{", "final", "T", "instance", "=", "PluginLoader", ".", "loadSpecificPlugin", ...
Helper method to load and initialize a given plugin class. This uses reflection because plugins share no common interfaces. (They could though!) @param pluginClassName the class name of the plugin to load @param pluginClass class of the plugin @return loaded an initialized instance of {@code pluginClass}
[ "Helper", "method", "to", "load", "and", "initialize", "a", "given", "plugin", "class", ".", "This", "uses", "reflection", "because", "plugins", "share", "no", "common", "interfaces", ".", "(", "They", "could", "though!", ")" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/RpcManager.java#L456-L473
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Spliterators.java
Spliterators.checkFromToBounds
private static void checkFromToBounds(int arrayLength, int origin, int fence) { """ Validate inclusive start index and exclusive end index against the length of an array. @param arrayLength The length of the array @param origin The inclusive start index @param fence The exclusive end index @throws ArrayIndexO...
java
private static void checkFromToBounds(int arrayLength, int origin, int fence) { if (origin > fence) { throw new ArrayIndexOutOfBoundsException( "origin(" + origin + ") > fence(" + fence + ")"); } if (origin < 0) { throw new ArrayIndexOutOfBoundsExcepti...
[ "private", "static", "void", "checkFromToBounds", "(", "int", "arrayLength", ",", "int", "origin", ",", "int", "fence", ")", "{", "if", "(", "origin", ">", "fence", ")", "{", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "\"origin(\"", "+", "origin", ...
Validate inclusive start index and exclusive end index against the length of an array. @param arrayLength The length of the array @param origin The inclusive start index @param fence The exclusive end index @throws ArrayIndexOutOfBoundsException if the start index is greater than the end index, if the start index is ne...
[ "Validate", "inclusive", "start", "index", "and", "exclusive", "end", "index", "against", "the", "length", "of", "an", "array", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Spliterators.java#L385-L396
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/v/smoothing/OmsLineSmootherMcMaster.java
OmsLineSmootherMcMaster.defaultSmoothShapefile
public static void defaultSmoothShapefile( String shapePath, String outPath ) throws Exception { """ An utility method to use the module with default values and shapefiles. <p> This will use the windowed average and a density of 0.2, simplification threshold of 0.1 and a lookahead of 13, as well as a length f...
java
public static void defaultSmoothShapefile( String shapePath, String outPath ) throws Exception { PrintStreamProgressMonitor pm = new PrintStreamProgressMonitor(System.out, System.err); SimpleFeatureCollection initialFC = OmsShapefileFeatureReader.readShapefile(shapePath); OmsLineSmootherMcMaste...
[ "public", "static", "void", "defaultSmoothShapefile", "(", "String", "shapePath", ",", "String", "outPath", ")", "throws", "Exception", "{", "PrintStreamProgressMonitor", "pm", "=", "new", "PrintStreamProgressMonitor", "(", "System", ".", "out", ",", "System", ".", ...
An utility method to use the module with default values and shapefiles. <p> This will use the windowed average and a density of 0.2, simplification threshold of 0.1 and a lookahead of 13, as well as a length filter of 10. </p> @param shapePath the input file. @param outPath the output smoothed path. @throws Exception
[ "An", "utility", "method", "to", "use", "the", "module", "with", "default", "values", "and", "shapefiles", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/v/smoothing/OmsLineSmootherMcMaster.java#L245-L262
impossibl/stencil
engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java
StencilOperands.lessThanOrEqual
public boolean lessThanOrEqual(Object left, Object right) { """ Test if left <= right. @param left first value @param right second value @return test result. """ if (left == right) { return true; } else if (left == null || right == null) { return false; } else { ret...
java
public boolean lessThanOrEqual(Object left, Object right) { if (left == right) { return true; } else if (left == null || right == null) { return false; } else { return compare(left, right, "<=") <= 0; } }
[ "public", "boolean", "lessThanOrEqual", "(", "Object", "left", ",", "Object", "right", ")", "{", "if", "(", "left", "==", "right", ")", "{", "return", "true", ";", "}", "else", "if", "(", "left", "==", "null", "||", "right", "==", "null", ")", "{", ...
Test if left <= right. @param left first value @param right second value @return test result.
[ "Test", "if", "left", "<", "=", "right", "." ]
train
https://github.com/impossibl/stencil/blob/4aac1be605542b4248be95bf8916be4e2f755d1c/engine/src/main/java/com/impossibl/stencil/engine/internal/StencilOperands.java#L851-L861
cdk/cdk
tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java
MmffAtomTypeMatcher.symbolicTypes
String[] symbolicTypes(final IAtomContainer container, final int[][] graph, final EdgeToBondMap bonds, final Set<IBond> mmffArom) { """ Obtain the MMFF symbolic types to the atoms of the provided structure. @param container structure representation @param graph adj list data structure @param bonds bon...
java
String[] symbolicTypes(final IAtomContainer container, final int[][] graph, final EdgeToBondMap bonds, final Set<IBond> mmffArom) { // Array of symbolic types, MMFF refers to these as 'SYMB' and the numeric // value a s 'TYPE'. final String[] symbs = new String[container.getAtomCount()]; ...
[ "String", "[", "]", "symbolicTypes", "(", "final", "IAtomContainer", "container", ",", "final", "int", "[", "]", "[", "]", "graph", ",", "final", "EdgeToBondMap", "bonds", ",", "final", "Set", "<", "IBond", ">", "mmffArom", ")", "{", "// Array of symbolic ty...
Obtain the MMFF symbolic types to the atoms of the provided structure. @param container structure representation @param graph adj list data structure @param bonds bond lookup map @param mmffArom flags which bonds are aromatic by MMFF model @return MMFF symbolic types for each atom index
[ "Obtain", "the", "MMFF", "symbolic", "types", "to", "the", "atoms", "of", "the", "provided", "structure", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/forcefield/src/main/java/org/openscience/cdk/forcefield/mmff/MmffAtomTypeMatcher.java#L117-L139
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/SparkLine.java
SparkLine.cubicInterpolate
private double cubicInterpolate(final double Y0, final double Y1, final double Y2, final double Y3, final double MU) { """ Returns the value smoothed by a cubic spline interpolation function @param Y0 @param Y1 @param Y2 @param Y3 @param MU @return the value smoothed by a cubic spline interpolation function ...
java
private double cubicInterpolate(final double Y0, final double Y1, final double Y2, final double Y3, final double MU) { final double A0; final double A1; final double A2; final double A3; final double MU2; MU2 = MU * MU; A0 = Y3 - Y2 - Y0 + Y1; A1 = Y0 - Y...
[ "private", "double", "cubicInterpolate", "(", "final", "double", "Y0", ",", "final", "double", "Y1", ",", "final", "double", "Y2", ",", "final", "double", "Y3", ",", "final", "double", "MU", ")", "{", "final", "double", "A0", ";", "final", "double", "A1"...
Returns the value smoothed by a cubic spline interpolation function @param Y0 @param Y1 @param Y2 @param Y3 @param MU @return the value smoothed by a cubic spline interpolation function
[ "Returns", "the", "value", "smoothed", "by", "a", "cubic", "spline", "interpolation", "function" ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/SparkLine.java#L1085-L1099
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java
GrammaticalRelation.toPrettyString
private void toPrettyString(int indentLevel, StringBuilder buf) { """ Returns a <code>String</code> representation of this <code>GrammaticalRelation</code> and the hierarchy below it, with one node per line, indented according to <code>indentLevel</code>. @param indentLevel how many levels to indent (0 for r...
java
private void toPrettyString(int indentLevel, StringBuilder buf) { for (int i = 0; i < indentLevel; i++) { buf.append(" "); } buf.append(shortName).append(": ").append(targetPatterns); for (GrammaticalRelation child : children) { buf.append('\n'); child.toPrettyString(indentLeve...
[ "private", "void", "toPrettyString", "(", "int", "indentLevel", ",", "StringBuilder", "buf", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "indentLevel", ";", "i", "++", ")", "{", "buf", ".", "append", "(", "\" \"", ")", ";", "}", "bu...
Returns a <code>String</code> representation of this <code>GrammaticalRelation</code> and the hierarchy below it, with one node per line, indented according to <code>indentLevel</code>. @param indentLevel how many levels to indent (0 for root node)
[ "Returns", "a", "<code", ">", "String<", "/", "code", ">", "representation", "of", "this", "<code", ">", "GrammaticalRelation<", "/", "code", ">", "and", "the", "hierarchy", "below", "it", "with", "one", "node", "per", "line", "indented", "according", "to", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java#L420-L429
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/debug/DebugHelper.java
DebugHelper.debugImage
public static void debugImage(PdfContentByte canvas, Image img, Color bordercolor, String styleClass, String extraInfo, EnhancedMap settings, LayerManager layerAware, VectorPrintDocument document) { """ When in debugging mode, adds a border to the image and calls {@link VectorPrintDocument#addHook(com.vectorprint....
java
public static void debugImage(PdfContentByte canvas, Image img, Color bordercolor, String styleClass, String extraInfo, EnhancedMap settings, LayerManager layerAware, VectorPrintDocument document) { if (null != img) { img.setBorder(Rectangle.BOX); img.setBorderWidth(0.3f); img.setBorder...
[ "public", "static", "void", "debugImage", "(", "PdfContentByte", "canvas", ",", "Image", "img", ",", "Color", "bordercolor", ",", "String", "styleClass", ",", "String", "extraInfo", ",", "EnhancedMap", "settings", ",", "LayerManager", "layerAware", ",", "VectorPri...
When in debugging mode, adds a border to the image and calls {@link VectorPrintDocument#addHook(com.vectorprint.report.itext.VectorPrintDocument.AddElementHook) } to be able to print debugging info and link for the image @param canvas @param img @param bordercolor @param styleClass @param extraInfo @param settings @pa...
[ "When", "in", "debugging", "mode", "adds", "a", "border", "to", "the", "image", "and", "calls", "{", "@link", "VectorPrintDocument#addHook", "(", "com", ".", "vectorprint", ".", "report", ".", "itext", ".", "VectorPrintDocument", ".", "AddElementHook", ")", "}...
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/debug/DebugHelper.java#L111-L123
j256/ormlite-core
src/main/java/com/j256/ormlite/support/BaseConnectionSource.java
BaseConnectionSource.isSingleConnection
protected boolean isSingleConnection(DatabaseConnection conn1, DatabaseConnection conn2) throws SQLException { """ Return true if the two connections seem to one one connection under the covers. """ // initialize the connections auto-commit flags conn1.setAutoCommit(true); conn2.setAutoCommit(true); tr...
java
protected boolean isSingleConnection(DatabaseConnection conn1, DatabaseConnection conn2) throws SQLException { // initialize the connections auto-commit flags conn1.setAutoCommit(true); conn2.setAutoCommit(true); try { // change conn1's auto-commit to be false conn1.setAutoCommit(false); if (conn2.isAu...
[ "protected", "boolean", "isSingleConnection", "(", "DatabaseConnection", "conn1", ",", "DatabaseConnection", "conn2", ")", "throws", "SQLException", "{", "// initialize the connections auto-commit flags", "conn1", ".", "setAutoCommit", "(", "true", ")", ";", "conn2", ".",...
Return true if the two connections seem to one one connection under the covers.
[ "Return", "true", "if", "the", "two", "connections", "seem", "to", "one", "one", "connection", "under", "the", "covers", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/support/BaseConnectionSource.java#L103-L121
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getTorsionAngle
public double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d) { """ Calculates the torsionAngle of a-b-c-d. @param a Point3d @param b Point3d @param c Point3d @param d Point3d @return The torsionAngle value """ Vector3d ab = new Vector3d(a.x - b.x, a.y - b.y, a.z - b.z); ...
java
public double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d) { Vector3d ab = new Vector3d(a.x - b.x, a.y - b.y, a.z - b.z); Vector3d cb = new Vector3d(c.x - b.x, c.y - b.y, c.z - b.z); Vector3d dc = new Vector3d(d.x - c.x, d.y - c.y, d.z - c.z); Vector3d bc = new Vector3d(b....
[ "public", "double", "getTorsionAngle", "(", "Point3d", "a", ",", "Point3d", "b", ",", "Point3d", "c", ",", "Point3d", "d", ")", "{", "Vector3d", "ab", "=", "new", "Vector3d", "(", "a", ".", "x", "-", "b", ".", "x", ",", "a", ".", "y", "-", "b", ...
Calculates the torsionAngle of a-b-c-d. @param a Point3d @param b Point3d @param c Point3d @param d Point3d @return The torsionAngle value
[ "Calculates", "the", "torsionAngle", "of", "a", "-", "b", "-", "c", "-", "d", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L787-L806
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYBarChartBuilder.java
DJXYBarChartBuilder.addSerie
public DJXYBarChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) { """ Adds the specified serie column to the dataset with custom label. @param column the serie column """ getDataset().addSerie(column, labelExpression); return this; }
java
public DJXYBarChartBuilder addSerie(AbstractColumn column, StringExpression labelExpression) { getDataset().addSerie(column, labelExpression); return this; }
[ "public", "DJXYBarChartBuilder", "addSerie", "(", "AbstractColumn", "column", ",", "StringExpression", "labelExpression", ")", "{", "getDataset", "(", ")", ".", "addSerie", "(", "column", ",", "labelExpression", ")", ";", "return", "this", ";", "}" ]
Adds the specified serie column to the dataset with custom label. @param column the serie column
[ "Adds", "the", "specified", "serie", "column", "to", "the", "dataset", "with", "custom", "label", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYBarChartBuilder.java#L384-L387
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/lsh/RandomProjectionLSH.java
RandomProjectionLSH.entropy
public INDArray entropy(INDArray data) { """ This picks uniformaly distributed random points on the unit of a sphere using the method of: An efficient method for generating uniformly distributed points on the surface of an n-dimensional sphere JS Hicks, RF Wheeling - Communications of the ACM, 1959 @param dat...
java
public INDArray entropy(INDArray data){ INDArray data2 = Nd4j.getExecutioner().exec(new GaussianDistribution(Nd4j.create(numTables, inDimension), radius)); INDArray norms = Nd4j.norm2(data2.dup(), -1); Preconditions.checkState(norms.rank() == 1 && norms.size(0) == numTable...
[ "public", "INDArray", "entropy", "(", "INDArray", "data", ")", "{", "INDArray", "data2", "=", "Nd4j", ".", "getExecutioner", "(", ")", ".", "exec", "(", "new", "GaussianDistribution", "(", "Nd4j", ".", "create", "(", "numTables", ",", "inDimension", ")", "...
This picks uniformaly distributed random points on the unit of a sphere using the method of: An efficient method for generating uniformly distributed points on the surface of an n-dimensional sphere JS Hicks, RF Wheeling - Communications of the ACM, 1959 @param data a query to generate multiple probes for @return `num...
[ "This", "picks", "uniformaly", "distributed", "random", "points", "on", "the", "unit", "of", "a", "sphere", "using", "the", "method", "of", ":" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/lsh/RandomProjectionLSH.java#L122-L134
reactor/reactor-netty
src/main/java/reactor/netty/ByteBufFlux.java
ByteBufFlux.fromPath
public static ByteBufFlux fromPath(Path path, ByteBufAllocator allocator) { """ Open a {@link java.nio.channels.FileChannel} from a path and stream {@link ByteBuf} chunks with a default maximum size of 500K into the returned {@link ByteBufFlux}, using the provided {@link ByteBufAllocator}. @param path the pat...
java
public static ByteBufFlux fromPath(Path path, ByteBufAllocator allocator) { return fromPath(path, MAX_CHUNK_SIZE, allocator); }
[ "public", "static", "ByteBufFlux", "fromPath", "(", "Path", "path", ",", "ByteBufAllocator", "allocator", ")", "{", "return", "fromPath", "(", "path", ",", "MAX_CHUNK_SIZE", ",", "allocator", ")", ";", "}" ]
Open a {@link java.nio.channels.FileChannel} from a path and stream {@link ByteBuf} chunks with a default maximum size of 500K into the returned {@link ByteBufFlux}, using the provided {@link ByteBufAllocator}. @param path the path to the resource to stream @param allocator the channel {@link ByteBufAllocator} @retur...
[ "Open", "a", "{", "@link", "java", ".", "nio", ".", "channels", ".", "FileChannel", "}", "from", "a", "path", "and", "stream", "{", "@link", "ByteBuf", "}", "chunks", "with", "a", "default", "maximum", "size", "of", "500K", "into", "the", "returned", "...
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/ByteBufFlux.java#L133-L135
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseDoWhileStatement
private Stmt parseDoWhileStatement(EnclosingScope scope) { """ Parse a do-while statement, which has the form: <pre> DoWhileStmt ::= "do" ':' NewLine Block "where" Expr ("where" Expr)* </pre> @see wyc.lang.Stmt.DoWhile @param scope The enclosing scope for this statement, which determines the set of vi...
java
private Stmt parseDoWhileStatement(EnclosingScope scope) { int start = index; match(Do); match(Colon); int end = index; matchEndLine(); // match the block Stmt.Block blk = parseBlock(scope, true); // match while and condition match(While); Expr condition = parseLogicalExpression(scope, false); // ...
[ "private", "Stmt", "parseDoWhileStatement", "(", "EnclosingScope", "scope", ")", "{", "int", "start", "=", "index", ";", "match", "(", "Do", ")", ";", "match", "(", "Colon", ")", ";", "int", "end", "=", "index", ";", "matchEndLine", "(", ")", ";", "// ...
Parse a do-while statement, which has the form: <pre> DoWhileStmt ::= "do" ':' NewLine Block "where" Expr ("where" Expr)* </pre> @see wyc.lang.Stmt.DoWhile @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also the current indentation level. @retur...
[ "Parse", "a", "do", "-", "while", "statement", "which", "has", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1064-L1079
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/util/MD5FileUtils.java
MD5FileUtils.saveMD5File
public static void saveMD5File(File dataFile, MD5Hash digest) throws IOException { """ Save the ".md5" file that lists the md5sum of another file. @param dataFile the original file whose md5 was computed @param digest the computed digest @throws IOException """ File md5File = getDigestFileForFile(...
java
public static void saveMD5File(File dataFile, MD5Hash digest) throws IOException { File md5File = getDigestFileForFile(dataFile); String digestString = StringUtils.byteToHexString( digest.getDigest()); String md5Line = digestString + " *" + dataFile.getName() + "\n"; AtomicFileOutputS...
[ "public", "static", "void", "saveMD5File", "(", "File", "dataFile", ",", "MD5Hash", "digest", ")", "throws", "IOException", "{", "File", "md5File", "=", "getDigestFileForFile", "(", "dataFile", ")", ";", "String", "digestString", "=", "StringUtils", ".", "byteTo...
Save the ".md5" file that lists the md5sum of another file. @param dataFile the original file whose md5 was computed @param digest the computed digest @throws IOException
[ "Save", "the", ".", "md5", "file", "that", "lists", "the", "md5sum", "of", "another", "file", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/util/MD5FileUtils.java#L133-L144
craftercms/commons
utilities/src/main/java/org/craftercms/commons/http/HttpUtils.java
HttpUtils.getCookieValue
public static String getCookieValue(String name, HttpServletRequest request) { """ Returns the cookie value with the given name for the given request @param name the name of the cookie @param request the request where to extract the request from @return the cookie value, or null if no cookie found ...
java
public static String getCookieValue(String name, HttpServletRequest request) { Cookie cookie = getCookie(name, request); if (cookie != null) { return cookie.getValue(); } else { return null; } }
[ "public", "static", "String", "getCookieValue", "(", "String", "name", ",", "HttpServletRequest", "request", ")", "{", "Cookie", "cookie", "=", "getCookie", "(", "name", ",", "request", ")", ";", "if", "(", "cookie", "!=", "null", ")", "{", "return", "cook...
Returns the cookie value with the given name for the given request @param name the name of the cookie @param request the request where to extract the request from @return the cookie value, or null if no cookie found
[ "Returns", "the", "cookie", "value", "with", "the", "given", "name", "for", "the", "given", "request" ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/http/HttpUtils.java#L169-L176
EdwardRaff/JSAT
JSAT/src/jsat/io/LIBSVMLoader.java
LIBSVMLoader.loadR
public static RegressionDataSet loadR(Reader reader, double sparseRatio, int vectorLength) throws IOException { """ Loads a new regression data set from a LIBSVM file, assuming the label is a numeric target value to predict. @param reader the reader for the file to load @param sparseRatio the fraction of non ...
java
public static RegressionDataSet loadR(Reader reader, double sparseRatio, int vectorLength) throws IOException { return loadR(reader, sparseRatio, vectorLength, DataStore.DEFAULT_STORE); }
[ "public", "static", "RegressionDataSet", "loadR", "(", "Reader", "reader", ",", "double", "sparseRatio", ",", "int", "vectorLength", ")", "throws", "IOException", "{", "return", "loadR", "(", "reader", ",", "sparseRatio", ",", "vectorLength", ",", "DataStore", "...
Loads a new regression data set from a LIBSVM file, assuming the label is a numeric target value to predict. @param reader the reader for the file to load @param sparseRatio the fraction of non zero values to qualify a data point as sparse @param vectorLength the pre-determined length of each vector. If given a negati...
[ "Loads", "a", "new", "regression", "data", "set", "from", "a", "LIBSVM", "file", "assuming", "the", "label", "is", "a", "numeric", "target", "value", "to", "predict", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/io/LIBSVMLoader.java#L131-L134
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
AbstractDatabaseEngine.addEntity
private void addEntity(DbEntity entity, boolean recovering) throws DatabaseEngineException { """ Adds an entity to the engine. It will create tables and everything necessary so persistence can work. @param entity The entity to add. @param recovering True if entities are being add due to recovery. @throws ...
java
private void addEntity(DbEntity entity, boolean recovering) throws DatabaseEngineException { if (!recovering) { try { getConnection(); } catch (final Exception e) { throw new DatabaseEngineException("Could not add entity", e); } va...
[ "private", "void", "addEntity", "(", "DbEntity", "entity", ",", "boolean", "recovering", ")", "throws", "DatabaseEngineException", "{", "if", "(", "!", "recovering", ")", "{", "try", "{", "getConnection", "(", ")", ";", "}", "catch", "(", "final", "Exception...
Adds an entity to the engine. It will create tables and everything necessary so persistence can work. @param entity The entity to add. @param recovering True if entities are being add due to recovery. @throws DatabaseEngineException If something goes wrong while creating the structures.
[ "Adds", "an", "entity", "to", "the", "engine", ".", "It", "will", "create", "tables", "and", "everything", "necessary", "so", "persistence", "can", "work", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java#L520-L548
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java
AbstractRegionPainter.desaturate
protected Color desaturate(Color color) { """ Returns a new color with the saturation cut to one third the original, and the brightness moved one third closer to white. @param color the original color. @return the new color. """ float[] tmp = Color.RGBtoHSB(color.getRed(), color.getGreen(), col...
java
protected Color desaturate(Color color) { float[] tmp = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); tmp[1] /= 3.0f; tmp[2] = clamp(1.0f - (1.0f - tmp[2]) / 3f); return new Color((Color.HSBtoRGB(tmp[0], tmp[1], tmp[2]) & 0xFFFFFF)); }
[ "protected", "Color", "desaturate", "(", "Color", "color", ")", "{", "float", "[", "]", "tmp", "=", "Color", ".", "RGBtoHSB", "(", "color", ".", "getRed", "(", ")", ",", "color", ".", "getGreen", "(", ")", ",", "color", ".", "getBlue", "(", ")", ",...
Returns a new color with the saturation cut to one third the original, and the brightness moved one third closer to white. @param color the original color. @return the new color.
[ "Returns", "a", "new", "color", "with", "the", "saturation", "cut", "to", "one", "third", "the", "original", "and", "the", "brightness", "moved", "one", "third", "closer", "to", "white", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/AbstractRegionPainter.java#L542-L549
simbiose/Encryption
Encryption/main/se/simbio/encryption/Encryption.java
Encryption.decryptAsync
public void decryptAsync(final String data, final Callback callback) { """ This is a sugar method that calls decrypt method in background, it is a good idea to use this one instead the default method because decryption can take several time and with this method the process occurs in a AsyncTask, other advantage ...
java
public void decryptAsync(final String data, final Callback callback) { if (callback == null) return; new Thread(new Runnable() { @Override public void run() { try { String decrypt = decrypt(data); if (decrypt == null) { ...
[ "public", "void", "decryptAsync", "(", "final", "String", "data", ",", "final", "Callback", "callback", ")", "{", "if", "(", "callback", "==", "null", ")", "return", ";", "new", "Thread", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", ...
This is a sugar method that calls decrypt method in background, it is a good idea to use this one instead the default method because decryption can take several time and with this method the process occurs in a AsyncTask, other advantage is the Callback with separated methods, one for success and other for the exceptio...
[ "This", "is", "a", "sugar", "method", "that", "calls", "decrypt", "method", "in", "background", "it", "is", "a", "good", "idea", "to", "use", "this", "one", "instead", "the", "default", "method", "because", "decryption", "can", "take", "several", "time", "...
train
https://github.com/simbiose/Encryption/blob/a344761a10add131cbe9962f895b416e5217d0e9/Encryption/main/se/simbio/encryption/Encryption.java#L209-L225
xiancloud/xian
xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java
UnitResponse.createException
public static UnitResponse createException(Throwable e, String errMsg) { """ Please pass an exception object to this method, and it returns a newly created response object with error code {@link Group#CODE_EXCEPTION} and the exception object as the data. @param e the exception object. @param errMsg the e...
java
public static UnitResponse createException(Throwable e, String errMsg) { return UnitResponse.createException(e).setMessage(errMsg); }
[ "public", "static", "UnitResponse", "createException", "(", "Throwable", "e", ",", "String", "errMsg", ")", "{", "return", "UnitResponse", ".", "createException", "(", "e", ")", ".", "setMessage", "(", "errMsg", ")", ";", "}" ]
Please pass an exception object to this method, and it returns a newly created response object with error code {@link Group#CODE_EXCEPTION} and the exception object as the data. @param e the exception object. @param errMsg the error message that you want to add.
[ "Please", "pass", "an", "exception", "object", "to", "this", "method", "and", "it", "returns", "a", "newly", "created", "response", "object", "with", "error", "code", "{", "@link", "Group#CODE_EXCEPTION", "}", "and", "the", "exception", "object", "as", "the", ...
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-core/src/main/java/info/xiancloud/core/message/UnitResponse.java#L128-L130
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatednasha/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednasha.java
ApiOvhDedicatednasha.serviceName_partition_partitionName_use_GET
public OvhUnitAndValue<Double> serviceName_partition_partitionName_use_GET(String serviceName, String partitionName, OvhPartitionUsageTypeEnum type) throws IOException { """ Return statistics about the partition REST: GET /dedicated/nasha/{serviceName}/partition/{partitionName}/use @param type [required] The t...
java
public OvhUnitAndValue<Double> serviceName_partition_partitionName_use_GET(String serviceName, String partitionName, OvhPartitionUsageTypeEnum type) throws IOException { String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/use"; StringBuilder sb = path(qPath, serviceName, partitionName); query...
[ "public", "OvhUnitAndValue", "<", "Double", ">", "serviceName_partition_partitionName_use_GET", "(", "String", "serviceName", ",", "String", "partitionName", ",", "OvhPartitionUsageTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated...
Return statistics about the partition REST: GET /dedicated/nasha/{serviceName}/partition/{partitionName}/use @param type [required] The type of statistic to be fetched @param serviceName [required] The internal name of your storage @param partitionName [required] the given name of partition
[ "Return", "statistics", "about", "the", "partition" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatednasha/src/main/java/net/minidev/ovh/api/ApiOvhDedicatednasha.java#L358-L364
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java
PrepareRequestInterceptor.prepareQBOPremierUri
private <T extends IEntity> String prepareQBOPremierUri(String entityName, Context context, Map<String, String> requestParameters) throws FMSException { """ Method to construct the OLB QBO URI @param entityName the entity name @param context the context @param requestParameters the request params @ret...
java
private <T extends IEntity> String prepareQBOPremierUri(String entityName, Context context, Map<String, String> requestParameters) throws FMSException { StringBuilder uri = new StringBuilder(); // constructs request URI uri.append(Config.getProperty("BASE_URL_QBO_OLB")).append("/").append(context.getRealmID(...
[ "private", "<", "T", "extends", "IEntity", ">", "String", "prepareQBOPremierUri", "(", "String", "entityName", ",", "Context", "context", ",", "Map", "<", "String", ",", "String", ">", "requestParameters", ")", "throws", "FMSException", "{", "StringBuilder", "ur...
Method to construct the OLB QBO URI @param entityName the entity name @param context the context @param requestParameters the request params @return the QBO URI @throws FMSException the FMSException
[ "Method", "to", "construct", "the", "OLB", "QBO", "URI" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L373-L398
gresrun/jesque
src/main/java/net/greghaines/jesque/worker/MapBasedJobFactory.java
MapBasedJobFactory.addJobType
public void addJobType(final String jobName, final Class<?> jobType) { """ Allow the given job type to be executed. @param jobName the job name as seen @param jobType the job type to allow """ checkJobType(jobName, jobType); this.jobTypes.put(jobName, jobType); }
java
public void addJobType(final String jobName, final Class<?> jobType) { checkJobType(jobName, jobType); this.jobTypes.put(jobName, jobType); }
[ "public", "void", "addJobType", "(", "final", "String", "jobName", ",", "final", "Class", "<", "?", ">", "jobType", ")", "{", "checkJobType", "(", "jobName", ",", "jobType", ")", ";", "this", ".", "jobTypes", ".", "put", "(", "jobName", ",", "jobType", ...
Allow the given job type to be executed. @param jobName the job name as seen @param jobType the job type to allow
[ "Allow", "the", "given", "job", "type", "to", "be", "executed", "." ]
train
https://github.com/gresrun/jesque/blob/44749183dccc40962a94c2af547ea7d0d880b5d1/src/main/java/net/greghaines/jesque/worker/MapBasedJobFactory.java#L65-L68
landawn/AbacusUtil
src/com/landawn/abacus/http/okhttp/OkHttpRequest.java
OkHttpRequest.addHeader
public OkHttpRequest addHeader(String name, String value) { """ Adds a header with {@code name} and {@code value}. Prefer this method for multiply-valued headers like "Cookie". <p>Note that for some headers including {@code Content-Length} and {@code Content-Encoding}, OkHttp may replace {@code value} with a ...
java
public OkHttpRequest addHeader(String name, String value) { builder.addHeader(name, value); return this; }
[ "public", "OkHttpRequest", "addHeader", "(", "String", "name", ",", "String", "value", ")", "{", "builder", ".", "addHeader", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a header with {@code name} and {@code value}. Prefer this method for multiply-valued headers like "Cookie". <p>Note that for some headers including {@code Content-Length} and {@code Content-Encoding}, OkHttp may replace {@code value} with a header derived from the request body.
[ "Adds", "a", "header", "with", "{", "@code", "name", "}", "and", "{", "@code", "value", "}", ".", "Prefer", "this", "method", "for", "multiply", "-", "valued", "headers", "like", "Cookie", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/http/okhttp/OkHttpRequest.java#L178-L181
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java
LayerMap.getContainer
public Element getContainer(PlotItem item, VisualizationTask task) { """ Get the container element referenced by a item/key combination. @param item Plot item @param task Visualization task @return Container element """ Pair<Element, Visualization> pair = map.get(key(item, task)); return pair == n...
java
public Element getContainer(PlotItem item, VisualizationTask task) { Pair<Element, Visualization> pair = map.get(key(item, task)); return pair == null ? null : pair.first; }
[ "public", "Element", "getContainer", "(", "PlotItem", "item", ",", "VisualizationTask", "task", ")", "{", "Pair", "<", "Element", ",", "Visualization", ">", "pair", "=", "map", ".", "get", "(", "key", "(", "item", ",", "task", ")", ")", ";", "return", ...
Get the container element referenced by a item/key combination. @param item Plot item @param task Visualization task @return Container element
[ "Get", "the", "container", "element", "referenced", "by", "a", "item", "/", "key", "combination", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/LayerMap.java#L88-L91
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/FastaAFPChainConverter.java
FastaAFPChainConverter.cpFastaToAfpChain
public static AFPChain cpFastaToAfpChain(File fastaFile, Structure structure, int cpSite) throws IOException, StructureException { """ Takes a structure and sequence corresponding to an alignment between a structure or sequence and itself (or even a structure with a sequence), where the result has a circular permu...
java
public static AFPChain cpFastaToAfpChain(File fastaFile, Structure structure, int cpSite) throws IOException, StructureException { InputStream inStream = new FileInputStream(fastaFile); SequenceCreatorInterface<AminoAcidCompound> creator = new CasePreservingProteinSequenceCreator(AminoAcidCompoundSet.getAminoAcidCo...
[ "public", "static", "AFPChain", "cpFastaToAfpChain", "(", "File", "fastaFile", ",", "Structure", "structure", ",", "int", "cpSite", ")", "throws", "IOException", ",", "StructureException", "{", "InputStream", "inStream", "=", "new", "FileInputStream", "(", "fastaFil...
Takes a structure and sequence corresponding to an alignment between a structure or sequence and itself (or even a structure with a sequence), where the result has a circular permutation site {@link cpSite} residues to the right. @param fastaFile A FASTA file containing exactly 2 sequences, the first unpermuted and th...
[ "Takes", "a", "structure", "and", "sequence", "corresponding", "to", "an", "alignment", "between", "a", "structure", "or", "sequence", "and", "itself", "(", "or", "even", "a", "structure", "with", "a", "sequence", ")", "where", "the", "result", "has", "a", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/FastaAFPChainConverter.java#L85-L96
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVConfig.java
CSVConfig.getCredentials
public Credentials getCredentials() { """ Return a Credentials object if either tenant or user is set (or both). If neither is set, null is returned. @return Credentials to use with Client or null if there are no credentials to set. """ if (!Utils.isEmpty(tenant) || !Utils.isEmpty(user)) { ...
java
public Credentials getCredentials() { if (!Utils.isEmpty(tenant) || !Utils.isEmpty(user)) { return new Credentials(tenant, user, password); } return null; }
[ "public", "Credentials", "getCredentials", "(", ")", "{", "if", "(", "!", "Utils", ".", "isEmpty", "(", "tenant", ")", "||", "!", "Utils", ".", "isEmpty", "(", "user", ")", ")", "{", "return", "new", "Credentials", "(", "tenant", ",", "user", ",", "p...
Return a Credentials object if either tenant or user is set (or both). If neither is set, null is returned. @return Credentials to use with Client or null if there are no credentials to set.
[ "Return", "a", "Credentials", "object", "if", "either", "tenant", "or", "user", "is", "set", "(", "or", "both", ")", ".", "If", "neither", "is", "set", "null", "is", "returned", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVConfig.java#L122-L127
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.getStats
public ExpressRouteCircuitStatsInner getStats(String resourceGroupName, String circuitName) { """ Gets all the stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @throws IllegalArgumentExce...
java
public ExpressRouteCircuitStatsInner getStats(String resourceGroupName, String circuitName) { return getStatsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); }
[ "public", "ExpressRouteCircuitStatsInner", "getStats", "(", "String", "resourceGroupName", ",", "String", "circuitName", ")", "{", "return", "getStatsWithServiceResponseAsync", "(", "resourceGroupName", ",", "circuitName", ")", ".", "toBlocking", "(", ")", ".", "single"...
Gets all the stats from an express route circuit in a resource group. @param resourceGroupName The name of the resource group. @param circuitName The name of the express route circuit. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by ...
[ "Gets", "all", "the", "stats", "from", "an", "express", "route", "circuit", "in", "a", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L1416-L1418
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java
JsonModelCoder.get
public T get(String json, OnJsonObjectAddListener listener) throws IOException, JsonFormatException { """ Attempts to parse the given data as an object.<br> Accepts {@link OnJsonObjectAddListener}; allows you to peek various intermittent instances as parsing goes. @param json JSON-formatted data @param lis...
java
public T get(String json, OnJsonObjectAddListener listener) throws IOException, JsonFormatException { JsonPullParser parser = JsonPullParser.newParser(json); return get(parser); }
[ "public", "T", "get", "(", "String", "json", ",", "OnJsonObjectAddListener", "listener", ")", "throws", "IOException", ",", "JsonFormatException", "{", "JsonPullParser", "parser", "=", "JsonPullParser", ".", "newParser", "(", "json", ")", ";", "return", "get", "...
Attempts to parse the given data as an object.<br> Accepts {@link OnJsonObjectAddListener}; allows you to peek various intermittent instances as parsing goes. @param json JSON-formatted data @param listener {@link OnJsonObjectAddListener} to notify @return An object instance @throws IOException @throws JsonFormatExcep...
[ "Attempts", "to", "parse", "the", "given", "data", "as", "an", "object", ".", "<br", ">", "Accepts", "{", "@link", "OnJsonObjectAddListener", "}", ";", "allows", "you", "to", "peek", "various", "intermittent", "instances", "as", "parsing", "goes", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L172-L176
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.downto
public static void downto(Temporal from, Temporal to, TemporalUnit unit, Closure closure) { """ Iterates from this to the {@code to} {@link java.time.temporal.Temporal}, inclusive, decrementing by one {@code unit} each iteration, calling the closure once per iteration. The closure may accept a single {@link java...
java
public static void downto(Temporal from, Temporal to, TemporalUnit unit, Closure closure) { if (isDowntoEligible(from, to)) { for (Temporal i = from; isDowntoEligible(i, to); i = i.minus(1, unit)) { closure.call(i); } } else { throw new GroovyRuntimeEx...
[ "public", "static", "void", "downto", "(", "Temporal", "from", ",", "Temporal", "to", ",", "TemporalUnit", "unit", ",", "Closure", "closure", ")", "{", "if", "(", "isDowntoEligible", "(", "from", ",", "to", ")", ")", "{", "for", "(", "Temporal", "i", "...
Iterates from this to the {@code to} {@link java.time.temporal.Temporal}, inclusive, decrementing by one {@code unit} each iteration, calling the closure once per iteration. The closure may accept a single {@link java.time.temporal.Temporal} argument. <p> If the unit is too large to iterate to the second Temporal exact...
[ "Iterates", "from", "this", "to", "the", "{", "@code", "to", "}", "{", "@link", "java", ".", "time", ".", "temporal", ".", "Temporal", "}", "inclusive", "decrementing", "by", "one", "{", "@code", "unit", "}", "each", "iteration", "calling", "the", "closu...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L223-L232
google/closure-templates
java/src/com/google/template/soy/jbcsrc/restricted/SoyExpression.java
SoyExpression.unboxAsList
public SoyExpression unboxAsList() { """ Unboxes this to a {@link SoyExpression} with a List runtime type. <p>This method is appropriate when you know (likely via inspection of the {@link #soyType()}, or other means) that the value does have the appropriate type but you prefer to interact with it as its unbox...
java
public SoyExpression unboxAsList() { if (alreadyUnboxed(List.class)) { return this; } assertBoxed(List.class); Expression unboxedList; if (delegate.isNonNullable()) { unboxedList = delegate.checkedCast(SOY_LIST_TYPE).invoke(MethodRef.SOY_LIST_AS_JAVA_LIST); } else { unboxedLis...
[ "public", "SoyExpression", "unboxAsList", "(", ")", "{", "if", "(", "alreadyUnboxed", "(", "List", ".", "class", ")", ")", "{", "return", "this", ";", "}", "assertBoxed", "(", "List", ".", "class", ")", ";", "Expression", "unboxedList", ";", "if", "(", ...
Unboxes this to a {@link SoyExpression} with a List runtime type. <p>This method is appropriate when you know (likely via inspection of the {@link #soyType()}, or other means) that the value does have the appropriate type but you prefer to interact with it as its unboxed representation.
[ "Unboxes", "this", "to", "a", "{", "@link", "SoyExpression", "}", "with", "a", "List", "runtime", "type", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/restricted/SoyExpression.java#L515-L553
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XCARespondingGatewayAuditor.java
XCARespondingGatewayAuditor.auditCrossGatewayRetrieveEvent
public void auditCrossGatewayRetrieveEvent( RFC3881EventOutcomeCodes eventOutcome, String initiatingGatewayUserId, String initiatingGatewayIpAddress, String respondingGatewayEndpointUri, String initiatingGatewayUserName, String[] documentUniqueIds, String[] repositoryUniqueIds, String homeCommun...
java
public void auditCrossGatewayRetrieveEvent( RFC3881EventOutcomeCodes eventOutcome, String initiatingGatewayUserId, String initiatingGatewayIpAddress, String respondingGatewayEndpointUri, String initiatingGatewayUserName, String[] documentUniqueIds, String[] repositoryUniqueIds, String homeCommun...
[ "public", "void", "auditCrossGatewayRetrieveEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "initiatingGatewayUserId", ",", "String", "initiatingGatewayIpAddress", ",", "String", "respondingGatewayEndpointUri", ",", "String", "initiatingGatewayUserName", "...
Audits an ITI-39 Cross Gateway Retrieve event for XCA Responding Gateway actors. @param eventOutcome The event outcome indicator @param initiatingGatewayUserId The Active Participant UserID for the document consumer (if using WS-Addressing) @param initiatingGatewayUserName The Active Participant UserName for the docum...
[ "Audits", "an", "ITI", "-", "39", "Cross", "Gateway", "Retrieve", "event", "for", "XCA", "Responding", "Gateway", "actors", "." ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/XCARespondingGatewayAuditor.java#L103-L131
google/closure-compiler
src/com/google/javascript/jscomp/CheckAccessControls.java
CheckAccessControls.checkPrivateNameConvention
private Visibility checkPrivateNameConvention(Visibility v, Node name) { """ Returns the effective visibility of the given name, reporting an error if there is a contradiction in the various sources of visibility (example: a variable with a trailing underscore that is declared {@code @public}). """ if (...
java
private Visibility checkPrivateNameConvention(Visibility v, Node name) { if (isPrivateByConvention(name.getString())) { if (v != Visibility.PRIVATE && v != Visibility.INHERITED) { compiler.report(JSError.make(name, CONVENTION_MISMATCH)); } return Visibility.PRIVATE; } return v; }
[ "private", "Visibility", "checkPrivateNameConvention", "(", "Visibility", "v", ",", "Node", "name", ")", "{", "if", "(", "isPrivateByConvention", "(", "name", ".", "getString", "(", ")", ")", ")", "{", "if", "(", "v", "!=", "Visibility", ".", "PRIVATE", "&...
Returns the effective visibility of the given name, reporting an error if there is a contradiction in the various sources of visibility (example: a variable with a trailing underscore that is declared {@code @public}).
[ "Returns", "the", "effective", "visibility", "of", "the", "given", "name", "reporting", "an", "error", "if", "there", "is", "a", "contradiction", "in", "the", "various", "sources", "of", "visibility", "(", "example", ":", "a", "variable", "with", "a", "trail...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckAccessControls.java#L599-L607
alkacon/opencms-core
src/org/opencms/security/CmsRoleManager.java
CmsRoleManager.hasRoleForResource
public boolean hasRoleForResource(CmsObject cms, String userName, CmsRole role, String resourceName) { """ Checks if the given context user has the given role for the given resource.<p> @param cms the opencms context @param userName the name of the user to check the role for @param role the role to check @pa...
java
public boolean hasRoleForResource(CmsObject cms, String userName, CmsRole role, String resourceName) { CmsResource resource; try { resource = cms.readResource(resourceName, CmsResourceFilter.ALL); } catch (CmsException e) { // ignore return false; } ...
[ "public", "boolean", "hasRoleForResource", "(", "CmsObject", "cms", ",", "String", "userName", ",", "CmsRole", "role", ",", "String", "resourceName", ")", "{", "CmsResource", "resource", ";", "try", "{", "resource", "=", "cms", ".", "readResource", "(", "resou...
Checks if the given context user has the given role for the given resource.<p> @param cms the opencms context @param userName the name of the user to check the role for @param role the role to check @param resourceName the name of the resource to check @return <code>true</code> if the given context user has the given...
[ "Checks", "if", "the", "given", "context", "user", "has", "the", "given", "role", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsRoleManager.java#L505-L522
threerings/narya
core/src/main/java/com/threerings/presents/server/RebootManager.java
RebootManager.scheduleReboot
protected void scheduleReboot (long rebootTime, boolean exact, String initiator) { """ Schedule a reboot. @param exact if false we round up to the next highest warning time. """ // if there's already a reboot scheduled, cancel it cancelReboot(); long now = System.currentTimeMillis()...
java
protected void scheduleReboot (long rebootTime, boolean exact, String initiator) { // if there's already a reboot scheduled, cancel it cancelReboot(); long now = System.currentTimeMillis(); rebootTime = Math.max(rebootTime, now); // don't let reboots happen in the past long ...
[ "protected", "void", "scheduleReboot", "(", "long", "rebootTime", ",", "boolean", "exact", ",", "String", "initiator", ")", "{", "// if there's already a reboot scheduled, cancel it", "cancelReboot", "(", ")", ";", "long", "now", "=", "System", ".", "currentTimeMillis...
Schedule a reboot. @param exact if false we round up to the next highest warning time.
[ "Schedule", "a", "reboot", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/RebootManager.java#L193-L219
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java
TopologyBuilder.setBolt
public BoltDeclarer setBolt(String id, IBasicBolt bolt) throws IllegalArgumentException { """ Define a new bolt in this topology. This defines a basic bolt, which is a simpler to use but more restricted kind of bolt. Basic bolts are intended for non-aggregation processing and automate the anchoring/acking proces...
java
public BoltDeclarer setBolt(String id, IBasicBolt bolt) throws IllegalArgumentException { return setBolt(id, bolt, null); }
[ "public", "BoltDeclarer", "setBolt", "(", "String", "id", ",", "IBasicBolt", "bolt", ")", "throws", "IllegalArgumentException", "{", "return", "setBolt", "(", "id", ",", "bolt", ",", "null", ")", ";", "}" ]
Define a new bolt in this topology. This defines a basic bolt, which is a simpler to use but more restricted kind of bolt. Basic bolts are intended for non-aggregation processing and automate the anchoring/acking process to achieve proper reliability in the topology. @param id the id of this component. This id is refe...
[ "Define", "a", "new", "bolt", "in", "this", "topology", ".", "This", "defines", "a", "basic", "bolt", "which", "is", "a", "simpler", "to", "use", "but", "more", "restricted", "kind", "of", "bolt", ".", "Basic", "bolts", "are", "intended", "for", "non", ...
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java#L204-L206
phax/peppol-directory
peppol-directory-client/src/main/java/com/helger/pd/client/PDClient.java
PDClient.isServiceGroupRegistered
@Nonnull public boolean isServiceGroupRegistered (@Nonnull final IParticipantIdentifier aParticipantID) { """ Gets a list of references to the CompleteServiceGroup's owned by the specified userId. This is a non-specification compliant method. @param aParticipantID Participant ID to query for existence. May ...
java
@Nonnull public boolean isServiceGroupRegistered (@Nonnull final IParticipantIdentifier aParticipantID) { ValueEnforcer.notNull (aParticipantID, "ParticipantID"); final HttpGet aGet = new HttpGet (m_sPDIndexerURL + aParticipantID.getURIPercentEncoded ()); try { return executeRequest (aGet, ne...
[ "@", "Nonnull", "public", "boolean", "isServiceGroupRegistered", "(", "@", "Nonnull", "final", "IParticipantIdentifier", "aParticipantID", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aParticipantID", ",", "\"ParticipantID\"", ")", ";", "final", "HttpGet", "aGet",...
Gets a list of references to the CompleteServiceGroup's owned by the specified userId. This is a non-specification compliant method. @param aParticipantID Participant ID to query for existence. May not be <code>null</code>. @return <code>true</code> if the participant is in the index, <code>false</code> otherwise.
[ "Gets", "a", "list", "of", "references", "to", "the", "CompleteServiceGroup", "s", "owned", "by", "the", "specified", "userId", ".", "This", "is", "a", "non", "-", "specification", "compliant", "method", "." ]
train
https://github.com/phax/peppol-directory/blob/98da26da29fb7178371d6b029516cbf01be223fb/peppol-directory-client/src/main/java/com/helger/pd/client/PDClient.java#L265-L280