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
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JawrApplicationConfigManager.java
JawrApplicationConfigManager.setStringValue
public void setStringValue(String property, String value) { """ Update the property with the string value in each config manager. @param property the property to update @param value the value to set """ try { if (jsMBean != null) { setProperty(jsMBean, property, value); } if (cssMBean != n...
java
public void setStringValue(String property, String value) { try { if (jsMBean != null) { setProperty(jsMBean, property, value); } if (cssMBean != null) { setProperty(cssMBean, property, value); } if (binaryMBean != null) { setProperty(binaryMBean, property, value); } } catch (IllegalAc...
[ "public", "void", "setStringValue", "(", "String", "property", ",", "String", "value", ")", "{", "try", "{", "if", "(", "jsMBean", "!=", "null", ")", "{", "setProperty", "(", "jsMBean", ",", "property", ",", "value", ")", ";", "}", "if", "(", "cssMBean...
Update the property with the string value in each config manager. @param property the property to update @param value the value to set
[ "Update", "the", "property", "with", "the", "string", "value", "in", "each", "config", "manager", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JawrApplicationConfigManager.java#L557-L571
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.setLong
public <T extends Model> T setLong(String attributeName, Object value) { """ Sets attribute value as <code>Long</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Long</code>, given the value is an instance of <code>S</code>, then...
java
public <T extends Model> T setLong(String attributeName, Object value) { Converter<Object, Long> converter = modelRegistryLocal.converterForValue(attributeName, value, Long.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toLong(value)); }
[ "public", "<", "T", "extends", "Model", ">", "T", "setLong", "(", "String", "attributeName", ",", "Object", "value", ")", "{", "Converter", "<", "Object", ",", "Long", ">", "converter", "=", "modelRegistryLocal", ".", "converterForValue", "(", "attributeName",...
Sets attribute value as <code>Long</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Long</code>, given the value is an instance of <code>S</code>, then it will be used, otherwise performs a conversion using {@link Convert#toLong(Object...
[ "Sets", "attribute", "value", "as", "<code", ">", "Long<", "/", "code", ">", ".", "If", "there", "is", "a", "{", "@link", "Converter", "}", "registered", "for", "the", "attribute", "that", "converts", "from", "Class", "<code", ">", "S<", "/", "code", "...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L1771-L1774
ops4j/org.ops4j.pax.web
pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/HttpServiceRequestWrapper.java
HttpServiceRequestWrapper.setAttribute
@Override public void setAttribute(final String name, Object value) { """ Filter the setting of authentication related attributes. If one of HttpContext.AUTHENTICATION_TYPE or HTTPContext.REMOTE_USER set the corresponding values in original request. @see javax.servlet.http.HttpServletRequest#setAttribute(St...
java
@Override public void setAttribute(final String name, Object value) { if (HttpContext.AUTHENTICATION_TYPE.equals(name)) { handleAuthenticationType(value); } else if (HttpContext.REMOTE_USER.equals(name)) { handleRemoteUser(value); } super.setAttribute(name, value); }
[ "@", "Override", "public", "void", "setAttribute", "(", "final", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "HttpContext", ".", "AUTHENTICATION_TYPE", ".", "equals", "(", "name", ")", ")", "{", "handleAuthenticationType", "(", "value", ")...
Filter the setting of authentication related attributes. If one of HttpContext.AUTHENTICATION_TYPE or HTTPContext.REMOTE_USER set the corresponding values in original request. @see javax.servlet.http.HttpServletRequest#setAttribute(String, Object)
[ "Filter", "the", "setting", "of", "authentication", "related", "attributes", ".", "If", "one", "of", "HttpContext", ".", "AUTHENTICATION_TYPE", "or", "HTTPContext", ".", "REMOTE_USER", "set", "the", "corresponding", "values", "in", "original", "request", "." ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-jetty/src/main/java/org/ops4j/pax/web/service/jetty/internal/HttpServiceRequestWrapper.java#L98-L106
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java
TableSession.doSetHandle
public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException { """ Reposition to this record using this bookmark. <p />JiniTables can't access the datasource on the server, so they must use the bookmark. @param bookmark The handle of the record ...
java
public Object doSetHandle(Object bookmark, int iOpenMode, String strFields, int iHandleType) throws DBException, RemoteException { int iOldOpenMode = this.getMainRecord().getOpenMode(); try { Utility.getLogger().info("EJB doSetHandle, key= " + bookmark); Record record = thi...
[ "public", "Object", "doSetHandle", "(", "Object", "bookmark", ",", "int", "iOpenMode", ",", "String", "strFields", ",", "int", "iHandleType", ")", "throws", "DBException", ",", "RemoteException", "{", "int", "iOldOpenMode", "=", "this", ".", "getMainRecord", "("...
Reposition to this record using this bookmark. <p />JiniTables can't access the datasource on the server, so they must use the bookmark. @param bookmark The handle of the record to retrieve. @param iHandleType The type of handle to use. @return The record or the return code as an Boolean.
[ "Reposition", "to", "this", "record", "using", "this", "bookmark", ".", "<p", "/", ">", "JiniTables", "can", "t", "access", "the", "datasource", "on", "the", "server", "so", "they", "must", "use", "the", "bookmark", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L587-L632
trellis-ldp/trellis
components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java
TrellisWebDAV.copyResource
@COPY @Timed public void copyResource(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, @Context final SecurityContext security) { """ Copy a resource. @param response the async response @pa...
java
@COPY @Timed public void copyResource(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, @Context final SecurityContext security) { final TrellisRequest req = new TrellisRequest(request, uri...
[ "@", "COPY", "@", "Timed", "public", "void", "copyResource", "(", "@", "Suspended", "final", "AsyncResponse", "response", ",", "@", "Context", "final", "Request", "request", ",", "@", "Context", "final", "UriInfo", "uriInfo", ",", "@", "Context", "final", "H...
Copy a resource. @param response the async response @param request the request @param uriInfo the URI info @param headers the headers @param security the security context
[ "Copy", "a", "resource", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/webdav/src/main/java/org/trellisldp/webdav/TrellisWebDAV.java#L167-L185
Nexmo/nexmo-java
src/main/java/com/nexmo/client/account/AccountClient.java
AccountClient.getSecret
public SecretResponse getSecret(String apiKey, String secretId) throws IOException, NexmoClientException { """ Get information for a specific secret id associated to a given API key. @param apiKey The API key that the secret is associated to. @param secretId The id of the secret to get information on. @re...
java
public SecretResponse getSecret(String apiKey, String secretId) throws IOException, NexmoClientException { return getSecret(new SecretRequest(apiKey, secretId)); }
[ "public", "SecretResponse", "getSecret", "(", "String", "apiKey", ",", "String", "secretId", ")", "throws", "IOException", ",", "NexmoClientException", "{", "return", "getSecret", "(", "new", "SecretRequest", "(", "apiKey", ",", "secretId", ")", ")", ";", "}" ]
Get information for a specific secret id associated to a given API key. @param apiKey The API key that the secret is associated to. @param secretId The id of the secret to get information on. @return SecretResponse object which contains the results from the API. @throws IOException if a network error occu...
[ "Get", "information", "for", "a", "specific", "secret", "id", "associated", "to", "a", "given", "API", "key", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/account/AccountClient.java#L159-L161
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcResultSet.java
WSJdbcResultSet.updateBlob
public void updateBlob(int columnIndex, java.sql.Blob b) throws SQLException { """ <p>Updates the designated column with a java.sql.Blob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateR...
java
public void updateBlob(int columnIndex, java.sql.Blob b) throws SQLException { try { rsetImpl.updateBlob(columnIndex, b); } catch (SQLException ex) { FFDCFilter.processException(ex, "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateBlob", "4038", this); throw WSJdbcU...
[ "public", "void", "updateBlob", "(", "int", "columnIndex", ",", "java", ".", "sql", ".", "Blob", "b", ")", "throws", "SQLException", "{", "try", "{", "rsetImpl", ".", "updateBlob", "(", "columnIndex", ",", "b", ")", ";", "}", "catch", "(", "SQLException"...
<p>Updates the designated column with a java.sql.Blob value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.</p> @param columnIndex the fir...
[ "<p", ">", "Updates", "the", "designated", "column", "with", "a", "java", ".", "sql", ".", "Blob", "value", ".", "The", "updater", "methods", "are", "used", "to", "update", "column", "values", "in", "the", "current", "row", "or", "the", "insert", "row", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcResultSet.java#L4615-L4626
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/HttpCookie.java
HttpCookie.setAttribute
public void setAttribute(String name, String value) { """ Set a generic attribute on this cookie. @param name @param value """ this.myAttrs.put(name.toLowerCase(), value); }
java
public void setAttribute(String name, String value) { this.myAttrs.put(name.toLowerCase(), value); }
[ "public", "void", "setAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "this", ".", "myAttrs", ".", "put", "(", "name", ".", "toLowerCase", "(", ")", ",", "value", ")", ";", "}" ]
Set a generic attribute on this cookie. @param name @param value
[ "Set", "a", "generic", "attribute", "on", "this", "cookie", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/wsspi/http/HttpCookie.java#L114-L116
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/CentralAnalyzer.java
CentralAnalyzer.fetchMavenArtifacts
protected List<MavenArtifact> fetchMavenArtifacts(Dependency dependency) throws IOException { """ Downloads the corresponding list of MavenArtifacts of the given dependency from MavenCentral. <p> As the connection to MavenCentral is known to be unreliable, we implement a simple retry logic in order to compensa...
java
protected List<MavenArtifact> fetchMavenArtifacts(Dependency dependency) throws IOException { IOException lastException = null; long sleepingTimeBetweenRetriesInMillis = BASE_RETRY_WAIT; int triesLeft = numberOfRetries; while (triesLeft-- > 0) { try { return s...
[ "protected", "List", "<", "MavenArtifact", ">", "fetchMavenArtifacts", "(", "Dependency", "dependency", ")", "throws", "IOException", "{", "IOException", "lastException", "=", "null", ";", "long", "sleepingTimeBetweenRetriesInMillis", "=", "BASE_RETRY_WAIT", ";", "int",...
Downloads the corresponding list of MavenArtifacts of the given dependency from MavenCentral. <p> As the connection to MavenCentral is known to be unreliable, we implement a simple retry logic in order to compensate for 99% of the issues. @param dependency the dependency to analyze @return the downloaded list of Maven...
[ "Downloads", "the", "corresponding", "list", "of", "MavenArtifacts", "of", "the", "given", "dependency", "from", "MavenCentral", ".", "<p", ">", "As", "the", "connection", "to", "MavenCentral", "is", "known", "to", "be", "unreliable", "we", "implement", "a", "...
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/CentralAnalyzer.java#L305-L334
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java
SDLoss.cosineDistance
public SDVariable cosineDistance(String name, @NonNull SDVariable label, @NonNull SDVariable predictions, int dimension) { """ See {@link #cosineDistance(String, SDVariable, SDVariable, SDVariable, LossReduce, int)}. """ return cosineDistance(name, label, predictions, null, LossReduce.MEAN_BY_NONZERO_W...
java
public SDVariable cosineDistance(String name, @NonNull SDVariable label, @NonNull SDVariable predictions, int dimension) { return cosineDistance(name, label, predictions, null, LossReduce.MEAN_BY_NONZERO_WEIGHT_COUNT, dimension); }
[ "public", "SDVariable", "cosineDistance", "(", "String", "name", ",", "@", "NonNull", "SDVariable", "label", ",", "@", "NonNull", "SDVariable", "predictions", ",", "int", "dimension", ")", "{", "return", "cosineDistance", "(", "name", ",", "label", ",", "predi...
See {@link #cosineDistance(String, SDVariable, SDVariable, SDVariable, LossReduce, int)}.
[ "See", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java#L64-L66
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/HeapAttributeCollection.java
HeapAttributeCollection.getStoredAttribute
@Pure protected Attribute getStoredAttribute(String name, AttributeType expectedType) { """ Replies the attribute with the given name. @param name is the name of the attribute to retreive @param expectedType is the expected type for the attribute. @return the value or <code>null</code> """ Object val =...
java
@Pure protected Attribute getStoredAttribute(String name, AttributeType expectedType) { Object val = this.heap.get(name); if (val != null) { final AttributeType currentType = AttributeType.fromValue(val); val = unprotectNull(val); final Attribute attr = new AttributeImpl(name); if (expectedType == null...
[ "@", "Pure", "protected", "Attribute", "getStoredAttribute", "(", "String", "name", ",", "AttributeType", "expectedType", ")", "{", "Object", "val", "=", "this", ".", "heap", ".", "get", "(", "name", ")", ";", "if", "(", "val", "!=", "null", ")", "{", ...
Replies the attribute with the given name. @param name is the name of the attribute to retreive @param expectedType is the expected type for the attribute. @return the value or <code>null</code>
[ "Replies", "the", "attribute", "with", "the", "given", "name", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/HeapAttributeCollection.java#L251-L266
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_input_inputId_configuration_flowgger_PUT
public OvhOperation serviceName_input_inputId_configuration_flowgger_PUT(String serviceName, String inputId, OvhFlowggerConfigurationLogFormatEnum logFormat, OvhFlowggerConfigurationLogFramingEnum logFraming) throws IOException { """ Update the flowgger configuration REST: PUT /dbaas/logs/{serviceName}/input/{i...
java
public OvhOperation serviceName_input_inputId_configuration_flowgger_PUT(String serviceName, String inputId, OvhFlowggerConfigurationLogFormatEnum logFormat, OvhFlowggerConfigurationLogFramingEnum logFraming) throws IOException { String qPath = "/dbaas/logs/{serviceName}/input/{inputId}/configuration/flowgger"; Str...
[ "public", "OvhOperation", "serviceName_input_inputId_configuration_flowgger_PUT", "(", "String", "serviceName", ",", "String", "inputId", ",", "OvhFlowggerConfigurationLogFormatEnum", "logFormat", ",", "OvhFlowggerConfigurationLogFramingEnum", "logFraming", ")", "throws", "IOExcept...
Update the flowgger configuration REST: PUT /dbaas/logs/{serviceName}/input/{inputId}/configuration/flowgger @param serviceName [required] Service name @param inputId [required] Input ID @param logFraming [required] Log framing @param logFormat [required] configuration log format
[ "Update", "the", "flowgger", "configuration" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L309-L317
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/scale/UtcRules.java
UtcRules.validateModifiedJulianDay
public void validateModifiedJulianDay(long mjDay, long nanoOfDay) { """ Validates combination of Modified Julian Day and nanosecond-of-day. <p> Modified Julian Day is a simple incrementing count of days where day 0 is 1858-11-17. Nanosecond-of-day is a simple count of nanoseconds from the start of the day incl...
java
public void validateModifiedJulianDay(long mjDay, long nanoOfDay) { long leapSecs = getLeapSecondAdjustment(mjDay); long maxNanos = (SECS_PER_DAY + leapSecs) * NANOS_PER_SECOND; if (nanoOfDay < 0 || nanoOfDay >= maxNanos) { throw new DateTimeException("Nanosecond-of-day must be betwe...
[ "public", "void", "validateModifiedJulianDay", "(", "long", "mjDay", ",", "long", "nanoOfDay", ")", "{", "long", "leapSecs", "=", "getLeapSecondAdjustment", "(", "mjDay", ")", ";", "long", "maxNanos", "=", "(", "SECS_PER_DAY", "+", "leapSecs", ")", "*", "NANOS...
Validates combination of Modified Julian Day and nanosecond-of-day. <p> Modified Julian Day is a simple incrementing count of days where day 0 is 1858-11-17. Nanosecond-of-day is a simple count of nanoseconds from the start of the day including any additional leap-second. This method validates the nanosecond-of-day val...
[ "Validates", "combination", "of", "Modified", "Julian", "Day", "and", "nanosecond", "-", "of", "-", "day", ".", "<p", ">", "Modified", "Julian", "Day", "is", "a", "simple", "incrementing", "count", "of", "days", "where", "day", "0", "is", "1858", "-", "1...
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/UtcRules.java#L187-L193
OpenLiberty/open-liberty
dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/utils/CommonIOUtils.java
CommonIOUtils.replaceStringsInFile
public boolean replaceStringsInFile(String filePath, Map<String, String> replaceValues) { """ Replaces all occurrences of the strings included in {@code replaceValues} within the file specified by {@code filePath}. If {@code outputFilePath} is null or empty, the resulting text will be output to the same path as {...
java
public boolean replaceStringsInFile(String filePath, Map<String, String> replaceValues) { return replaceStringsInFile(filePath, replaceValues, null); }
[ "public", "boolean", "replaceStringsInFile", "(", "String", "filePath", ",", "Map", "<", "String", ",", "String", ">", "replaceValues", ")", "{", "return", "replaceStringsInFile", "(", "filePath", ",", "replaceValues", ",", "null", ")", ";", "}" ]
Replaces all occurrences of the strings included in {@code replaceValues} within the file specified by {@code filePath}. If {@code outputFilePath} is null or empty, the resulting text will be output to the same path as {@code filePath}. @param filePath File in which the string will be replaced. @param replaceValues Ma...
[ "Replaces", "all", "occurrences", "of", "the", "strings", "included", "in", "{", "@code", "replaceValues", "}", "within", "the", "file", "specified", "by", "{", "@code", "filePath", "}", ".", "If", "{", "@code", "outputFilePath", "}", "is", "null", "or", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/utils/CommonIOUtils.java#L42-L44
buschmais/jqa-rdbms-plugin
src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java
AbstractSchemaScannerPlugin.getColumnTypeDescriptor
private ColumnTypeDescriptor getColumnTypeDescriptor(ColumnDataType columnDataType, Map<String, ColumnTypeDescriptor> columnTypes, Store store) { """ Return the column type descriptor for the given data type. @param columnDataType The data type. @param columnTypes The cached data types. @param store ...
java
private ColumnTypeDescriptor getColumnTypeDescriptor(ColumnDataType columnDataType, Map<String, ColumnTypeDescriptor> columnTypes, Store store) { String databaseSpecificTypeName = columnDataType.getDatabaseSpecificTypeName(); ColumnTypeDescriptor columnTypeDescriptor = columnTypes.get(databaseSpecificTy...
[ "private", "ColumnTypeDescriptor", "getColumnTypeDescriptor", "(", "ColumnDataType", "columnDataType", ",", "Map", "<", "String", ",", "ColumnTypeDescriptor", ">", "columnTypes", ",", "Store", "store", ")", "{", "String", "databaseSpecificTypeName", "=", "columnDataType",...
Return the column type descriptor for the given data type. @param columnDataType The data type. @param columnTypes The cached data types. @param store The store. @return The column type descriptor.
[ "Return", "the", "column", "type", "descriptor", "for", "the", "given", "data", "type", "." ]
train
https://github.com/buschmais/jqa-rdbms-plugin/blob/96c3919907deee00175cf5ab005867d76e01ba62/src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java#L392-L414
milaboratory/milib
src/main/java/com/milaboratory/core/alignment/BandedLinearAligner.java
BandedLinearAligner.alignSemiLocalLeft
public static Alignment<NucleotideSequence> alignSemiLocalLeft(LinearGapAlignmentScoring scoring, NucleotideSequence seq1, NucleotideSequence seq2, int width, int stopPenalty) { """ ...
java
public static Alignment<NucleotideSequence> alignSemiLocalLeft(LinearGapAlignmentScoring scoring, NucleotideSequence seq1, NucleotideSequence seq2, int width, int stopPenalty) { ...
[ "public", "static", "Alignment", "<", "NucleotideSequence", ">", "alignSemiLocalLeft", "(", "LinearGapAlignmentScoring", "scoring", ",", "NucleotideSequence", "seq1", ",", "NucleotideSequence", "seq2", ",", "int", "width", ",", "int", "stopPenalty", ")", "{", "return"...
Alignment which identifies what is the highly similar part of the both sequences. <p/> <p>Alignment is done in the way that beginning of second sequences is aligned to beginning of first sequence.</p> <p/> <p>Alignment terminates when score in banded alignment matrix reaches {@code stopPenalty} value.</p> <p/> <p>In ot...
[ "Alignment", "which", "identifies", "what", "is", "the", "highly", "similar", "part", "of", "the", "both", "sequences", ".", "<p", "/", ">", "<p", ">", "Alignment", "is", "done", "in", "the", "way", "that", "beginning", "of", "second", "sequences", "is", ...
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/BandedLinearAligner.java#L699-L703
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.SPAN
public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) { """ Generates a SPAN tag with id and style class attributes. It also encloses a content. @param id the id for the tag @param styleClass stylesheet class for the tag @param body content for the tag @return an HtmlTree object for the...
java
public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body)); htmltree.addAttr(HtmlAttr.ID, nullCheck(id)); if (styleClass != null) htmltree.addStyle(styleClass); return htmltree; }
[ "public", "static", "HtmlTree", "SPAN", "(", "String", "id", ",", "HtmlStyle", "styleClass", ",", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "SPAN", ",", "nullCheck", "(", "body", ")", ")", ";", "htm...
Generates a SPAN tag with id and style class attributes. It also encloses a content. @param id the id for the tag @param styleClass stylesheet class for the tag @param body content for the tag @return an HtmlTree object for the SPAN tag
[ "Generates", "a", "SPAN", "tag", "with", "id", "and", "style", "class", "attributes", ".", "It", "also", "encloses", "a", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L735-L741
petergeneric/stdlib
user-manager/service/src/main/java/com/peterphi/usermanager/guice/authentication/UserLoginProvider.java
UserLoginProvider.tryBasicAuthLogin
private UserLogin tryBasicAuthLogin(UserLogin login, UserAuthenticationService authService, HttpServletRequest request) { """ Support proactive HTTP BASIC authentication @param authService the user authentication service @param request the HTTP request @return a UserLogin for the appropriate user if valid...
java
private UserLogin tryBasicAuthLogin(UserLogin login, UserAuthenticationService authService, HttpServletRequest request) { final String header = request.getHeader(HttpHeaderNames.AUTHORIZATION); if (header != null) { final String[] credentials = BasicAuthHelper.parseHeader(header); if (credentials != null...
[ "private", "UserLogin", "tryBasicAuthLogin", "(", "UserLogin", "login", ",", "UserAuthenticationService", "authService", ",", "HttpServletRequest", "request", ")", "{", "final", "String", "header", "=", "request", ".", "getHeader", "(", "HttpHeaderNames", ".", "AUTHOR...
Support proactive HTTP BASIC authentication @param authService the user authentication service @param request the HTTP request @return a UserLogin for the appropriate user if valid credentials were presented, otherwise null
[ "Support", "proactive", "HTTP", "BASIC", "authentication" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/user-manager/service/src/main/java/com/peterphi/usermanager/guice/authentication/UserLoginProvider.java#L121-L154
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.mediaSwicthToCoach
public ApiSuccessResponse mediaSwicthToCoach(String mediatype, String id, MediaSwicthToCoachData1 mediaSwicthToCoachData) throws ApiException { """ Switch to coach Switch to the coach monitoring mode for the specified chat. Only the agent can see the supervisor&#39;s messages. @param mediatype The media channel....
java
public ApiSuccessResponse mediaSwicthToCoach(String mediatype, String id, MediaSwicthToCoachData1 mediaSwicthToCoachData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = mediaSwicthToCoachWithHttpInfo(mediatype, id, mediaSwicthToCoachData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "mediaSwicthToCoach", "(", "String", "mediatype", ",", "String", "id", ",", "MediaSwicthToCoachData1", "mediaSwicthToCoachData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "mediaSwicthToC...
Switch to coach Switch to the coach monitoring mode for the specified chat. Only the agent can see the supervisor&#39;s messages. @param mediatype The media channel. (required) @param id The ID of the chat interaction. (required) @param mediaSwicthToCoachData Request parameters. (optional) @return ApiSuccessResponse @t...
[ "Switch", "to", "coach", "Switch", "to", "the", "coach", "monitoring", "mode", "for", "the", "specified", "chat", ".", "Only", "the", "agent", "can", "see", "the", "supervisor&#39", ";", "s", "messages", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L2585-L2588
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.deleteImageRegionsAsync
public Observable<Void> deleteImageRegionsAsync(UUID projectId, List<String> regionIds) { """ Delete a set of image regions. @param projectId The project id @param regionIds Regions to delete. Limited to 64 @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceRe...
java
public Observable<Void> deleteImageRegionsAsync(UUID projectId, List<String> regionIds) { return deleteImageRegionsWithServiceResponseAsync(projectId, regionIds).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { re...
[ "public", "Observable", "<", "Void", ">", "deleteImageRegionsAsync", "(", "UUID", "projectId", ",", "List", "<", "String", ">", "regionIds", ")", "{", "return", "deleteImageRegionsWithServiceResponseAsync", "(", "projectId", ",", "regionIds", ")", ".", "map", "(",...
Delete a set of image regions. @param projectId The project id @param regionIds Regions to delete. Limited to 64 @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Delete", "a", "set", "of", "image", "regions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L3282-L3289
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.resetSharedKey
public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { """ The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the sp...
java
public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, int keyLength) { return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().last().body(); }
[ "public", "ConnectionResetSharedKeyInner", "resetSharedKey", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "int", "keyLength", ")", "{", "return", "resetSharedKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualN...
The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConn...
[ "The", "VirtualNetworkGatewayConnectionResetSharedKey", "operation", "resets", "the", "virtual", "network", "gateway", "connection", "shared", "key", "for", "passed", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "through", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L1223-L1225
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.isDowntoEligible
private static boolean isDowntoEligible(Temporal from, Temporal to) { """ Returns true if the {@code from} can be iterated down to {@code to}. """ TemporalAmount amount = rightShift(from, to); if (amount instanceof Period) { return isNonpositive((Period) amount); } else if (...
java
private static boolean isDowntoEligible(Temporal from, Temporal to) { TemporalAmount amount = rightShift(from, to); if (amount instanceof Period) { return isNonpositive((Period) amount); } else if (amount instanceof Duration) { return isNonpositive((Duration) amount); ...
[ "private", "static", "boolean", "isDowntoEligible", "(", "Temporal", "from", ",", "Temporal", "to", ")", "{", "TemporalAmount", "amount", "=", "rightShift", "(", "from", ",", "to", ")", ";", "if", "(", "amount", "instanceof", "Period", ")", "{", "return", ...
Returns true if the {@code from} can be iterated down to {@code to}.
[ "Returns", "true", "if", "the", "{" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L237-L247
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/tools/RuleMatchAsXmlSerializer.java
RuleMatchAsXmlSerializer.ruleMatchesToXml
public String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, ApiPrintMode xmlMode, Language lang, List<String> unknownWords) { """ Get an XML representation of the given rule matches. @param text the original text that was checked, used to get the context of the matches @param cont...
java
public String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, ApiPrintMode xmlMode, Language lang, List<String> unknownWords) { String xmlSnippet = ruleMatchesToXmlSnippet(ruleMatches, text, contextSize); switch (xmlMode) { case START_API: return getXmlStart(lang, null)...
[ "public", "String", "ruleMatchesToXml", "(", "List", "<", "RuleMatch", ">", "ruleMatches", ",", "String", "text", ",", "int", "contextSize", ",", "ApiPrintMode", "xmlMode", ",", "Language", "lang", ",", "List", "<", "String", ">", "unknownWords", ")", "{", "...
Get an XML representation of the given rule matches. @param text the original text that was checked, used to get the context of the matches @param contextSize the desired context size in characters @param unknownWords unknown words to be printed in a separated list @since 3.0
[ "Get", "an", "XML", "representation", "of", "the", "given", "rule", "matches", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/tools/RuleMatchAsXmlSerializer.java#L174-L187
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.deleteHierarchicalEntityChildAsync
public Observable<OperationStatus> deleteHierarchicalEntityChildAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { """ Deletes a hierarchical entity extractor child from the application. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entit...
java
public Observable<OperationStatus> deleteHierarchicalEntityChildAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { return deleteHierarchicalEntityChildWithServiceResponseAsync(appId, versionId, hEntityId, hChildId).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { ...
[ "public", "Observable", "<", "OperationStatus", ">", "deleteHierarchicalEntityChildAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "UUID", "hChildId", ")", "{", "return", "deleteHierarchicalEntityChildWithServiceResponseAsync", "("...
Deletes a hierarchical entity extractor child from the application. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param hChildId The hierarchical entity extractor child ID. @throws IllegalArgumentException thrown if parameters fail the validat...
[ "Deletes", "a", "hierarchical", "entity", "extractor", "child", "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#L6575-L6582
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/GeometryCoordinateDimension.java
GeometryCoordinateDimension.convert
public static LinearRing convert(LineString lineString,int dimension) { """ Force the dimension of the LineString and update correctly the coordinate dimension @param lineString @param dimension @return """ return gf.createLinearRing(convertSequence(lineString.getCoordinates(),dimension)); }
java
public static LinearRing convert(LineString lineString,int dimension) { return gf.createLinearRing(convertSequence(lineString.getCoordinates(),dimension)); }
[ "public", "static", "LinearRing", "convert", "(", "LineString", "lineString", ",", "int", "dimension", ")", "{", "return", "gf", ".", "createLinearRing", "(", "convertSequence", "(", "lineString", ".", "getCoordinates", "(", ")", ",", "dimension", ")", ")", ";...
Force the dimension of the LineString and update correctly the coordinate dimension @param lineString @param dimension @return
[ "Force", "the", "dimension", "of", "the", "LineString", "and", "update", "correctly", "the", "coordinate", "dimension" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/GeometryCoordinateDimension.java#L143-L145
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/UnLockCommand.java
UnLockCommand.unLock
public Response unLock(Session session, String path, List<String> tokens) { """ Webdav Unlock method implementation. @param session current seesion @param path resource path @param tokens tokens @return the instance of javax.ws.rs.core.Response """ try { try { ...
java
public Response unLock(Session session, String path, List<String> tokens) { try { try { Node node = (Node)session.getItem(path); if (node.isLocked()) { node.unlock(); session.save(); } ...
[ "public", "Response", "unLock", "(", "Session", "session", ",", "String", "path", ",", "List", "<", "String", ">", "tokens", ")", "{", "try", "{", "try", "{", "Node", "node", "=", "(", "Node", ")", "session", ".", "getItem", "(", "path", ")", ";", ...
Webdav Unlock method implementation. @param session current seesion @param path resource path @param tokens tokens @return the instance of javax.ws.rs.core.Response
[ "Webdav", "Unlock", "method", "implementation", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/UnLockCommand.java#L72-L111
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
@SuppressWarnings("checkstyle:cyclomaticcomplexity") protected XExpression _generate(XBinaryOperation operation, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param operation the binary operation. @param it the target for the generated content. @param context the c...
java
@SuppressWarnings("checkstyle:cyclomaticcomplexity") protected XExpression _generate(XBinaryOperation operation, IAppendable it, IExtraLanguageGeneratorContext context) { appendReturnIfExpectedReturnedExpression(it, context); final String operator = getOperatorSymbol(operation); if (operator != null) { it.app...
[ "@", "SuppressWarnings", "(", "\"checkstyle:cyclomaticcomplexity\"", ")", "protected", "XExpression", "_generate", "(", "XBinaryOperation", "operation", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "appendReturnIfExpectedReturnedExpressi...
Generate the given object. @param operation the binary operation. @param it the target for the generated content. @param context the context. @return the operation.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L441-L488
googleapis/google-cloud-java
google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java
ErrorStatsServiceClient.listEvents
public final ListEventsPagedResponse listEvents(ProjectName projectName, String groupId) { """ Lists the specified events. <p>Sample code: <pre><code> try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) { ProjectName projectName = ProjectName.of("[PROJECT]"); String gr...
java
public final ListEventsPagedResponse listEvents(ProjectName projectName, String groupId) { ListEventsRequest request = ListEventsRequest.newBuilder() .setProjectName(projectName == null ? null : projectName.toString()) .setGroupId(groupId) .build(); return listEvents(...
[ "public", "final", "ListEventsPagedResponse", "listEvents", "(", "ProjectName", "projectName", ",", "String", "groupId", ")", "{", "ListEventsRequest", "request", "=", "ListEventsRequest", ".", "newBuilder", "(", ")", ".", "setProjectName", "(", "projectName", "==", ...
Lists the specified events. <p>Sample code: <pre><code> try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) { ProjectName projectName = ProjectName.of("[PROJECT]"); String groupId = ""; for (ErrorEvent element : errorStatsServiceClient.listEvents(projectName, groupId).iterateAll()...
[ "Lists", "the", "specified", "events", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java#L356-L363
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/util/handler/channel/ChannelUpdateHandler.java
ChannelUpdateHandler.handleGroupChannel
private void handleGroupChannel(JsonNode jsonChannel) { """ Handles a group channel update. @param jsonChannel The channel data. """ long channelId = jsonChannel.get("id").asLong(); api.getGroupChannelById(channelId).map(GroupChannelImpl.class::cast).ifPresent(channel -> { String...
java
private void handleGroupChannel(JsonNode jsonChannel) { long channelId = jsonChannel.get("id").asLong(); api.getGroupChannelById(channelId).map(GroupChannelImpl.class::cast).ifPresent(channel -> { String oldName = channel.getName().orElseThrow(AssertionError::new); String newName...
[ "private", "void", "handleGroupChannel", "(", "JsonNode", "jsonChannel", ")", "{", "long", "channelId", "=", "jsonChannel", ".", "get", "(", "\"id\"", ")", ".", "asLong", "(", ")", ";", "api", ".", "getGroupChannelById", "(", "channelId", ")", ".", "map", ...
Handles a group channel update. @param jsonChannel The channel data.
[ "Handles", "a", "group", "channel", "update", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/util/handler/channel/ChannelUpdateHandler.java#L358-L373
wcm-io/wcm-io-tooling
commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/PackageManagerHelper.java
PackageManagerHelper.executePackageManagerMethodJson
public JSONObject executePackageManagerMethodJson(CloseableHttpClient httpClient, HttpRequestBase method) { """ Execute CRX HTTP Package manager method and parse JSON response. @param httpClient Http client @param method Get or Post method @return JSON object """ PackageManagerJsonCall call = new Packag...
java
public JSONObject executePackageManagerMethodJson(CloseableHttpClient httpClient, HttpRequestBase method) { PackageManagerJsonCall call = new PackageManagerJsonCall(httpClient, method, log); return executeHttpCallWithRetry(call, 0); }
[ "public", "JSONObject", "executePackageManagerMethodJson", "(", "CloseableHttpClient", "httpClient", ",", "HttpRequestBase", "method", ")", "{", "PackageManagerJsonCall", "call", "=", "new", "PackageManagerJsonCall", "(", "httpClient", ",", "method", ",", "log", ")", ";...
Execute CRX HTTP Package manager method and parse JSON response. @param httpClient Http client @param method Get or Post method @return JSON object
[ "Execute", "CRX", "HTTP", "Package", "manager", "method", "and", "parse", "JSON", "response", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/crx-packmgr-helper/src/main/java/io/wcm/tooling/commons/packmgr/PackageManagerHelper.java#L220-L223
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/icon/provider/IconProviderBuilder.java
IconProviderBuilder.withValue
public IconProviderBuilder withValue(Object value, Icon icon) { """ Sets the {@link Icon} to use for the state value.<br> {@link #forProperty(IProperty)} must be called before with the corresponding {@link IProperty}. @param value the value @param icon the icon @return the icon provider builder """ if ...
java
public IconProviderBuilder withValue(Object value, Icon icon) { if (currentProperty == null) throw new IllegalStateException("You must set the property first."); if (!currentProperty.getAllowedValues().contains(value)) throw new IllegalStateException("The property " + currentProperty + "(" + currentProperty....
[ "public", "IconProviderBuilder", "withValue", "(", "Object", "value", ",", "Icon", "icon", ")", "{", "if", "(", "currentProperty", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"You must set the property first.\"", ")", ";", "if", "(", "!", ...
Sets the {@link Icon} to use for the state value.<br> {@link #forProperty(IProperty)} must be called before with the corresponding {@link IProperty}. @param value the value @param icon the icon @return the icon provider builder
[ "Sets", "the", "{", "@link", "Icon", "}", "to", "use", "for", "the", "state", "value", ".", "<br", ">", "{", "@link", "#forProperty", "(", "IProperty", ")", "}", "must", "be", "called", "before", "with", "the", "corresponding", "{", "@link", "IProperty",...
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/icon/provider/IconProviderBuilder.java#L209-L219
stripe/stripe-java
src/main/java/com/stripe/net/ApiResource.java
ApiResource.checkNullTypedParams
public static void checkNullTypedParams(String url, ApiRequestParams params) { """ Invalidate null typed parameters. @param url request url associated with the given parameters. @param params typed parameters to check for null value. """ if (params == null) { throw new IllegalArgumentException...
java
public static void checkNullTypedParams(String url, ApiRequestParams params) { if (params == null) { throw new IllegalArgumentException(String.format("Found null params for %s. " + "Please pass empty params using param builder via `builder().build()` instead.", url )); } }
[ "public", "static", "void", "checkNullTypedParams", "(", "String", "url", ",", "ApiRequestParams", "params", ")", "{", "if", "(", "params", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"Found null param...
Invalidate null typed parameters. @param url request url associated with the given parameters. @param params typed parameters to check for null value.
[ "Invalidate", "null", "typed", "parameters", "." ]
train
https://github.com/stripe/stripe-java/blob/acfa8becef3e73bfe3e9d8880bea3f3f30dadeac/src/main/java/com/stripe/net/ApiResource.java#L228-L234
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/DiskId.java
DiskId.of
public static DiskId of(String project, String zone, String disk) { """ Returns a disk identity given project, zone and disks names. The disk name must be 1-63 characters long and comply with RFC1035. Specifically, the name must match the regular expression {@code [a-z]([-a-z0-9]*[a-z0-9])?} which means the firs...
java
public static DiskId of(String project, String zone, String disk) { return new DiskId(project, zone, disk); }
[ "public", "static", "DiskId", "of", "(", "String", "project", ",", "String", "zone", ",", "String", "disk", ")", "{", "return", "new", "DiskId", "(", "project", ",", "zone", ",", "disk", ")", ";", "}" ]
Returns a disk identity given project, zone and disks names. The disk name must be 1-63 characters long and comply with RFC1035. Specifically, the name must match the regular expression {@code [a-z]([-a-z0-9]*[a-z0-9])?} which means the first character must be a lowercase letter, and all following characters must be a ...
[ "Returns", "a", "disk", "identity", "given", "project", "zone", "and", "disks", "names", ".", "The", "disk", "name", "must", "be", "1", "-", "63", "characters", "long", "and", "comply", "with", "RFC1035", ".", "Specifically", "the", "name", "must", "match"...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/DiskId.java#L136-L138
web3j/web3j
core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java
Bip44WalletUtils.generateBip44Wallet
public static Bip39Wallet generateBip44Wallet(String password, File destinationDirectory, boolean testNet) throws CipherException, IOException { """ Generates a BIP-44 compatible Ethereum wallet on top of BIP-39 generated seed. @param password Will b...
java
public static Bip39Wallet generateBip44Wallet(String password, File destinationDirectory, boolean testNet) throws CipherException, IOException { byte[] initialEntropy = new byte[16]; SecureRandomUtils.secureRandom().nextBytes(initialEntropy);...
[ "public", "static", "Bip39Wallet", "generateBip44Wallet", "(", "String", "password", ",", "File", "destinationDirectory", ",", "boolean", "testNet", ")", "throws", "CipherException", ",", "IOException", "{", "byte", "[", "]", "initialEntropy", "=", "new", "byte", ...
Generates a BIP-44 compatible Ethereum wallet on top of BIP-39 generated seed. @param password Will be used for both wallet encryption and passphrase for BIP-39 seed @param destinationDirectory The directory containing the wallet @param testNet should use the testNet derive path @return A BIP-39 compatible Ethereum wa...
[ "Generates", "a", "BIP", "-", "44", "compatible", "Ethereum", "wallet", "on", "top", "of", "BIP", "-", "39", "generated", "seed", "." ]
train
https://github.com/web3j/web3j/blob/f99ceb19cdd65895c18e0a565034767ca18ea9fc/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java#L34-L49
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContentEditorHandler.java
CmsContentEditorHandler.openDialog
public void openDialog(final CmsContainerPageElementPanel element, final boolean inline, boolean wasNew) { """ Opens the XML content editor.<p> @param element the container element widget @param inline <code>true</code> to open the in-line editor for the given element if available @param wasNew <code>true</co...
java
public void openDialog(final CmsContainerPageElementPanel element, final boolean inline, boolean wasNew) { if (!inline && element.hasEditHandler()) { m_handler.m_controller.getEditOptions( element.getId(), false, new I_CmsSimpleCallback<CmsDialogOptio...
[ "public", "void", "openDialog", "(", "final", "CmsContainerPageElementPanel", "element", ",", "final", "boolean", "inline", ",", "boolean", "wasNew", ")", "{", "if", "(", "!", "inline", "&&", "element", ".", "hasEditHandler", "(", ")", ")", "{", "m_handler", ...
Opens the XML content editor.<p> @param element the container element widget @param inline <code>true</code> to open the in-line editor for the given element if available @param wasNew <code>true</code> in case this is a newly created element not previously edited
[ "Opens", "the", "XML", "content", "editor", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContentEditorHandler.java#L166-L222
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.unregisterChaincodeEventListener
public boolean unregisterChaincodeEventListener(String handle) throws InvalidArgumentException { """ Unregister an existing chaincode event listener. @param handle Chaincode event listener handle to be unregistered. @return True if the chaincode handler was found and removed. @throws InvalidArgumentException ...
java
public boolean unregisterChaincodeEventListener(String handle) throws InvalidArgumentException { boolean ret; if (shutdown) { throw new InvalidArgumentException(format("Channel %s has been shutdown.", name)); } checkHandle(CHAINCODE_EVENTS_TAG, handle); synchronize...
[ "public", "boolean", "unregisterChaincodeEventListener", "(", "String", "handle", ")", "throws", "InvalidArgumentException", "{", "boolean", "ret", ";", "if", "(", "shutdown", ")", "{", "throw", "new", "InvalidArgumentException", "(", "format", "(", "\"Channel %s has ...
Unregister an existing chaincode event listener. @param handle Chaincode event listener handle to be unregistered. @return True if the chaincode handler was found and removed. @throws InvalidArgumentException
[ "Unregister", "an", "existing", "chaincode", "event", "listener", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L5933-L5957
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_happly.java
Scs_happly.cs_happly
public static boolean cs_happly(Scs V, int i, float beta, float[] x) { """ Applies a Householder reflection to a dense vector, x = (I - beta*v*v')*x. @param V column-compressed matrix of Householder vectors @param i v = V(:,i), the ith column of V @param beta scalar beta @param x vector x of size m @re...
java
public static boolean cs_happly(Scs V, int i, float beta, float[] x) { int p, Vp[], Vi[]; float Vx[], tau = 0; if (!Scs_util.CS_CSC(V) || x == null) return (false); /* check inputs */ Vp = V.p; Vi = V.i; Vx = V.x; for (p = Vp[i]; p < Vp[i + 1];...
[ "public", "static", "boolean", "cs_happly", "(", "Scs", "V", ",", "int", "i", ",", "float", "beta", ",", "float", "[", "]", "x", ")", "{", "int", "p", ",", "Vp", "[", "]", ",", "Vi", "[", "]", ";", "float", "Vx", "[", "]", ",", "tau", "=", ...
Applies a Householder reflection to a dense vector, x = (I - beta*v*v')*x. @param V column-compressed matrix of Householder vectors @param i v = V(:,i), the ith column of V @param beta scalar beta @param x vector x of size m @return true if successful, false on error
[ "Applies", "a", "Householder", "reflection", "to", "a", "dense", "vector", "x", "=", "(", "I", "-", "beta", "*", "v", "*", "v", ")", "*", "x", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_happly.java#L51-L69
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java
P2sVpnGatewaysInner.generateVpnProfileAsync
public Observable<VpnProfileResponseInner> generateVpnProfileAsync(String resourceGroupName, String gatewayName) { """ Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @param resourceGroupName The name of the resource group. @param gatewayName The name of the P2SVpnGat...
java
public Observable<VpnProfileResponseInner> generateVpnProfileAsync(String resourceGroupName, String gatewayName) { return generateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName).map(new Func1<ServiceResponse<VpnProfileResponseInner>, VpnProfileResponseInner>() { @Override ...
[ "public", "Observable", "<", "VpnProfileResponseInner", ">", "generateVpnProfileAsync", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ")", "{", "return", "generateVpnProfileWithServiceResponseAsync", "(", "resourceGroupName", ",", "gatewayName", ")", "."...
Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @param resourceGroupName The name of the resource group. @param gatewayName The name of the P2SVpnGateway. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Generates", "VPN", "profile", "for", "P2S", "client", "of", "the", "P2SVpnGateway", "in", "the", "specified", "resource", "group", "." ]
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/P2sVpnGatewaysInner.java#L1099-L1106
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java
PluralRules.getDecimalSamples
@Deprecated public FixedDecimalSamples getDecimalSamples(String keyword, SampleType sampleType) { """ Returns a list of values for which select() would return that keyword, or null if the keyword is not defined or no samples are available. The returned collection is unmodifiable. The returned list is not co...
java
@Deprecated public FixedDecimalSamples getDecimalSamples(String keyword, SampleType sampleType) { return rules.getDecimalSamples(keyword, sampleType); }
[ "@", "Deprecated", "public", "FixedDecimalSamples", "getDecimalSamples", "(", "String", "keyword", ",", "SampleType", "sampleType", ")", "{", "return", "rules", ".", "getDecimalSamples", "(", "keyword", ",", "sampleType", ")", ";", "}" ]
Returns a list of values for which select() would return that keyword, or null if the keyword is not defined or no samples are available. The returned collection is unmodifiable. The returned list is not complete, and there might be additional values that would return the keyword. @param keyword the keyword to test @p...
[ "Returns", "a", "list", "of", "values", "for", "which", "select", "()", "would", "return", "that", "keyword", "or", "null", "if", "the", "keyword", "is", "not", "defined", "or", "no", "samples", "are", "available", ".", "The", "returned", "collection", "is...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L2189-L2192
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.runScript
public String runScript(String script, boolean crumbFlag) throws IOException { """ Runs the provided groovy script on the server and returns the result. This is similar to running groovy scripts using the script console. In the instance where your script causes an exception, the server still returns a 200 s...
java
public String runScript(String script, boolean crumbFlag) throws IOException { return client.post_text("/scriptText", "script=" + script, ContentType.APPLICATION_FORM_URLENCODED, crumbFlag); }
[ "public", "String", "runScript", "(", "String", "script", ",", "boolean", "crumbFlag", ")", "throws", "IOException", "{", "return", "client", ".", "post_text", "(", "\"/scriptText\"", ",", "\"script=\"", "+", "script", ",", "ContentType", ".", "APPLICATION_FORM_UR...
Runs the provided groovy script on the server and returns the result. This is similar to running groovy scripts using the script console. In the instance where your script causes an exception, the server still returns a 200 status, so detecting errors is very challenging. It is recommended to use heuristics to check ...
[ "Runs", "the", "provided", "groovy", "script", "on", "the", "server", "and", "returns", "the", "result", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L812-L814
alkacon/opencms-core
src/org/opencms/file/CmsProperty.java
CmsProperty.replaceDelimiter
private String replaceDelimiter(String value, char delimiter, String delimiterReplacement) { """ Replaces the given delimiter character with the replacement string.<p> @param value the string that is scanned @param delimiter the delimiter character to replace @param delimiterReplacement the replacement string...
java
private String replaceDelimiter(String value, char delimiter, String delimiterReplacement) { return CmsStringUtil.substitute(value, String.valueOf(delimiter), delimiterReplacement); }
[ "private", "String", "replaceDelimiter", "(", "String", "value", ",", "char", "delimiter", ",", "String", "delimiterReplacement", ")", "{", "return", "CmsStringUtil", ".", "substitute", "(", "value", ",", "String", ".", "valueOf", "(", "delimiter", ")", ",", "...
Replaces the given delimiter character with the replacement string.<p> @param value the string that is scanned @param delimiter the delimiter character to replace @param delimiterReplacement the replacement string for the delimiter character @return the substituted string
[ "Replaces", "the", "given", "delimiter", "character", "with", "the", "replacement", "string", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsProperty.java#L1350-L1353
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/FileUtils.java
FileUtils.getStorageDirectory
public static File getStorageDirectory(File parent_directory, String new_child_directory_name) { """ Returns a Java File initialized to a directory of given name within the given location. @param parent_directory a File representing the directory in which the new child will reside @return a File pointing to t...
java
public static File getStorageDirectory(File parent_directory, String new_child_directory_name){ File result = new File(parent_directory, new_child_directory_name); if(!result.exists()) if(result.mkdir()) return result; else{ Log.e("getStorageDirec...
[ "public", "static", "File", "getStorageDirectory", "(", "File", "parent_directory", ",", "String", "new_child_directory_name", ")", "{", "File", "result", "=", "new", "File", "(", "parent_directory", ",", "new_child_directory_name", ")", ";", "if", "(", "!", "resu...
Returns a Java File initialized to a directory of given name within the given location. @param parent_directory a File representing the directory in which the new child will reside @return a File pointing to the desired directory, or null if a file with conflicting name exists or if getRootStorageDirectory was not cal...
[ "Returns", "a", "Java", "File", "initialized", "to", "a", "directory", "of", "given", "name", "within", "the", "given", "location", "." ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/FileUtils.java#L83-L99
apache/incubator-druid
sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java
Calcites.calciteTimestampToJoda
public static DateTime calciteTimestampToJoda(final long timestamp, final DateTimeZone timeZone) { """ The inverse of {@link #jodaToCalciteTimestamp(DateTime, DateTimeZone)}. @param timestamp Calcite style timestamp @param timeZone session time zone @return joda timestamp, with time zone set to the session...
java
public static DateTime calciteTimestampToJoda(final long timestamp, final DateTimeZone timeZone) { return new DateTime(timestamp, DateTimeZone.UTC).withZoneRetainFields(timeZone); }
[ "public", "static", "DateTime", "calciteTimestampToJoda", "(", "final", "long", "timestamp", ",", "final", "DateTimeZone", "timeZone", ")", "{", "return", "new", "DateTime", "(", "timestamp", ",", "DateTimeZone", ".", "UTC", ")", ".", "withZoneRetainFields", "(", ...
The inverse of {@link #jodaToCalciteTimestamp(DateTime, DateTimeZone)}. @param timestamp Calcite style timestamp @param timeZone session time zone @return joda timestamp, with time zone set to the session time zone
[ "The", "inverse", "of", "{", "@link", "#jodaToCalciteTimestamp", "(", "DateTime", "DateTimeZone", ")", "}", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java#L325-L328
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer2.java
Normalizer2.getInstance
public static Normalizer2 getInstance(InputStream data, String name, Mode mode) { """ Returns a Normalizer2 instance which uses the specified data file (an ICU data file if data=null, or else custom binary data) and which composes or decomposes text according to the specified mode. Returns an unmodifiable singl...
java
public static Normalizer2 getInstance(InputStream data, String name, Mode mode) { // TODO: If callers really use this API, then we should add an overload that takes a ByteBuffer. ByteBuffer bytes = null; if (data != null) { try { bytes = ICUBinary.getByteBufferFromInp...
[ "public", "static", "Normalizer2", "getInstance", "(", "InputStream", "data", ",", "String", "name", ",", "Mode", "mode", ")", "{", "// TODO: If callers really use this API, then we should add an overload that takes a ByteBuffer.", "ByteBuffer", "bytes", "=", "null", ";", "...
Returns a Normalizer2 instance which uses the specified data file (an ICU data file if data=null, or else custom binary data) and which composes or decomposes text according to the specified mode. Returns an unmodifiable singleton instance. <ul> <li>Use data=null for data files that are part of ICU's own data. <li>Use ...
[ "Returns", "a", "Normalizer2", "instance", "which", "uses", "the", "specified", "data", "file", "(", "an", "ICU", "data", "file", "if", "data", "=", "null", "or", "else", "custom", "binary", "data", ")", "and", "which", "composes", "or", "decomposes", "tex...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer2.java#L181-L199
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java
UCharacter.getCodePoint
public static int getCodePoint(char lead, char trail) { """ <strong>[icu]</strong> Returns a code point corresponding to the two surrogate code units. @param lead the lead char @param trail the trail char @return code point if surrogate characters are valid. @exception IllegalArgumentException thrown when th...
java
public static int getCodePoint(char lead, char trail) { if (Character.isSurrogatePair(lead, trail)) { return Character.toCodePoint(lead, trail); } throw new IllegalArgumentException("Illegal surrogate characters"); }
[ "public", "static", "int", "getCodePoint", "(", "char", "lead", ",", "char", "trail", ")", "{", "if", "(", "Character", ".", "isSurrogatePair", "(", "lead", ",", "trail", ")", ")", "{", "return", "Character", ".", "toCodePoint", "(", "lead", ",", "trail"...
<strong>[icu]</strong> Returns a code point corresponding to the two surrogate code units. @param lead the lead char @param trail the trail char @return code point if surrogate characters are valid. @exception IllegalArgumentException thrown when the code units do not form a valid code point
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "a", "code", "point", "corresponding", "to", "the", "two", "surrogate", "code", "units", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacter.java#L4247-L4253
DaGeRe/KoPeMe
kopeme-core/src/main/java/de/dagere/kopeme/kieker/KiekerTraceEntry.java
KiekerTraceEntry.getCellProcessors
public static CellProcessor[] getCellProcessors() { """ Provide this array to parse the columns of the csv into the right type using the Super CSV framework. @return """ return new CellProcessor[] { new ParseInt(){ @Override public Object execute(Object value, CsvContext context) { String ...
java
public static CellProcessor[] getCellProcessors(){ return new CellProcessor[] { new ParseInt(){ @Override public Object execute(Object value, CsvContext context) { String content = value.toString(); String[] split = content.split("\\$"); return super.execute(split[1], context); } }, ...
[ "public", "static", "CellProcessor", "[", "]", "getCellProcessors", "(", ")", "{", "return", "new", "CellProcessor", "[", "]", "{", "new", "ParseInt", "(", ")", "{", "@", "Override", "public", "Object", "execute", "(", "Object", "value", ",", "CsvContext", ...
Provide this array to parse the columns of the csv into the right type using the Super CSV framework. @return
[ "Provide", "this", "array", "to", "parse", "the", "columns", "of", "the", "csv", "into", "the", "right", "type", "using", "the", "Super", "CSV", "framework", "." ]
train
https://github.com/DaGeRe/KoPeMe/blob/a4939113cba73cb20a2c7d6dc8d34d0139a3e340/kopeme-core/src/main/java/de/dagere/kopeme/kieker/KiekerTraceEntry.java#L45-L65
ThreeTen/threetenbp
src/main/java/org/threeten/bp/chrono/Chronology.java
Chronology.ensureChronoLocalDateTime
<D extends ChronoLocalDate> ChronoLocalDateTimeImpl<D> ensureChronoLocalDateTime(Temporal temporal) { """ Casts the {@code Temporal} to {@code ChronoLocalDateTime} with the same chronology. @param temporal a date-time to cast, not null @return the date-time checked and cast to {@code ChronoLocalDateTime}, no...
java
<D extends ChronoLocalDate> ChronoLocalDateTimeImpl<D> ensureChronoLocalDateTime(Temporal temporal) { @SuppressWarnings("unchecked") ChronoLocalDateTimeImpl<D> other = (ChronoLocalDateTimeImpl<D>) temporal; if (this.equals(other.toLocalDate().getChronology()) == false) { throw new Cl...
[ "<", "D", "extends", "ChronoLocalDate", ">", "ChronoLocalDateTimeImpl", "<", "D", ">", "ensureChronoLocalDateTime", "(", "Temporal", "temporal", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "ChronoLocalDateTimeImpl", "<", "D", ">", "other", "=", "...
Casts the {@code Temporal} to {@code ChronoLocalDateTime} with the same chronology. @param temporal a date-time to cast, not null @return the date-time checked and cast to {@code ChronoLocalDateTime}, not null @throws ClassCastException if the date-time cannot be cast to ChronoLocalDateTimeImpl or the chronology is ...
[ "Casts", "the", "{", "@code", "Temporal", "}", "to", "{", "@code", "ChronoLocalDateTime", "}", "with", "the", "same", "chronology", "." ]
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/chrono/Chronology.java#L374-L382
NordicSemiconductor/Android-DFU-Library
dfu/src/main/java/no/nordicsemi/android/dfu/LegacyDfuImpl.java
LegacyDfuImpl.writeOpCode
private void writeOpCode(@NonNull final BluetoothGattCharacteristic characteristic, @NonNull final byte[] value) throws DeviceDisconnectedException, DfuException, UploadAbortedException { """ Writes the operation code to the characteristic. This method is SYNCHRONOUS and wait until the {@link android.bluetooth...
java
private void writeOpCode(@NonNull final BluetoothGattCharacteristic characteristic, @NonNull final byte[] value) throws DeviceDisconnectedException, DfuException, UploadAbortedException { final boolean reset = value[0] == OP_CODE_RESET_KEY || value[0] == OP_CODE_ACTIVATE_AND_RESET_KEY; writeOpCode(characteristic...
[ "private", "void", "writeOpCode", "(", "@", "NonNull", "final", "BluetoothGattCharacteristic", "characteristic", ",", "@", "NonNull", "final", "byte", "[", "]", "value", ")", "throws", "DeviceDisconnectedException", ",", "DfuException", ",", "UploadAbortedException", ...
Writes the operation code to the characteristic. This method is SYNCHRONOUS and wait until the {@link android.bluetooth.BluetoothGattCallback#onCharacteristicWrite(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int)} will be called or the device gets disconnected. If connection state wi...
[ "Writes", "the", "operation", "code", "to", "the", "characteristic", ".", "This", "method", "is", "SYNCHRONOUS", "and", "wait", "until", "the", "{", "@link", "android", ".", "bluetooth", ".", "BluetoothGattCallback#onCharacteristicWrite", "(", "android", ".", "blu...
train
https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/LegacyDfuImpl.java#L606-L610
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.showInstallPrompt
public static boolean showInstallPrompt(@NonNull Activity activity, int requestCode, @Nullable String referrer) { """ Method shows play store install prompt for the full app. Use this method only if you have custom parameters to pass to the full app using referrer else use {@link #showInstallPrompt(Activity, int)...
java
public static boolean showInstallPrompt(@NonNull Activity activity, int requestCode, @Nullable String referrer) { String installReferrerString = Defines.Jsonkey.IsFullAppConv.getKey() + "=true&" + referrer; return InstantAppUtil.doShowInstallPrompt(activity, requestCode, installReferrerString); }
[ "public", "static", "boolean", "showInstallPrompt", "(", "@", "NonNull", "Activity", "activity", ",", "int", "requestCode", ",", "@", "Nullable", "String", "referrer", ")", "{", "String", "installReferrerString", "=", "Defines", ".", "Jsonkey", ".", "IsFullAppConv...
Method shows play store install prompt for the full app. Use this method only if you have custom parameters to pass to the full app using referrer else use {@link #showInstallPrompt(Activity, int)} @param activity Current activity @param requestCode Request code for the activity to receive the result @param referre...
[ "Method", "shows", "play", "store", "install", "prompt", "for", "the", "full", "app", ".", "Use", "this", "method", "only", "if", "you", "have", "custom", "parameters", "to", "pass", "to", "the", "full", "app", "using", "referrer", "else", "use", "{", "@...
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L4003-L4006
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/HeapAlphaSketch.java
HeapAlphaSketch.getR
private static final int getR(final double theta, final double alpha, final double p) { """ Computes whether there have been 0, 1, or 2 or more actual insertions into the cache in a numerically safe way. @param theta <a href="{@docRoot}/resources/dictionary.html#theta">See Theta</a>. @param alpha internal compu...
java
private static final int getR(final double theta, final double alpha, final double p) { final double split1 = (p * (alpha + 1.0)) / 2.0; if (theta > split1) { return 0; } if (theta > (alpha * split1)) { return 1; } return 2; }
[ "private", "static", "final", "int", "getR", "(", "final", "double", "theta", ",", "final", "double", "alpha", ",", "final", "double", "p", ")", "{", "final", "double", "split1", "=", "(", "p", "*", "(", "alpha", "+", "1.0", ")", ")", "/", "2.0", "...
Computes whether there have been 0, 1, or 2 or more actual insertions into the cache in a numerically safe way. @param theta <a href="{@docRoot}/resources/dictionary.html#theta">See Theta</a>. @param alpha internal computed value alpha. @param p <a href="{@docRoot}/resources/dictionary.html#p">See Sampling Probability,...
[ "Computes", "whether", "there", "have", "been", "0", "1", "or", "2", "or", "more", "actual", "insertions", "into", "the", "cache", "in", "a", "numerically", "safe", "way", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/HeapAlphaSketch.java#L528-L533
kefirfromperm/kefirbb
src/org/kefirsf/bb/DomConfigurationFactory.java
DomConfigurationFactory.nodeAttribute
private boolean nodeAttribute(Node node, String attributeName, boolean defaultValue) { """ Return node attribute value, if exists or default attribute value @param node XML-node @param attributeName attributeName @param defaultValue attribute default value @return attribute value or default value ...
java
private boolean nodeAttribute(Node node, String attributeName, boolean defaultValue) { boolean value = defaultValue; if (node.hasAttributes()) { Node attribute = node.getAttributes().getNamedItem(attributeName); if (attribute != null) { value = Boolean.valueOf(att...
[ "private", "boolean", "nodeAttribute", "(", "Node", "node", ",", "String", "attributeName", ",", "boolean", "defaultValue", ")", "{", "boolean", "value", "=", "defaultValue", ";", "if", "(", "node", ".", "hasAttributes", "(", ")", ")", "{", "Node", "attribut...
Return node attribute value, if exists or default attribute value @param node XML-node @param attributeName attributeName @param defaultValue attribute default value @return attribute value or default value
[ "Return", "node", "attribute", "value", "if", "exists", "or", "default", "attribute", "value" ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/DomConfigurationFactory.java#L602-L611
bazaarvoice/jolt
jolt-core/src/main/java/com/bazaarvoice/jolt/cardinality/CardinalityCompositeSpec.java
CardinalityCompositeSpec.applyKeyToLiteralAndComputed
private static void applyKeyToLiteralAndComputed( CardinalityCompositeSpec spec, String subKeyStr, Object subInput, WalkedPath walkedPath, Object input ) { """ This method implements the Cardinality matching behavior when we have both literal and computed children. <p/> For each input key, we see if it matches ...
java
private static void applyKeyToLiteralAndComputed( CardinalityCompositeSpec spec, String subKeyStr, Object subInput, WalkedPath walkedPath, Object input ) { CardinalitySpec literalChild = spec.literalChildren.get( subKeyStr ); // if the subKeyStr found a literalChild, then we do not have to try to matc...
[ "private", "static", "void", "applyKeyToLiteralAndComputed", "(", "CardinalityCompositeSpec", "spec", ",", "String", "subKeyStr", ",", "Object", "subInput", ",", "WalkedPath", "walkedPath", ",", "Object", "input", ")", "{", "CardinalitySpec", "literalChild", "=", "spe...
This method implements the Cardinality matching behavior when we have both literal and computed children. <p/> For each input key, we see if it matches a literal, and it not, try to match the key with every computed child.
[ "This", "method", "implements", "the", "Cardinality", "matching", "behavior", "when", "we", "have", "both", "literal", "and", "computed", "children", ".", "<p", "/", ">", "For", "each", "input", "key", "we", "see", "if", "it", "matches", "a", "literal", "a...
train
https://github.com/bazaarvoice/jolt/blob/4cf866a9f4222142da41b50dbcccce022a956bff/jolt-core/src/main/java/com/bazaarvoice/jolt/cardinality/CardinalityCompositeSpec.java#L198-L217
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java
ConstraintNetwork.removeRelation
synchronized boolean removeRelation(Interval i1, Interval i2) { """ Remove the distance relation between two intervals, if such a relation exists. @param i1 an interval. @param i2 another interval. @return true if the graph changed as a result of this operation, false otherwise. """ if (i1 == ...
java
synchronized boolean removeRelation(Interval i1, Interval i2) { if (i1 == i2 || !containsInterval(i1) || !containsInterval(i2)) { return false; } Object i1Start = i1.getStart(); Object i1Finish = i1.getFinish(); Object i2Start = i2.getStart(); Object i2Finish...
[ "synchronized", "boolean", "removeRelation", "(", "Interval", "i1", ",", "Interval", "i2", ")", "{", "if", "(", "i1", "==", "i2", "||", "!", "containsInterval", "(", "i1", ")", "||", "!", "containsInterval", "(", "i2", ")", ")", "{", "return", "false", ...
Remove the distance relation between two intervals, if such a relation exists. @param i1 an interval. @param i2 another interval. @return true if the graph changed as a result of this operation, false otherwise.
[ "Remove", "the", "distance", "relation", "between", "two", "intervals", "if", "such", "a", "relation", "exists", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/ConstraintNetwork.java#L99-L128
dita-ot/dita-ot
src/main/java/org/dita/dost/util/XMLUtils.java
XMLUtils.getChildElements
public static List<Element> getChildElements(final Element elem, final DitaClass cls) { """ List child elements by DITA class. @param elem root element @param cls DITA class to match elements @return list of matching elements """ return getChildElements(elem, cls, false); }
java
public static List<Element> getChildElements(final Element elem, final DitaClass cls) { return getChildElements(elem, cls, false); }
[ "public", "static", "List", "<", "Element", ">", "getChildElements", "(", "final", "Element", "elem", ",", "final", "DitaClass", "cls", ")", "{", "return", "getChildElements", "(", "elem", ",", "cls", ",", "false", ")", ";", "}" ]
List child elements by DITA class. @param elem root element @param cls DITA class to match elements @return list of matching elements
[ "List", "child", "elements", "by", "DITA", "class", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/XMLUtils.java#L180-L182
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/link/medium/RawFrameFactory.java
RawFrameFactory.createPL132
public static RawFrame createPL132(byte[] data, int offset) throws KNXFormatException { """ Creates a raw frame out of a byte array for the PL132 communication medium. <p> @param data byte array containing the PL132 raw frame structure @param offset start offset of frame structure in <code>data</code>, 0 &lt;...
java
public static RawFrame createPL132(byte[] data, int offset) throws KNXFormatException { if (data.length - offset == 2) return new PL132Ack(data, offset); return new PL132LData(data, offset); }
[ "public", "static", "RawFrame", "createPL132", "(", "byte", "[", "]", "data", ",", "int", "offset", ")", "throws", "KNXFormatException", "{", "if", "(", "data", ".", "length", "-", "offset", "==", "2", ")", "return", "new", "PL132Ack", "(", "data", ",", ...
Creates a raw frame out of a byte array for the PL132 communication medium. <p> @param data byte array containing the PL132 raw frame structure @param offset start offset of frame structure in <code>data</code>, 0 &lt;= offset &lt; <code>data.length</code> @return the created PL132 raw frame @throws KNXFormatException...
[ "Creates", "a", "raw", "frame", "out", "of", "a", "byte", "array", "for", "the", "PL132", "communication", "medium", ".", "<p", ">" ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/link/medium/RawFrameFactory.java#L157-L162
GerdHolz/TOVAL
src/de/invation/code/toval/misc/ListUtils.java
ListUtils.insertHeader
public static <T> void insertHeader(List<T> list, T headerValue, int headerSize) { """ Inserts a header @param <T> @param list @param headerValue @param headerSize """ for (int i = 0; i < headerSize; i++) list.add(0, headerValue); }
java
public static <T> void insertHeader(List<T> list, T headerValue, int headerSize) { for (int i = 0; i < headerSize; i++) list.add(0, headerValue); }
[ "public", "static", "<", "T", ">", "void", "insertHeader", "(", "List", "<", "T", ">", "list", ",", "T", "headerValue", ",", "int", "headerSize", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "headerSize", ";", "i", "++", ")", "list"...
Inserts a header @param <T> @param list @param headerValue @param headerSize
[ "Inserts", "a", "header" ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/ListUtils.java#L44-L47
phax/ph-commons
ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java
CertificateHelper.getRFC1421CompliantString
@Nullable public static String getRFC1421CompliantString (@Nullable final String sCertificate, final boolean bIncludePEMHeader) { """ The certificate string needs to be emitted in portions of 64 characters. If characters are left, than &lt;CR&gt;&lt;LF&gt; ("\r\n") must be added to the string so that the next ...
java
@Nullable public static String getRFC1421CompliantString (@Nullable final String sCertificate, final boolean bIncludePEMHeader) { return getRFC1421CompliantString (sCertificate, bIncludePEMHeader, CRLF); }
[ "@", "Nullable", "public", "static", "String", "getRFC1421CompliantString", "(", "@", "Nullable", "final", "String", "sCertificate", ",", "final", "boolean", "bIncludePEMHeader", ")", "{", "return", "getRFC1421CompliantString", "(", "sCertificate", ",", "bIncludePEMHead...
The certificate string needs to be emitted in portions of 64 characters. If characters are left, than &lt;CR&gt;&lt;LF&gt; ("\r\n") must be added to the string so that the next characters start on a new line. After the last part, no &lt;CR&gt;&lt;LF&gt; is needed. Respective RFC parts are 1421 4.3.2.2 and 4.3.2.4 @par...
[ "The", "certificate", "string", "needs", "to", "be", "emitted", "in", "portions", "of", "64", "characters", ".", "If", "characters", "are", "left", "than", "&lt", ";", "CR&gt", ";", "&lt", ";", "LF&gt", ";", "(", "\\", "r", "\\", "n", ")", "must", "b...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/certificate/CertificateHelper.java#L138-L142
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.viewToImage
public static Bitmap viewToImage(Context context, WebView viewToBeConverted) { """ Convert view to an image. Can be used to make animations smoother. @param context The current Context or Activity that this method is called from. @param viewToBeConverted View to convert to a Bitmap. @return Bitmap ...
java
public static Bitmap viewToImage(Context context, WebView viewToBeConverted) { int extraSpace = 2000; //because getContentHeight doesn't always return the full screen height. int height = viewToBeConverted.getContentHeight() + extraSpace; Bitmap viewBitmap = Bitmap.createBitmap(viewToBeConverte...
[ "public", "static", "Bitmap", "viewToImage", "(", "Context", "context", ",", "WebView", "viewToBeConverted", ")", "{", "int", "extraSpace", "=", "2000", ";", "//because getContentHeight doesn't always return the full screen height.", "int", "height", "=", "viewToBeConverted...
Convert view to an image. Can be used to make animations smoother. @param context The current Context or Activity that this method is called from. @param viewToBeConverted View to convert to a Bitmap. @return Bitmap object that can be put in an ImageView. Will look like the converted viewToBeConverted.
[ "Convert", "view", "to", "an", "image", ".", "Can", "be", "used", "to", "make", "animations", "smoother", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L173-L192
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/utilities/ServerUtility.java
ServerUtility.getServerResponse
private static String getServerResponse(String protocol, String user, String pass, String path) throws IOException { """ Hits the given Fedora Server URL and returns the response as a...
java
private static String getServerResponse(String protocol, String user, String pass, String path) throws IOException { String url = getBaseURL(protocol) + path; logger.info("...
[ "private", "static", "String", "getServerResponse", "(", "String", "protocol", ",", "String", "user", ",", "String", "pass", ",", "String", "path", ")", "throws", "IOException", "{", "String", "url", "=", "getBaseURL", "(", "protocol", ")", "+", "path", ";",...
Hits the given Fedora Server URL and returns the response as a String. Throws an IOException if the response code is not 200(OK).
[ "Hits", "the", "given", "Fedora", "Server", "URL", "and", "returns", "the", "response", "as", "a", "String", ".", "Throws", "an", "IOException", "if", "the", "response", "code", "is", "not", "200", "(", "OK", ")", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/ServerUtility.java#L129-L138
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java
EntityDataModelUtil.getPropertyValue
public static Object getPropertyValue(StructuralProperty property, Object object) { """ Gets the value of a property. @param property The property. @param object The object to get the value from (typically an OData entity). @return The value of the property. """ Field field = property.getJavaFie...
java
public static Object getPropertyValue(StructuralProperty property, Object object) { Field field = property.getJavaField(); field.setAccessible(true); try { return field.get(object); } catch (IllegalAccessException e) { throw new ODataSystemException("Cannot read p...
[ "public", "static", "Object", "getPropertyValue", "(", "StructuralProperty", "property", ",", "Object", "object", ")", "{", "Field", "field", "=", "property", ".", "getJavaField", "(", ")", ";", "field", ".", "setAccessible", "(", "true", ")", ";", "try", "{...
Gets the value of a property. @param property The property. @param object The object to get the value from (typically an OData entity). @return The value of the property.
[ "Gets", "the", "value", "of", "a", "property", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L311-L319
fuinorg/objects4j
src/main/java/org/fuin/objects4j/vo/DayOpeningHours.java
DayOpeningHours.asAddedChanges
public List<Change> asAddedChanges() { """ Returns all hour ranges of this day as if they were added. @return Added day changes. """ final List<Change> changes = new ArrayList<>(); for (final HourRange hr : hourRanges) { changes.add(new Change(ChangeType.ADDED, dayOfTheWeek, hr))...
java
public List<Change> asAddedChanges() { final List<Change> changes = new ArrayList<>(); for (final HourRange hr : hourRanges) { changes.add(new Change(ChangeType.ADDED, dayOfTheWeek, hr)); } return changes; }
[ "public", "List", "<", "Change", ">", "asAddedChanges", "(", ")", "{", "final", "List", "<", "Change", ">", "changes", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "HourRange", "hr", ":", "hourRanges", ")", "{", "changes", ".", ...
Returns all hour ranges of this day as if they were added. @return Added day changes.
[ "Returns", "all", "hour", "ranges", "of", "this", "day", "as", "if", "they", "were", "added", "." ]
train
https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/DayOpeningHours.java#L364-L370
jaxio/celerio
celerio-maven/celerio-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/celerio/GenerateMojo.java
GenerateMojo.overridePacksAndModules
private void overridePacksAndModules(Celerio celerio) { """ For convenience (multi module, springfuse, etc...) template packs and modules may be in a separate file... we process this file if it exists. @param celerio """ String filename = xmlTemplatePacksOverride; if (!FileUtils.fileExists(f...
java
private void overridePacksAndModules(Celerio celerio) { String filename = xmlTemplatePacksOverride; if (!FileUtils.fileExists(filename)) { return; } getLog().info("Overriding configuration with " + filename); CelerioLoader celerioLoader = context.getBean(CelerioLoade...
[ "private", "void", "overridePacksAndModules", "(", "Celerio", "celerio", ")", "{", "String", "filename", "=", "xmlTemplatePacksOverride", ";", "if", "(", "!", "FileUtils", ".", "fileExists", "(", "filename", ")", ")", "{", "return", ";", "}", "getLog", "(", ...
For convenience (multi module, springfuse, etc...) template packs and modules may be in a separate file... we process this file if it exists. @param celerio
[ "For", "convenience", "(", "multi", "module", "springfuse", "etc", "...", ")", "template", "packs", "and", "modules", "may", "be", "in", "a", "separate", "file", "...", "we", "process", "this", "file", "if", "it", "exists", "." ]
train
https://github.com/jaxio/celerio/blob/fbfacb639e286f9f3f3a18986f74ea275bebd887/celerio-maven/celerio-maven-plugin/src/main/java/com/jaxio/celerio/maven/plugin/celerio/GenerateMojo.java#L333-L363
katharsis-project/katharsis-framework
katharsis-core/src/main/java/io/katharsis/core/internal/dispatcher/ControllerRegistry.java
ControllerRegistry.getController
public BaseController getController(JsonPath jsonPath, String requestType) { """ Iterate over all registered controllers to get the first suitable one. @param jsonPath built JsonPath object mad from request path @param requestType type of a HTTP request @return suitable controller """ for (BaseContr...
java
public BaseController getController(JsonPath jsonPath, String requestType) { for (BaseController controller : controllers) { if (controller.isAcceptable(jsonPath, requestType)) { return controller; } } throw new MethodNotFoundException(PathBuilder.buildPat...
[ "public", "BaseController", "getController", "(", "JsonPath", "jsonPath", ",", "String", "requestType", ")", "{", "for", "(", "BaseController", "controller", ":", "controllers", ")", "{", "if", "(", "controller", ".", "isAcceptable", "(", "jsonPath", ",", "reque...
Iterate over all registered controllers to get the first suitable one. @param jsonPath built JsonPath object mad from request path @param requestType type of a HTTP request @return suitable controller
[ "Iterate", "over", "all", "registered", "controllers", "to", "get", "the", "first", "suitable", "one", "." ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/core/internal/dispatcher/ControllerRegistry.java#L41-L48
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java
LogAnalyticsInner.exportRequestRateByIntervalAsync
public Observable<LogAnalyticsOperationResultInner> exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters) { """ Export logs that show Api requests made by this subscription in the given time window to show throttling activities. @param location The location upon which virtual-...
java
public Observable<LogAnalyticsOperationResultInner> exportRequestRateByIntervalAsync(String location, RequestRateByIntervalInput parameters) { return exportRequestRateByIntervalWithServiceResponseAsync(location, parameters).map(new Func1<ServiceResponse<LogAnalyticsOperationResultInner>, LogAnalyticsOperationRe...
[ "public", "Observable", "<", "LogAnalyticsOperationResultInner", ">", "exportRequestRateByIntervalAsync", "(", "String", "location", ",", "RequestRateByIntervalInput", "parameters", ")", "{", "return", "exportRequestRateByIntervalWithServiceResponseAsync", "(", "location", ",", ...
Export logs that show Api requests made by this subscription in the given time window to show throttling activities. @param location The location upon which virtual-machine-sizes is queried. @param parameters Parameters supplied to the LogAnalytics getRequestRateByInterval Api. @throws IllegalArgumentException thrown ...
[ "Export", "logs", "that", "show", "Api", "requests", "made", "by", "this", "subscription", "in", "the", "given", "time", "window", "to", "show", "throttling", "activities", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java#L111-L118
alexa/alexa-skills-kit-sdk-for-java
ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/SkillRequestTimestampVerifier.java
SkillRequestTimestampVerifier.verify
public void verify(HttpServletRequest servletRequest, byte[] serializedRequestEnvelope, RequestEnvelope deserializedRequestEnvelope) { """ Validates if the provided date is inclusively within the verifier tolerance, either in the past or future, of the current system time. This method will throw a {@link Security...
java
public void verify(HttpServletRequest servletRequest, byte[] serializedRequestEnvelope, RequestEnvelope deserializedRequestEnvelope) { if (deserializedRequestEnvelope == null) { throw new SecurityException("Incoming request did not contain a request envelope"); } Request request = de...
[ "public", "void", "verify", "(", "HttpServletRequest", "servletRequest", ",", "byte", "[", "]", "serializedRequestEnvelope", ",", "RequestEnvelope", "deserializedRequestEnvelope", ")", "{", "if", "(", "deserializedRequestEnvelope", "==", "null", ")", "{", "throw", "ne...
Validates if the provided date is inclusively within the verifier tolerance, either in the past or future, of the current system time. This method will throw a {@link SecurityException} if the tolerance is not in the expected range, or if the request is null or does not contain a timestamp value. {@inheritDoc}
[ "Validates", "if", "the", "provided", "date", "is", "inclusively", "within", "the", "verifier", "tolerance", "either", "in", "the", "past", "or", "future", "of", "the", "current", "system", "time", ".", "This", "method", "will", "throw", "a", "{", "@link", ...
train
https://github.com/alexa/alexa-skills-kit-sdk-for-java/blob/c49194da0693898c70f3f2c4a372f5a12da04e3e/ask-sdk-servlet-support/src/com/amazon/ask/servlet/verifiers/SkillRequestTimestampVerifier.java#L81-L98
kiegroup/droolsjbpm-integration
kie-server-parent/kie-server-common/src/main/java/org/kie/server/common/rest/KieServerHttpRequest.java
KieServerHttpRequest.appendQueryParameters
static String appendQueryParameters( final CharSequence url, final Object... params ) { """ Append given name/value pairs as query parameters to the base URL <p> The params argument is interpreted as a sequence of name/value pairs so the given number of params must be divisible by 2. @param url @param params...
java
static String appendQueryParameters( final CharSequence url, final Object... params ) { final String baseUrl = url.toString(); if( params == null || params.length == 0 ) { return baseUrl; } if( params.length % 2 != 0 ) { throw new IllegalArgumentException("Must s...
[ "static", "String", "appendQueryParameters", "(", "final", "CharSequence", "url", ",", "final", "Object", "...", "params", ")", "{", "final", "String", "baseUrl", "=", "url", ".", "toString", "(", ")", ";", "if", "(", "params", "==", "null", "||", "params"...
Append given name/value pairs as query parameters to the base URL <p> The params argument is interpreted as a sequence of name/value pairs so the given number of params must be divisible by 2. @param url @param params name/value pairs @return URL with appended query params
[ "Append", "given", "name", "/", "value", "pairs", "as", "query", "parameters", "to", "the", "base", "URL", "<p", ">", "The", "params", "argument", "is", "interpreted", "as", "a", "sequence", "of", "name", "/", "value", "pairs", "so", "the", "given", "num...
train
https://github.com/kiegroup/droolsjbpm-integration/blob/6c26200ab03855dbb92b56ca0c6363cdec0eaf2c/kie-server-parent/kie-server-common/src/main/java/org/kie/server/common/rest/KieServerHttpRequest.java#L548-L581
amaembo/streamex
src/main/java/one/util/streamex/IntStreamEx.java
IntStreamEx.zip
public static IntStreamEx zip(int[] first, int[] second, IntBinaryOperator mapper) { """ Returns a sequential {@code IntStreamEx} containing the results of applying the given function to the corresponding pairs of values in given two arrays. @param first the first array @param second the second array @param...
java
public static IntStreamEx zip(int[] first, int[] second, IntBinaryOperator mapper) { return of(new RangeBasedSpliterator.ZipInt(0, checkLength(first.length, second.length), mapper, first, second)); }
[ "public", "static", "IntStreamEx", "zip", "(", "int", "[", "]", "first", ",", "int", "[", "]", "second", ",", "IntBinaryOperator", "mapper", ")", "{", "return", "of", "(", "new", "RangeBasedSpliterator", ".", "ZipInt", "(", "0", ",", "checkLength", "(", ...
Returns a sequential {@code IntStreamEx} containing the results of applying the given function to the corresponding pairs of values in given two arrays. @param first the first array @param second the second array @param mapper a non-interfering, stateless function to apply to each pair of the corresponding array eleme...
[ "Returns", "a", "sequential", "{", "@code", "IntStreamEx", "}", "containing", "the", "results", "of", "applying", "the", "given", "function", "to", "the", "corresponding", "pairs", "of", "values", "in", "given", "two", "arrays", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L2623-L2625
calrissian/mango
mango-core/src/main/java/org/calrissian/mango/io/Serializables.java
Serializables.fromBase64
public static <T extends Serializable>T fromBase64(byte[] bytes, boolean compressed) throws IOException, ClassNotFoundException { """ Utility for returning a Serializable object from a byte array. Only use this method if the data was originally serialized using the {@link Serializables#toBase64(Serializable)} met...
java
public static <T extends Serializable>T fromBase64(byte[] bytes, boolean compressed) throws IOException, ClassNotFoundException { return deserialize(decodeBase64(bytes), compressed); }
[ "public", "static", "<", "T", "extends", "Serializable", ">", "T", "fromBase64", "(", "byte", "[", "]", "bytes", ",", "boolean", "compressed", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "return", "deserialize", "(", "decodeBase64", "(", ...
Utility for returning a Serializable object from a byte array. Only use this method if the data was originally serialized using the {@link Serializables#toBase64(Serializable)} method. Only use the {@code compressed} option if the data was originally compresses when using the {@link Serializables#serialize(Serializable...
[ "Utility", "for", "returning", "a", "Serializable", "object", "from", "a", "byte", "array", ".", "Only", "use", "this", "method", "if", "the", "data", "was", "originally", "serialized", "using", "the", "{" ]
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/io/Serializables.java#L103-L105
alipay/sofa-hessian
src/main/java/com/caucho/hessian/micro/MicroHessianOutput.java
MicroHessianOutput.writeBytes
public void writeBytes(byte[] buffer, int offset, int length) throws IOException { """ Writes a byte array to the stream. The array will be written with the following syntax: <code><pre> B b16 b18 bytes </pre></code> If the value is null, it will be written as <code><pre> N </pre></code> @...
java
public void writeBytes(byte[] buffer, int offset, int length) throws IOException { if (buffer == null) { os.write('N'); } else { os.write('B'); os.write(length << 8); os.write(length); os.write(buffer, offset, length); ...
[ "public", "void", "writeBytes", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "if", "(", "buffer", "==", "null", ")", "{", "os", ".", "write", "(", "'", "'", ")", ";", "}", "else", ...
Writes a byte array to the stream. The array will be written with the following syntax: <code><pre> B b16 b18 bytes </pre></code> If the value is null, it will be written as <code><pre> N </pre></code> @param value the string value to write.
[ "Writes", "a", "byte", "array", "to", "the", "stream", ".", "The", "array", "will", "be", "written", "with", "the", "following", "syntax", ":" ]
train
https://github.com/alipay/sofa-hessian/blob/89e4f5af28602101dab7b498995018871616357b/src/main/java/com/caucho/hessian/micro/MicroHessianOutput.java#L319-L331
mockito/mockito
src/main/java/org/mockito/internal/util/reflection/GenericMetadataSupport.java
GenericMetadataSupport.resolveGenericReturnType
public GenericMetadataSupport resolveGenericReturnType(Method method) { """ Resolve current method generic return type to a {@link GenericMetadataSupport}. @param method Method to resolve the return type. @return {@link GenericMetadataSupport} representing this generic return type. """ Type generic...
java
public GenericMetadataSupport resolveGenericReturnType(Method method) { Type genericReturnType = method.getGenericReturnType(); // logger.log("Method '" + method.toGenericString() + "' has return type : " + genericReturnType.getClass().getInterfaces()[0].getSimpleName() + " : " + genericReturnType); ...
[ "public", "GenericMetadataSupport", "resolveGenericReturnType", "(", "Method", "method", ")", "{", "Type", "genericReturnType", "=", "method", ".", "getGenericReturnType", "(", ")", ";", "// logger.log(\"Method '\" + method.toGenericString() + \"' has return type : \" + genericRetu...
Resolve current method generic return type to a {@link GenericMetadataSupport}. @param method Method to resolve the return type. @return {@link GenericMetadataSupport} representing this generic return type.
[ "Resolve", "current", "method", "generic", "return", "type", "to", "a", "{", "@link", "GenericMetadataSupport", "}", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/util/reflection/GenericMetadataSupport.java#L270-L286
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/scale/TaiInstant.java
TaiInstant.plus
public TaiInstant plus(Duration duration) { """ Returns a copy of this instant with the specified duration added. <p> The duration is added using simple addition of the seconds and nanoseconds in the duration to the seconds and nanoseconds of this instant. As a result, the duration is treated as being measured...
java
public TaiInstant plus(Duration duration) { long secsToAdd = duration.getSeconds(); int nanosToAdd = duration.getNano(); if ((secsToAdd | nanosToAdd) == 0) { return this; } long secs = Math.addExact(seconds, secsToAdd); long nanoAdjustment = ((long) nanos) + n...
[ "public", "TaiInstant", "plus", "(", "Duration", "duration", ")", "{", "long", "secsToAdd", "=", "duration", ".", "getSeconds", "(", ")", ";", "int", "nanosToAdd", "=", "duration", ".", "getNano", "(", ")", ";", "if", "(", "(", "secsToAdd", "|", "nanosTo...
Returns a copy of this instant with the specified duration added. <p> The duration is added using simple addition of the seconds and nanoseconds in the duration to the seconds and nanoseconds of this instant. As a result, the duration is treated as being measured in TAI compatible seconds for the purpose of this method...
[ "Returns", "a", "copy", "of", "this", "instant", "with", "the", "specified", "duration", "added", ".", "<p", ">", "The", "duration", "is", "added", "using", "simple", "addition", "of", "the", "seconds", "and", "nanoseconds", "in", "the", "duration", "to", ...
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/TaiInstant.java#L308-L317
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.createEventLog
public Long createEventLog(String pEventName, String pEventCategory, String pEventSubCat, String pEventSource, String pEventOwner, Long pEventOwnerId, String user, String modUser, String comments) throws DataAccessException, EventException { """ Method that creates the event log based on the passed in ...
java
public Long createEventLog(String pEventName, String pEventCategory, String pEventSubCat, String pEventSource, String pEventOwner, Long pEventOwnerId, String user, String modUser, String comments) throws DataAccessException, EventException { TransactionWrapper transaction = null; EngineDataA...
[ "public", "Long", "createEventLog", "(", "String", "pEventName", ",", "String", "pEventCategory", ",", "String", "pEventSubCat", ",", "String", "pEventSource", ",", "String", "pEventOwner", ",", "Long", "pEventOwnerId", ",", "String", "user", ",", "String", "modUs...
Method that creates the event log based on the passed in params @param pEventName @param pEventCategory @param pEventSource @param pEventOwner @param pEventOwnerId @return EventLog
[ "Method", "that", "creates", "the", "event", "log", "based", "on", "the", "passed", "in", "params" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L89-L105
monitorjbl/excel-streaming-reader
src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java
BufferedStringsTable.parseCT_Rst
private String parseCT_Rst(XMLEventReader xmlEventReader) throws XMLStreamException { """ Parses a {@code <si>} String Item. Returns just the text and drops the formatting. See <a href="https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.sharedstringitem.aspx">xmlschema type {@code CT_Rst...
java
private String parseCT_Rst(XMLEventReader xmlEventReader) throws XMLStreamException { // Precondition: pointing to <si>; Post condition: pointing to </si> StringBuilder buf = new StringBuilder(); XMLEvent xmlEvent; while((xmlEvent = xmlEventReader.nextTag()).isStartElement()) { switch(xmlEvent.as...
[ "private", "String", "parseCT_Rst", "(", "XMLEventReader", "xmlEventReader", ")", "throws", "XMLStreamException", "{", "// Precondition: pointing to <si>; Post condition: pointing to </si>", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "XMLEvent", "xml...
Parses a {@code <si>} String Item. Returns just the text and drops the formatting. See <a href="https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.sharedstringitem.aspx">xmlschema type {@code CT_Rst}</a>.
[ "Parses", "a", "{" ]
train
https://github.com/monitorjbl/excel-streaming-reader/blob/4e95c9aaaecf33685a09f8c267af3a578ba5e070/src/main/java/com/monitorjbl/xlsx/sst/BufferedStringsTable.java#L56-L77
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java
CommonConfigUtils.getRequiredConfigAttributeWithDefaultValue
public String getRequiredConfigAttributeWithDefaultValue(Map<String, Object> props, String key, String defaultValue) { """ Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the resulting value will be {@code null} and an error message will be log...
java
public String getRequiredConfigAttributeWithDefaultValue(Map<String, Object> props, String key, String defaultValue) { return getRequiredConfigAttributeWithDefaultValueAndConfigId(props, key, defaultValue, null); }
[ "public", "String", "getRequiredConfigAttributeWithDefaultValue", "(", "Map", "<", "String", ",", "Object", ">", "props", ",", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "getRequiredConfigAttributeWithDefaultValueAndConfigId", "(", "props", ",",...
Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the resulting value will be {@code null} and an error message will be logged.
[ "Returns", "the", "value", "for", "the", "configuration", "attribute", "matching", "the", "key", "provided", ".", "If", "the", "value", "does", "not", "exist", "or", "is", "empty", "the", "resulting", "value", "will", "be", "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java#L60-L62
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HTTPURLConnectionInterceptor.java
HTTPURLConnectionInterceptor.setResponseElements
private void setResponseElements(IntuitMessage intuitMessage, HttpURLConnection httpUrlConnection) throws FMSException { """ Method to set the response elements by reading the values from the response """ LOG.debug("Response headers:"+httpUrlConnection.getHeaderFields()); ResponseElements responseElements ...
java
private void setResponseElements(IntuitMessage intuitMessage, HttpURLConnection httpUrlConnection) throws FMSException { LOG.debug("Response headers:"+httpUrlConnection.getHeaderFields()); ResponseElements responseElements = intuitMessage.getResponseElements(); responseElements.setEncodingHeader(httpUrlConnection...
[ "private", "void", "setResponseElements", "(", "IntuitMessage", "intuitMessage", ",", "HttpURLConnection", "httpUrlConnection", ")", "throws", "FMSException", "{", "LOG", ".", "debug", "(", "\"Response headers:\"", "+", "httpUrlConnection", ".", "getHeaderFields", "(", ...
Method to set the response elements by reading the values from the response
[ "Method", "to", "set", "the", "response", "elements", "by", "reading", "the", "values", "from", "the", "response" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HTTPURLConnectionInterceptor.java#L184-L209
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/UnsignedNumberUtil.java
UnsignedNumberUtil.remainder
private static long remainder(long dividend, long divisor) { """ Returns dividend % divisor, where the dividend and divisor are treated as unsigned 64-bit quantities. @param dividend the dividend (numerator) @param divisor the divisor (denominator) @throws ArithmeticException if divisor is 0 @since 11.0 ...
java
private static long remainder(long dividend, long divisor) { if (divisor < 0) { // i.e., divisor >= 2^63: if (compareUnsigned(dividend, divisor) < 0) { return dividend; // dividend < divisor } else { return d...
[ "private", "static", "long", "remainder", "(", "long", "dividend", ",", "long", "divisor", ")", "{", "if", "(", "divisor", "<", "0", ")", "{", "// i.e., divisor >= 2^63:", "if", "(", "compareUnsigned", "(", "dividend", ",", "divisor", ")", "<", "0", ")", ...
Returns dividend % divisor, where the dividend and divisor are treated as unsigned 64-bit quantities. @param dividend the dividend (numerator) @param divisor the divisor (denominator) @throws ArithmeticException if divisor is 0 @since 11.0
[ "Returns", "dividend", "%", "divisor", "where", "the", "dividend", "and", "divisor", "are", "treated", "as", "unsigned", "64", "-", "bit", "quantities", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/UnsignedNumberUtil.java#L227-L255
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java
MultiChangeBuilder.deleteTextAbsolutely
public MultiChangeBuilder<PS, SEG, S> deleteTextAbsolutely(int start, int end) { """ Removes a range of text. It must hold {@code 0 <= start <= end <= getLength()}. @param start Start position of the range to remove @param end End position of the range to remove """ return replaceTextAbsolutely(...
java
public MultiChangeBuilder<PS, SEG, S> deleteTextAbsolutely(int start, int end) { return replaceTextAbsolutely(start, end, ""); }
[ "public", "MultiChangeBuilder", "<", "PS", ",", "SEG", ",", "S", ">", "deleteTextAbsolutely", "(", "int", "start", ",", "int", "end", ")", "{", "return", "replaceTextAbsolutely", "(", "start", ",", "end", ",", "\"\"", ")", ";", "}" ]
Removes a range of text. It must hold {@code 0 <= start <= end <= getLength()}. @param start Start position of the range to remove @param end End position of the range to remove
[ "Removes", "a", "range", "of", "text", "." ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/MultiChangeBuilder.java#L274-L276
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscNodeConfigurationsInner.java
DscNodeConfigurationsInner.getAsync
public Observable<DscNodeConfigurationInner> getAsync(String resourceGroupName, String automationAccountName, String nodeConfigurationName) { """ Retrieve the Dsc node configurations by node configuration. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the au...
java
public Observable<DscNodeConfigurationInner> getAsync(String resourceGroupName, String automationAccountName, String nodeConfigurationName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeConfigurationName).map(new Func1<ServiceResponse<DscNodeConfigurationInner>, DscNodeConfi...
[ "public", "Observable", "<", "DscNodeConfigurationInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "nodeConfigurationName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Retrieve the Dsc node configurations by node configuration. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeConfigurationName The Dsc node configuration name. @throws IllegalArgumentException thrown if parameters fail the validation ...
[ "Retrieve", "the", "Dsc", "node", "configurations", "by", "node", "configuration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/DscNodeConfigurationsInner.java#L215-L222
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/international/pennchinese/ChineseEnglishWordMap.java
ChineseEnglishWordMap.addMap
public int addMap(Map<String, Set<String>> addM) { """ Add all of the mappings from the specified map to the current map. """ int newTrans = 0; for (Map.Entry<String,Set<String>> me : addM.entrySet()) { String k = me.getKey(); Set<String> addList = me.getValue(); Set<String> or...
java
public int addMap(Map<String, Set<String>> addM) { int newTrans = 0; for (Map.Entry<String,Set<String>> me : addM.entrySet()) { String k = me.getKey(); Set<String> addList = me.getValue(); Set<String> origList = map.get(k); if (origList == null) { map.put(k, new LinkedHa...
[ "public", "int", "addMap", "(", "Map", "<", "String", ",", "Set", "<", "String", ">", ">", "addM", ")", "{", "int", "newTrans", "=", "0", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Set", "<", "String", ">", ">", "me", ":", "addM...
Add all of the mappings from the specified map to the current map.
[ "Add", "all", "of", "the", "mappings", "from", "the", "specified", "map", "to", "the", "current", "map", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/international/pennchinese/ChineseEnglishWordMap.java#L300-L323
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/live/internal/ManagerCommunicationExceptionMapper.java
ManagerCommunicationExceptionMapper.mapSendActionException
static ManagerCommunicationException mapSendActionException(String actionName, Exception exception) { """ Maps exceptions received from {@link org.asteriskjava.manager.ManagerConnection} when sending a {@link org.asteriskjava.manager.action.ManagerAction} to the corresponding {@link org.asteriskjava.live.Manage...
java
static ManagerCommunicationException mapSendActionException(String actionName, Exception exception) { if (exception instanceof IllegalStateException) { return new ManagerCommunicationException("Not connected to Asterisk Server", exception); } else if (exception instanceof...
[ "static", "ManagerCommunicationException", "mapSendActionException", "(", "String", "actionName", ",", "Exception", "exception", ")", "{", "if", "(", "exception", "instanceof", "IllegalStateException", ")", "{", "return", "new", "ManagerCommunicationException", "(", "\"No...
Maps exceptions received from {@link org.asteriskjava.manager.ManagerConnection} when sending a {@link org.asteriskjava.manager.action.ManagerAction} to the corresponding {@link org.asteriskjava.live.ManagerCommunicationException}. @param actionName name of the action that has been tried to send @param exception excep...
[ "Maps", "exceptions", "received", "from", "{", "@link", "org", ".", "asteriskjava", ".", "manager", ".", "ManagerConnection", "}", "when", "sending", "a", "{", "@link", "org", ".", "asteriskjava", ".", "manager", ".", "action", ".", "ManagerAction", "}", "to...
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/live/internal/ManagerCommunicationExceptionMapper.java#L48-L62
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.isSafeClass
public static boolean isSafeClass(String className, List<String> whitelist) { """ Checks whether class name is matched by the class name white list regular expressions provided. @param className class to verify @param whitelist list of regular expressions to match class name against @return true if the class ...
java
public static boolean isSafeClass(String className, List<String> whitelist) { for (String whiteRegExp : whitelist) { Pattern whitePattern = Pattern.compile(whiteRegExp); Matcher whiteMatcher = whitePattern.matcher(className); if (whiteMatcher.find()) { if (log.isTraceEnabled...
[ "public", "static", "boolean", "isSafeClass", "(", "String", "className", ",", "List", "<", "String", ">", "whitelist", ")", "{", "for", "(", "String", "whiteRegExp", ":", "whitelist", ")", "{", "Pattern", "whitePattern", "=", "Pattern", ".", "compile", "(",...
Checks whether class name is matched by the class name white list regular expressions provided. @param className class to verify @param whitelist list of regular expressions to match class name against @return true if the class matched at least one of the regular expressions, false otherwise
[ "Checks", "whether", "class", "name", "is", "matched", "by", "the", "class", "name", "white", "list", "regular", "expressions", "provided", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L509-L522
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java
ProxyTask.setReturnObject
public void setReturnObject(PrintWriter out, Object objReturn) { """ Sent/send this return string. @param out The return output stream. @param strReturn The string to return. """ String strReturn = org.jbundle.thin.base.remote.proxy.transport.BaseTransport.convertObjectToString(objReturn); st...
java
public void setReturnObject(PrintWriter out, Object objReturn) { String strReturn = org.jbundle.thin.base.remote.proxy.transport.BaseTransport.convertObjectToString(objReturn); strReturn = Base64.encode(strReturn); this.setReturnString(out, strReturn); }
[ "public", "void", "setReturnObject", "(", "PrintWriter", "out", ",", "Object", "objReturn", ")", "{", "String", "strReturn", "=", "org", ".", "jbundle", ".", "thin", ".", "base", ".", "remote", ".", "proxy", ".", "transport", ".", "BaseTransport", ".", "co...
Sent/send this return string. @param out The return output stream. @param strReturn The string to return.
[ "Sent", "/", "send", "this", "return", "string", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/ProxyTask.java#L205-L210
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.reimageComputeNode
public void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption) throws BatchErrorException, IOException { """ Reinstalls the operating system on the specified compute node. <p>You can reimage a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.m...
java
public void reimageComputeNode(String poolId, String nodeId, ComputeNodeReimageOption nodeReimageOption) throws BatchErrorException, IOException { reimageComputeNode(poolId, nodeId, nodeReimageOption, null); }
[ "public", "void", "reimageComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ",", "ComputeNodeReimageOption", "nodeReimageOption", ")", "throws", "BatchErrorException", ",", "IOException", "{", "reimageComputeNode", "(", "poolId", ",", "nodeId", ",", "nod...
Reinstalls the operating system on the specified compute node. <p>You can reimage a compute node only when it is in the {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#IDLE Idle} or {@link com.microsoft.azure.batch.protocol.models.ComputeNodeState#RUNNING Running} state.</p> @param poolId The ID of t...
[ "Reinstalls", "the", "operating", "system", "on", "the", "specified", "compute", "node", ".", "<p", ">", "You", "can", "reimage", "a", "compute", "node", "only", "when", "it", "is", "in", "the", "{", "@link", "com", ".", "microsoft", ".", "azure", ".", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L337-L339
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/RuntimeUtil.java
RuntimeUtil.redirectStreams
public static void redirectStreams(Process process, OutputStream output, OutputStream error) { """ Redirects given process's input and error streams to the specified streams. the streams specified are not closed automatically. The streams passed can be null, if you don't want to redirect them. @param process ...
java
public static void redirectStreams(Process process, OutputStream output, OutputStream error){ if(output!=null) new Thread(new IOPump(process.getInputStream(), output, false, false).asRunnable()).start(); if(error!=null) new Thread(new IOPump(process.getErrorStream(), error, false...
[ "public", "static", "void", "redirectStreams", "(", "Process", "process", ",", "OutputStream", "output", ",", "OutputStream", "error", ")", "{", "if", "(", "output", "!=", "null", ")", "new", "Thread", "(", "new", "IOPump", "(", "process", ".", "getInputStre...
Redirects given process's input and error streams to the specified streams. the streams specified are not closed automatically. The streams passed can be null, if you don't want to redirect them. @param process process whose streams to be redirected @param output outputStream to which process's inputStream is red...
[ "Redirects", "given", "process", "s", "input", "and", "error", "streams", "to", "the", "specified", "streams", ".", "the", "streams", "specified", "are", "not", "closed", "automatically", ".", "The", "streams", "passed", "can", "be", "null", "if", "you", "do...
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/RuntimeUtil.java#L43-L48
js-lib-com/template.xhtml
src/main/java/js/template/xhtml/ListOperator.java
ListOperator.doExec
@Override protected Object doExec(Element element, Object scope, String propertyPath, Object... arguments) throws IOException, TemplateException { """ Execute LIST operator. Extract content list then repeat context element first child for every list item. @param element context element, @param scope scope ob...
java
@Override protected Object doExec(Element element, Object scope, String propertyPath, Object... arguments) throws IOException, TemplateException { if (!propertyPath.equals(".") && ConverterRegistry.hasType(scope.getClass())) { throw new TemplateException("Operand is property path but scope is not an object.");...
[ "@", "Override", "protected", "Object", "doExec", "(", "Element", "element", ",", "Object", "scope", ",", "String", "propertyPath", ",", "Object", "...", "arguments", ")", "throws", "IOException", ",", "TemplateException", "{", "if", "(", "!", "propertyPath", ...
Execute LIST operator. Extract content list then repeat context element first child for every list item. @param element context element, @param scope scope object, @param propertyPath property path, @param arguments optional arguments, not used. @return always returns null to signal full processing. @throws IOExceptio...
[ "Execute", "LIST", "operator", ".", "Extract", "content", "list", "then", "repeat", "context", "element", "first", "child", "for", "every", "list", "item", "." ]
train
https://github.com/js-lib-com/template.xhtml/blob/d50cec08aca9ab9680baebe2a26a341c096564fb/src/main/java/js/template/xhtml/ListOperator.java#L74-L87
LevelFourAB/commons
commons-serialization/src/main/java/se/l4/commons/serialization/internal/reflection/FactoryDefinition.java
FactoryDefinition.getScore
public int getScore(Map<String, Object> data) { """ Get a score for this factory based on the given data. The higher the score the more arguments were found. @param data @return """ if(! hasSerializedFields) { return 0; } int score = 0; for(Argument arg : arguments) { if(arg instanceof...
java
public int getScore(Map<String, Object> data) { if(! hasSerializedFields) { return 0; } int score = 0; for(Argument arg : arguments) { if(arg instanceof FactoryDefinition.SerializedArgument) { if(data.containsKey(((SerializedArgument) arg).name)) { score++; } } } return ...
[ "public", "int", "getScore", "(", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "if", "(", "!", "hasSerializedFields", ")", "{", "return", "0", ";", "}", "int", "score", "=", "0", ";", "for", "(", "Argument", "arg", ":", "arguments", ...
Get a score for this factory based on the given data. The higher the score the more arguments were found. @param data @return
[ "Get", "a", "score", "for", "this", "factory", "based", "on", "the", "given", "data", ".", "The", "higher", "the", "score", "the", "more", "arguments", "were", "found", "." ]
train
https://github.com/LevelFourAB/commons/blob/aa121b3a5504b43d0c10450a1b984694fcd2b8ee/commons-serialization/src/main/java/se/l4/commons/serialization/internal/reflection/FactoryDefinition.java#L287-L308
ops4j/org.ops4j.base
ops4j-base-net/src/main/java/org/ops4j/net/URLUtils.java
URLUtils.prepareForSSL
public static URLConnection prepareForSSL( final URLConnection connection ) { """ Prepares an url connection for authentication if necessary. @param connection the connection to be prepared @return the prepared conection """ NullArgumentException.validateNotNull( connection, "url connection canno...
java
public static URLConnection prepareForSSL( final URLConnection connection ) { NullArgumentException.validateNotNull( connection, "url connection cannot be null" ); URLConnection conn = connection; if( conn instanceof JarURLConnection ) { try { ...
[ "public", "static", "URLConnection", "prepareForSSL", "(", "final", "URLConnection", "connection", ")", "{", "NullArgumentException", ".", "validateNotNull", "(", "connection", ",", "\"url connection cannot be null\"", ")", ";", "URLConnection", "conn", "=", "connection",...
Prepares an url connection for authentication if necessary. @param connection the connection to be prepared @return the prepared conection
[ "Prepares", "an", "url", "connection", "for", "authentication", "if", "necessary", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-net/src/main/java/org/ops4j/net/URLUtils.java#L123-L158
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.isAssignableFrom
public static boolean isAssignableFrom(ClassNode superClass, ClassNode childClass) { """ Determines if the class or interface represented by the superClass argument is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified subClass parameter. @param su...
java
public static boolean isAssignableFrom(ClassNode superClass, ClassNode childClass) { ClassNode currentSuper = childClass; while (currentSuper != null) { if (currentSuper.equals(superClass)) { return true; } currentSuper = currentSuper.getSuperClass()...
[ "public", "static", "boolean", "isAssignableFrom", "(", "ClassNode", "superClass", ",", "ClassNode", "childClass", ")", "{", "ClassNode", "currentSuper", "=", "childClass", ";", "while", "(", "currentSuper", "!=", "null", ")", "{", "if", "(", "currentSuper", "."...
Determines if the class or interface represented by the superClass argument is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified subClass parameter. @param superClass The super class to check @param childClass The sub class the check @return true if the ch...
[ "Determines", "if", "the", "class", "or", "interface", "represented", "by", "the", "superClass", "argument", "is", "either", "the", "same", "as", "or", "is", "a", "superclass", "or", "superinterface", "of", "the", "class", "or", "interface", "represented", "by...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L655-L665
netceteragroup/valdr-bean-validation
valdr-bean-validation/src/main/java/com/github/valdr/thirdparty/spring/AnnotationUtils.java
AnnotationUtils.isAnnotationDeclaredLocally
public static boolean isAnnotationDeclaredLocally(Class<? extends Annotation> annotationType, Class<?> clazz) { """ Determine whether an annotation for the specified {@code annotationType} is declared locally on the supplied {@code clazz}. The supplied {@link Class} may represent any type. <p>Note: This method ...
java
public static boolean isAnnotationDeclaredLocally(Class<? extends Annotation> annotationType, Class<?> clazz) { boolean declaredLocally = false; for (Annotation annotation : clazz.getDeclaredAnnotations()) { if (annotation.annotationType().equals(annotationType)) { declaredLocally = true; ...
[ "public", "static", "boolean", "isAnnotationDeclaredLocally", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotationType", ",", "Class", "<", "?", ">", "clazz", ")", "{", "boolean", "declaredLocally", "=", "false", ";", "for", "(", "Annotation", "an...
Determine whether an annotation for the specified {@code annotationType} is declared locally on the supplied {@code clazz}. The supplied {@link Class} may represent any type. <p>Note: This method does <strong>not</strong> determine if the annotation is {@linkplain java.lang.annotation.Inherited inherited}. For greater ...
[ "Determine", "whether", "an", "annotation", "for", "the", "specified", "{" ]
train
https://github.com/netceteragroup/valdr-bean-validation/blob/3f49f1357c575a11331be2de867cf47809a83823/valdr-bean-validation/src/main/java/com/github/valdr/thirdparty/spring/AnnotationUtils.java#L277-L286
eBay/parallec
src/main/java/io/parallec/core/ParallelTaskBuilder.java
ParallelTaskBuilder.setTargetHostsFromCmsQueryUrl
public ParallelTaskBuilder setTargetHostsFromCmsQueryUrl( String cmsQueryUrl, String projection) throws TargetHostsLoadException { """ Sets the target hosts from CMS query url. Will not use authorization token. CMS: configuration-management-service. A.k.a. YiDB: http://www.yidb.org/ Pa...
java
public ParallelTaskBuilder setTargetHostsFromCmsQueryUrl( String cmsQueryUrl, String projection) throws TargetHostsLoadException { this.targetHosts = targetHostBuilder.setTargetHostsFromCmsQueryUrl(cmsQueryUrl, projection); return this; }
[ "public", "ParallelTaskBuilder", "setTargetHostsFromCmsQueryUrl", "(", "String", "cmsQueryUrl", ",", "String", "projection", ")", "throws", "TargetHostsLoadException", "{", "this", ".", "targetHosts", "=", "targetHostBuilder", ".", "setTargetHostsFromCmsQueryUrl", "(", "cms...
Sets the target hosts from CMS query url. Will not use authorization token. CMS: configuration-management-service. A.k.a. YiDB: http://www.yidb.org/ Parallec supports CMS query http://ccoetech.ebay.com/cms-configuration-management-service-based- mongodb @param cmsQueryUrl the cms query url @param projection the proj...
[ "Sets", "the", "target", "hosts", "from", "CMS", "query", "url", ".", "Will", "not", "use", "authorization", "token", ".", "CMS", ":", "configuration", "-", "management", "-", "service", ".", "A", ".", "k", ".", "a", ".", "YiDB", ":", "http", ":", "/...
train
https://github.com/eBay/parallec/blob/1b4f1628f34fedfb06b24c33a5372d64d3df0952/src/main/java/io/parallec/core/ParallelTaskBuilder.java#L585-L591
Stratio/bdt
src/main/java/com/stratio/qa/specs/DatabaseSpec.java
DatabaseSpec.assertRowNumberOfTableOnCassandraKeyspace
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$") public void assertRowNumberOfTableOnCassandraKeyspace(String keyspace, String tableName, String numberRows) { """ Checks the number of rows in a cassandra table. @param keyspace @param tableName @param numberRows """ ...
java
@Then("^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$") public void assertRowNumberOfTableOnCassandraKeyspace(String keyspace, String tableName, String numberRows) { Long numberRowsLong = Long.parseLong(numberRows); commonspec.getCassandraClient().useKeyspace(keyspace); ...
[ "@", "Then", "(", "\"^a Cassandra keyspace '(.+?)' contains a table '(.+?)' with '(.+?)' rows$\"", ")", "public", "void", "assertRowNumberOfTableOnCassandraKeyspace", "(", "String", "keyspace", ",", "String", "tableName", ",", "String", "numberRows", ")", "{", "Long", "number...
Checks the number of rows in a cassandra table. @param keyspace @param tableName @param numberRows
[ "Checks", "the", "number", "of", "rows", "in", "a", "cassandra", "table", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/DatabaseSpec.java#L680-L686
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.createPool
public void createPool(PoolAddParameter pool, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Adds a pool to the Batch account. @param pool The pool to be added. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that ...
java
public void createPool(PoolAddParameter pool, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { PoolAddOptions options = new PoolAddOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.ap...
[ "public", "void", "createPool", "(", "PoolAddParameter", "pool", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "PoolAddOptions", "options", "=", "new", "PoolAddOptions", "(", ")"...
Adds a pool to the Batch account. @param pool The pool to be added. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException...
[ "Adds", "a", "pool", "to", "the", "Batch", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L488-L495
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java
ExpressionToken.mapUpdate
protected final void mapUpdate(Map map, Object key, Object value) { """ Update the value of <code>key</code> in <code>map</code> @param map the map @param key the key @param value the value """ Object o = map.get(key); /* If a value exists in map.get(key), convert the "value" param...
java
protected final void mapUpdate(Map map, Object key, Object value) { Object o = map.get(key); /* If a value exists in map.get(key), convert the "value" parameter into the type of map.get(key). It's a best guess as to what the type of the Map _should_ be without any further ...
[ "protected", "final", "void", "mapUpdate", "(", "Map", "map", ",", "Object", "key", ",", "Object", "value", ")", "{", "Object", "o", "=", "map", ".", "get", "(", "key", ")", ";", "/*\n If a value exists in map.get(key), convert the \"value\" parameter into\...
Update the value of <code>key</code> in <code>map</code> @param map the map @param key the key @param value the value
[ "Update", "the", "value", "of", "<code", ">", "key<", "/", "code", ">", "in", "<code", ">", "map<", "/", "code", ">" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java#L94-L108
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/StackedBarChart.java
StackedBarChart.calculateBounds
protected void calculateBounds(float _Width, float _Margin) { """ Calculates the bar boundaries based on the bar width and bar margin. @param _Width Calculated bar width @param _Margin Calculated bar margin """ int last = 0; for (StackedBarModel model : mData) { float lastY...
java
protected void calculateBounds(float _Width, float _Margin) { int last = 0; for (StackedBarModel model : mData) { float lastY = 0; float cumulatedValues = 0; // used if seperators are enabled, to prevent information loss int usableGraphHeight = mGraphHei...
[ "protected", "void", "calculateBounds", "(", "float", "_Width", ",", "float", "_Margin", ")", "{", "int", "last", "=", "0", ";", "for", "(", "StackedBarModel", "model", ":", "mData", ")", "{", "float", "lastY", "=", "0", ";", "float", "cumulatedValues", ...
Calculates the bar boundaries based on the bar width and bar margin. @param _Width Calculated bar width @param _Margin Calculated bar margin
[ "Calculates", "the", "bar", "boundaries", "based", "on", "the", "bar", "width", "and", "bar", "margin", "." ]
train
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/StackedBarChart.java#L230-L269
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
AWSUtil.createKinesisClient
public static AmazonKinesis createKinesisClient(Properties configProps, ClientConfiguration awsClientConfig) { """ Creates an Amazon Kinesis Client. @param configProps configuration properties containing the access key, secret key, and region @param awsClientConfig preconfigured AWS SDK client configuration @re...
java
public static AmazonKinesis createKinesisClient(Properties configProps, ClientConfiguration awsClientConfig) { // set a Flink-specific user agent awsClientConfig.setUserAgentPrefix(String.format(USER_AGENT_FORMAT, EnvironmentInformation.getVersion(), EnvironmentInformation.getRevisionInformation().commitId)...
[ "public", "static", "AmazonKinesis", "createKinesisClient", "(", "Properties", "configProps", ",", "ClientConfiguration", "awsClientConfig", ")", "{", "// set a Flink-specific user agent", "awsClientConfig", ".", "setUserAgentPrefix", "(", "String", ".", "format", "(", "USE...
Creates an Amazon Kinesis Client. @param configProps configuration properties containing the access key, secret key, and region @param awsClientConfig preconfigured AWS SDK client configuration @return a new Amazon Kinesis Client
[ "Creates", "an", "Amazon", "Kinesis", "Client", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java#L76-L96
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/PropertyValueNavigator.java
PropertyValueNavigator.get
public static Object get(final Object obj, final String property) { """ プロパティの値を取得する。 <p>オプションはデフォルト値で処理する。</p> @param obj 取得元となるオブジェクト。 @param property プロパティ名。 @return @throws IllegalArgumentException peropety is null or empty. @throws PropertyAccessException 存在しないプロパティを指定した場合など。 @throws NullPointerExcepti...
java
public static Object get(final Object obj, final String property) { return new PropertyValueNavigator().getProperty(obj, property); }
[ "public", "static", "Object", "get", "(", "final", "Object", "obj", ",", "final", "String", "property", ")", "{", "return", "new", "PropertyValueNavigator", "(", ")", ".", "getProperty", "(", "obj", ",", "property", ")", ";", "}" ]
プロパティの値を取得する。 <p>オプションはデフォルト値で処理する。</p> @param obj 取得元となるオブジェクト。 @param property プロパティ名。 @return @throws IllegalArgumentException peropety is null or empty. @throws PropertyAccessException 存在しないプロパティを指定した場合など。 @throws NullPointerException アクセスしようとしたプロパティがnullの場合。 @throws IndexOutOfBoundsException リスト、配列にアクセスする際に存在しないイン...
[ "プロパティの値を取得する。", "<p", ">", "オプションはデフォルト値で処理する。<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/PropertyValueNavigator.java#L104-L106
rhuss/jolokia
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
HttpRequestHandler.handleThrowable
public JSONObject handleThrowable(Throwable pThrowable) { """ Utility method for handling single runtime exceptions and errors. This method is called in addition to and after {@link #executeRequest(JmxRequest)} to catch additional errors. They are two different methods because of bulk requests, where each indivi...
java
public JSONObject handleThrowable(Throwable pThrowable) { if (pThrowable instanceof IllegalArgumentException) { return getErrorJSON(400,pThrowable, null); } else if (pThrowable instanceof SecurityException) { // Wipe out stacktrace return getErrorJSON(403,new Exceptio...
[ "public", "JSONObject", "handleThrowable", "(", "Throwable", "pThrowable", ")", "{", "if", "(", "pThrowable", "instanceof", "IllegalArgumentException", ")", "{", "return", "getErrorJSON", "(", "400", ",", "pThrowable", ",", "null", ")", ";", "}", "else", "if", ...
Utility method for handling single runtime exceptions and errors. This method is called in addition to and after {@link #executeRequest(JmxRequest)} to catch additional errors. They are two different methods because of bulk requests, where each individual request can lead to an error. So, each individual request is wra...
[ "Utility", "method", "for", "handling", "single", "runtime", "exceptions", "and", "errors", ".", "This", "method", "is", "called", "in", "addition", "to", "and", "after", "{", "@link", "#executeRequest", "(", "JmxRequest", ")", "}", "to", "catch", "additional"...
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java#L237-L246
saxsys/SynchronizeFX
transmitter/tomcat-transmitter/src/main/java/de/saxsys/synchronizefx/tomcat/SynchronizeFXTomcatServlet.java
SynchronizeFXTomcatServlet.newChannel
public SynchronizeFxServer newChannel(final Object root, final String channelName, final ServerCallback callback) { """ Creates a new {@link SynchronizeFxServer} that synchronizes it's own model. <p> Each {@link SynchronizeFxServer} managed by this servlet must have its own channel name. </p> @param root T...
java
public SynchronizeFxServer newChannel(final Object root, final String channelName, final ServerCallback callback) { synchronized (channels) { if (channels.containsKey(channelName)) { throw new IllegalArgumentException("A new SynchronizeFX channel with the name \"" + channelName ...
[ "public", "SynchronizeFxServer", "newChannel", "(", "final", "Object", "root", ",", "final", "String", "channelName", ",", "final", "ServerCallback", "callback", ")", "{", "synchronized", "(", "channels", ")", "{", "if", "(", "channels", ".", "containsKey", "(",...
Creates a new {@link SynchronizeFxServer} that synchronizes it's own model. <p> Each {@link SynchronizeFxServer} managed by this servlet must have its own channel name. </p> @param root The root object of the model that should be synchronized. @param channelName The name of the channel at which clients can connect to...
[ "Creates", "a", "new", "{", "@link", "SynchronizeFxServer", "}", "that", "synchronizes", "it", "s", "own", "model", "." ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/transmitter/tomcat-transmitter/src/main/java/de/saxsys/synchronizefx/tomcat/SynchronizeFXTomcatServlet.java#L96-L109
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.upperCase
public static String upperCase(final String str, final Locale locale) { """ <p>Converts a String to upper case as per {@link String#toUpperCase(Locale)}.</p> <p>A {@code null} input String returns {@code null}.</p> <pre> StringUtils.upperCase(null, Locale.ENGLISH) = null StringUtils.upperCase("", Locale.E...
java
public static String upperCase(final String str, final Locale locale) { if (str == null) { return null; } return str.toUpperCase(locale); }
[ "public", "static", "String", "upperCase", "(", "final", "String", "str", ",", "final", "Locale", "locale", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "null", ";", "}", "return", "str", ".", "toUpperCase", "(", "locale", ")", ";", ...
<p>Converts a String to upper case as per {@link String#toUpperCase(Locale)}.</p> <p>A {@code null} input String returns {@code null}.</p> <pre> StringUtils.upperCase(null, Locale.ENGLISH) = null StringUtils.upperCase("", Locale.ENGLISH) = "" StringUtils.upperCase("aBc", Locale.ENGLISH) = "ABC" </pre> @param str...
[ "<p", ">", "Converts", "a", "String", "to", "upper", "case", "as", "per", "{", "@link", "String#toUpperCase", "(", "Locale", ")", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L6641-L6646
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.listWebAppsByHybridConnectionWithServiceResponseAsync
public Observable<ServiceResponse<Page<String>>> listWebAppsByHybridConnectionWithServiceResponseAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName) { """ Get all apps that use a Hybrid Connection in an App Service Plan. Get all apps that use a Hybrid Conne...
java
public Observable<ServiceResponse<Page<String>>> listWebAppsByHybridConnectionWithServiceResponseAsync(final String resourceGroupName, final String name, final String namespaceName, final String relayName) { return listWebAppsByHybridConnectionSinglePageAsync(resourceGroupName, name, namespaceName, relayName) ...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "String", ">", ">", ">", "listWebAppsByHybridConnectionWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "namespaceName", ",...
Get all apps that use a Hybrid Connection in an App Service Plan. Get all apps that use a Hybrid Connection in an App Service Plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param namespaceName Name of the Hybrid Connection namespace. ...
[ "Get", "all", "apps", "that", "use", "a", "Hybrid", "Connection", "in", "an", "App", "Service", "Plan", ".", "Get", "all", "apps", "that", "use", "a", "Hybrid", "Connection", "in", "an", "App", "Service", "Plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L1513-L1525