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
apiman/apiman
gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ApiRequestExecutorImpl.java
ApiRequestExecutorImpl.createRequestChain
private Chain<ApiRequest> createRequestChain(IAsyncHandler<ApiRequest> requestHandler) { """ Creates the chain used to apply policies in order to the api request. """ RequestChain chain = new RequestChain(policyImpls, context); chain.headHandler(requestHandler); chain.policyFailureHandl...
java
private Chain<ApiRequest> createRequestChain(IAsyncHandler<ApiRequest> requestHandler) { RequestChain chain = new RequestChain(policyImpls, context); chain.headHandler(requestHandler); chain.policyFailureHandler(failure -> { // Jump straight to the response leg. // It wil...
[ "private", "Chain", "<", "ApiRequest", ">", "createRequestChain", "(", "IAsyncHandler", "<", "ApiRequest", ">", "requestHandler", ")", "{", "RequestChain", "chain", "=", "new", "RequestChain", "(", "policyImpls", ",", "context", ")", ";", "chain", ".", "headHand...
Creates the chain used to apply policies in order to the api request.
[ "Creates", "the", "chain", "used", "to", "apply", "policies", "in", "order", "to", "the", "api", "request", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/ApiRequestExecutorImpl.java#L805-L819
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.nextElement
public static Element nextElement(XMLExtendedStreamReader reader, Namespace expectedNamespace) throws XMLStreamException { """ A variation of nextElement that verifies the nextElement is not in a different namespace. @param reader the XmlExtendedReader to read from. @param expectedNamespace the namespace expec...
java
public static Element nextElement(XMLExtendedStreamReader reader, Namespace expectedNamespace) throws XMLStreamException { Element element = nextElement(reader); if (element == null) { return null; } else if (element != Element.UNKNOWN && expectedNamespace.equals(Nam...
[ "public", "static", "Element", "nextElement", "(", "XMLExtendedStreamReader", "reader", ",", "Namespace", "expectedNamespace", ")", "throws", "XMLStreamException", "{", "Element", "element", "=", "nextElement", "(", "reader", ")", ";", "if", "(", "element", "==", ...
A variation of nextElement that verifies the nextElement is not in a different namespace. @param reader the XmlExtendedReader to read from. @param expectedNamespace the namespace expected. @return the element or null if the end is reached @throws XMLStreamException if the namespace is wrong or there is a problem acces...
[ "A", "variation", "of", "nextElement", "that", "verifies", "the", "nextElement", "is", "not", "in", "a", "different", "namespace", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L77-L88
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/internal/views/PaginationToken.java
PaginationToken.tokenize
static String tokenize(PageMetadata<?, ?> pageMetadata) { """ Generate an opaque pagination token from the supplied PageMetadata. @param pageMetadata page metadata of the page for which the token should be generated @return opaque pagination token """ try { Gson g = getGsonWithKeyAdapte...
java
static String tokenize(PageMetadata<?, ?> pageMetadata) { try { Gson g = getGsonWithKeyAdapter(pageMetadata.pageRequestParameters); return new String(Base64.encodeBase64URLSafe(g.toJson(new PaginationToken (pageMetadata)).getBytes("UTF-8")), Charse...
[ "static", "String", "tokenize", "(", "PageMetadata", "<", "?", ",", "?", ">", "pageMetadata", ")", "{", "try", "{", "Gson", "g", "=", "getGsonWithKeyAdapter", "(", "pageMetadata", ".", "pageRequestParameters", ")", ";", "return", "new", "String", "(", "Base6...
Generate an opaque pagination token from the supplied PageMetadata. @param pageMetadata page metadata of the page for which the token should be generated @return opaque pagination token
[ "Generate", "an", "opaque", "pagination", "token", "from", "the", "supplied", "PageMetadata", "." ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/internal/views/PaginationToken.java#L110-L120
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_device_profile.java
br_device_profile.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ br_device_profile_responses result = (br_device_profile_responses) serv...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_device_profile_responses result = (br_device_profile_responses) service.get_payload_formatter().string_to_resource(br_device_profile_responses.class, response); if(result.errorcode != 0) { if (...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_device_profile_responses", "result", "=", "(", "br_device_profile_responses", ")", "service", ".", "get_pa...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_device_profile.java#L237-L254
sahan/ZombieLink
zombielink/src/main/java/com/lonepulse/zombielink/util/Is.java
Is.hierarchyTerminal
public static boolean hierarchyTerminal(Class<?> type, List<String> packagePrefixes) { """ <p>Determines if the given type terminates an endpoint lookup along an inheritance hierarchy.</p> <p>This evaluation is performed using a basic conditional check which will return {@code true} if the given type is in the...
java
public static boolean hierarchyTerminal(Class<?> type, List<String> packagePrefixes) { String name = type.getName(); if(packagePrefixes != null && !packagePrefixes.isEmpty()) { for (String packagePrefix : packagePrefixes) { if(name.startsWith(packagePrefix)) { return false; } ...
[ "public", "static", "boolean", "hierarchyTerminal", "(", "Class", "<", "?", ">", "type", ",", "List", "<", "String", ">", "packagePrefixes", ")", "{", "String", "name", "=", "type", ".", "getName", "(", ")", ";", "if", "(", "packagePrefixes", "!=", "null...
<p>Determines if the given type terminates an endpoint lookup along an inheritance hierarchy.</p> <p>This evaluation is performed using a basic conditional check which will return {@code true} if the given type is in the specified packages list. If a package list is not provided, the hierarchy is deemed to have termin...
[ "<p", ">", "Determines", "if", "the", "given", "type", "terminates", "an", "endpoint", "lookup", "along", "an", "inheritance", "hierarchy", ".", "<", "/", "p", ">" ]
train
https://github.com/sahan/ZombieLink/blob/a9971add56d4f6919a4a5e84c78e9220011d8982/zombielink/src/main/java/com/lonepulse/zombielink/util/Is.java#L144-L164
square/dagger
core/src/main/java/dagger/internal/Keys.java
Keys.getLazyKey
static String getLazyKey(String key) { """ Returns a key for the underlying binding of a Lazy<T> value. For example, if this is a key for a {@code Lazy<Foo>}, this returns the key for {@code Foo}. This retains annotations. """ int start = startOfType(key); if (substringStartsWith(key, start, LAZY_PRE...
java
static String getLazyKey(String key) { int start = startOfType(key); if (substringStartsWith(key, start, LAZY_PREFIX)) { return extractKey(key, start, key.substring(0, start), LAZY_PREFIX); } else { return null; } }
[ "static", "String", "getLazyKey", "(", "String", "key", ")", "{", "int", "start", "=", "startOfType", "(", "key", ")", ";", "if", "(", "substringStartsWith", "(", "key", ",", "start", ",", "LAZY_PREFIX", ")", ")", "{", "return", "extractKey", "(", "key",...
Returns a key for the underlying binding of a Lazy<T> value. For example, if this is a key for a {@code Lazy<Foo>}, this returns the key for {@code Foo}. This retains annotations.
[ "Returns", "a", "key", "for", "the", "underlying", "binding", "of", "a", "Lazy<T", ">", "value", ".", "For", "example", "if", "this", "is", "a", "key", "for", "a", "{" ]
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/core/src/main/java/dagger/internal/Keys.java#L196-L203
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/InverseColorMapIndexColorModel.java
InverseColorMapIndexColorModel.getDataElements
public Object getDataElements(int rgb, Object pixel) { """ Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the {@link java.awt.image.WritableRaster#setDataElements(int, int, Object)...
java
public Object getDataElements(int rgb, Object pixel) { int alpha = (rgb>>>24); int pix; if (alpha < ALPHA_THRESHOLD && getTransparentPixel() != -1) { pix = getTransparentPixel(); } else { int color = rgb & RGB_MASK; if (color == WHITE...
[ "public", "Object", "getDataElements", "(", "int", "rgb", ",", "Object", "pixel", ")", "{", "int", "alpha", "=", "(", "rgb", ">>>", "24", ")", ";", "int", "pix", ";", "if", "(", "alpha", "<", "ALPHA_THRESHOLD", "&&", "getTransparentPixel", "(", ")", "!...
Returns a data element array representation of a pixel in this ColorModel, given an integer pixel representation in the default RGB color model. This array can then be passed to the {@link java.awt.image.WritableRaster#setDataElements(int, int, Object) setDataElements} method of a {@link java.awt.image.WritableRaster}...
[ "Returns", "a", "data", "element", "array", "representation", "of", "a", "pixel", "in", "this", "ColorModel", "given", "an", "integer", "pixel", "representation", "in", "the", "default", "RGB", "color", "model", ".", "This", "array", "can", "then", "be", "pa...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/InverseColorMapIndexColorModel.java#L243-L261
apereo/cas
core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java
DefaultCasConfigurationPropertiesSourceLocator.getAllPossibleExternalConfigDirFilenames
private List<File> getAllPossibleExternalConfigDirFilenames(final File configDirectory, final List<String> profiles) { """ Make a list of files that will be processed in order where the last one processed wins. Profiles are added after base property names like application.properties, cas.properties, CAS.propertie...
java
private List<File> getAllPossibleExternalConfigDirFilenames(final File configDirectory, final List<String> profiles) { val applicationName = casConfigurationPropertiesEnvironmentManager.getApplicationName(); val appNameLowerCase = applicationName.toLowerCase(); val fileNames = CollectionUtils.wr...
[ "private", "List", "<", "File", ">", "getAllPossibleExternalConfigDirFilenames", "(", "final", "File", "configDirectory", ",", "final", "List", "<", "String", ">", "profiles", ")", "{", "val", "applicationName", "=", "casConfigurationPropertiesEnvironmentManager", ".", ...
Make a list of files that will be processed in order where the last one processed wins. Profiles are added after base property names like application.properties, cas.properties, CAS.properties so that the profiles will override the base properties. Profiles are processed in order so that the last profile list (e.g. in ...
[ "Make", "a", "list", "of", "files", "that", "will", "be", "processed", "in", "order", "where", "the", "last", "one", "processed", "wins", ".", "Profiles", "are", "added", "after", "base", "property", "names", "like", "application", ".", "properties", "cas", ...
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java#L91-L111
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_remotelicense.java
br_remotelicense.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ br_remotelicense_responses result = (br_remotelicense_responses) servic...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_remotelicense_responses result = (br_remotelicense_responses) service.get_payload_formatter().string_to_resource(br_remotelicense_responses.class, response); if(result.errorcode != 0) { if (res...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_remotelicense_responses", "result", "=", "(", "br_remotelicense_responses", ")", "service", ".", "get_payl...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_remotelicense.java#L199-L216
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/qjournal/client/HttpImageUploadChannel.java
HttpImageUploadChannel.setErrorStatus
void setErrorStatus(String msg, Exception e) { """ If any operation for this channel fail, the error status is set. Parent output stream, based on this information, decides whether the upload can be still continued with remaining channels. """ this.e = new IOException(msg + " " + (e == null ? "" : e.toSt...
java
void setErrorStatus(String msg, Exception e) { this.e = new IOException(msg + " " + (e == null ? "" : e.toString())); // no more writes will be accepted this.isDisabled = true; // close the executor sendExecutor.shutdown(); LOG.error(msg, e); }
[ "void", "setErrorStatus", "(", "String", "msg", ",", "Exception", "e", ")", "{", "this", ".", "e", "=", "new", "IOException", "(", "msg", "+", "\" \"", "+", "(", "e", "==", "null", "?", "\"\"", ":", "e", ".", "toString", "(", ")", ")", ")", ";", ...
If any operation for this channel fail, the error status is set. Parent output stream, based on this information, decides whether the upload can be still continued with remaining channels.
[ "If", "any", "operation", "for", "this", "channel", "fail", "the", "error", "status", "is", "set", ".", "Parent", "output", "stream", "based", "on", "this", "information", "decides", "whether", "the", "upload", "can", "be", "still", "continued", "with", "rem...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/qjournal/client/HttpImageUploadChannel.java#L271-L280
xwiki/xwiki-rendering
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xwiki20/src/main/java/org/xwiki/rendering/internal/renderer/xwiki20/AbstractStackingInlineContentChainingListener.java
AbstractStackingInlineContentChainingListener.stopStacking
protected void stopStacking() { """ Stop stacking events and move them back to the {@link LookaheadChainingListener} to replay them. """ if (this.isStacking) { // Stop stacking in this listener setLookaheadDepth(0); this.isStacking = false; // Flush all ...
java
protected void stopStacking() { if (this.isStacking) { // Stop stacking in this listener setLookaheadDepth(0); this.isStacking = false; // Flush all stacked events BUT flush them in the Lookahead Listener at the beginning of the stack, in order //...
[ "protected", "void", "stopStacking", "(", ")", "{", "if", "(", "this", ".", "isStacking", ")", "{", "// Stop stacking in this listener", "setLookaheadDepth", "(", "0", ")", ";", "this", ".", "isStacking", "=", "false", ";", "// Flush all stacked events BUT flush the...
Stop stacking events and move them back to the {@link LookaheadChainingListener} to replay them.
[ "Stop", "stacking", "events", "and", "move", "them", "back", "to", "the", "{" ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xwiki20/src/main/java/org/xwiki/rendering/internal/renderer/xwiki20/AbstractStackingInlineContentChainingListener.java#L176-L199
alkacon/opencms-core
src/org/opencms/ade/contenteditor/CmsContentTypeVisitor.java
CmsContentTypeVisitor.visitTypes
public void visitTypes(CmsXmlContentDefinition xmlContentDefinition, Locale messageLocale) { """ Visits all types within the XML content definition.<p> @param xmlContentDefinition the content definition @param messageLocale the locale """ m_rootContentDefinition = xmlContentDefinition; ...
java
public void visitTypes(CmsXmlContentDefinition xmlContentDefinition, Locale messageLocale) { m_rootContentDefinition = xmlContentDefinition; m_contentHandler = xmlContentDefinition.getContentHandler(); CmsMessages messages = null; m_messages = new CmsMultiMessages(messageLocale); ...
[ "public", "void", "visitTypes", "(", "CmsXmlContentDefinition", "xmlContentDefinition", ",", "Locale", "messageLocale", ")", "{", "m_rootContentDefinition", "=", "xmlContentDefinition", ";", "m_contentHandler", "=", "xmlContentDefinition", ".", "getContentHandler", "(", ")"...
Visits all types within the XML content definition.<p> @param xmlContentDefinition the content definition @param messageLocale the locale
[ "Visits", "all", "types", "within", "the", "XML", "content", "definition", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentTypeVisitor.java#L402-L432
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_instanceId_rescueMode_POST
public OvhRescueAdminPassword project_serviceName_instance_instanceId_rescueMode_POST(String serviceName, String instanceId, String imageId, Boolean rescue) throws IOException { """ Enable or disable rescue mode REST: POST /cloud/project/{serviceName}/instance/{instanceId}/rescueMode @param imageId [required] ...
java
public OvhRescueAdminPassword project_serviceName_instance_instanceId_rescueMode_POST(String serviceName, String instanceId, String imageId, Boolean rescue) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/rescueMode"; StringBuilder sb = path(qPath, serviceName, instanceId); ...
[ "public", "OvhRescueAdminPassword", "project_serviceName_instance_instanceId_rescueMode_POST", "(", "String", "serviceName", ",", "String", "instanceId", ",", "String", "imageId", ",", "Boolean", "rescue", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/clo...
Enable or disable rescue mode REST: POST /cloud/project/{serviceName}/instance/{instanceId}/rescueMode @param imageId [required] Image to boot on @param instanceId [required] Instance id @param rescue [required] Enable rescue mode @param serviceName [required] Service name
[ "Enable", "or", "disable", "rescue", "mode" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1818-L1826
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNSerializables.java
XNSerializables.createUpdate
public static XNElement createUpdate(String function, XNSerializable object) { """ Create an update request and store the contents of the object into it. @param function the remote function name @param object the object to store. @return the request XML """ XNElement result = new XNElement(function)...
java
public static XNElement createUpdate(String function, XNSerializable object) { XNElement result = new XNElement(function); object.save(result); return result; }
[ "public", "static", "XNElement", "createUpdate", "(", "String", "function", ",", "XNSerializable", "object", ")", "{", "XNElement", "result", "=", "new", "XNElement", "(", "function", ")", ";", "object", ".", "save", "(", "result", ")", ";", "return", "resul...
Create an update request and store the contents of the object into it. @param function the remote function name @param object the object to store. @return the request XML
[ "Create", "an", "update", "request", "and", "store", "the", "contents", "of", "the", "object", "into", "it", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNSerializables.java#L48-L52
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/query/QueryImpl.java
QueryImpl.populateUsingLucene
protected List<Object> populateUsingLucene(EntityMetadata m, Client client, List<Object> result, String[] columnsToSelect) { """ Populate using lucene. @param m the m @param client the client @param result the result @param columnsToSelect List of column names to be selected (rest should be i...
java
protected List<Object> populateUsingLucene(EntityMetadata m, Client client, List<Object> result, String[] columnsToSelect) { Set<Object> uniquePKs = null; MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel( m.getPersistenceUni...
[ "protected", "List", "<", "Object", ">", "populateUsingLucene", "(", "EntityMetadata", "m", ",", "Client", "client", ",", "List", "<", "Object", ">", "result", ",", "String", "[", "]", "columnsToSelect", ")", "{", "Set", "<", "Object", ">", "uniquePKs", "=...
Populate using lucene. @param m the m @param client the client @param result the result @param columnsToSelect List of column names to be selected (rest should be ignored) @return the list
[ "Populate", "using", "lucene", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/QueryImpl.java#L414-L450
OpenLiberty/open-liberty
dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixCompareCommandTask.java
IFixCompareCommandTask.isIFixFileListValid
private boolean isIFixFileListValid(IFixInfo iFixInfo, File wlpInstallationDirectory) throws ParseException { """ Returns <code>true</code> if the list of files in the IFixInfo are present (for non-platform JARs) or more recent than those listed (for platform JARs or static files). @param iFixInfo @param wlpIn...
java
private boolean isIFixFileListValid(IFixInfo iFixInfo, File wlpInstallationDirectory) throws ParseException { // First get the list of files to check Updates updates = iFixInfo.getUpdates(); if (updates == null) { return true; } Set<UpdatedFile> files = updates.getFil...
[ "private", "boolean", "isIFixFileListValid", "(", "IFixInfo", "iFixInfo", ",", "File", "wlpInstallationDirectory", ")", "throws", "ParseException", "{", "// First get the list of files to check", "Updates", "updates", "=", "iFixInfo", ".", "getUpdates", "(", ")", ";", "...
Returns <code>true</code> if the list of files in the IFixInfo are present (for non-platform JARs) or more recent than those listed (for platform JARs or static files). @param iFixInfo @param wlpInstallationDirectory @return @throws ParseException
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "list", "of", "files", "in", "the", "IFixInfo", "are", "present", "(", "for", "non", "-", "platform", "JARs", ")", "or", "more", "recent", "than", "those", "listed", "(", "for", "platform...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.product.utility/src/com/ibm/ws/product/utility/extension/IFixCompareCommandTask.java#L430-L464
elastic/elasticsearch-metrics-reporter-java
src/main/java/org/elasticsearch/metrics/ElasticsearchReporter.java
ElasticsearchReporter.createNewConnectionIfBulkSizeReached
private HttpURLConnection createNewConnectionIfBulkSizeReached(HttpURLConnection connection, int entriesWritten) throws IOException { """ Create a new connection when the bulk size has hit the limit Checked on every write of a metric """ if (entriesWritten % bulkSize == 0) { closeConnectio...
java
private HttpURLConnection createNewConnectionIfBulkSizeReached(HttpURLConnection connection, int entriesWritten) throws IOException { if (entriesWritten % bulkSize == 0) { closeConnection(connection); return openConnection("/_bulk", "POST"); } return connection; }
[ "private", "HttpURLConnection", "createNewConnectionIfBulkSizeReached", "(", "HttpURLConnection", "connection", ",", "int", "entriesWritten", ")", "throws", "IOException", "{", "if", "(", "entriesWritten", "%", "bulkSize", "==", "0", ")", "{", "closeConnection", "(", ...
Create a new connection when the bulk size has hit the limit Checked on every write of a metric
[ "Create", "a", "new", "connection", "when", "the", "bulk", "size", "has", "hit", "the", "limit", "Checked", "on", "every", "write", "of", "a", "metric" ]
train
https://github.com/elastic/elasticsearch-metrics-reporter-java/blob/4018eaef6fc7721312f7440b2bf5a19699a6cb56/src/main/java/org/elasticsearch/metrics/ElasticsearchReporter.java#L412-L419
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java
TimeExtensions.convertFromTo
@Pure @SuppressWarnings("checkstyle:cyclomaticcomplexity") public static double convertFromTo(double time, TimeUnit source, TimeUnit target) { """ Convert the gien amount of time in the given source unit, to the given target unit. In opposite to {@link TimeUnit#convert(long, TimeUnit)}, this function works on ...
java
@Pure @SuppressWarnings("checkstyle:cyclomaticcomplexity") public static double convertFromTo(double time, TimeUnit source, TimeUnit target) { assert source != null; assert target != null; if (source == target) { return time; } final double millis; switch (source) { case DAYS: millis = time * MILL...
[ "@", "Pure", "@", "SuppressWarnings", "(", "\"checkstyle:cyclomaticcomplexity\"", ")", "public", "static", "double", "convertFromTo", "(", "double", "time", ",", "TimeUnit", "source", ",", "TimeUnit", "target", ")", "{", "assert", "source", "!=", "null", ";", "a...
Convert the gien amount of time in the given source unit, to the given target unit. In opposite to {@link TimeUnit#convert(long, TimeUnit)}, this function works on double floating-point values. @param time the amount of time. @param source the source unit. Never <code>null</code>. @param target the target unit. Never ...
[ "Convert", "the", "gien", "amount", "of", "time", "in", "the", "given", "source", "unit", "to", "the", "given", "target", "unit", ".", "In", "opposite", "to", "{", "@link", "TimeUnit#convert", "(", "long", "TimeUnit", ")", "}", "this", "function", "works",...
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/time/TimeExtensions.java#L545-L597
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/common/Similarity.java
Similarity.tanimotoCoefficient
public static double tanimotoCoefficient(Vector a, Vector b) { """ Returns the Tanimoto coefficient of the two {@link Vector} instances. @throws IllegalArgumentException when the length of the two vectors are not the same. """ return tanimotoCoefficient(Vectors.asDouble(a), Vectors.asDouble(b)); ...
java
public static double tanimotoCoefficient(Vector a, Vector b) { return tanimotoCoefficient(Vectors.asDouble(a), Vectors.asDouble(b)); }
[ "public", "static", "double", "tanimotoCoefficient", "(", "Vector", "a", ",", "Vector", "b", ")", "{", "return", "tanimotoCoefficient", "(", "Vectors", ".", "asDouble", "(", "a", ")", ",", "Vectors", ".", "asDouble", "(", "b", ")", ")", ";", "}" ]
Returns the Tanimoto coefficient of the two {@link Vector} instances. @throws IllegalArgumentException when the length of the two vectors are not the same.
[ "Returns", "the", "Tanimoto", "coefficient", "of", "the", "two", "{", "@link", "Vector", "}", "instances", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/common/Similarity.java#L2307-L2309
OpenLiberty/open-liberty
dev/com.ibm.ws.security.wim.adapter.ldap_fat/fat/src/com/ibm/ws/security/wim/adapter/ldap/fat/URAPIs_UserGroupSearchBases.java
URAPIs_UserGroupSearchBases.updateLibertyServer
private static void updateLibertyServer() throws Exception { """ Convenience method to configure the Liberty server with an {@link LdapRegistry} configuration that will connect to {@link #ldapServer}. @throws Exception If there was an error configuring the server. """ ServerConfiguration server = e...
java
private static void updateLibertyServer() throws Exception { ServerConfiguration server = emptyConfiguration.clone(); LdapRegistry ldap = new LdapRegistry(); ldap.setId("ldap1"); ldap.setRealm("LDAPRealm"); ldap.setHost("localhost"); ldap.setPort(String.valueOf(ds.getLis...
[ "private", "static", "void", "updateLibertyServer", "(", ")", "throws", "Exception", "{", "ServerConfiguration", "server", "=", "emptyConfiguration", ".", "clone", "(", ")", ";", "LdapRegistry", "ldap", "=", "new", "LdapRegistry", "(", ")", ";", "ldap", ".", "...
Convenience method to configure the Liberty server with an {@link LdapRegistry} configuration that will connect to {@link #ldapServer}. @throws Exception If there was an error configuring the server.
[ "Convenience", "method", "to", "configure", "the", "Liberty", "server", "with", "an", "{", "@link", "LdapRegistry", "}", "configuration", "that", "will", "connect", "to", "{", "@link", "#ldapServer", "}", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.adapter.ldap_fat/fat/src/com/ibm/ws/security/wim/adapter/ldap/fat/URAPIs_UserGroupSearchBases.java#L224-L246
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/DBObject.java
DBObject.removeFieldValues
public void removeFieldValues(String fieldName, Collection<String> values) { """ Add "remove" values for the given field. This method should only be called for MV scalar and link fields. When the updates in this DBObject are applied to the database, the given set of values are removed for the object. An exceptio...
java
public void removeFieldValues(String fieldName, Collection<String> values) { Utils.require(!Utils.isEmpty(fieldName), "fieldName"); if (values != null && values.size() > 0) { List<String> valueSet = m_valueRemoveMap.get(fieldName); if (valueSet == null) { val...
[ "public", "void", "removeFieldValues", "(", "String", "fieldName", ",", "Collection", "<", "String", ">", "values", ")", "{", "Utils", ".", "require", "(", "!", "Utils", ".", "isEmpty", "(", "fieldName", ")", ",", "\"fieldName\"", ")", ";", "if", "(", "v...
Add "remove" values for the given field. This method should only be called for MV scalar and link fields. When the updates in this DBObject are applied to the database, the given set of values are removed for the object. An exception is thrown if the field is not MV. If the given set of values is null or empty, this me...
[ "Add", "remove", "values", "for", "the", "given", "field", ".", "This", "method", "should", "only", "be", "called", "for", "MV", "scalar", "and", "link", "fields", ".", "When", "the", "updates", "in", "this", "DBObject", "are", "applied", "to", "the", "d...
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/DBObject.java#L459-L469
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
HtmlLinkRendererBase.findNestingForm
protected FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext) { """ find nesting form<br /> need to be overrideable to deal with dummyForm stuff in tomahawk. """ return _ComponentUtils.findNestingForm(uiComponent, facesContext); }
java
protected FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext) { return _ComponentUtils.findNestingForm(uiComponent, facesContext); }
[ "protected", "FormInfo", "findNestingForm", "(", "UIComponent", "uiComponent", ",", "FacesContext", "facesContext", ")", "{", "return", "_ComponentUtils", ".", "findNestingForm", "(", "uiComponent", ",", "facesContext", ")", ";", "}" ]
find nesting form<br /> need to be overrideable to deal with dummyForm stuff in tomahawk.
[ "find", "nesting", "form<br", "/", ">", "need", "to", "be", "overrideable", "to", "deal", "with", "dummyForm", "stuff", "in", "tomahawk", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java#L728-L731
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/command/Command.java
Command.shortcutChanged
private void shortcutChanged(String shortcut, boolean unbind) { """ Called when a shortcut is bound or unbound. @param shortcut The shortcut that has been bound or unbound. @param unbind If true, the shortcut is being unbound. """ Set<String> bindings = new HashSet<>(); bindings.add(shortcu...
java
private void shortcutChanged(String shortcut, boolean unbind) { Set<String> bindings = new HashSet<>(); bindings.add(shortcut); for (BaseUIComponent component : componentBindings) { CommandUtil.updateShortcuts(component, bindings, unbind); } }
[ "private", "void", "shortcutChanged", "(", "String", "shortcut", ",", "boolean", "unbind", ")", "{", "Set", "<", "String", ">", "bindings", "=", "new", "HashSet", "<>", "(", ")", ";", "bindings", ".", "add", "(", "shortcut", ")", ";", "for", "(", "Base...
Called when a shortcut is bound or unbound. @param shortcut The shortcut that has been bound or unbound. @param unbind If true, the shortcut is being unbound.
[ "Called", "when", "a", "shortcut", "is", "bound", "or", "unbound", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/command/Command.java#L187-L194
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/service/tsdb/AnnotationQuery.java
AnnotationQuery.toTagParameterArray
protected String toTagParameterArray(Map<String, String> tags) throws UnsupportedEncodingException { """ Returns the tags in TSDB query string format. @param tags The tags to convert. Can be null. @return The formatted tags. @throws UnsupportedEncodingException If UTF-8 is not supported. """ ...
java
protected String toTagParameterArray(Map<String, String> tags) throws UnsupportedEncodingException { if(tags == null || tags.isEmpty()) { return ""; } StringBuilder sb = new StringBuilder(encode("{", "UTF-8")); for (Map.Entry<String, String> tagEntry : tags.entrySet()) { ...
[ "protected", "String", "toTagParameterArray", "(", "Map", "<", "String", ",", "String", ">", "tags", ")", "throws", "UnsupportedEncodingException", "{", "if", "(", "tags", "==", "null", "||", "tags", ".", "isEmpty", "(", ")", ")", "{", "return", "\"\"", ";...
Returns the tags in TSDB query string format. @param tags The tags to convert. Can be null. @return The formatted tags. @throws UnsupportedEncodingException If UTF-8 is not supported.
[ "Returns", "the", "tags", "in", "TSDB", "query", "string", "format", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/tsdb/AnnotationQuery.java#L266-L282
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/util/EnvUtil.java
EnvUtil.stringJoin
public static String stringJoin(List list, String separator) { """ Join a list of objects to a string with a given separator by calling Object.toString() on the elements. @param list to join @param separator separator to use @return the joined string. """ StringBuilder ret = new StringBuilder(); ...
java
public static String stringJoin(List list, String separator) { StringBuilder ret = new StringBuilder(); boolean first = true; for (Object o : list) { if (!first) { ret.append(separator); } ret.append(o); first = false; } ...
[ "public", "static", "String", "stringJoin", "(", "List", "list", ",", "String", "separator", ")", "{", "StringBuilder", "ret", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "first", "=", "true", ";", "for", "(", "Object", "o", ":", "list", ")", ...
Join a list of objects to a string with a given separator by calling Object.toString() on the elements. @param list to join @param separator separator to use @return the joined string.
[ "Join", "a", "list", "of", "objects", "to", "a", "string", "with", "a", "given", "separator", "by", "calling", "Object", ".", "toString", "()", "on", "the", "elements", "." ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/util/EnvUtil.java#L187-L198
tomgibara/bits
src/main/java/com/tomgibara/bits/BitVector.java
BitVector.duplicateRange
public BitVector duplicateRange(int from, int to, boolean copy, boolean mutable) { """ Duplicates a range of the {@link BitVector}. @param from the (inclusive) position at which the range begins @param to the (exclusive) position at which the range ends @param copy true if the duplicated range should be a ...
java
public BitVector duplicateRange(int from, int to, boolean copy, boolean mutable) { if (mutable && !copy && !this.mutable) throw new IllegalStateException("Cannot obtain mutable view of an immutable BitVector"); if (from < 0) throw new IllegalArgumentException(); if (to < from) throw new IllegalArgumentException()...
[ "public", "BitVector", "duplicateRange", "(", "int", "from", ",", "int", "to", ",", "boolean", "copy", ",", "boolean", "mutable", ")", "{", "if", "(", "mutable", "&&", "!", "copy", "&&", "!", "this", ".", "mutable", ")", "throw", "new", "IllegalStateExce...
Duplicates a range of the {@link BitVector}. @param from the (inclusive) position at which the range begins @param to the (exclusive) position at which the range ends @param copy true if the duplicated range should be a detached copy, false if it should be a view, backed by the same bit data. @param mutable whether th...
[ "Duplicates", "a", "range", "of", "the", "{", "@link", "BitVector", "}", "." ]
train
https://github.com/tomgibara/bits/blob/56c32c0a30efd3d7c4e7c6600a0ca39e51eecc97/src/main/java/com/tomgibara/bits/BitVector.java#L916-L924
samskivert/pythagoras
src/main/java/pythagoras/f/Box.java
Box.intersectsX
protected boolean intersectsX (IRay3 ray, float x) { """ Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box at the plane where x equals the value specified. """ IVector3 origin = ray.origin(), dir = ray.direction(); float t = (x - origin.x()) / dir.x(); ...
java
protected boolean intersectsX (IRay3 ray, float x) { IVector3 origin = ray.origin(), dir = ray.direction(); float t = (x - origin.x()) / dir.x(); if (t < 0f) { return false; } float iy = origin.y() + t*dir.y(), iz = origin.z() + t*dir.z(); return iy >= _minExt...
[ "protected", "boolean", "intersectsX", "(", "IRay3", "ray", ",", "float", "x", ")", "{", "IVector3", "origin", "=", "ray", ".", "origin", "(", ")", ",", "dir", "=", "ray", ".", "direction", "(", ")", ";", "float", "t", "=", "(", "x", "-", "origin",...
Helper method for {@link #intersects(Ray3)}. Determines whether the ray intersects the box at the plane where x equals the value specified.
[ "Helper", "method", "for", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Box.java#L434-L443
di2e/Argo
ProbeSender/src/main/java/ws/argo/probe/ProbeSender.java
ProbeSender.sendProbe
public List<Probe> sendProbe(Probe probe) throws ProbeSenderException { """ Send the probe. It will take the provided probe and then disassemble it into a number of smaller probes based on the max payload size of the transport provided. @param probe the probe to send @return the list of actual probes sent (w...
java
public List<Probe> sendProbe(Probe probe) throws ProbeSenderException { List<Probe> actualProbesToSend; try { actualProbesToSend = splitProbe(probe); } catch (MalformedURLException | JAXBException | UnsupportedPayloadType e) { throw new ProbeSenderException("Issue splitting the probe.", e); ...
[ "public", "List", "<", "Probe", ">", "sendProbe", "(", "Probe", "probe", ")", "throws", "ProbeSenderException", "{", "List", "<", "Probe", ">", "actualProbesToSend", ";", "try", "{", "actualProbesToSend", "=", "splitProbe", "(", "probe", ")", ";", "}", "catc...
Send the probe. It will take the provided probe and then disassemble it into a number of smaller probes based on the max payload size of the transport provided. @param probe the probe to send @return the list of actual probes sent (which were created when the provided probe was spit into smaller ones that complied wit...
[ "Send", "the", "probe", ".", "It", "will", "take", "the", "provided", "probe", "and", "then", "disassemble", "it", "into", "a", "number", "of", "smaller", "probes", "based", "on", "the", "max", "payload", "size", "of", "the", "transport", "provided", "." ]
train
https://github.com/di2e/Argo/blob/f537a03d2d25fdfecda7999ec10e1da67dc3b8f3/ProbeSender/src/main/java/ws/argo/probe/ProbeSender.java#L67-L88
google/closure-templates
java/src/com/google/template/soy/jbcsrc/ExpressionCompiler.java
ExpressionCompiler.compileWithNoDetaches
Optional<SoyExpression> compileWithNoDetaches(ExprNode node) { """ Compiles the given expression tree to a sequence of bytecode if it can be done without generating any detach operations. """ checkNotNull(node); if (RequiresDetachVisitor.INSTANCE.exec(node)) { return Optional.absent(); } ...
java
Optional<SoyExpression> compileWithNoDetaches(ExprNode node) { checkNotNull(node); if (RequiresDetachVisitor.INSTANCE.exec(node)) { return Optional.absent(); } Supplier<ExpressionDetacher> throwingSupplier = () -> { throw new AssertionError(); }; return Optional.of( ...
[ "Optional", "<", "SoyExpression", ">", "compileWithNoDetaches", "(", "ExprNode", "node", ")", "{", "checkNotNull", "(", "node", ")", ";", "if", "(", "RequiresDetachVisitor", ".", "INSTANCE", ".", "exec", "(", "node", ")", ")", "{", "return", "Optional", ".",...
Compiles the given expression tree to a sequence of bytecode if it can be done without generating any detach operations.
[ "Compiles", "the", "given", "expression", "tree", "to", "a", "sequence", "of", "bytecode", "if", "it", "can", "be", "done", "without", "generating", "any", "detach", "operations", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/ExpressionCompiler.java#L245-L257
fedups/com.obdobion.algebrain
src/main/java/com/obdobion/algebrain/ValueStack.java
ValueStack.popByteArray
public byte[] popByteArray() throws ParseException { """ <p> popByteArray. </p> @return an array of byte. @throws java.text.ParseException if any. """ final Object popped = super.pop(); if (popped instanceof byte[]) return (byte[]) popped; throw new ParseException("by...
java
public byte[] popByteArray() throws ParseException { final Object popped = super.pop(); if (popped instanceof byte[]) return (byte[]) popped; throw new ParseException("byte[] required, found " + popped.getClass().getSimpleName(), 0); }
[ "public", "byte", "[", "]", "popByteArray", "(", ")", "throws", "ParseException", "{", "final", "Object", "popped", "=", "super", ".", "pop", "(", ")", ";", "if", "(", "popped", "instanceof", "byte", "[", "]", ")", "return", "(", "byte", "[", "]", ")...
<p> popByteArray. </p> @return an array of byte. @throws java.text.ParseException if any.
[ "<p", ">", "popByteArray", ".", "<", "/", "p", ">" ]
train
https://github.com/fedups/com.obdobion.algebrain/blob/d0adaa9fbbba907bdcf820961e9058b0d2b15a8a/src/main/java/com/obdobion/algebrain/ValueStack.java#L209-L216
box/box-java-sdk
src/main/java/com/box/sdk/BoxWebHook.java
BoxWebHook.validateTrigger
private static void validateTrigger(String targetType, BoxWebHook.Trigger trigger) { """ Validates that provided {@link BoxWebHook.Trigger} can be applied on the provided {@link BoxResourceType}. @param targetType on which targets the trigger should be applied to @param trigger for check @see #validateTri...
java
private static void validateTrigger(String targetType, BoxWebHook.Trigger trigger) { for (String type : trigger.getTypes()) { if (targetType.equals(type)) { return; } } throw new IllegalArgumentException(String.format( "Provided trigger '%s...
[ "private", "static", "void", "validateTrigger", "(", "String", "targetType", ",", "BoxWebHook", ".", "Trigger", "trigger", ")", "{", "for", "(", "String", "type", ":", "trigger", ".", "getTypes", "(", ")", ")", "{", "if", "(", "targetType", ".", "equals", ...
Validates that provided {@link BoxWebHook.Trigger} can be applied on the provided {@link BoxResourceType}. @param targetType on which targets the trigger should be applied to @param trigger for check @see #validateTriggers(String, Collection)
[ "Validates", "that", "provided", "{", "@link", "BoxWebHook", ".", "Trigger", "}", "can", "be", "applied", "on", "the", "provided", "{", "@link", "BoxResourceType", "}", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxWebHook.java#L250-L258
Netflix/conductor
core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java
WorkflowExecutor.retry
public void retry(String workflowId) { """ Gets the last instance of each failed task and reschedule each Gets all cancelled tasks and schedule all of them except JOIN (join should change status to INPROGRESS) Switch workflow back to RUNNING status and call decider. @param workflowId the id of the workflow to...
java
public void retry(String workflowId) { Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true); if (!workflow.getStatus().isTerminal()) { throw new ApplicationException(CONFLICT, "Workflow is still running. status=" + workflow.getStatus()); } if (workflow.ge...
[ "public", "void", "retry", "(", "String", "workflowId", ")", "{", "Workflow", "workflow", "=", "executionDAOFacade", ".", "getWorkflowById", "(", "workflowId", ",", "true", ")", ";", "if", "(", "!", "workflow", ".", "getStatus", "(", ")", ".", "isTerminal", ...
Gets the last instance of each failed task and reschedule each Gets all cancelled tasks and schedule all of them except JOIN (join should change status to INPROGRESS) Switch workflow back to RUNNING status and call decider. @param workflowId the id of the workflow to be retried
[ "Gets", "the", "last", "instance", "of", "each", "failed", "task", "and", "reschedule", "each", "Gets", "all", "cancelled", "tasks", "and", "schedule", "all", "of", "them", "except", "JOIN", "(", "join", "should", "change", "status", "to", "INPROGRESS", ")",...
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java#L415-L470
eurekaclinical/protempa
protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/ConnectionManager.java
ConnectionManager.createInstance
Instance createInstance(String name, Cls cls) throws KnowledgeSourceReadException { """ Creates a new instance in the knowledge base. @param name the name <code>String</code> of the instance. @param cls the <code>Cls</code> of the instance. @return a new <code>Instance</code>, or <code>null</code...
java
Instance createInstance(String name, Cls cls) throws KnowledgeSourceReadException { return getFromProtege(new InstanceSpec(name, cls), INSTANCE_CREATOR); }
[ "Instance", "createInstance", "(", "String", "name", ",", "Cls", "cls", ")", "throws", "KnowledgeSourceReadException", "{", "return", "getFromProtege", "(", "new", "InstanceSpec", "(", "name", ",", "cls", ")", ",", "INSTANCE_CREATOR", ")", ";", "}" ]
Creates a new instance in the knowledge base. @param name the name <code>String</code> of the instance. @param cls the <code>Cls</code> of the instance. @return a new <code>Instance</code>, or <code>null</code> if an invalid class specification was provided. @see ConnectionManager#INSTANCE_CREATOR
[ "Creates", "a", "new", "instance", "in", "the", "knowledge", "base", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-ksb-protege/src/main/java/org/protempa/backend/ksb/protege/ConnectionManager.java#L475-L478
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.getAllStrings
public HashSet<String> getAllStrings() { """ 取出所有key<br> Retrieves all the valid Strings that have been inserted in to the MDAG. @return a HashSet containing all the Strings that have been inserted into the MDAG """ HashSet<String> strHashSet = new LinkedHashSet<String>(); if (sourceNode !...
java
public HashSet<String> getAllStrings() { HashSet<String> strHashSet = new LinkedHashSet<String>(); if (sourceNode != null) getStrings(strHashSet, SearchCondition.NO_SEARCH_CONDITION, null, "", sourceNode.getOutgoingTransitions()); else getStrings(strHashSet, SearchCo...
[ "public", "HashSet", "<", "String", ">", "getAllStrings", "(", ")", "{", "HashSet", "<", "String", ">", "strHashSet", "=", "new", "LinkedHashSet", "<", "String", ">", "(", ")", ";", "if", "(", "sourceNode", "!=", "null", ")", "getStrings", "(", "strHashS...
取出所有key<br> Retrieves all the valid Strings that have been inserted in to the MDAG. @return a HashSet containing all the Strings that have been inserted into the MDAG
[ "取出所有key<br", ">", "Retrieves", "all", "the", "valid", "Strings", "that", "have", "been", "inserted", "in", "to", "the", "MDAG", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L920-L930
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.appendColName
protected boolean appendColName(String attr, String attrAlias, boolean useOuterJoins, UserAlias aUserAlias, StringBuffer buf) { """ Append the appropriate ColumnName to the buffer<br> if a FIELDDESCRIPTOR is found for the Criteria the colName is taken from there otherwise its taken from Criteria. <b...
java
protected boolean appendColName(String attr, String attrAlias, boolean useOuterJoins, UserAlias aUserAlias, StringBuffer buf) { AttributeInfo attrInfo = getAttributeInfo(attr, useOuterJoins, aUserAlias, getQuery().getPathClasses()); TableAlias tableAlias = attrInfo.tableAlias; Pat...
[ "protected", "boolean", "appendColName", "(", "String", "attr", ",", "String", "attrAlias", ",", "boolean", "useOuterJoins", ",", "UserAlias", "aUserAlias", ",", "StringBuffer", "buf", ")", "{", "AttributeInfo", "attrInfo", "=", "getAttributeInfo", "(", "attr", ",...
Append the appropriate ColumnName to the buffer<br> if a FIELDDESCRIPTOR is found for the Criteria the colName is taken from there otherwise its taken from Criteria. <br> field names in functions (ie: sum(name) ) are tried to resolve ie: name from FIELDDESCRIPTOR , UPPER(name_test) from Criteria<br> also resolve pathEx...
[ "Append", "the", "appropriate", "ColumnName", "to", "the", "buffer<br", ">", "if", "a", "FIELDDESCRIPTOR", "is", "found", "for", "the", "Criteria", "the", "colName", "is", "taken", "from", "there", "otherwise", "its", "taken", "from", "Criteria", ".", "<br", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L456-L473
smurn/jPLY
jply/src/main/java/org/smurn/jply/Element.java
Element.setDouble
public void setDouble(final String propertyName, final double value) { """ Sets the value of a property-list. If the property is a list, the list will be set to a single entry. @param propertyName Name of the property to set. @param value Value to set for that property. @throws NullPointerException if {@code p...
java
public void setDouble(final String propertyName, final double value) { if (propertyName == null) { throw new NullPointerException("propertyName must not be null."); } Integer index = propertyMap.get(propertyName); if (index == null) { throw new IllegalArgumentExce...
[ "public", "void", "setDouble", "(", "final", "String", "propertyName", ",", "final", "double", "value", ")", "{", "if", "(", "propertyName", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"propertyName must not be null.\"", ")", ";", "}",...
Sets the value of a property-list. If the property is a list, the list will be set to a single entry. @param propertyName Name of the property to set. @param value Value to set for that property. @throws NullPointerException if {@code propertyName} is {@code null}. @throws IllegalArgumentException if the element type d...
[ "Sets", "the", "value", "of", "a", "property", "-", "list", ".", "If", "the", "property", "is", "a", "list", "the", "list", "will", "be", "set", "to", "a", "single", "entry", "." ]
train
https://github.com/smurn/jPLY/blob/77cb8c47fff7549ae1da8d8568ad8bdf374fe89f/jply/src/main/java/org/smurn/jply/Element.java#L221-L231
Red5/red5-io
src/main/java/org/red5/io/mp3/impl/MP3Stream.java
MP3Stream.calculateFrameLength
private static int calculateFrameLength(int layer, int bitRate, int sampleRate, int padding) { """ Calculates the length of an MPEG frame based on the given parameters. @param layer the layer @param bitRate the bit rate @param sampleRate the sample rate @param padding the padding flag @return the length...
java
private static int calculateFrameLength(int layer, int bitRate, int sampleRate, int padding) { if (layer == AudioFrame.LAYER_1) { return (12 * bitRate / sampleRate + padding) * 4; } else { return 144 * bitRate / sampleRate + padding; } }
[ "private", "static", "int", "calculateFrameLength", "(", "int", "layer", ",", "int", "bitRate", ",", "int", "sampleRate", ",", "int", "padding", ")", "{", "if", "(", "layer", "==", "AudioFrame", ".", "LAYER_1", ")", "{", "return", "(", "12", "*", "bitRat...
Calculates the length of an MPEG frame based on the given parameters. @param layer the layer @param bitRate the bit rate @param sampleRate the sample rate @param padding the padding flag @return the length of the frame in bytes
[ "Calculates", "the", "length", "of", "an", "MPEG", "frame", "based", "on", "the", "given", "parameters", "." ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/mp3/impl/MP3Stream.java#L312-L318
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java
GenericGenerators.mergeIf
public static ConditionalMerger mergeIf(boolean condition, Supplier<Object[]> insnsSupplier) { """ Combines multiple instructions (or instruction lists) in to a single instruction list if some condition is met. @param condition flag indicating if the instruction list should be generated @param insnsSupplier supp...
java
public static ConditionalMerger mergeIf(boolean condition, Supplier<Object[]> insnsSupplier) { Validate.notNull(insnsSupplier); ConditionalMerger merger = new ConditionalMerger(); return merger.mergeIf(condition, insnsSupplier); }
[ "public", "static", "ConditionalMerger", "mergeIf", "(", "boolean", "condition", ",", "Supplier", "<", "Object", "[", "]", ">", "insnsSupplier", ")", "{", "Validate", ".", "notNull", "(", "insnsSupplier", ")", ";", "ConditionalMerger", "merger", "=", "new", "C...
Combines multiple instructions (or instruction lists) in to a single instruction list if some condition is met. @param condition flag indicating if the instruction list should be generated @param insnsSupplier supplier that generates the instructions to merge (only generated if {@code condition == true}) @throws NullPo...
[ "Combines", "multiple", "instructions", "(", "or", "instruction", "lists", ")", "in", "to", "a", "single", "instruction", "list", "if", "some", "condition", "is", "met", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L204-L209
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/report/HHelpScreen.java
HHelpScreen.printHtmlMenubar
public void printHtmlMenubar(PrintWriter out, ResourceBundle reg) throws DBException { """ Print the top nav menu. @exception DBException File exception. """ if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.MENUBARS)) != UserInfoModel.NO.charAt(0)) { if (HHelpScree...
java
public void printHtmlMenubar(PrintWriter out, ResourceBundle reg) throws DBException { if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.MENUBARS)) != UserInfoModel.NO.charAt(0)) { if (HHelpScreen.getFirstToUpper(this.getProperty(DBParams.NAVMENUS)) != UserInfoModel.NO_IC...
[ "public", "void", "printHtmlMenubar", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "if", "(", "HHelpScreen", ".", "getFirstToUpper", "(", "this", ".", "getProperty", "(", "DBParams", ".", "MENUBARS", ")", ")", "!=...
Print the top nav menu. @exception DBException File exception.
[ "Print", "the", "top", "nav", "menu", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/report/HHelpScreen.java#L95-L121
joniles/mpxj
src/main/java/net/sf/mpxj/synchro/SynchroReader.java
SynchroReader.processResourceAssignments
private void processResourceAssignments(Task task, List<MapRow> assignments) { """ Extract resource assignments for a task. @param task parent task @param assignments list of Synchro resource assignment data """ for (MapRow row : assignments) { processResourceAssignment(task, row); ...
java
private void processResourceAssignments(Task task, List<MapRow> assignments) { for (MapRow row : assignments) { processResourceAssignment(task, row); } }
[ "private", "void", "processResourceAssignments", "(", "Task", "task", ",", "List", "<", "MapRow", ">", "assignments", ")", "{", "for", "(", "MapRow", "row", ":", "assignments", ")", "{", "processResourceAssignment", "(", "task", ",", "row", ")", ";", "}", ...
Extract resource assignments for a task. @param task parent task @param assignments list of Synchro resource assignment data
[ "Extract", "resource", "assignments", "for", "a", "task", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/synchro/SynchroReader.java#L411-L417
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehouseItemPersistenceImpl.java
CommerceWarehouseItemPersistenceImpl.findByCPI_CPIU
@Override public List<CommerceWarehouseItem> findByCPI_CPIU(long CProductId, String CPInstanceUuid, int start, int end) { """ Returns a range of all the commerce warehouse items where CProductId = &#63; and CPInstanceUuid = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</c...
java
@Override public List<CommerceWarehouseItem> findByCPI_CPIU(long CProductId, String CPInstanceUuid, int start, int end) { return findByCPI_CPIU(CProductId, CPInstanceUuid, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceWarehouseItem", ">", "findByCPI_CPIU", "(", "long", "CProductId", ",", "String", "CPInstanceUuid", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByCPI_CPIU", "(", "CProductId", ",", "CPInstanceU...
Returns a range of all the commerce warehouse items where CProductId = &#63; and CPInstanceUuid = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> re...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "warehouse", "items", "where", "CProductId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehouseItemPersistenceImpl.java#L924-L928
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/StringUtil.java
StringUtil.startsWithAny
public static boolean startsWithAny(boolean _ignoreCase, String _str, String... _args) { """ Checks if given string in _str starts with any of the given strings in _args. @param _ignoreCase true to ignore case, false to be case sensitive @param _str string to check @param _args patterns to find @return true if...
java
public static boolean startsWithAny(boolean _ignoreCase, String _str, String... _args) { if (_str == null || _args == null || _args.length == 0) { return false; } String heystack = _str; if (_ignoreCase) { heystack = _str.toLowerCase(); } for (Str...
[ "public", "static", "boolean", "startsWithAny", "(", "boolean", "_ignoreCase", ",", "String", "_str", ",", "String", "...", "_args", ")", "{", "if", "(", "_str", "==", "null", "||", "_args", "==", "null", "||", "_args", ".", "length", "==", "0", ")", "...
Checks if given string in _str starts with any of the given strings in _args. @param _ignoreCase true to ignore case, false to be case sensitive @param _str string to check @param _args patterns to find @return true if given string in _str starts with any of the given strings in _args, false if not or _str/_args is nul...
[ "Checks", "if", "given", "string", "in", "_str", "starts", "with", "any", "of", "the", "given", "strings", "in", "_args", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L547-L564
ehcache/ehcache3
impl/src/main/java/org/ehcache/impl/internal/resilience/AbstractResilienceStrategy.java
AbstractResilienceStrategy.pacedErrorLog
protected void pacedErrorLog(String message, Object arg1, Object arg2) { """ Log messages in error at worst every 30 seconds. Log everything at debug level. @param message message to log @param arg1 first log param @param arg2 second log param """ pacer.pacedCall(() -> LOGGER.error(message + " - Simil...
java
protected void pacedErrorLog(String message, Object arg1, Object arg2) { pacer.pacedCall(() -> LOGGER.error(message + " - Similar messages will be suppressed for 30 seconds", arg1, arg2), () -> LOGGER.debug(message, arg1, arg2)); }
[ "protected", "void", "pacedErrorLog", "(", "String", "message", ",", "Object", "arg1", ",", "Object", "arg2", ")", "{", "pacer", ".", "pacedCall", "(", "(", ")", "->", "LOGGER", ".", "error", "(", "message", "+", "\" - Similar messages will be suppressed for 30 ...
Log messages in error at worst every 30 seconds. Log everything at debug level. @param message message to log @param arg1 first log param @param arg2 second log param
[ "Log", "messages", "in", "error", "at", "worst", "every", "30", "seconds", ".", "Log", "everything", "at", "debug", "level", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/impl/internal/resilience/AbstractResilienceStrategy.java#L189-L191
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/map/geotools/FeaturesParser.java
FeaturesParser.treatStringAsURL
public final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl) throws IOException { """ Get the features collection from a GeoJson URL. @param template the template @param geoJsonUrl what to parse @return the feature collection """ URL url; ...
java
public final SimpleFeatureCollection treatStringAsURL(final Template template, final String geoJsonUrl) throws IOException { URL url; try { url = FileUtils.testForLegalFileUrl(template.getConfiguration(), new URL(geoJsonUrl)); } catch (MalformedURLException e) { ...
[ "public", "final", "SimpleFeatureCollection", "treatStringAsURL", "(", "final", "Template", "template", ",", "final", "String", "geoJsonUrl", ")", "throws", "IOException", "{", "URL", "url", ";", "try", "{", "url", "=", "FileUtils", ".", "testForLegalFileUrl", "("...
Get the features collection from a GeoJson URL. @param template the template @param geoJsonUrl what to parse @return the feature collection
[ "Get", "the", "features", "collection", "from", "a", "GeoJson", "URL", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/map/geotools/FeaturesParser.java#L167-L184
raphw/byte-buddy
byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ClassLoaderResolver.java
ClassLoaderResolver.doResolve
private ClassLoader doResolve(Set<? extends File> classPath) { """ Resolves a class path to a class loader. @param classPath The class path to consider. @return A class loader for the supplied class path. """ List<URL> urls = new ArrayList<URL>(classPath.size()); for (File file : classPath)...
java
private ClassLoader doResolve(Set<? extends File> classPath) { List<URL> urls = new ArrayList<URL>(classPath.size()); for (File file : classPath) { try { urls.add(file.toURI().toURL()); } catch (MalformedURLException exception) { throw new GradleEx...
[ "private", "ClassLoader", "doResolve", "(", "Set", "<", "?", "extends", "File", ">", "classPath", ")", "{", "List", "<", "URL", ">", "urls", "=", "new", "ArrayList", "<", "URL", ">", "(", "classPath", ".", "size", "(", ")", ")", ";", "for", "(", "F...
Resolves a class path to a class loader. @param classPath The class path to consider. @return A class loader for the supplied class path.
[ "Resolves", "a", "class", "path", "to", "a", "class", "loader", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ClassLoaderResolver.java#L88-L98
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/painter/RasterTilePainter.java
RasterTilePainter.deleteShape
public void deleteShape(Paintable paintable, Object group, MapContext context) { """ Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The object to be painted. @param group The group where the object resides in (optiona...
java
public void deleteShape(Paintable paintable, Object group, MapContext context) { RasterTile tile = (RasterTile) paintable; context.getRasterContext().deleteElement(tile.getStore().getLayer(), tile.getCode().toString()); }
[ "public", "void", "deleteShape", "(", "Paintable", "paintable", ",", "Object", "group", ",", "MapContext", "context", ")", "{", "RasterTile", "tile", "=", "(", "RasterTile", ")", "paintable", ";", "context", ".", "getRasterContext", "(", ")", ".", "deleteEleme...
Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The object to be painted. @param group The group where the object resides in (optional). @param context The context to paint on.
[ "Delete", "a", "{", "@link", "Paintable", "}", "object", "from", "the", "given", "{", "@link", "MapContext", "}", ".", "It", "the", "object", "does", "not", "exist", "nothing", "will", "be", "done", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/painter/RasterTilePainter.java#L60-L63
kefirfromperm/kefirbb
src/org/kefirsf/bb/util/IntSet.java
IntSet.binarySearch
private static int binarySearch(int[] array, int toIndex, int key) { """ Realisation of binary search algorithm. It is in JDK 1.6.0 but for JDK 1.5.0 compatibility I added it there. @param array array of integers values ordered by ascending @param toIndex top break of array @param key searched value @...
java
private static int binarySearch(int[] array, int toIndex, int key) { int low = 0; int high = toIndex - 1; while (low <= high) { int mid = (low + high) >>> 1; int midVal = array[mid]; if (midVal < key) { low = mid + 1; } else if (m...
[ "private", "static", "int", "binarySearch", "(", "int", "[", "]", "array", ",", "int", "toIndex", ",", "int", "key", ")", "{", "int", "low", "=", "0", ";", "int", "high", "=", "toIndex", "-", "1", ";", "while", "(", "low", "<=", "high", ")", "{",...
Realisation of binary search algorithm. It is in JDK 1.6.0 but for JDK 1.5.0 compatibility I added it there. @param array array of integers values ordered by ascending @param toIndex top break of array @param key searched value @return value index or -(index of position)
[ "Realisation", "of", "binary", "search", "algorithm", ".", "It", "is", "in", "JDK", "1", ".", "6", ".", "0", "but", "for", "JDK", "1", ".", "5", ".", "0", "compatibility", "I", "added", "it", "there", "." ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/util/IntSet.java#L66-L83
Sciss/abc4j
abc/src/main/java/abc/ui/swing/ScoreMetrics.java
ScoreMetrics.getTextFontWidth
protected int getTextFontWidth(byte textType, String text) { """ Returns width of string rendered in the textType font. @param textType one of {@link abc.ui.scoretemplates.ScoreElements} constants @param text The text we want to know its width @return the width of a string in this font used for this score m...
java
protected int getTextFontWidth(byte textType, String text) { if (text == null) return 0; FontMetrics fontMetrics = g2.getFontMetrics(getTextFont(textType)); return fontMetrics.stringWidth(text); }
[ "protected", "int", "getTextFontWidth", "(", "byte", "textType", ",", "String", "text", ")", "{", "if", "(", "text", "==", "null", ")", "return", "0", ";", "FontMetrics", "fontMetrics", "=", "g2", ".", "getFontMetrics", "(", "getTextFont", "(", "textType", ...
Returns width of string rendered in the textType font. @param textType one of {@link abc.ui.scoretemplates.ScoreElements} constants @param text The text we want to know its width @return the width of a string in this font used for this score metrics
[ "Returns", "width", "of", "string", "rendered", "in", "the", "textType", "font", "." ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/ScoreMetrics.java#L340-L345
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkTapsInner.java
VirtualNetworkTapsInner.createOrUpdateAsync
public Observable<VirtualNetworkTapInner> createOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { """ Creates or updates a Virtual Network Tap. @param resourceGroupName The name of the resource group. @param tapName The name of the virtual network tap. @param paramet...
java
public Observable<VirtualNetworkTapInner> createOrUpdateAsync(String resourceGroupName, String tapName, VirtualNetworkTapInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, tapName, parameters).map(new Func1<ServiceResponse<VirtualNetworkTapInner>, VirtualNetworkTapInner>() { ...
[ "public", "Observable", "<", "VirtualNetworkTapInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "tapName", ",", "VirtualNetworkTapInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName"...
Creates or updates a Virtual Network Tap. @param resourceGroupName The name of the resource group. @param tapName The name of the virtual network tap. @param parameters Parameters supplied to the create or update virtual network tap operation. @throws IllegalArgumentException thrown if parameters fail the validation @...
[ "Creates", "or", "updates", "a", "Virtual", "Network", "Tap", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkTapsInner.java#L389-L396
JOML-CI/JOML
src/org/joml/Vector2d.java
Vector2d.setComponent
public Vector2d setComponent(int component, double value) throws IllegalArgumentException { """ Set the value of the specified component of this vector. @param component the component whose value to set, within <code>[0..1]</code> @param value the value to set @return this @throws IllegalArgumentException ...
java
public Vector2d setComponent(int component, double value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; default: throw new IllegalArgum...
[ "public", "Vector2d", "setComponent", "(", "int", "component", ",", "double", "value", ")", "throws", "IllegalArgumentException", "{", "switch", "(", "component", ")", "{", "case", "0", ":", "x", "=", "value", ";", "break", ";", "case", "1", ":", "y", "=...
Set the value of the specified component of this vector. @param component the component whose value to set, within <code>[0..1]</code> @param value the value to set @return this @throws IllegalArgumentException if <code>component</code> is not within <code>[0..1]</code>
[ "Set", "the", "value", "of", "the", "specified", "component", "of", "this", "vector", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector2d.java#L389-L401
michael-rapp/AndroidMaterialPreferences
example/src/main/java/de/mrapp/android/preference/example/PreferenceFragment.java
PreferenceFragment.createDialogPreferenceClickListener
private OnClickListener createDialogPreferenceClickListener() { """ Creates and returns a listener, which allows to show a toast, when a button of the {@link DialogPreference}'s dialog has been clicked. @return The listener, which has been created, as an instance of the type {@link OnClickListener} """ ...
java
private OnClickListener createDialogPreferenceClickListener() { return new OnClickListener() { @Override public void onClick(final DialogInterface dialog, final int which) { String button = getString( which == DialogInterface.BUTTON_POSITIVE ? and...
[ "private", "OnClickListener", "createDialogPreferenceClickListener", "(", ")", "{", "return", "new", "OnClickListener", "(", ")", "{", "@", "Override", "public", "void", "onClick", "(", "final", "DialogInterface", "dialog", ",", "final", "int", "which", ")", "{", ...
Creates and returns a listener, which allows to show a toast, when a button of the {@link DialogPreference}'s dialog has been clicked. @return The listener, which has been created, as an instance of the type {@link OnClickListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "show", "a", "toast", "when", "a", "button", "of", "the", "{", "@link", "DialogPreference", "}", "s", "dialog", "has", "been", "clicked", "." ]
train
https://github.com/michael-rapp/AndroidMaterialPreferences/blob/73a7e449458313bd041fc8d6038e290506b68eb1/example/src/main/java/de/mrapp/android/preference/example/PreferenceFragment.java#L233-L246
liyiorg/weixin-popular
src/main/java/weixin/popular/api/UserAPI.java
UserAPI.userInfoBatchget
public static UserInfoList userInfoBatchget(String access_token,String lang,List<String> openids) { """ 批量获取用户基本信息 @param access_token access_token @param lang zh-CN @param openids 最多支持一次拉取100条 @return UserInfoList """ return userInfoBatchget(access_token, lang, openids,0); }
java
public static UserInfoList userInfoBatchget(String access_token,String lang,List<String> openids){ return userInfoBatchget(access_token, lang, openids,0); }
[ "public", "static", "UserInfoList", "userInfoBatchget", "(", "String", "access_token", ",", "String", "lang", ",", "List", "<", "String", ">", "openids", ")", "{", "return", "userInfoBatchget", "(", "access_token", ",", "lang", ",", "openids", ",", "0", ")", ...
批量获取用户基本信息 @param access_token access_token @param lang zh-CN @param openids 最多支持一次拉取100条 @return UserInfoList
[ "批量获取用户基本信息" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L133-L135
killbill/killbill
invoice/src/main/java/org/killbill/billing/invoice/tree/ItemsNodeInterval.java
ItemsNodeInterval.addProposedItem
public boolean addProposedItem(final ItemsNodeInterval newNode) { """ Add proposed item into the (flattened and reversed) tree @param newNode a new proposed item @return true if the item was merged and will trigger a repair or false if the proposed item should be kept as such and no repair generated """ ...
java
public boolean addProposedItem(final ItemsNodeInterval newNode) { Preconditions.checkState(newNode.getItems().size() == 1, "Invalid node=%s", newNode); final Item item = newNode.getItems().get(0); return addNode(newNode, new AddNodeCallback() { @Override public boolean o...
[ "public", "boolean", "addProposedItem", "(", "final", "ItemsNodeInterval", "newNode", ")", "{", "Preconditions", ".", "checkState", "(", "newNode", ".", "getItems", "(", ")", ".", "size", "(", ")", "==", "1", ",", "\"Invalid node=%s\"", ",", "newNode", ")", ...
Add proposed item into the (flattened and reversed) tree @param newNode a new proposed item @return true if the item was merged and will trigger a repair or false if the proposed item should be kept as such and no repair generated
[ "Add", "proposed", "item", "into", "the", "(", "flattened", "and", "reversed", ")", "tree" ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/invoice/src/main/java/org/killbill/billing/invoice/tree/ItemsNodeInterval.java#L130-L170
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/nfs/nfs3/Nfs3.java
Nfs3.handleRpcException
private boolean handleRpcException(RpcException e, int attemptNumber) throws IOException { """ Decide whether to retry or throw an exception @param e The exception. @param attemptNumber The number of attempts so far. @return <ul><li><code>true</code> if there was an authentication failure and pr...
java
private boolean handleRpcException(RpcException e, int attemptNumber) throws IOException { boolean tryPrivilegedPort = e.getStatus().equals(RejectStatus.AUTH_ERROR); boolean networkError = e.getStatus().equals(RpcStatus.NETWORK_ERROR); boolean retry = (tryPrivilegedPort || networkErr...
[ "private", "boolean", "handleRpcException", "(", "RpcException", "e", ",", "int", "attemptNumber", ")", "throws", "IOException", "{", "boolean", "tryPrivilegedPort", "=", "e", ".", "getStatus", "(", ")", ".", "equals", "(", "RejectStatus", ".", "AUTH_ERROR", ")"...
Decide whether to retry or throw an exception @param e The exception. @param attemptNumber The number of attempts so far. @return <ul><li><code>true</code> if there was an authentication failure and privileged ports should be tried,</li> <li><code>false</code> otherwise.</li></ul> @throws IOException
[ "Decide", "whether", "to", "retry", "or", "throw", "an", "exception" ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/nfs/nfs3/Nfs3.java#L390-L407
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/BooleanUtils.java
BooleanUtils.toBoolean
public static boolean toBoolean(final int value, final int trueValue, final int falseValue) { """ <p>Converts an int to a boolean specifying the conversion values.</p> <pre> BooleanUtils.toBoolean(0, 1, 0) = false BooleanUtils.toBoolean(1, 1, 0) = true BooleanUtils.toBoolean(2, 1, 2) = false BooleanUtils.to...
java
public static boolean toBoolean(final int value, final int trueValue, final int falseValue) { if (value == trueValue) { return true; } if (value == falseValue) { return false; } // no match throw new IllegalArgumentException("The Integer did not ma...
[ "public", "static", "boolean", "toBoolean", "(", "final", "int", "value", ",", "final", "int", "trueValue", ",", "final", "int", "falseValue", ")", "{", "if", "(", "value", "==", "trueValue", ")", "{", "return", "true", ";", "}", "if", "(", "value", "=...
<p>Converts an int to a boolean specifying the conversion values.</p> <pre> BooleanUtils.toBoolean(0, 1, 0) = false BooleanUtils.toBoolean(1, 1, 0) = true BooleanUtils.toBoolean(2, 1, 2) = false BooleanUtils.toBoolean(2, 2, 0) = true </pre> @param value the Integer to convert @param trueValue the value to match for...
[ "<p", ">", "Converts", "an", "int", "to", "a", "boolean", "specifying", "the", "conversion", "values", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/BooleanUtils.java#L260-L269
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/model/FilterVersion.java
FilterVersion.getFilterRange
public static VersionRange getFilterRange(FilterVersion minVersion, FilterVersion maxVersion) { """ This method creates a version range from the supplied min and max FilterVersion @param minVersion The min version in the range. Can be null, if so treated as {@link Version#emptyVersion} @param maxVersion The ma...
java
public static VersionRange getFilterRange(FilterVersion minVersion, FilterVersion maxVersion) { VersionRange vr = null; Version vmin = minVersion == null ? Version.emptyVersion : new Version(minVersion.getValue()); Version vmax = maxVersion == null ? null : new Version(maxVersion.getValue()); ...
[ "public", "static", "VersionRange", "getFilterRange", "(", "FilterVersion", "minVersion", ",", "FilterVersion", "maxVersion", ")", "{", "VersionRange", "vr", "=", "null", ";", "Version", "vmin", "=", "minVersion", "==", "null", "?", "Version", ".", "emptyVersion",...
This method creates a version range from the supplied min and max FilterVersion @param minVersion The min version in the range. Can be null, if so treated as {@link Version#emptyVersion} @param maxVersion The max version. Can be null, null in a version range is treated as infinite @return A version range object repres...
[ "This", "method", "creates", "a", "version", "range", "from", "the", "supplied", "min", "and", "max", "FilterVersion" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/model/FilterVersion.java#L111-L119
apache/groovy
src/main/java/org/codehaus/groovy/transform/trait/TraitComposer.java
TraitComposer.doCreateSuperForwarder
private static void doCreateSuperForwarder(ClassNode targetNode, MethodNode forwarderMethod, ClassNode[] interfacesToGenerateForwarderFor, Map<String,ClassNode> genericsSpec) { """ Creates a method to dispatch to "super traits" in a "stackable" fashion. The generated method looks like this: <p> <code>ReturnType ...
java
private static void doCreateSuperForwarder(ClassNode targetNode, MethodNode forwarderMethod, ClassNode[] interfacesToGenerateForwarderFor, Map<String,ClassNode> genericsSpec) { Parameter[] parameters = forwarderMethod.getParameters(); Parameter[] superForwarderParams = new Parameter[parameters.length]; ...
[ "private", "static", "void", "doCreateSuperForwarder", "(", "ClassNode", "targetNode", ",", "MethodNode", "forwarderMethod", ",", "ClassNode", "[", "]", "interfacesToGenerateForwarderFor", ",", "Map", "<", "String", ",", "ClassNode", ">", "genericsSpec", ")", "{", "...
Creates a method to dispatch to "super traits" in a "stackable" fashion. The generated method looks like this: <p> <code>ReturnType trait$super$method(Class clazz, Arg1 arg1, Arg2 arg2, ...) { if (SomeTrait.is(A) { return SomeOtherTrait$Trait$Helper.method(this, arg1, arg2) } super.method(arg1,arg2) }</code> </p> @para...
[ "Creates", "a", "method", "to", "dispatch", "to", "super", "traits", "in", "a", "stackable", "fashion", ".", "The", "generated", "method", "looks", "like", "this", ":", "<p", ">", "<code", ">", "ReturnType", "trait$super$method", "(", "Class", "clazz", "Arg1...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/trait/TraitComposer.java#L493-L512
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/Parser.java
Parser.processOption
protected void processOption(String arg, ListIterator<String> iter) throws ParseException { """ Process the Option specified by <code>arg</code> using the values retrieved from the specified iterator <code>iter</code>. @param arg The String value representing an Option @param iter The iterator over the flatte...
java
protected void processOption(String arg, ListIterator<String> iter) throws ParseException { boolean hasOption = getOptions().hasOption(arg); // if there is no option throw an UnrecognisedOptionException if (!hasOption) { throw new UnrecognizedOptionException("Unrecognize...
[ "protected", "void", "processOption", "(", "String", "arg", ",", "ListIterator", "<", "String", ">", "iter", ")", "throws", "ParseException", "{", "boolean", "hasOption", "=", "getOptions", "(", ")", ".", "hasOption", "(", "arg", ")", ";", "// if there is no o...
Process the Option specified by <code>arg</code> using the values retrieved from the specified iterator <code>iter</code>. @param arg The String value representing an Option @param iter The iterator over the flattened command line arguments. @throws ParseException if <code>arg</code> does not represent an Option
[ "Process", "the", "Option", "specified", "by", "<code", ">", "arg<", "/", "code", ">", "using", "the", "values", "retrieved", "from", "the", "specified", "iterator", "<code", ">", "iter<", "/", "code", ">", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/Parser.java#L376-L400
lamarios/sherdog-parser
src/main/java/com/ftpix/sherdogparser/parsers/ParserUtils.java
ParserUtils.getFightType
public static FightType getFightType(Sherdog parser, Fight fight) { """ Gets the type of a fight (Pro, amateur etc...) @param parser the sherdsog parser, required as we need to use the parser to get info on the fighter @param fight the fight to check @return the type of the fight """ //getting o...
java
public static FightType getFightType(Sherdog parser, Fight fight) { //getting one of the fighter, and parsing his/her fights to find this fight BiFunction<SherdogBaseObject, SherdogBaseObject, FightType> getType = (f1, f2) -> { try { Fighter fighter = parser.getFighter(f1.g...
[ "public", "static", "FightType", "getFightType", "(", "Sherdog", "parser", ",", "Fight", "fight", ")", "{", "//getting one of the fighter, and parsing his/her fights to find this fight", "BiFunction", "<", "SherdogBaseObject", ",", "SherdogBaseObject", ",", "FightType", ">", ...
Gets the type of a fight (Pro, amateur etc...) @param parser the sherdsog parser, required as we need to use the parser to get info on the fighter @param fight the fight to check @return the type of the fight
[ "Gets", "the", "type", "of", "a", "fight", "(", "Pro", "amateur", "etc", "...", ")" ]
train
https://github.com/lamarios/sherdog-parser/blob/7cdb36280317caeaaa54db77c04dc4b4e1db053e/src/main/java/com/ftpix/sherdogparser/parsers/ParserUtils.java#L137-L174
greenfrvr/rubber-loader
rubber-loader/src/main/java/com/greenfrvr/rubberloader/RubberLoaderView.java
RubberLoaderView.setPaletteRes
public void setPaletteRes(@ColorRes int primeId, @ColorRes int extraId) { """ Sets loader prime and extra color. @param primeId Prime color resId @param extraId Extra color resId """ this.primeColor = ContextCompat.getColor(getContext(), primeId); this.extraColor = ContextCompat.getColor(ge...
java
public void setPaletteRes(@ColorRes int primeId, @ColorRes int extraId) { this.primeColor = ContextCompat.getColor(getContext(), primeId); this.extraColor = ContextCompat.getColor(getContext(), extraId); pathPaint.setColor(primeColor); gradient = null; }
[ "public", "void", "setPaletteRes", "(", "@", "ColorRes", "int", "primeId", ",", "@", "ColorRes", "int", "extraId", ")", "{", "this", ".", "primeColor", "=", "ContextCompat", ".", "getColor", "(", "getContext", "(", ")", ",", "primeId", ")", ";", "this", ...
Sets loader prime and extra color. @param primeId Prime color resId @param extraId Extra color resId
[ "Sets", "loader", "prime", "and", "extra", "color", "." ]
train
https://github.com/greenfrvr/rubber-loader/blob/7ce5c6edd567f37cd55654afc1987740550f6002/rubber-loader/src/main/java/com/greenfrvr/rubberloader/RubberLoaderView.java#L136-L141
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java
ByteArrayUtil.writeString
public static void writeString(ByteBuffer buffer, String s) throws IOException { """ Write a string to the buffer. See {@link StringSerializer} for details. @param buffer Buffer to write to @param s String to write """ if(s == null) { s = ""; // Which will be written as Varint 0 = single byte ...
java
public static void writeString(ByteBuffer buffer, String s) throws IOException { if(s == null) { s = ""; // Which will be written as Varint 0 = single byte 0. } ByteArrayUtil.STRING_SERIALIZER.toByteBuffer(buffer, s); }
[ "public", "static", "void", "writeString", "(", "ByteBuffer", "buffer", ",", "String", "s", ")", "throws", "IOException", "{", "if", "(", "s", "==", "null", ")", "{", "s", "=", "\"\"", ";", "// Which will be written as Varint 0 = single byte 0.", "}", "ByteArray...
Write a string to the buffer. See {@link StringSerializer} for details. @param buffer Buffer to write to @param s String to write
[ "Write", "a", "string", "to", "the", "buffer", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/ByteArrayUtil.java#L687-L692
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java
HadoopUtils.deserializeFromString
public static Writable deserializeFromString(Class<? extends Writable> writableClass, String serializedWritableStr) throws IOException { """ Deserialize a {@link Writable} object from a string. @param writableClass the {@link Writable} implementation class @param serializedWritableStr the string containi...
java
public static Writable deserializeFromString(Class<? extends Writable> writableClass, String serializedWritableStr) throws IOException { return deserializeFromString(writableClass, serializedWritableStr, new Configuration()); }
[ "public", "static", "Writable", "deserializeFromString", "(", "Class", "<", "?", "extends", "Writable", ">", "writableClass", ",", "String", "serializedWritableStr", ")", "throws", "IOException", "{", "return", "deserializeFromString", "(", "writableClass", ",", "seri...
Deserialize a {@link Writable} object from a string. @param writableClass the {@link Writable} implementation class @param serializedWritableStr the string containing a serialized {@link Writable} object @return a {@link Writable} deserialized from the string @throws IOException if there's something wrong with the des...
[ "Deserialize", "a", "{", "@link", "Writable", "}", "object", "from", "a", "string", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L806-L809
casmi/casmi
src/main/java/casmi/graphics/element/Curve.java
Curve.setNode
public void setNode(int number, Vector3D v) { """ Sets coordinate of nodes of this Curve. @param number The number of a node. The node whose number is 0 or 3 is a anchor point, and the node whose number is 1 or 2 is a control point. @param v The coordinates of this node. """ if (number <= 0) { ...
java
public void setNode(int number, Vector3D v) { if (number <= 0) { number = 0; } else if (3 <= number) { number = 3; } this.points[number * 3] = (float)v.getX(); this.points[number * 3 + 1] = (float)v.getY(); this.points[number * 3 + 2] = (float)v.ge...
[ "public", "void", "setNode", "(", "int", "number", ",", "Vector3D", "v", ")", "{", "if", "(", "number", "<=", "0", ")", "{", "number", "=", "0", ";", "}", "else", "if", "(", "3", "<=", "number", ")", "{", "number", "=", "3", ";", "}", "this", ...
Sets coordinate of nodes of this Curve. @param number The number of a node. The node whose number is 0 or 3 is a anchor point, and the node whose number is 1 or 2 is a control point. @param v The coordinates of this node.
[ "Sets", "coordinate", "of", "nodes", "of", "this", "Curve", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Curve.java#L384-L394
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getBestRowIdentifier
@Override public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { """ Retrieves a description of a table's optimal set of columns that uniquely identifies a row. """ checkClosed(); throw SQLError.noSupport(); ...
java
@Override public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
[ "@", "Override", "public", "ResultSet", "getBestRowIdentifier", "(", "String", "catalog", ",", "String", "schema", ",", "String", "table", ",", "int", "scope", ",", "boolean", "nullable", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "throw...
Retrieves a description of a table's optimal set of columns that uniquely identifies a row.
[ "Retrieves", "a", "description", "of", "a", "table", "s", "optimal", "set", "of", "columns", "that", "uniquely", "identifies", "a", "row", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L147-L152
andrehertwig/admintool
admin-tools-filebrowser/src/main/java/de/chandre/admintool/filebrowser/AdminToolFilebrowserServiceImpl.java
AdminToolFilebrowserServiceImpl.isAllowed
protected boolean isAllowed(File path, boolean write) throws IOException { """ checks if file is allowed for access @param path @param write @return @throws IOException """ return isAllowedInternal(path, write, config.isReadOnly()); }
java
protected boolean isAllowed(File path, boolean write) throws IOException { return isAllowedInternal(path, write, config.isReadOnly()); }
[ "protected", "boolean", "isAllowed", "(", "File", "path", ",", "boolean", "write", ")", "throws", "IOException", "{", "return", "isAllowedInternal", "(", "path", ",", "write", ",", "config", ".", "isReadOnly", "(", ")", ")", ";", "}" ]
checks if file is allowed for access @param path @param write @return @throws IOException
[ "checks", "if", "file", "is", "allowed", "for", "access" ]
train
https://github.com/andrehertwig/admintool/blob/6d391e2d26969b70e3ccabfc34202abe8d915080/admin-tools-filebrowser/src/main/java/de/chandre/admintool/filebrowser/AdminToolFilebrowserServiceImpl.java#L516-L518
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/XMLResourceBundle.java
XMLResourceBundle.get
public String get(final String aMessage, final File... aFileArray) { """ Returns the string form of the requested message with the file values integrated into it. @param aMessage A message key to use to return a message value @param aFileArray An array of files, whose names should be integrated into the messag...
java
public String get(final String aMessage, final File... aFileArray) { final String[] details = new String[aFileArray.length]; for (int index = 0; index < details.length; index++) { details[index] = aFileArray[index].getAbsolutePath(); } LOGGER.debug(MessageCodes.UTIL_026, aM...
[ "public", "String", "get", "(", "final", "String", "aMessage", ",", "final", "File", "...", "aFileArray", ")", "{", "final", "String", "[", "]", "details", "=", "new", "String", "[", "aFileArray", ".", "length", "]", ";", "for", "(", "int", "index", "=...
Returns the string form of the requested message with the file values integrated into it. @param aMessage A message key to use to return a message value @param aFileArray An array of files, whose names should be integrated into the message value @return The message value with the supplied file names integrated
[ "Returns", "the", "string", "form", "of", "the", "requested", "message", "with", "the", "file", "values", "integrated", "into", "it", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/XMLResourceBundle.java#L123-L132
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/journal/RingbufferCacheEventJournalImpl.java
RingbufferCacheEventJournalImpl.toRingbufferConfig
@Override public RingbufferConfig toRingbufferConfig(EventJournalConfig config, ObjectNamespace namespace) { """ {@inheritDoc} @throws CacheNotExistsException if the cache configuration was not found """ CacheConfig cacheConfig = getCacheService().getCacheConfig(namespace.getObjectName()); ...
java
@Override public RingbufferConfig toRingbufferConfig(EventJournalConfig config, ObjectNamespace namespace) { CacheConfig cacheConfig = getCacheService().getCacheConfig(namespace.getObjectName()); if (cacheConfig == null) { throw new CacheNotExistsException("Cache " + namespace.getObjectN...
[ "@", "Override", "public", "RingbufferConfig", "toRingbufferConfig", "(", "EventJournalConfig", "config", ",", "ObjectNamespace", "namespace", ")", "{", "CacheConfig", "cacheConfig", "=", "getCacheService", "(", ")", ".", "getCacheConfig", "(", "namespace", ".", "getO...
{@inheritDoc} @throws CacheNotExistsException if the cache configuration was not found
[ "{", "@inheritDoc", "}" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/journal/RingbufferCacheEventJournalImpl.java#L189-L204
Bedework/bw-util
bw-util-jmx/src/main/java/org/bedework/util/jmx/AnnotatedMBean.java
AnnotatedMBean.registerMBean
@SuppressWarnings("unchecked") public static void registerMBean(final ManagementContext context, final Object object, final ObjectName objectName) throws Exception { """ Register an mbean with the jmx context @param context @param obje...
java
@SuppressWarnings("unchecked") public static void registerMBean(final ManagementContext context, final Object object, final ObjectName objectName) throws Exception { String mbeanName = object.getClass().getName() + "MBean"; for (Class...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "void", "registerMBean", "(", "final", "ManagementContext", "context", ",", "final", "Object", "object", ",", "final", "ObjectName", "objectName", ")", "throws", "Exception", "{", "String", "m...
Register an mbean with the jmx context @param context @param object @param objectName @throws Exception
[ "Register", "an", "mbean", "with", "the", "jmx", "context" ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-jmx/src/main/java/org/bedework/util/jmx/AnnotatedMBean.java#L58-L74
realtime-framework/RealtimeMessaging-Java
library/src/main/java/ibt/ortc/extensibility/OrtcClient.java
OrtcClient.setProxy
public void setProxy(String host, int port, String user, String pwd) { """ sets proxy, optionally using basic authentication @param host proxy host @param port proxy port @param user proxy user or null when no authentication is needed @param pwd proxy password or null when no authentication is needed """...
java
public void setProxy(String host, int port, String user, String pwd) { this.proxy = new Proxy(host, port, user, pwd); }
[ "public", "void", "setProxy", "(", "String", "host", ",", "int", "port", ",", "String", "user", ",", "String", "pwd", ")", "{", "this", ".", "proxy", "=", "new", "Proxy", "(", "host", ",", "port", ",", "user", ",", "pwd", ")", ";", "}" ]
sets proxy, optionally using basic authentication @param host proxy host @param port proxy port @param user proxy user or null when no authentication is needed @param pwd proxy password or null when no authentication is needed
[ "sets", "proxy", "optionally", "using", "basic", "authentication" ]
train
https://github.com/realtime-framework/RealtimeMessaging-Java/blob/cae0dfd01567a2d9e55a0849c0c9b09ad4b2cc08/library/src/main/java/ibt/ortc/extensibility/OrtcClient.java#L1329-L1331
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverRf.java
JCusolverRf.cusolverRfBatchResetValues
public static int cusolverRfBatchResetValues( int batchSize, int n, int nnzA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer csrValA_array, Pointer P, Pointer Q, /** Output */ cusolverRfHandle handle) { """ CUSOLVERR...
java
public static int cusolverRfBatchResetValues( int batchSize, int n, int nnzA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer csrValA_array, Pointer P, Pointer Q, /** Output */ cusolverRfHandle handle) { retu...
[ "public", "static", "int", "cusolverRfBatchResetValues", "(", "int", "batchSize", ",", "int", "n", ",", "int", "nnzA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA", ",", "Pointer", "csrValA_array", ",", "Pointer", "P", ",", "Pointer", "Q", ",", ...
CUSOLVERRF-batch update the matrix values (assuming the reordering, pivoting and consequently the sparsity pattern of L and U did not change), and zero out the remaining values.
[ "CUSOLVERRF", "-", "batch", "update", "the", "matrix", "values", "(", "assuming", "the", "reordering", "pivoting", "and", "consequently", "the", "sparsity", "pattern", "of", "L", "and", "U", "did", "not", "change", ")", "and", "zero", "out", "the", "remainin...
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverRf.java#L481-L494
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/SmartTable.java
SmartTable.setColumnCellStyles
public void setColumnCellStyles (int column, String... styles) { """ Sets the style of all cells in the given column to the given values. The first style is set as the primary style and additional styles are added onto that. """ int rowCount = getRowCount(); for (int row = 0; row < rowCount; +...
java
public void setColumnCellStyles (int column, String... styles) { int rowCount = getRowCount(); for (int row = 0; row < rowCount; ++row) { setStyleNames(row, column, styles); } }
[ "public", "void", "setColumnCellStyles", "(", "int", "column", ",", "String", "...", "styles", ")", "{", "int", "rowCount", "=", "getRowCount", "(", ")", ";", "for", "(", "int", "row", "=", "0", ";", "row", "<", "rowCount", ";", "++", "row", ")", "{"...
Sets the style of all cells in the given column to the given values. The first style is set as the primary style and additional styles are added onto that.
[ "Sets", "the", "style", "of", "all", "cells", "in", "the", "given", "column", "to", "the", "given", "values", ".", "The", "first", "style", "is", "set", "as", "the", "primary", "style", "and", "additional", "styles", "are", "added", "onto", "that", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/SmartTable.java#L351-L357
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/Vertigo.java
Vertigo.deployNetwork
public Vertigo deployNetwork(String name) { """ Deploys a bare network to an anonymous local-only cluster.<p> The network will be deployed with no components and no connections. You can add components and connections to the network with an {@link ActiveNetwork} instance. @param name The name of the network...
java
public Vertigo deployNetwork(String name) { return deployNetwork(name, (Handler<AsyncResult<ActiveNetwork>>) null); }
[ "public", "Vertigo", "deployNetwork", "(", "String", "name", ")", "{", "return", "deployNetwork", "(", "name", ",", "(", "Handler", "<", "AsyncResult", "<", "ActiveNetwork", ">", ">", ")", "null", ")", ";", "}" ]
Deploys a bare network to an anonymous local-only cluster.<p> The network will be deployed with no components and no connections. You can add components and connections to the network with an {@link ActiveNetwork} instance. @param name The name of the network to deploy. @return The Vertigo instance.
[ "Deploys", "a", "bare", "network", "to", "an", "anonymous", "local", "-", "only", "cluster", ".", "<p", ">" ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/Vertigo.java#L315-L317
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteEntityAsync
public Observable<OperationStatus> deleteEntityAsync(UUID appId, String versionId, UUID entityId) { """ Deletes an entity extractor from the application. @param appId The application ID. @param versionId The version ID. @param entityId The entity extractor ID. @throws IllegalArgumentException thrown if param...
java
public Observable<OperationStatus> deleteEntityAsync(UUID appId, String versionId, UUID entityId) { return deleteEntityWithServiceResponseAsync(appId, versionId, entityId).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public OperationStatus call(ServiceRe...
[ "public", "Observable", "<", "OperationStatus", ">", "deleteEntityAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ")", "{", "return", "deleteEntityWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId", ")", "...
Deletes an entity extractor from the application. @param appId The application ID. @param versionId The version ID. @param entityId The entity extractor ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the OperationStatus object
[ "Deletes", "an", "entity", "extractor", "from", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3592-L3599
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.passwordBytes
public static byte[] passwordBytes(AbstractConfig config, String key, String charset) { """ Method is used to return an array of bytes representing the password stored in the config. @param config Config to read from @param key Key to read from @param charset Charset to use @return byte array containing...
java
public static byte[] passwordBytes(AbstractConfig config, String key, String charset) { return passwordBytes(config, key, Charset.forName(charset)); }
[ "public", "static", "byte", "[", "]", "passwordBytes", "(", "AbstractConfig", "config", ",", "String", "key", ",", "String", "charset", ")", "{", "return", "passwordBytes", "(", "config", ",", "key", ",", "Charset", ".", "forName", "(", "charset", ")", ")"...
Method is used to return an array of bytes representing the password stored in the config. @param config Config to read from @param key Key to read from @param charset Charset to use @return byte array containing the password
[ "Method", "is", "used", "to", "return", "an", "array", "of", "bytes", "representing", "the", "password", "stored", "in", "the", "config", "." ]
train
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L341-L343
graphql-java/graphql-java
src/main/java/graphql/GraphQL.java
GraphQL.executeAsync
public CompletableFuture<ExecutionResult> executeAsync(ExecutionInput executionInput) { """ Executes the graphql query using the provided input object <p> This will return a promise (aka {@link CompletableFuture}) to provide a {@link ExecutionResult} which is the result of executing the provided query. @para...
java
public CompletableFuture<ExecutionResult> executeAsync(ExecutionInput executionInput) { try { log.debug("Executing request. operation name: '{}'. query: '{}'. variables '{}'", executionInput.getOperationName(), executionInput.getQuery(), executionInput.getVariables()); InstrumentationSt...
[ "public", "CompletableFuture", "<", "ExecutionResult", ">", "executeAsync", "(", "ExecutionInput", "executionInput", ")", "{", "try", "{", "log", ".", "debug", "(", "\"Executing request. operation name: '{}'. query: '{}'. variables '{}'\"", ",", "executionInput", ".", "getO...
Executes the graphql query using the provided input object <p> This will return a promise (aka {@link CompletableFuture}) to provide a {@link ExecutionResult} which is the result of executing the provided query. @param executionInput {@link ExecutionInput} @return a promise to an {@link ExecutionResult} which can inc...
[ "Executes", "the", "graphql", "query", "using", "the", "provided", "input", "object", "<p", ">", "This", "will", "return", "a", "promise", "(", "aka", "{", "@link", "CompletableFuture", "}", ")", "to", "provide", "a", "{", "@link", "ExecutionResult", "}", ...
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/GraphQL.java#L482-L507
Bedework/bw-util
bw-util-directory/src/main/java/org/bedework/util/directory/common/DirRecord.java
DirRecord.setAttr
public void setAttr(String attr, Object val) throws NamingException { """ Set the attribute value in the table. Replaces any existing value(s) This does not write back to the directory @param attr @param val @throws NamingException """ getAttributes().put(attr, val); }
java
public void setAttr(String attr, Object val) throws NamingException { getAttributes().put(attr, val); }
[ "public", "void", "setAttr", "(", "String", "attr", ",", "Object", "val", ")", "throws", "NamingException", "{", "getAttributes", "(", ")", ".", "put", "(", "attr", ",", "val", ")", ";", "}" ]
Set the attribute value in the table. Replaces any existing value(s) This does not write back to the directory @param attr @param val @throws NamingException
[ "Set", "the", "attribute", "value", "in", "the", "table", ".", "Replaces", "any", "existing", "value", "(", "s", ")", "This", "does", "not", "write", "back", "to", "the", "directory" ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-directory/src/main/java/org/bedework/util/directory/common/DirRecord.java#L82-L84
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.getSQLFromField
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { """ Move the physical binary data to this SQL parameter row. This is overidden to move the physical data type. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param i...
java
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((this.isNullable()) && (iType != DBConstants.SQL_SELECT_TYPE) && (iType != DBConstants.SQL_SEEK_TYPE)) statement.setNull(iParamColumn, Type...
[ "public", "void", "getSQLFromField", "(", "PreparedStatement", "statement", ",", "int", "iType", ",", "int", "iParamColumn", ")", "throws", "SQLException", "{", "if", "(", "this", ".", "isNull", "(", ")", ")", "{", "if", "(", "(", "this", ".", "isNullable"...
Move the physical binary data to this SQL parameter row. This is overidden to move the physical data type. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param iParamColumn The column in the prepared statement to set the data. @exception SQLException From SQL calls.
[ "Move", "the", "physical", "binary", "data", "to", "this", "SQL", "parameter", "row", ".", "This", "is", "overidden", "to", "move", "the", "physical", "data", "type", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L801-L828
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindableModel.java
PathfindableModel.removeObjectId
private void removeObjectId(int dtx, int dty) { """ Remove the map object id of the pathfindable. @param dtx The tile horizontal destination. @param dty The tile vertical destination. """ final int tw = transformable.getWidth() / map.getTileWidth(); final int th = transformable.getHeight() ...
java
private void removeObjectId(int dtx, int dty) { final int tw = transformable.getWidth() / map.getTileWidth(); final int th = transformable.getHeight() / map.getTileHeight(); for (int tx = dtx; tx < dtx + tw; tx++) { for (int ty = dty; ty < dty + th; ty++) { ...
[ "private", "void", "removeObjectId", "(", "int", "dtx", ",", "int", "dty", ")", "{", "final", "int", "tw", "=", "transformable", ".", "getWidth", "(", ")", "/", "map", ".", "getTileWidth", "(", ")", ";", "final", "int", "th", "=", "transformable", ".",...
Remove the map object id of the pathfindable. @param dtx The tile horizontal destination. @param dty The tile vertical destination.
[ "Remove", "the", "map", "object", "id", "of", "the", "pathfindable", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindableModel.java#L187-L201
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.redirectRelativeLinks
private String redirectRelativeLinks(Element element, TextTree tt) { """ Suppose a piece of documentation has a relative link. When you copy that documentation to another place such as the index or class-use page, that relative link will no longer work. We should redirect those links so that they will work ag...
java
private String redirectRelativeLinks(Element element, TextTree tt) { String text = tt.getBody(); if (element == null || utils.isOverviewElement(element) || shouldNotRedirectRelativeLinks()) { return text; } DocPath redirectPathFromRoot = new SimpleElementVisitor9<DocPath, Vo...
[ "private", "String", "redirectRelativeLinks", "(", "Element", "element", ",", "TextTree", "tt", ")", "{", "String", "text", "=", "tt", ".", "getBody", "(", ")", ";", "if", "(", "element", "==", "null", "||", "utils", ".", "isOverviewElement", "(", "element...
Suppose a piece of documentation has a relative link. When you copy that documentation to another place such as the index or class-use page, that relative link will no longer work. We should redirect those links so that they will work again. <p> Here is the algorithm used to fix the link: <p> {@literal <relative link...
[ "Suppose", "a", "piece", "of", "documentation", "has", "a", "relative", "link", ".", "When", "you", "copy", "that", "documentation", "to", "another", "place", "such", "as", "the", "index", "or", "class", "-", "use", "page", "that", "relative", "link", "wil...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java#L2077-L2122
RestComm/cluster
cache/src/main/java/org/restcomm/cache/MobicentsCache.java
MobicentsCache.setReplicationClassLoader
@SuppressWarnings("rawtypes") public void setReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { """ Sets the class loader to be used on serialization operations, for data stored in the specified fqn and child nodes. Note that if another class loader is set for a specific child node tree, the cache...
java
@SuppressWarnings("rawtypes") public void setReplicationClassLoader(Fqn regionFqn, ClassLoader classLoader) { if (!isLocalMode()) { final Region region = jBossCache.getRegion(regionFqn, true); region.registerContextClassLoader(classLoader); if (!region.isActive() && jBossCache.getCacheStatus() == CacheStatu...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "setReplicationClassLoader", "(", "Fqn", "regionFqn", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "!", "isLocalMode", "(", ")", ")", "{", "final", "Region", "region", "=", "jBossC...
Sets the class loader to be used on serialization operations, for data stored in the specified fqn and child nodes. Note that if another class loader is set for a specific child node tree, the cache will use instead that class loader. @param regionFqn @param classLoader
[ "Sets", "the", "class", "loader", "to", "be", "used", "on", "serialization", "operations", "for", "data", "stored", "in", "the", "specified", "fqn", "and", "child", "nodes", ".", "Note", "that", "if", "another", "class", "loader", "is", "set", "for", "a", ...
train
https://github.com/RestComm/cluster/blob/46bff5e9ae89528ccc7b43ba50a0de5b96913e6f/cache/src/main/java/org/restcomm/cache/MobicentsCache.java#L184-L193
alkacon/opencms-core
src/org/opencms/ade/contenteditor/shared/CmsContentDefinition.java
CmsContentDefinition.uuidToEntityId
public static String uuidToEntityId(CmsUUID uuid, String locale) { """ Returns the entity id according to the given UUID.<p> @param uuid the UUID @param locale the content locale @return the entity id """ return ENTITY_ID_PREFIX + locale + "/" + uuid.toString(); }
java
public static String uuidToEntityId(CmsUUID uuid, String locale) { return ENTITY_ID_PREFIX + locale + "/" + uuid.toString(); }
[ "public", "static", "String", "uuidToEntityId", "(", "CmsUUID", "uuid", ",", "String", "locale", ")", "{", "return", "ENTITY_ID_PREFIX", "+", "locale", "+", "\"/\"", "+", "uuid", ".", "toString", "(", ")", ";", "}" ]
Returns the entity id according to the given UUID.<p> @param uuid the UUID @param locale the content locale @return the entity id
[ "Returns", "the", "entity", "id", "according", "to", "the", "given", "UUID", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/shared/CmsContentDefinition.java#L376-L379
apache/flink
flink-core/src/main/java/org/apache/flink/util/Preconditions.java
Preconditions.checkArgument
public static void checkArgument(boolean condition, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { """ Checks the given boolean condition, and throws an {@code IllegalArgumentException} if the condition is not met (evaluates to {@code false}). @param condition The conditio...
java
public static void checkArgument(boolean condition, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!condition) { throw new IllegalArgumentException(format(errorMessageTemplate, errorMessageArgs)); } }
[ "public", "static", "void", "checkArgument", "(", "boolean", "condition", ",", "@", "Nullable", "String", "errorMessageTemplate", ",", "@", "Nullable", "Object", "...", "errorMessageArgs", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "Illeg...
Checks the given boolean condition, and throws an {@code IllegalArgumentException} if the condition is not met (evaluates to {@code false}). @param condition The condition to check @param errorMessageTemplate The message template for the {@code IllegalArgumentException} that is thrown if the check fails. The template ...
[ "Checks", "the", "given", "boolean", "condition", "and", "throws", "an", "{", "@code", "IllegalArgumentException", "}", "if", "the", "condition", "is", "not", "met", "(", "evaluates", "to", "{", "@code", "false", "}", ")", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/util/Preconditions.java#L156-L163
MenoData/Time4J
base/src/main/java/net/time4j/format/expert/Iso8601Format.java
Iso8601Format.parseDate
public static PlainDate parseDate(CharSequence iso) throws ParseException { """ /*[deutsch] <p>Interpretiert den angegebenen ISO-8601-kompatiblen Datumstext im <i>basic</i>-Format oder im <i>extended</i>-Format. </p> @param iso text like &quot;20160101&quot;, &quot;2016001&quot;, &quot;2016W011&quot;, ...
java
public static PlainDate parseDate(CharSequence iso) throws ParseException { ParseLog plog = new ParseLog(); PlainDate date = parseDate(iso, plog); if ((date == null) || plog.isError()) { throw new ParseException(plog.getErrorMessage(), plog.getErrorIndex()); } else if (plog...
[ "public", "static", "PlainDate", "parseDate", "(", "CharSequence", "iso", ")", "throws", "ParseException", "{", "ParseLog", "plog", "=", "new", "ParseLog", "(", ")", ";", "PlainDate", "date", "=", "parseDate", "(", "iso", ",", "plog", ")", ";", "if", "(", ...
/*[deutsch] <p>Interpretiert den angegebenen ISO-8601-kompatiblen Datumstext im <i>basic</i>-Format oder im <i>extended</i>-Format. </p> @param iso text like &quot;20160101&quot;, &quot;2016001&quot;, &quot;2016W011&quot;, &quot;2016-01-01&quot;, &quot;2016-001&quot; or &quot;2016-W01-1&quot; @return PlainDate ...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Interpretiert", "den", "angegebenen", "ISO", "-", "8601", "-", "kompatiblen", "Datumstext", "im", "<i", ">", "basic<", "/", "i", ">", "-", "Format", "oder", "im", "<i", ">", "extended<", "/", "i", ">", "-", ...
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/format/expert/Iso8601Format.java#L572-L585
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newUploadPhotoRequest
public static Request newUploadPhotoRequest(Session session, Bitmap image, Callback callback) { """ Creates a new Request configured to upload a photo to the user's default photo album. @param session the Session to use, or null; if non-null, the session must be in an opened state @param image the image to u...
java
public static Request newUploadPhotoRequest(Session session, Bitmap image, Callback callback) { Bundle parameters = new Bundle(1); parameters.putParcelable(PICTURE_PARAM, image); return new Request(session, MY_PHOTOS, parameters, HttpMethod.POST, callback); }
[ "public", "static", "Request", "newUploadPhotoRequest", "(", "Session", "session", ",", "Bitmap", "image", ",", "Callback", "callback", ")", "{", "Bundle", "parameters", "=", "new", "Bundle", "(", "1", ")", ";", "parameters", ".", "putParcelable", "(", "PICTUR...
Creates a new Request configured to upload a photo to the user's default photo album. @param session the Session to use, or null; if non-null, the session must be in an opened state @param image the image to upload @param callback a callback that will be called when the request is completed to handle success or error ...
[ "Creates", "a", "new", "Request", "configured", "to", "upload", "a", "photo", "to", "the", "user", "s", "default", "photo", "album", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L319-L324
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/Utils.java
Utils.createFile
public static FileWriter createFile(String name, String outDir) throws IOException { """ Create file @param name The name of the class @param outDir output directory @return The file @throws IOException Thrown if an error occurs """ File path = new File(outDir); if (!path.exists()) { ...
java
public static FileWriter createFile(String name, String outDir) throws IOException { File path = new File(outDir); if (!path.exists()) { if (!path.mkdirs()) throw new IOException("outdir can't be created"); } File file = new File(path.getAbsolutePath() + File.separ...
[ "public", "static", "FileWriter", "createFile", "(", "String", "name", ",", "String", "outDir", ")", "throws", "IOException", "{", "File", "path", "=", "new", "File", "(", "outDir", ")", ";", "if", "(", "!", "path", ".", "exists", "(", ")", ")", "{", ...
Create file @param name The name of the class @param outDir output directory @return The file @throws IOException Thrown if an error occurs
[ "Create", "file" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/Utils.java#L169-L187
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java
MutateInBuilder.arrayPrependAll
@Deprecated public <T> MutateInBuilder arrayPrependAll(String path, Collection<T> values, boolean createPath) { """ Prepend multiple values at once in an existing array, pushing all values in the collection's iteration order to the front/start of the array. First value becomes the first element of the arra...
java
@Deprecated public <T> MutateInBuilder arrayPrependAll(String path, Collection<T> values, boolean createPath) { asyncBuilder.arrayPrependAll(path, values, new SubdocOptionsBuilder().createPath(createPath)); return this; }
[ "@", "Deprecated", "public", "<", "T", ">", "MutateInBuilder", "arrayPrependAll", "(", "String", "path", ",", "Collection", "<", "T", ">", "values", ",", "boolean", "createPath", ")", "{", "asyncBuilder", ".", "arrayPrependAll", "(", "path", ",", "values", "...
Prepend multiple values at once in an existing array, pushing all values in the collection's iteration order to the front/start of the array. First value becomes the first element of the array, second value the second, etc... All existing values are shifted right in the array, by the number of inserted elements. Each...
[ "Prepend", "multiple", "values", "at", "once", "in", "an", "existing", "array", "pushing", "all", "values", "in", "the", "collection", "s", "iteration", "order", "to", "the", "front", "/", "start", "of", "the", "array", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java#L744-L748
alkacon/opencms-core
src/org/opencms/main/CmsStaticResourceHandler.java
CmsStaticResourceHandler.streamContent
private void streamContent(HttpServletResponse response, InputStream is) throws IOException { """ Streams the input stream to the response.<p> @param response the response @param is the input stream @throws IOException in case writing to the response fails """ OutputStream os = response.getOutp...
java
private void streamContent(HttpServletResponse response, InputStream is) throws IOException { OutputStream os = response.getOutputStream(); try { byte buffer[] = new byte[DEFAULT_BUFFER_SIZE]; int bytes; while ((bytes = is.read(buffer)) >= 0) { os.wri...
[ "private", "void", "streamContent", "(", "HttpServletResponse", "response", ",", "InputStream", "is", ")", "throws", "IOException", "{", "OutputStream", "os", "=", "response", ".", "getOutputStream", "(", ")", ";", "try", "{", "byte", "buffer", "[", "]", "=", ...
Streams the input stream to the response.<p> @param response the response @param is the input stream @throws IOException in case writing to the response fails
[ "Streams", "the", "input", "stream", "to", "the", "response", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/CmsStaticResourceHandler.java#L438-L450
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDAvailabilityEstimatePersistenceImpl.java
CPDAvailabilityEstimatePersistenceImpl.removeByUUID_G
@Override public CPDAvailabilityEstimate removeByUUID_G(String uuid, long groupId) throws NoSuchCPDAvailabilityEstimateException { """ Removes the cpd availability estimate where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cpd availabilit...
java
@Override public CPDAvailabilityEstimate removeByUUID_G(String uuid, long groupId) throws NoSuchCPDAvailabilityEstimateException { CPDAvailabilityEstimate cpdAvailabilityEstimate = findByUUID_G(uuid, groupId); return remove(cpdAvailabilityEstimate); }
[ "@", "Override", "public", "CPDAvailabilityEstimate", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPDAvailabilityEstimateException", "{", "CPDAvailabilityEstimate", "cpdAvailabilityEstimate", "=", "findByUUID_G", "(", "uuid", ",", ...
Removes the cpd availability estimate where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cpd availability estimate that was removed
[ "Removes", "the", "cpd", "availability", "estimate", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDAvailabilityEstimatePersistenceImpl.java#L816-L823
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java
CPDefinitionOptionValueRelPersistenceImpl.findByKey
@Override public List<CPDefinitionOptionValueRel> findByKey(String key) { """ Returns all the cp definition option value rels where key = &#63;. @param key the key @return the matching cp definition option value rels """ return findByKey(key, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPDefinitionOptionValueRel> findByKey(String key) { return findByKey(key, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionOptionValueRel", ">", "findByKey", "(", "String", "key", ")", "{", "return", "findByKey", "(", "key", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp definition option value rels where key = &#63;. @param key the key @return the matching cp definition option value rels
[ "Returns", "all", "the", "cp", "definition", "option", "value", "rels", "where", "key", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java#L3097-L3100
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java
AkkaRpcActor.handleRunAsync
private void handleRunAsync(RunAsync runAsync) { """ Handle asynchronous {@link Runnable}. This method simply executes the given {@link Runnable} in the context of the actor thread. @param runAsync Run async message """ final long timeToRun = runAsync.getTimeNanos(); final long delayNanos; if (timeT...
java
private void handleRunAsync(RunAsync runAsync) { final long timeToRun = runAsync.getTimeNanos(); final long delayNanos; if (timeToRun == 0 || (delayNanos = timeToRun - System.nanoTime()) <= 0) { // run immediately try { runAsync.getRunnable().run(); } catch (Throwable t) { log.error("Caught exce...
[ "private", "void", "handleRunAsync", "(", "RunAsync", "runAsync", ")", "{", "final", "long", "timeToRun", "=", "runAsync", ".", "getTimeNanos", "(", ")", ";", "final", "long", "delayNanos", ";", "if", "(", "timeToRun", "==", "0", "||", "(", "delayNanos", "...
Handle asynchronous {@link Runnable}. This method simply executes the given {@link Runnable} in the context of the actor thread. @param runAsync Run async message
[ "Handle", "asynchronous", "{", "@link", "Runnable", "}", ".", "This", "method", "simply", "executes", "the", "given", "{", "@link", "Runnable", "}", "in", "the", "context", "of", "the", "actor", "thread", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActor.java#L390-L413
kaazing/gateway
service/http.directory/src/main/java/org/kaazing/gateway/service/http/directory/cachecontrol/ConflictResolverUtils.java
ConflictResolverUtils.resolveValueConflicts
private static void resolveValueConflicts(Directive directive, String generalValue, PatternCacheControl specificPattern) { """ Resolves the conflicts for a given directive between the general pattern and the specific PatternCacheControl @param directive @param generalValue @param specificPattern """ ...
java
private static void resolveValueConflicts(Directive directive, String generalValue, PatternCacheControl specificPattern) { long generalPatternValue = Long.parseLong(generalValue); if (specificPattern.hasDirective(directive)) { long specificPatternValue = Long.parseLong(specificPattern.getDir...
[ "private", "static", "void", "resolveValueConflicts", "(", "Directive", "directive", ",", "String", "generalValue", ",", "PatternCacheControl", "specificPattern", ")", "{", "long", "generalPatternValue", "=", "Long", ".", "parseLong", "(", "generalValue", ")", ";", ...
Resolves the conflicts for a given directive between the general pattern and the specific PatternCacheControl @param directive @param generalValue @param specificPattern
[ "Resolves", "the", "conflicts", "for", "a", "given", "directive", "between", "the", "general", "pattern", "and", "the", "specific", "PatternCacheControl" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/http.directory/src/main/java/org/kaazing/gateway/service/http/directory/cachecontrol/ConflictResolverUtils.java#L70-L80
virgo47/javasimon
core/src/main/java/org/javasimon/callback/lastsplits/CircularList.java
CircularList.incrementIndex
private int incrementIndex(int index, int maxIndex) { """ Increment an index @param index Input index @param maxIndex Assigned value when capacity is reached @return Output index """ int newIndex = index + 1; if (newIndex >= elements.length) { newIndex = maxIndex; } return newIndex; }
java
private int incrementIndex(int index, int maxIndex) { int newIndex = index + 1; if (newIndex >= elements.length) { newIndex = maxIndex; } return newIndex; }
[ "private", "int", "incrementIndex", "(", "int", "index", ",", "int", "maxIndex", ")", "{", "int", "newIndex", "=", "index", "+", "1", ";", "if", "(", "newIndex", ">=", "elements", ".", "length", ")", "{", "newIndex", "=", "maxIndex", ";", "}", "return"...
Increment an index @param index Input index @param maxIndex Assigned value when capacity is reached @return Output index
[ "Increment", "an", "index" ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/lastsplits/CircularList.java#L98-L104
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/proposition/CopyPropositionVisitor.java
CopyPropositionVisitor.setProperties
public void setProperties(Map<String, Value> properties) { """ Overrides the properties for copies made with this visitor. @param properties a map of property name to value pairs, or <code>null</code> to use the original proposition's value for this field. """ if (properties != null) { ...
java
public void setProperties(Map<String, Value> properties) { if (properties != null) { this.properties = new HashMap<>(properties); } else { this.properties = null; } }
[ "public", "void", "setProperties", "(", "Map", "<", "String", ",", "Value", ">", "properties", ")", "{", "if", "(", "properties", "!=", "null", ")", "{", "this", ".", "properties", "=", "new", "HashMap", "<>", "(", "properties", ")", ";", "}", "else", ...
Overrides the properties for copies made with this visitor. @param properties a map of property name to value pairs, or <code>null</code> to use the original proposition's value for this field.
[ "Overrides", "the", "properties", "for", "copies", "made", "with", "this", "visitor", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/CopyPropositionVisitor.java#L73-L79
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.readDeclaredStaticField
public static Object readDeclaredStaticField(final Class<?> cls, final String fieldName) throws IllegalAccessException { """ Gets the value of a {@code static} {@link Field} by name. The field must be {@code public}. Only the specified class will be considered. @param cls the {@link Class} to reflect, must no...
java
public static Object readDeclaredStaticField(final Class<?> cls, final String fieldName) throws IllegalAccessException { return readDeclaredStaticField(cls, fieldName, false); }
[ "public", "static", "Object", "readDeclaredStaticField", "(", "final", "Class", "<", "?", ">", "cls", ",", "final", "String", "fieldName", ")", "throws", "IllegalAccessException", "{", "return", "readDeclaredStaticField", "(", "cls", ",", "fieldName", ",", "false"...
Gets the value of a {@code static} {@link Field} by name. The field must be {@code public}. Only the specified class will be considered. @param cls the {@link Class} to reflect, must not be {@code null} @param fieldName the field name to obtain @return the value of the field @throws IllegalArgumentException if the cla...
[ "Gets", "the", "value", "of", "a", "{", "@code", "static", "}", "{", "@link", "Field", "}", "by", "name", ".", "The", "field", "must", "be", "{", "@code", "public", "}", ".", "Only", "the", "specified", "class", "will", "be", "considered", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L360-L362
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/setting/controller/MsgSettingController.java
MsgSettingController.downloadApi
@GetMapping("/setting/download/api/excel") public void downloadApi(HttpServletRequest req, @RequestParam("method") String method, @RequestParam("url") String url, HttpServletResponse res) { """ Download api. @param req the req @param method the method @param url the url @param res the res ""...
java
@GetMapping("/setting/download/api/excel") public void downloadApi(HttpServletRequest req, @RequestParam("method") String method, @RequestParam("url") String url, HttpServletResponse res) { this.validationSessionComponent.sessionCheck(req); url = new String(Base64.getDecoder().decode(url)); ...
[ "@", "GetMapping", "(", "\"/setting/download/api/excel\"", ")", "public", "void", "downloadApi", "(", "HttpServletRequest", "req", ",", "@", "RequestParam", "(", "\"method\"", ")", "String", "method", ",", "@", "RequestParam", "(", "\"url\"", ")", "String", "url",...
Download api. @param req the req @param method the method @param url the url @param res the res
[ "Download", "api", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/setting/controller/MsgSettingController.java#L118-L124
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java
StandardDirectoryAgentServer.handleTCPSrvDeReg
protected void handleTCPSrvDeReg(SrvDeReg srvDeReg, Socket socket) { """ Handles a unicast TCP SrvDeReg message arrived to this directory agent. <br /> This directory agent will reply with an acknowledge containing the result of the deregistration. @param srvDeReg the SrvDeReg message to handle @param socket...
java
protected void handleTCPSrvDeReg(SrvDeReg srvDeReg, Socket socket) { try { boolean update = srvDeReg.isUpdating(); ServiceInfo service = ServiceInfo.from(srvDeReg); uncacheService(service, update); tcpSrvAck.perform(socket, srvDeReg, SLPError.NO_ERROR)...
[ "protected", "void", "handleTCPSrvDeReg", "(", "SrvDeReg", "srvDeReg", ",", "Socket", "socket", ")", "{", "try", "{", "boolean", "update", "=", "srvDeReg", ".", "isUpdating", "(", ")", ";", "ServiceInfo", "service", "=", "ServiceInfo", ".", "from", "(", "srv...
Handles a unicast TCP SrvDeReg message arrived to this directory agent. <br /> This directory agent will reply with an acknowledge containing the result of the deregistration. @param srvDeReg the SrvDeReg message to handle @param socket the socket connected to the client where to write the reply
[ "Handles", "a", "unicast", "TCP", "SrvDeReg", "message", "arrived", "to", "this", "directory", "agent", ".", "<br", "/", ">", "This", "directory", "agent", "will", "reply", "with", "an", "acknowledge", "containing", "the", "result", "of", "the", "deregistratio...
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java#L594-L607
OpenLiberty/open-liberty
dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionAffinityManager.java
SessionAffinityManager.getInUseSessionID
@Override public String getInUseSessionID(ServletRequest req, SessionAffinityContext sac) { """ /* Method to get the requestedId. If the id is from a SSL request, we need to get the actual SSL id as this id shouldn't be stored on the request or Affinity Context @see com.ibm.wsspi.session.ISessionAffinit...
java
@Override public String getInUseSessionID(ServletRequest req, SessionAffinityContext sac) { String id = null; if (sac.isRequestedSessionIDFromSSL() && req != null) { id = getActualSSLSessionId(req); } else { // We may have been dispatched and a previous app created a ...
[ "@", "Override", "public", "String", "getInUseSessionID", "(", "ServletRequest", "req", ",", "SessionAffinityContext", "sac", ")", "{", "String", "id", "=", "null", ";", "if", "(", "sac", ".", "isRequestedSessionIDFromSSL", "(", ")", "&&", "req", "!=", "null",...
/* Method to get the requestedId. If the id is from a SSL request, we need to get the actual SSL id as this id shouldn't be stored on the request or Affinity Context @see com.ibm.wsspi.session.ISessionAffinityManager#getRequestSessionID(javax .servlet.ServletRequest, com.ibm.wsspi.session.SessionAffinityContext)
[ "/", "*", "Method", "to", "get", "the", "requestedId", ".", "If", "the", "id", "is", "from", "a", "SSL", "request", "we", "need", "to", "get", "the", "actual", "SSL", "id", "as", "this", "id", "shouldn", "t", "be", "stored", "on", "the", "request", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionAffinityManager.java#L467-L481
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java
AliasFactory.createAliasForProperty
public <A> A createAliasForProperty(Class<A> cl, Expression<?> path) { """ Create an alias instance for the given class, parent and path @param <A> @param cl type for alias @param path underlying expression @return alias instance """ return createProxy(cl, path); }
java
public <A> A createAliasForProperty(Class<A> cl, Expression<?> path) { return createProxy(cl, path); }
[ "public", "<", "A", ">", "A", "createAliasForProperty", "(", "Class", "<", "A", ">", "cl", ",", "Expression", "<", "?", ">", "path", ")", "{", "return", "createProxy", "(", "cl", ",", "path", ")", ";", "}" ]
Create an alias instance for the given class, parent and path @param <A> @param cl type for alias @param path underlying expression @return alias instance
[ "Create", "an", "alias", "instance", "for", "the", "given", "class", "parent", "and", "path" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java#L96-L98
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/options/GenericAnimateOption.java
GenericAnimateOption.setParam
private void setParam(Boolean booleanParam, Integer integerParam, String literalParam, T objectParam) { """ Method setting the right parameter @param booleanParam boolean parameter @param integerParam integer parameter @param literalParam literal parameter @param objectParam object parameter """ th...
java
private void setParam(Boolean booleanParam, Integer integerParam, String literalParam, T objectParam) { this.booleanParam = booleanParam; this.integerParam = integerParam; this.literalParam = literalParam; this.objectParam = objectParam; }
[ "private", "void", "setParam", "(", "Boolean", "booleanParam", ",", "Integer", "integerParam", ",", "String", "literalParam", ",", "T", "objectParam", ")", "{", "this", ".", "booleanParam", "=", "booleanParam", ";", "this", ".", "integerParam", "=", "integerPara...
Method setting the right parameter @param booleanParam boolean parameter @param integerParam integer parameter @param literalParam literal parameter @param objectParam object parameter
[ "Method", "setting", "the", "right", "parameter" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/options/GenericAnimateOption.java#L236-L242
lightblueseas/wicket-js-addons
wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/PercentNumberFormatTextValue.java
PercentNumberFormatTextValue.checkQuietly
private static Integer checkQuietly(final String name, final Integer value) { """ Checks the given value if it is between 0 to 100 quietly. If not a default value from 50 will be set. @param name the name @param value the value @return the integer """ Integer val = 50; try { val = Args.wit...
java
private static Integer checkQuietly(final String name, final Integer value) { Integer val = 50; try { val = Args.withinRange(0, 100, value, name); } catch (final IllegalArgumentException e) { LOGGER.error(String.format( "Given argument '%s' must have a value within [%s,%s], but was %s. ...
[ "private", "static", "Integer", "checkQuietly", "(", "final", "String", "name", ",", "final", "Integer", "value", ")", "{", "Integer", "val", "=", "50", ";", "try", "{", "val", "=", "Args", ".", "withinRange", "(", "0", ",", "100", ",", "value", ",", ...
Checks the given value if it is between 0 to 100 quietly. If not a default value from 50 will be set. @param name the name @param value the value @return the integer
[ "Checks", "the", "given", "value", "if", "it", "is", "between", "0", "to", "100", "quietly", ".", "If", "not", "a", "default", "value", "from", "50", "will", "be", "set", "." ]
train
https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/PercentNumberFormatTextValue.java#L55-L70