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
deephacks/confit
provider-hbase/src/main/java/org/deephacks/confit/internal/hbase/HBeanTable.java
HBeanTable.getEager
public HBeanRowCollector getEager(Set<HBeanRow> rows, FetchType... fetchType) throws HBeanNotFoundException { """ Fetch a set of rows and traverse and fetch references eagerly. @param rows to fetch @param fetchType data to fetch @return collector carring the result from the query """ S...
java
public HBeanRowCollector getEager(Set<HBeanRow> rows, FetchType... fetchType) throws HBeanNotFoundException { Set<HBeanRow> result; result = getLazy(rows, fetchType); HBeanRowCollector collector = new HBeanRowCollector(result); getEager(result, collector, FETCH_DEPTH_MAX, fet...
[ "public", "HBeanRowCollector", "getEager", "(", "Set", "<", "HBeanRow", ">", "rows", ",", "FetchType", "...", "fetchType", ")", "throws", "HBeanNotFoundException", "{", "Set", "<", "HBeanRow", ">", "result", ";", "result", "=", "getLazy", "(", "rows", ",", "...
Fetch a set of rows and traverse and fetch references eagerly. @param rows to fetch @param fetchType data to fetch @return collector carring the result from the query
[ "Fetch", "a", "set", "of", "rows", "and", "traverse", "and", "fetch", "references", "eagerly", "." ]
train
https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/provider-hbase/src/main/java/org/deephacks/confit/internal/hbase/HBeanTable.java#L94-L101
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/caching/CacheHeader.java
CacheHeader.isNotModified
public static boolean isNotModified(@NotNull Resource resource, @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws IOException { """ Compares the "If-Modified-Since header" of the incoming request with the last modification date of a resource. If the resource was no...
java
public static boolean isNotModified(@NotNull Resource resource, @NotNull SlingHttpServletRequest request, @NotNull SlingHttpServletResponse response) throws IOException { ResourceModificationDateProvider dateProvider = new ResourceModificationDateProvider(resource); return isNotModified(dateProvider, requ...
[ "public", "static", "boolean", "isNotModified", "(", "@", "NotNull", "Resource", "resource", ",", "@", "NotNull", "SlingHttpServletRequest", "request", ",", "@", "NotNull", "SlingHttpServletResponse", "response", ")", "throws", "IOException", "{", "ResourceModificationD...
Compares the "If-Modified-Since header" of the incoming request with the last modification date of a resource. If the resource was not modified since the client retrieved the resource, a 304-redirect is send to the response (and the method returns true). If the resource has changed (or the client didn't) supply the "If...
[ "Compares", "the", "If", "-", "Modified", "-", "Since", "header", "of", "the", "incoming", "request", "with", "the", "last", "modification", "date", "of", "a", "resource", ".", "If", "the", "resource", "was", "not", "modified", "since", "the", "client", "r...
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/caching/CacheHeader.java#L99-L103
elki-project/elki
elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java
Logging.debugFinest
public void debugFinest(CharSequence message, Throwable e) { """ Log a message at the 'finest' debugging level. You should check isDebugging() before building the message. @param message Informational log message. @param e Exception """ log(Level.FINEST, message, e); }
java
public void debugFinest(CharSequence message, Throwable e) { log(Level.FINEST, message, e); }
[ "public", "void", "debugFinest", "(", "CharSequence", "message", ",", "Throwable", "e", ")", "{", "log", "(", "Level", ".", "FINEST", ",", "message", ",", "e", ")", ";", "}" ]
Log a message at the 'finest' debugging level. You should check isDebugging() before building the message. @param message Informational log message. @param e Exception
[ "Log", "a", "message", "at", "the", "finest", "debugging", "level", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-logging/src/main/java/de/lmu/ifi/dbs/elki/logging/Logging.java#L537-L539
xbib/marc
src/main/java/org/xbib/marc/transformer/value/MarcValueTransformers.java
MarcValueTransformers.setMarcValueTransformer
public MarcValueTransformers setMarcValueTransformer(String fieldKey, MarcValueTransformer transformer) { """ Set MARC value transformer for transforming field values. @param fieldKey the MARC field key for the field to be transformed @param transformer the string transformer @return this handler """ ...
java
public MarcValueTransformers setMarcValueTransformer(String fieldKey, MarcValueTransformer transformer) { // split into tag + indicator and subfield IDs int pos = fieldKey.lastIndexOf('$'); String tagind = pos > 0 ? fieldKey.substring(0, pos) : fieldKey; String subs = pos > 0 ? fieldKey...
[ "public", "MarcValueTransformers", "setMarcValueTransformer", "(", "String", "fieldKey", ",", "MarcValueTransformer", "transformer", ")", "{", "// split into tag + indicator and subfield IDs", "int", "pos", "=", "fieldKey", ".", "lastIndexOf", "(", "'", "'", ")", ";", ...
Set MARC value transformer for transforming field values. @param fieldKey the MARC field key for the field to be transformed @param transformer the string transformer @return this handler
[ "Set", "MARC", "value", "transformer", "for", "transforming", "field", "values", "." ]
train
https://github.com/xbib/marc/blob/d8426fcfc686507cab59b3d8181b08f83718418c/src/main/java/org/xbib/marc/transformer/value/MarcValueTransformers.java#L45-L54
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java
UserProfileHandlerImpl.postSave
private void postSave(UserProfile userProfile, boolean isNew) throws Exception { """ Notifying listeners after profile creation. @param userProfile the user profile which is used in save operation @param isNew true if we have deal with new profile, otherwise it is false which mean update operation is in pro...
java
private void postSave(UserProfile userProfile, boolean isNew) throws Exception { for (UserProfileEventListener listener : listeners) { listener.postSave(userProfile, isNew); } }
[ "private", "void", "postSave", "(", "UserProfile", "userProfile", ",", "boolean", "isNew", ")", "throws", "Exception", "{", "for", "(", "UserProfileEventListener", "listener", ":", "listeners", ")", "{", "listener", ".", "postSave", "(", "userProfile", ",", "isN...
Notifying listeners after profile creation. @param userProfile the user profile which is used in save operation @param isNew true if we have deal with new profile, otherwise it is false which mean update operation is in progress @throws Exception if any listener failed to handle the event
[ "Notifying", "listeners", "after", "profile", "creation", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java#L427-L433
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/runtime/PojoTask.java
PojoTask.afterPropertiesSet
public synchronized void afterPropertiesSet() { """ This method <em>must</em> be invoked after all POJO properties have been supplied. If this <code>Task</code> has been defined using Spring Dependency Injection, this method will be called for you by the Spring context. Additional calls to this method are no-...
java
public synchronized void afterPropertiesSet() { // Subsequent calls are no-ops... if (task == null) { // Be sure we have what we need... if (location == null) { String msg = "Property 'location' not set. You must specify " + ...
[ "public", "synchronized", "void", "afterPropertiesSet", "(", ")", "{", "// Subsequent calls are no-ops...", "if", "(", "task", "==", "null", ")", "{", "// Be sure we have what we need...", "if", "(", "location", "==", "null", ")", "{", "String", "msg", "=", "\"Pro...
This method <em>must</em> be invoked after all POJO properties have been supplied. If this <code>Task</code> has been defined using Spring Dependency Injection, this method will be called for you by the Spring context. Additional calls to this method are no-ops.
[ "This", "method", "<em", ">", "must<", "/", "em", ">", "be", "invoked", "after", "all", "POJO", "properties", "have", "been", "supplied", ".", "If", "this", "<code", ">", "Task<", "/", "code", ">", "has", "been", "defined", "using", "Spring", "Dependency...
train
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/runtime/PojoTask.java#L121-L151
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.getFieldName
public String getFieldName(boolean bAddQuotes, boolean bIncludeFileName) { """ Get this field's name. @param bAddQuotes Add quotes if this field contains a space. @param bIncludeFileName include the file name as file.field. @return The field name. """ if (!bAddQuotes) if (!bIncludeFileName) ...
java
public String getFieldName(boolean bAddQuotes, boolean bIncludeFileName) { if (!bAddQuotes) if (!bIncludeFileName) return super.getFieldName(bAddQuotes, bIncludeFileName); // Return m_sFieldName String strFieldName = Constants.BLANK; if (bIncludeFileName) if (this....
[ "public", "String", "getFieldName", "(", "boolean", "bAddQuotes", ",", "boolean", "bIncludeFileName", ")", "{", "if", "(", "!", "bAddQuotes", ")", "if", "(", "!", "bIncludeFileName", ")", "return", "super", ".", "getFieldName", "(", "bAddQuotes", ",", "bInclud...
Get this field's name. @param bAddQuotes Add quotes if this field contains a space. @param bIncludeFileName include the file name as file.field. @return The field name.
[ "Get", "this", "field", "s", "name", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L658-L672
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java
PageParametersExtensions.toPageParameters
public static PageParameters toPageParameters(final Map<String, String> parameters) { """ Converts the given Map to a {@link PageParameters} object. @param parameters the {@link Map} with the parameters to set. @return the {@link PageParameters} """ final PageParameters param = new PageParameters(); f...
java
public static PageParameters toPageParameters(final Map<String, String> parameters) { final PageParameters param = new PageParameters(); for (final Entry<String, String> parameter : parameters.entrySet()) { param.add(parameter.getKey(), parameter.getValue()); } return param; }
[ "public", "static", "PageParameters", "toPageParameters", "(", "final", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "final", "PageParameters", "param", "=", "new", "PageParameters", "(", ")", ";", "for", "(", "final", "Entry", "<", "Str...
Converts the given Map to a {@link PageParameters} object. @param parameters the {@link Map} with the parameters to set. @return the {@link PageParameters}
[ "Converts", "the", "given", "Map", "to", "a", "{", "@link", "PageParameters", "}", "object", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java#L335-L343
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java
ExceptionUtils.indexOfThrowable
@GwtIncompatible("incompatible method") public static int indexOfThrowable(final Throwable throwable, final Class<?> clazz) { """ <p>Returns the (zero based) index of the first <code>Throwable</code> that matches the specified class (exactly) in the exception chain. Subclasses of the specified class do not m...
java
@GwtIncompatible("incompatible method") public static int indexOfThrowable(final Throwable throwable, final Class<?> clazz) { return indexOf(throwable, clazz, 0, false); }
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "int", "indexOfThrowable", "(", "final", "Throwable", "throwable", ",", "final", "Class", "<", "?", ">", "clazz", ")", "{", "return", "indexOf", "(", "throwable", ",", "clazz", ",...
<p>Returns the (zero based) index of the first <code>Throwable</code> that matches the specified class (exactly) in the exception chain. Subclasses of the specified class do not match - see {@link #indexOfType(Throwable, Class)} for the opposite.</p> <p>A <code>null</code> throwable returns <code>-1</code>. A <code>nu...
[ "<p", ">", "Returns", "the", "(", "zero", "based", ")", "index", "of", "the", "first", "<code", ">", "Throwable<", "/", "code", ">", "that", "matches", "the", "specified", "class", "(", "exactly", ")", "in", "the", "exception", "chain", ".", "Subclasses"...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java#L314-L317
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/AbstractSEPAGV.java
AbstractSEPAGV.createPainXml
protected void createPainXml() { """ Erstellt die XML für diesen Job und schreibt diese in den _sepapain Parameter des Jobs """ // Hier wird die XML rein geschrieben ByteArrayOutputStream o = new ByteArrayOutputStream(); // Passenden SEPA Generator zur verwendeten pain Version laden ...
java
protected void createPainXml() { // Hier wird die XML rein geschrieben ByteArrayOutputStream o = new ByteArrayOutputStream(); // Passenden SEPA Generator zur verwendeten pain Version laden PainGeneratorIf gen = this.getPainGenerator(); // Die XML in den baos schreiben, ggf fehl...
[ "protected", "void", "createPainXml", "(", ")", "{", "// Hier wird die XML rein geschrieben", "ByteArrayOutputStream", "o", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "// Passenden SEPA Generator zur verwendeten pain Version laden", "PainGeneratorIf", "gen", "=", "this...
Erstellt die XML für diesen Job und schreibt diese in den _sepapain Parameter des Jobs
[ "Erstellt", "die", "XML", "für", "diesen", "Job", "und", "schreibt", "diese", "in", "den", "_sepapain", "Parameter", "des", "Jobs" ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/AbstractSEPAGV.java#L244-L271
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java
TransactionWriteRequest.addPut
public TransactionWriteRequest addPut(Object object, DynamoDBTransactionWriteExpression transactionWriteExpression, ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure) { """ Adds put operation (to be executed o...
java
public TransactionWriteRequest addPut(Object object, DynamoDBTransactionWriteExpression transactionWriteExpression, ReturnValuesOnConditionCheckFailure returnValuesOnConditionCheckFailure) { transactionWriteOperations.add(new Tr...
[ "public", "TransactionWriteRequest", "addPut", "(", "Object", "object", ",", "DynamoDBTransactionWriteExpression", "transactionWriteExpression", ",", "ReturnValuesOnConditionCheckFailure", "returnValuesOnConditionCheckFailure", ")", "{", "transactionWriteOperations", ".", "add", "(...
Adds put operation (to be executed on object) to the list of transaction write operations. transactionWriteExpression is used to conditionally put object. returnValuesOnConditionCheckFailure specifies which attributes values (of existing item) should be returned if condition check fails.
[ "Adds", "put", "operation", "(", "to", "be", "executed", "on", "object", ")", "to", "the", "list", "of", "transaction", "write", "operations", ".", "transactionWriteExpression", "is", "used", "to", "conditionally", "put", "object", ".", "returnValuesOnConditionChe...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/TransactionWriteRequest.java#L67-L72
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java
AWSUtil.getCredentialsProvider
private static AWSCredentialsProvider getCredentialsProvider(final Properties configProps, final String configPrefix) { """ If the provider is ASSUME_ROLE, then the credentials for assuming this role are determined recursively. @param configProps the configuration properties @param configPrefix the prefix of ...
java
private static AWSCredentialsProvider getCredentialsProvider(final Properties configProps, final String configPrefix) { CredentialProvider credentialProviderType; if (!configProps.containsKey(configPrefix)) { if (configProps.containsKey(AWSConfigConstants.accessKeyId(configPrefix)) && configProps.containsKey...
[ "private", "static", "AWSCredentialsProvider", "getCredentialsProvider", "(", "final", "Properties", "configProps", ",", "final", "String", "configPrefix", ")", "{", "CredentialProvider", "credentialProviderType", ";", "if", "(", "!", "configProps", ".", "containsKey", ...
If the provider is ASSUME_ROLE, then the credentials for assuming this role are determined recursively. @param configProps the configuration properties @param configPrefix the prefix of the config properties for this credentials provider, e.g. aws.credentials.provider for the base credentials provider, aws.credentials...
[ "If", "the", "provider", "is", "ASSUME_ROLE", "then", "the", "credentials", "for", "assuming", "this", "role", "are", "determined", "recursively", "." ]
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#L118-L180
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.get
public JsonElement get(String name) throws JsonException { """ Returns the value mapped by {@code name}, or throws if no such mapping exists. @throws JsonException if no such mapping exists. """ JsonElement result = nameValuePairs.get(name); if (result == null) { throw new JsonEx...
java
public JsonElement get(String name) throws JsonException { JsonElement result = nameValuePairs.get(name); if (result == null) { throw new JsonException("No value for " + name + ", in: " + this.toString()); } return result; }
[ "public", "JsonElement", "get", "(", "String", "name", ")", "throws", "JsonException", "{", "JsonElement", "result", "=", "nameValuePairs", ".", "get", "(", "name", ")", ";", "if", "(", "result", "==", "null", ")", "{", "throw", "new", "JsonException", "("...
Returns the value mapped by {@code name}, or throws if no such mapping exists. @throws JsonException if no such mapping exists.
[ "Returns", "the", "value", "mapped", "by", "{", "@code", "name", "}", "or", "throws", "if", "no", "such", "mapping", "exists", "." ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L332-L338
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildFieldDeprecationInfo
public void buildFieldDeprecationInfo(XMLNode node, Content fieldsContentTree) { """ Build the field deprecation information. @param node the XML element that specifies which components to document @param fieldsContentTree content tree to which the documentation will be added """ if (!utils.defines...
java
public void buildFieldDeprecationInfo(XMLNode node, Content fieldsContentTree) { if (!utils.definesSerializableFields(currentTypeElement)) { fieldWriter.addMemberDeprecatedInfo((VariableElement)currentMember, fieldsContentTree); } }
[ "public", "void", "buildFieldDeprecationInfo", "(", "XMLNode", "node", ",", "Content", "fieldsContentTree", ")", "{", "if", "(", "!", "utils", ".", "definesSerializableFields", "(", "currentTypeElement", ")", ")", "{", "fieldWriter", ".", "addMemberDeprecatedInfo", ...
Build the field deprecation information. @param node the XML element that specifies which components to document @param fieldsContentTree content tree to which the documentation will be added
[ "Build", "the", "field", "deprecation", "information", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L470-L475
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java
HadoopUtils.deserializeFsPermission
public static FsPermission deserializeFsPermission(State props, String propName, FsPermission defaultPermission) { """ Get {@link FsPermission} from a {@link State} object. @param props A {@link State} containing properties. @param propName The property name for the permission. If not contained in the given st...
java
public static FsPermission deserializeFsPermission(State props, String propName, FsPermission defaultPermission) { short mode = props.getPropAsShortWithRadix(propName, defaultPermission.toShort(), ConfigurationKeys.PERMISSION_PARSING_RADIX); return new FsPermission(mode); }
[ "public", "static", "FsPermission", "deserializeFsPermission", "(", "State", "props", ",", "String", "propName", ",", "FsPermission", "defaultPermission", ")", "{", "short", "mode", "=", "props", ".", "getPropAsShortWithRadix", "(", "propName", ",", "defaultPermission...
Get {@link FsPermission} from a {@link State} object. @param props A {@link State} containing properties. @param propName The property name for the permission. If not contained in the given state, defaultPermission will be used. @param defaultPermission default permission if propName is not contained in props. @return...
[ "Get", "{", "@link", "FsPermission", "}", "from", "a", "{", "@link", "State", "}", "object", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/HadoopUtils.java#L909-L913
grpc/grpc-java
cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java
CronetChannelBuilder.forAddress
public static CronetChannelBuilder forAddress(String host, int port, CronetEngine cronetEngine) { """ Creates a new builder for the given server host, port and CronetEngine. """ Preconditions.checkNotNull(cronetEngine, "cronetEngine"); return new CronetChannelBuilder(host, port, cronetEngine); }
java
public static CronetChannelBuilder forAddress(String host, int port, CronetEngine cronetEngine) { Preconditions.checkNotNull(cronetEngine, "cronetEngine"); return new CronetChannelBuilder(host, port, cronetEngine); }
[ "public", "static", "CronetChannelBuilder", "forAddress", "(", "String", "host", ",", "int", "port", ",", "CronetEngine", "cronetEngine", ")", "{", "Preconditions", ".", "checkNotNull", "(", "cronetEngine", ",", "\"cronetEngine\"", ")", ";", "return", "new", "Cron...
Creates a new builder for the given server host, port and CronetEngine.
[ "Creates", "a", "new", "builder", "for", "the", "given", "server", "host", "port", "and", "CronetEngine", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java#L56-L59
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java
GalleryImagesInner.createOrUpdateAsync
public Observable<GalleryImageInner> createOrUpdateAsync(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) { """ Create or replace an existing Gallery Image. @param resourceGroupName The name of the resource group. @param labAccountName The name of the la...
java
public Observable<GalleryImageInner> createOrUpdateAsync(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, galleryImageName, galleryImage).map(new Func1<ServiceResponse<Gall...
[ "public", "Observable", "<", "GalleryImageInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "galleryImageName", ",", "GalleryImageInner", "galleryImage", ")", "{", "return", "createOrUpdateWithServiceResp...
Create or replace an existing Gallery Image. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param galleryImageName The name of the gallery Image. @param galleryImage Represents an image from the Azure Marketplace @throws IllegalArgumentException thrown if p...
[ "Create", "or", "replace", "an", "existing", "Gallery", "Image", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java#L580-L587
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java
AbstractNewSarlElementWizardPage.createMethodStubControls
protected void createMethodStubControls(Composite composite, int columns, boolean enableConstructors, boolean enableInherited, boolean defaultEvents, boolean lifecycleFunctions) { """ Create the controls related to the behavior units to generate. @param composite the container of the controls. @param col...
java
protected void createMethodStubControls(Composite composite, int columns, boolean enableConstructors, boolean enableInherited, boolean defaultEvents, boolean lifecycleFunctions) { this.isConstructorCreationEnabled = enableConstructors; this.isInheritedCreationEnabled = enableInherited; this.isDefaultEventGe...
[ "protected", "void", "createMethodStubControls", "(", "Composite", "composite", ",", "int", "columns", ",", "boolean", "enableConstructors", ",", "boolean", "enableInherited", ",", "boolean", "defaultEvents", ",", "boolean", "lifecycleFunctions", ")", "{", "this", "."...
Create the controls related to the behavior units to generate. @param composite the container of the controls. @param columns the number of columns. @param enableConstructors indicates if the constructor creation is enable. @param enableInherited indicates if the inherited operation creation is enable. @param defaultE...
[ "Create", "the", "controls", "related", "to", "the", "behavior", "units", "to", "generate", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/wizards/elements/AbstractNewSarlElementWizardPage.java#L994-L1030
rampatra/jbot
jbot/src/main/java/me/ramswaroop/jbot/core/slack/Bot.java
Bot.afterConnectionClosed
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) { """ Invoked after the web socket connection is closed. You can override this method in the child classes. @param session websocket session between bot and slack @param status websocket close status @see WebSocketHandler#afterC...
java
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) { logger.debug("WebSocket closed: {}, Close Status: {}", session, status.toString()); }
[ "public", "void", "afterConnectionClosed", "(", "WebSocketSession", "session", ",", "CloseStatus", "status", ")", "{", "logger", ".", "debug", "(", "\"WebSocket closed: {}, Close Status: {}\"", ",", "session", ",", "status", ".", "toString", "(", ")", ")", ";", "}...
Invoked after the web socket connection is closed. You can override this method in the child classes. @param session websocket session between bot and slack @param status websocket close status @see WebSocketHandler#afterConnectionClosed
[ "Invoked", "after", "the", "web", "socket", "connection", "is", "closed", ".", "You", "can", "override", "this", "method", "in", "the", "child", "classes", "." ]
train
https://github.com/rampatra/jbot/blob/0f42e1a6ec4dcbc5d1257e1307704903e771f7b5/jbot/src/main/java/me/ramswaroop/jbot/core/slack/Bot.java#L104-L106
airlift/slice
src/main/java/io/airlift/slice/Slices.java
Slices.wrappedFloatArray
public static Slice wrappedFloatArray(float[] array, int offset, int length) { """ Creates a slice over the specified array range. @param offset the array position at which the slice begins @param length the number of array positions to include in the slice """ if (length == 0) { return...
java
public static Slice wrappedFloatArray(float[] array, int offset, int length) { if (length == 0) { return EMPTY_SLICE; } return new Slice(array, offset, length); }
[ "public", "static", "Slice", "wrappedFloatArray", "(", "float", "[", "]", "array", ",", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "length", "==", "0", ")", "{", "return", "EMPTY_SLICE", ";", "}", "return", "new", "Slice", "(", "array"...
Creates a slice over the specified array range. @param offset the array position at which the slice begins @param length the number of array positions to include in the slice
[ "Creates", "a", "slice", "over", "the", "specified", "array", "range", "." ]
train
https://github.com/airlift/slice/blob/7166cb0319e3655f8ba15f5a7ccf3d2f721c1242/src/main/java/io/airlift/slice/Slices.java#L259-L265
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/ObjectUtils.java
ObjectUtils.getFieldInstance
public static Object getFieldInstance(List chids, Field f) { """ Gets the field instance. @param chids the chids @param f the f @return the field instance """ if (Set.class.isAssignableFrom(f.getType())) { Set col = new HashSet(chids); return col; } ...
java
public static Object getFieldInstance(List chids, Field f) { if (Set.class.isAssignableFrom(f.getType())) { Set col = new HashSet(chids); return col; } return chids; }
[ "public", "static", "Object", "getFieldInstance", "(", "List", "chids", ",", "Field", "f", ")", "{", "if", "(", "Set", ".", "class", ".", "isAssignableFrom", "(", "f", ".", "getType", "(", ")", ")", ")", "{", "Set", "col", "=", "new", "HashSet", "(",...
Gets the field instance. @param chids the chids @param f the f @return the field instance
[ "Gets", "the", "field", "instance", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/utils/ObjectUtils.java#L420-L429
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetStageResult.java
GetStageResult.withStageVariables
public GetStageResult withStageVariables(java.util.Map<String, String> stageVariables) { """ <p> A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. </p> @param stageVariables A map th...
java
public GetStageResult withStageVariables(java.util.Map<String, String> stageVariables) { setStageVariables(stageVariables); return this; }
[ "public", "GetStageResult", "withStageVariables", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "stageVariables", ")", "{", "setStageVariables", "(", "stageVariables", ")", ";", "return", "this", ";", "}" ]
<p> A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. </p> @param stageVariables A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore...
[ "<p", ">", "A", "map", "that", "defines", "the", "stage", "variables", "for", "a", "stage", "resource", ".", "Variable", "names", "can", "have", "alphanumeric", "and", "underscore", "characters", "and", "the", "values", "must", "match", "[", "A", "-", "Za"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/GetStageResult.java#L505-L508
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/IntegrationResponse.java
IntegrationResponse.withResponseParameters
public IntegrationResponse withResponseParameters(java.util.Map<String, String> responseParameters) { """ <p> A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response ...
java
public IntegrationResponse withResponseParameters(java.util.Map<String, String> responseParameters) { setResponseParameters(responseParameters); return this; }
[ "public", "IntegrationResponse", "withResponseParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseParameters", ")", "{", "setResponseParameters", "(", "responseParameters", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration r...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "response", "parameters", "that", "are", "passed", "to", "the", "method", "response", "from", "the", "backend", ".", "The", "key", "is", "a", "method", "response", "header", "parameter", "name", "an...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/IntegrationResponse.java#L382-L385
jenkinsci/github-plugin
src/main/java/org/jenkinsci/plugins/github/status/sources/ManuallyEnteredBackrefSource.java
ManuallyEnteredBackrefSource.get
@SuppressWarnings("deprecation") @Override public String get(Run<?, ?> run, TaskListener listener) { """ Just returns what user entered. Expands env vars and token macro """ try { return new ExpandableMessage(backref).expandAll(run, listener); } catch (Exception e) { ...
java
@SuppressWarnings("deprecation") @Override public String get(Run<?, ?> run, TaskListener listener) { try { return new ExpandableMessage(backref).expandAll(run, listener); } catch (Exception e) { LOG.debug("Can't expand backref, returning as is", e); return bac...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "@", "Override", "public", "String", "get", "(", "Run", "<", "?", ",", "?", ">", "run", ",", "TaskListener", "listener", ")", "{", "try", "{", "return", "new", "ExpandableMessage", "(", "backref", ")", ...
Just returns what user entered. Expands env vars and token macro
[ "Just", "returns", "what", "user", "entered", ".", "Expands", "env", "vars", "and", "token", "macro" ]
train
https://github.com/jenkinsci/github-plugin/blob/4e05b9aeb488af5342c78f78aa3c55114e8d462a/src/main/java/org/jenkinsci/plugins/github/status/sources/ManuallyEnteredBackrefSource.java#L38-L47
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/util/ShapeGenerator.java
ShapeGenerator.createInternalDropShadowRounded
public Shape createInternalDropShadowRounded(final int x, final int y, final int w, final int h) { """ Return a path for a rounded internal drop shadow. This is used for progress bar tracks and search fields. @param x the X coordinate of the upper-left corner of the shadow @param y the Y coordinate of the u...
java
public Shape createInternalDropShadowRounded(final int x, final int y, final int w, final int h) { final double radius = h / 2; final int right = x + w; final double bottom = y + radius; path.reset(); // Upper edge. path.moveTo(x, bottom); path.quadTo(x, y, ...
[ "public", "Shape", "createInternalDropShadowRounded", "(", "final", "int", "x", ",", "final", "int", "y", ",", "final", "int", "w", ",", "final", "int", "h", ")", "{", "final", "double", "radius", "=", "h", "/", "2", ";", "final", "int", "right", "=", ...
Return a path for a rounded internal drop shadow. This is used for progress bar tracks and search fields. @param x the X coordinate of the upper-left corner of the shadow @param y the Y coordinate of the upper-left corner of the shadow @param w the width of the shadow @param h the height of the rectangle @return ...
[ "Return", "a", "path", "for", "a", "rounded", "internal", "drop", "shadow", ".", "This", "is", "used", "for", "progress", "bar", "tracks", "and", "search", "fields", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/util/ShapeGenerator.java#L409-L431
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/sender/http2/OutboundMsgHolder.java
OutboundMsgHolder.addPushResponse
public void addPushResponse(int streamId, HttpCarbonResponse pushResponse) { """ Adds a push response message. @param streamId id of the stream in which the push response received @param pushResponse push response message """ pushResponsesMap.put(streamId, pushResponse); responseFuture....
java
public void addPushResponse(int streamId, HttpCarbonResponse pushResponse) { pushResponsesMap.put(streamId, pushResponse); responseFuture.notifyPushResponse(streamId, pushResponse); }
[ "public", "void", "addPushResponse", "(", "int", "streamId", ",", "HttpCarbonResponse", "pushResponse", ")", "{", "pushResponsesMap", ".", "put", "(", "streamId", ",", "pushResponse", ")", ";", "responseFuture", ".", "notifyPushResponse", "(", "streamId", ",", "pu...
Adds a push response message. @param streamId id of the stream in which the push response received @param pushResponse push response message
[ "Adds", "a", "push", "response", "message", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/sender/http2/OutboundMsgHolder.java#L106-L109
alamkanak/Android-Week-View
sample/src/main/java/com/alamkanak/weekview/sample/AsynchronousActivity.java
AsynchronousActivity.eventMatches
private boolean eventMatches(WeekViewEvent event, int year, int month) { """ Checks if an event falls into a specific year and month. @param event The event to check for. @param year The year. @param month The month. @return True if the event matches the year and month. """ return (event.getStartTi...
java
private boolean eventMatches(WeekViewEvent event, int year, int month) { return (event.getStartTime().get(Calendar.YEAR) == year && event.getStartTime().get(Calendar.MONTH) == month - 1) || (event.getEndTime().get(Calendar.YEAR) == year && event.getEndTime().get(Calendar.MONTH) == month - 1); }
[ "private", "boolean", "eventMatches", "(", "WeekViewEvent", "event", ",", "int", "year", ",", "int", "month", ")", "{", "return", "(", "event", ".", "getStartTime", "(", ")", ".", "get", "(", "Calendar", ".", "YEAR", ")", "==", "year", "&&", "event", "...
Checks if an event falls into a specific year and month. @param event The event to check for. @param year The year. @param month The month. @return True if the event matches the year and month.
[ "Checks", "if", "an", "event", "falls", "into", "a", "specific", "year", "and", "month", "." ]
train
https://github.com/alamkanak/Android-Week-View/blob/dc3f97d65d44785d1a761b52b58527c86c4eee1b/sample/src/main/java/com/alamkanak/weekview/sample/AsynchronousActivity.java#L59-L61
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/batch/BatchClient.java
BatchClient.createRequest
private InternalRequest createRequest( AbstractBceRequest bceRequest, HttpMethodName httpMethod, String... pathVariables) { """ Creates and initializes a new request object for the specified resource. @param bceRequest The original BCE request created by the user. @param httpMethod The HTTP method ...
java
private InternalRequest createRequest( AbstractBceRequest bceRequest, HttpMethodName httpMethod, String... pathVariables) { List<String> path = new ArrayList<String>(); path.add(VERSION); if (pathVariables != null) { for (String pathVariable : pathVariables) { ...
[ "private", "InternalRequest", "createRequest", "(", "AbstractBceRequest", "bceRequest", ",", "HttpMethodName", "httpMethod", ",", "String", "...", "pathVariables", ")", "{", "List", "<", "String", ">", "path", "=", "new", "ArrayList", "<", "String", ">", "(", ")...
Creates and initializes a new request object for the specified resource. @param bceRequest The original BCE request created by the user. @param httpMethod The HTTP method to use when sending the request. @param pathVariables The optional variables used in the URI path. @return A new request object populated with endpo...
[ "Creates", "and", "initializes", "a", "new", "request", "object", "for", "the", "specified", "resource", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/batch/BatchClient.java#L258-L277
hector-client/hector
core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java
HFactory.createKeyspaceDefinition
public static KeyspaceDefinition createKeyspaceDefinition( String keyspaceName, String strategyClass, int replicationFactor, List<ColumnFamilyDefinition> cfDefs) { """ Use createKeyspaceDefinition to add a new Keyspace to cluster. Example: String testKeyspace = "testKeyspace"; KeyspaceDefinition new...
java
public static KeyspaceDefinition createKeyspaceDefinition( String keyspaceName, String strategyClass, int replicationFactor, List<ColumnFamilyDefinition> cfDefs) { return new ThriftKsDef(keyspaceName, strategyClass, replicationFactor, cfDefs); }
[ "public", "static", "KeyspaceDefinition", "createKeyspaceDefinition", "(", "String", "keyspaceName", ",", "String", "strategyClass", ",", "int", "replicationFactor", ",", "List", "<", "ColumnFamilyDefinition", ">", "cfDefs", ")", "{", "return", "new", "ThriftKsDef", "...
Use createKeyspaceDefinition to add a new Keyspace to cluster. Example: String testKeyspace = "testKeyspace"; KeyspaceDefinition newKeyspace = HFactory.createKeyspaceDefinition(testKeyspace); cluster.addKeyspace(newKeyspace); @param keyspaceName @param strategyClass - example: org.apache.cassandra.locator.SimpleStrat...
[ "Use", "createKeyspaceDefinition", "to", "add", "a", "new", "Keyspace", "to", "cluster", ".", "Example", ":" ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java#L692-L697
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setTimestamp
@Override public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { """ Sets the designated parameter to the given java.sql.Timestamp value. """ checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_TIMESTAMP : x; }
java
@Override public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException { checkParameterBounds(parameterIndex); this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_TIMESTAMP : x; }
[ "@", "Override", "public", "void", "setTimestamp", "(", "int", "parameterIndex", ",", "Timestamp", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "this", ".", "parameters", "[", "parameterIndex", "-", "1", "]", ...
Sets the designated parameter to the given java.sql.Timestamp value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "Timestamp", "value", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L574-L579
mozilla/rhino
src/org/mozilla/classfile/TypeInfo.java
TypeInfo.getPayloadAsType
static final String getPayloadAsType(int typeInfo, ConstantPool pool) { """ Treat the result of getPayload as a constant pool index and fetch the corresponding String mapped to it. Only works on OBJECT types. """ if (getTag(typeInfo) == OBJECT_TAG) { return (String) pool.getConstantData(getPayloa...
java
static final String getPayloadAsType(int typeInfo, ConstantPool pool) { if (getTag(typeInfo) == OBJECT_TAG) { return (String) pool.getConstantData(getPayload(typeInfo)); } throw new IllegalArgumentException("expecting object type"); }
[ "static", "final", "String", "getPayloadAsType", "(", "int", "typeInfo", ",", "ConstantPool", "pool", ")", "{", "if", "(", "getTag", "(", "typeInfo", ")", "==", "OBJECT_TAG", ")", "{", "return", "(", "String", ")", "pool", ".", "getConstantData", "(", "get...
Treat the result of getPayload as a constant pool index and fetch the corresponding String mapped to it. Only works on OBJECT types.
[ "Treat", "the", "result", "of", "getPayload", "as", "a", "constant", "pool", "index", "and", "fetch", "the", "corresponding", "String", "mapped", "to", "it", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/classfile/TypeInfo.java#L55-L60
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRActivity.java
LRActivity.addActor
public boolean addActor(String objectType, String displayName, String url, String[] description) { """ Add an actor object to this activity @param objectType The type of actor (required) @param displayName Name of the actor @param url URL of a page representing the actor @param description Array of descripti...
java
public boolean addActor(String objectType, String displayName, String url, String[] description) { Map<String, Object> container = new HashMap<String, Object>(); if (objectType != null) { container.put("objectType", objectType); } else { r...
[ "public", "boolean", "addActor", "(", "String", "objectType", ",", "String", "displayName", ",", "String", "url", ",", "String", "[", "]", "description", ")", "{", "Map", "<", "String", ",", "Object", ">", "container", "=", "new", "HashMap", "<", "String",...
Add an actor object to this activity @param objectType The type of actor (required) @param displayName Name of the actor @param url URL of a page representing the actor @param description Array of descriptiosn of this actor @return True if added, false if not (due to missing required fields)
[ "Add", "an", "actor", "object", "to", "this", "activity" ]
train
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRActivity.java#L339-L365
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java
CommerceOrderItemPersistenceImpl.findAll
@Override public List<CommerceOrderItem> findAll() { """ Returns all the commerce order items. @return the commerce order items """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceOrderItem> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderItem", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce order items. @return the commerce order items
[ "Returns", "all", "the", "commerce", "order", "items", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderItemPersistenceImpl.java#L3667-L3670
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeUtil.java
SnowflakeUtil.checkErrorAndThrowExceptionSub
static private void checkErrorAndThrowExceptionSub( JsonNode rootNode, boolean raiseReauthenticateError) throws SnowflakeSQLException { """ Check the error in the JSON node and generate an exception based on information extracted from the node. @param rootNode json object contains error...
java
static private void checkErrorAndThrowExceptionSub( JsonNode rootNode, boolean raiseReauthenticateError) throws SnowflakeSQLException { // no need to throw exception if success if (rootNode.path("success").asBoolean()) { return; } String errorMessage; String sqlState; int er...
[ "static", "private", "void", "checkErrorAndThrowExceptionSub", "(", "JsonNode", "rootNode", ",", "boolean", "raiseReauthenticateError", ")", "throws", "SnowflakeSQLException", "{", "// no need to throw exception if success", "if", "(", "rootNode", ".", "path", "(", "\"succe...
Check the error in the JSON node and generate an exception based on information extracted from the node. @param rootNode json object contains error information @param raiseReauthenticateError raises SnowflakeReauthenticationRequest if true @throws SnowflakeSQLException the exception get from the error ...
[ "Check", "the", "error", "in", "the", "JSON", "node", "and", "generate", "an", "exception", "based", "on", "information", "extracted", "from", "the", "node", "." ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeUtil.java#L76-L141
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java
CDKMCS.getOverlaps
public static List<IAtomContainer> getOverlaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { """ Returns all the maximal common substructure between 2 atom containers. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. ...
java
public static List<IAtomContainer> getOverlaps(IAtomContainer sourceGraph, IAtomContainer targetGraph, boolean shouldMatchBonds) throws CDKException { List<List<CDKRMap>> rMapsList = search(sourceGraph, targetGraph, new BitSet(), new BitSet(), true, false, shouldMatchBonds); ...
[ "public", "static", "List", "<", "IAtomContainer", ">", "getOverlaps", "(", "IAtomContainer", "sourceGraph", ",", "IAtomContainer", "targetGraph", ",", "boolean", "shouldMatchBonds", ")", "throws", "CDKException", "{", "List", "<", "List", "<", "CDKRMap", ">>", "r...
Returns all the maximal common substructure between 2 atom containers. @param sourceGraph first molecule. Must not be an IQueryAtomContainer. @param targetGraph second molecule. May be an IQueryAtomContainer. @param shouldMatchBonds @return the list of all the maximal common substructure found projected of sou...
[ "Returns", "all", "the", "maximal", "common", "substructure", "between", "2", "atom", "containers", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCS.java#L398-L410
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.getString
public static String getString(Config config, String path, String def) { """ Return string value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return string value at <code>pa...
java
public static String getString(Config config, String path, String def) { if (config.hasPath(path)) { return config.getString(path); } return def; }
[ "public", "static", "String", "getString", "(", "Config", "config", ",", "String", "path", ",", "String", "def", ")", "{", "if", "(", "config", ".", "hasPath", "(", "path", ")", ")", "{", "return", "config", ".", "getString", "(", "path", ")", ";", "...
Return string value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return string value at <code>path</code> if <code>config</code> has path. If not return <code>def</code>
[ "Return", "string", "value", "at", "<code", ">", "path<", "/", "code", ">", "if", "<code", ">", "config<", "/", "code", ">", "has", "path", ".", "If", "not", "return", "<code", ">", "def<", "/", "code", ">" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L322-L327
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/classpath/CallStackReader.java
CallStackReader.getCallStackViaStackWalker
private static Class<?>[] getCallStackViaStackWalker() { """ Get the call stack via the StackWalker API (JRE 9+). @return the call stack, or null if it could not be obtained. """ try { // // Implement the following via reflection, for JDK7 compatibility: // List<Class<?...
java
private static Class<?>[] getCallStackViaStackWalker() { try { // // Implement the following via reflection, for JDK7 compatibility: // List<Class<?>> stackFrameClasses = new ArrayList<>(); // StackWalker.getInstance(Option.RETAIN_CLASS_REFERENCE) // ...
[ "private", "static", "Class", "<", "?", ">", "[", "]", "getCallStackViaStackWalker", "(", ")", "{", "try", "{", "// // Implement the following via reflection, for JDK7 compatibility:", "// List<Class<?>> stackFrameClasses = new ArrayList<>();", "// StackWalker.getInstance(Op...
Get the call stack via the StackWalker API (JRE 9+). @return the call stack, or null if it could not be obtained.
[ "Get", "the", "call", "stack", "via", "the", "StackWalker", "API", "(", "JRE", "9", "+", ")", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/CallStackReader.java#L57-L93
attribyte/acp
src/main/java/org/attribyte/sql/pool/Util.java
Util.createThreadFactoryBuilder
static ThreadFactory createThreadFactoryBuilder(final String baseName, final String componentName) { """ Creates a thread factory builder. @param baseName The (optional) base name. @param componentName The (required) component name. @return The thread factory. """ StringBuilder buf = new StringBuilde...
java
static ThreadFactory createThreadFactoryBuilder(final String baseName, final String componentName) { StringBuilder buf = new StringBuilder("ACP:"); if(!Strings.isNullOrEmpty(baseName)) { buf.append(baseName).append(":").append(componentName); } else { buf.append(componentName); ...
[ "static", "ThreadFactory", "createThreadFactoryBuilder", "(", "final", "String", "baseName", ",", "final", "String", "componentName", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "\"ACP:\"", ")", ";", "if", "(", "!", "Strings", ".", "isNul...
Creates a thread factory builder. @param baseName The (optional) base name. @param componentName The (required) component name. @return The thread factory.
[ "Creates", "a", "thread", "factory", "builder", "." ]
train
https://github.com/attribyte/acp/blob/dbee6ebb83fda4f19fbbbcb9d0ac2b527e3cb659/src/main/java/org/attribyte/sql/pool/Util.java#L121-L132
alkacon/opencms-core
src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java
CmsContentEditor.replaceResourceIds
public static void replaceResourceIds(Element element, String oldId, String newId) { """ Replaces the id's within data-oc-id attributes of the given element and all it's children.<p> @param element the element @param oldId the old id @param newId the new id """ NodeList<Element> children = CmsD...
java
public static void replaceResourceIds(Element element, String oldId, String newId) { NodeList<Element> children = CmsDomUtil.querySelectorAll( FIELD_SELECTOR + ENTITY_ID_SELECTOR_PREFIX + oldId + ENTITY_ID_SELECTOR_SUFFIX, element); if (children.getLength() > 0) { ...
[ "public", "static", "void", "replaceResourceIds", "(", "Element", "element", ",", "String", "oldId", ",", "String", "newId", ")", "{", "NodeList", "<", "Element", ">", "children", "=", "CmsDomUtil", ".", "querySelectorAll", "(", "FIELD_SELECTOR", "+", "ENTITY_ID...
Replaces the id's within data-oc-id attributes of the given element and all it's children.<p> @param element the element @param oldId the old id @param newId the new id
[ "Replaces", "the", "id", "s", "within", "data", "-", "oc", "-", "id", "attributes", "of", "the", "given", "element", "and", "all", "it", "s", "children", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/contenteditor/client/CmsContentEditor.java#L502-L515
the-fascinator/plugin-subscriber-solrEventLog
src/main/java/com/googlecode/fascinator/subscriber/solrEventLog/SolrEventLogSubscriber.java
SolrEventLogSubscriber.writeUpdateString
private String writeUpdateString(Map<String, String> param) { """ Turn a a message into a Solr document @param param : Map of key/value pairs to add to the index """ StringBuffer fieldStringBuffer = new StringBuffer(); for(Entry<String, String> entry : param.entrySet()){ fieldString...
java
private String writeUpdateString(Map<String, String> param) { StringBuffer fieldStringBuffer = new StringBuffer(); for(Entry<String, String> entry : param.entrySet()){ fieldStringBuffer.append("<field name=\"").append(entry.getKey()).append("\">") .append(StringEscapeUtils.escapeXml(...
[ "private", "String", "writeUpdateString", "(", "Map", "<", "String", ",", "String", ">", "param", ")", "{", "StringBuffer", "fieldStringBuffer", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "Entry", "<", "String", ",", "String", ">", "entry", ":"...
Turn a a message into a Solr document @param param : Map of key/value pairs to add to the index
[ "Turn", "a", "a", "message", "into", "a", "Solr", "document" ]
train
https://github.com/the-fascinator/plugin-subscriber-solrEventLog/blob/2c9da188887a622a6d43d33ea9099aff53a0516d/src/main/java/com/googlecode/fascinator/subscriber/solrEventLog/SolrEventLogSubscriber.java#L447-L456
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/retry/ClockSkewAdjuster.java
ClockSkewAdjuster.timeSkewInSeconds
private int timeSkewInSeconds(Date clientTime, Date serverTime) { """ Calculate the time skew between a client and server date. This value has the same semantics of {@link Request#setTimeOffset(int)}. Positive values imply the client clock is "fast" and negative values imply the client clock is "slow". """ ...
java
private int timeSkewInSeconds(Date clientTime, Date serverTime) { ValidationUtils.assertNotNull(clientTime, "clientTime"); ValidationUtils.assertNotNull(serverTime, "serverTime"); long value = (clientTime.getTime() - serverTime.getTime()) / 1000; if ((int) value != value) { ...
[ "private", "int", "timeSkewInSeconds", "(", "Date", "clientTime", ",", "Date", "serverTime", ")", "{", "ValidationUtils", ".", "assertNotNull", "(", "clientTime", ",", "\"clientTime\"", ")", ";", "ValidationUtils", ".", "assertNotNull", "(", "serverTime", ",", "\"...
Calculate the time skew between a client and server date. This value has the same semantics of {@link Request#setTimeOffset(int)}. Positive values imply the client clock is "fast" and negative values imply the client clock is "slow".
[ "Calculate", "the", "time", "skew", "between", "a", "client", "and", "server", "date", ".", "This", "value", "has", "the", "same", "semantics", "of", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/retry/ClockSkewAdjuster.java#L127-L138
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/host/controller/ManagedServer.java
ManagedServer.callbackUnregistered
boolean callbackUnregistered(final TransactionalProtocolClient old, final boolean shuttingDown) { """ Unregister the mgmt channel. @param old the proxy controller to unregister @param shuttingDown whether the server inventory is shutting down @return whether the registration can be removed from the domain-con...
java
boolean callbackUnregistered(final TransactionalProtocolClient old, final boolean shuttingDown) { // Disconnect the remote connection. // WFCORE-196 Do this out of the sync block to avoid deadlocks where in-flight requests can't // be informed that the channel has closed protocolClient.d...
[ "boolean", "callbackUnregistered", "(", "final", "TransactionalProtocolClient", "old", ",", "final", "boolean", "shuttingDown", ")", "{", "// Disconnect the remote connection.", "// WFCORE-196 Do this out of the sync block to avoid deadlocks where in-flight requests can't", "// be inform...
Unregister the mgmt channel. @param old the proxy controller to unregister @param shuttingDown whether the server inventory is shutting down @return whether the registration can be removed from the domain-controller
[ "Unregister", "the", "mgmt", "channel", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/ManagedServer.java#L465-L496
square/flow
flow/src/main/java/flow/Flow.java
Flow.replaceHistory
public void replaceHistory(@NonNull final Object key, @NonNull final Direction direction) { """ Replaces the history with the given key and dispatches in the given direction. """ setHistory(getHistory().buildUpon().clear().push(key).build(), direction); }
java
public void replaceHistory(@NonNull final Object key, @NonNull final Direction direction) { setHistory(getHistory().buildUpon().clear().push(key).build(), direction); }
[ "public", "void", "replaceHistory", "(", "@", "NonNull", "final", "Object", "key", ",", "@", "NonNull", "final", "Direction", "direction", ")", "{", "setHistory", "(", "getHistory", "(", ")", ".", "buildUpon", "(", ")", ".", "clear", "(", ")", ".", "push...
Replaces the history with the given key and dispatches in the given direction.
[ "Replaces", "the", "history", "with", "the", "given", "key", "and", "dispatches", "in", "the", "given", "direction", "." ]
train
https://github.com/square/flow/blob/1656288d1cb4a92dfbcff8276f4d7f9e3390419b/flow/src/main/java/flow/Flow.java#L208-L210
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java
LegacyBehavior.areEqualEventSubscriptions
protected static boolean areEqualEventSubscriptions(EventSubscriptionEntity subscription1, EventSubscriptionEntity subscription2) { """ Checks if the parameters are the same apart from the execution id """ return valuesEqual(subscription1.getEventType(), subscription2.getEventType()) && valuesEqual...
java
protected static boolean areEqualEventSubscriptions(EventSubscriptionEntity subscription1, EventSubscriptionEntity subscription2) { return valuesEqual(subscription1.getEventType(), subscription2.getEventType()) && valuesEqual(subscription1.getEventName(), subscription2.getEventName()) && valuesEqual...
[ "protected", "static", "boolean", "areEqualEventSubscriptions", "(", "EventSubscriptionEntity", "subscription1", ",", "EventSubscriptionEntity", "subscription2", ")", "{", "return", "valuesEqual", "(", "subscription1", ".", "getEventType", "(", ")", ",", "subscription2", ...
Checks if the parameters are the same apart from the execution id
[ "Checks", "if", "the", "parameters", "are", "the", "same", "apart", "from", "the", "execution", "id" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java#L450-L455
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java
AbstractObjectTable.createTableModel
protected GlazedTableModel createTableModel(EventList eventList) { """ Construct the table model for this table. The default implementation of this creates a GlazedTableModel using an Advanced format. @param eventList on which to build the model @return table model """ return new GlazedTableModel(event...
java
protected GlazedTableModel createTableModel(EventList eventList) { return new GlazedTableModel(eventList, getColumnPropertyNames(), modelId) { protected TableFormat createTableFormat() { return new DefaultAdvancedTableFormat(); } }; }
[ "protected", "GlazedTableModel", "createTableModel", "(", "EventList", "eventList", ")", "{", "return", "new", "GlazedTableModel", "(", "eventList", ",", "getColumnPropertyNames", "(", ")", ",", "modelId", ")", "{", "protected", "TableFormat", "createTableFormat", "("...
Construct the table model for this table. The default implementation of this creates a GlazedTableModel using an Advanced format. @param eventList on which to build the model @return table model
[ "Construct", "the", "table", "model", "for", "this", "table", ".", "The", "default", "implementation", "of", "this", "creates", "a", "GlazedTableModel", "using", "an", "Advanced", "format", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/table/support/AbstractObjectTable.java#L463-L470
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java
BindM2MBuilder.generateInsert
private void generateInsert(M2MEntity entity, String packageName) { """ Generate insert. @param entity the entity @param packageName the package name """ if (!isMethodAlreadyDefined(entity, "insert")) { // @formatter:off MethodSpec methodSpec = MethodSpec.methodBuilder("insert").addModifiers(Modi...
java
private void generateInsert(M2MEntity entity, String packageName) { if (!isMethodAlreadyDefined(entity, "insert")) { // @formatter:off MethodSpec methodSpec = MethodSpec.methodBuilder("insert").addModifiers(Modifier.PUBLIC) .addModifiers(Modifier.ABSTRACT).addAnnotation(AnnotationSpec.builder(BindSqlInsert...
[ "private", "void", "generateInsert", "(", "M2MEntity", "entity", ",", "String", "packageName", ")", "{", "if", "(", "!", "isMethodAlreadyDefined", "(", "entity", ",", "\"insert\"", ")", ")", "{", "// @formatter:off", "MethodSpec", "methodSpec", "=", "MethodSpec", ...
Generate insert. @param entity the entity @param packageName the package name
[ "Generate", "insert", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/BindM2MBuilder.java#L414-L427
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java
FileSystemView.getFileAttributeView
@Nullable public <V extends FileAttributeView> V getFileAttributeView( final JimfsPath path, Class<V> type, final Set<? super LinkOption> options) { """ Returns a file attribute view for the given path in this view. """ return store.getFileAttributeView( new FileLookup() { @Overri...
java
@Nullable public <V extends FileAttributeView> V getFileAttributeView( final JimfsPath path, Class<V> type, final Set<? super LinkOption> options) { return store.getFileAttributeView( new FileLookup() { @Override public File lookup() throws IOException { return lookUp...
[ "@", "Nullable", "public", "<", "V", "extends", "FileAttributeView", ">", "V", "getFileAttributeView", "(", "final", "JimfsPath", "path", ",", "Class", "<", "V", ">", "type", ",", "final", "Set", "<", "?", "super", "LinkOption", ">", "options", ")", "{", ...
Returns a file attribute view for the given path in this view.
[ "Returns", "a", "file", "attribute", "view", "for", "the", "given", "path", "in", "this", "view", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/FileSystemView.java#L701-L712
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/AbstractSREInstall.java
AbstractSREInstall.formatCommandLineOption
protected static String formatCommandLineOption(String name, String value) { """ Replies the string representation of a command-line option. @param name the name of the option. @param value the value to put in the command-line. @return the string representation of the command-line option. """ final Stri...
java
protected static String formatCommandLineOption(String name, String value) { final StringBuilder str = new StringBuilder(); str.append("--"); //$NON-NLS-1$ if (!Strings.isNullOrEmpty(name)) { str.append(name); if (!Strings.isNullOrEmpty(value)) { str.append("="); //$NON-NLS-1$ str.append(value); ...
[ "protected", "static", "String", "formatCommandLineOption", "(", "String", "name", ",", "String", "value", ")", "{", "final", "StringBuilder", "str", "=", "new", "StringBuilder", "(", ")", ";", "str", ".", "append", "(", "\"--\"", ")", ";", "//$NON-NLS-1$", ...
Replies the string representation of a command-line option. @param name the name of the option. @param value the value to put in the command-line. @return the string representation of the command-line option.
[ "Replies", "the", "string", "representation", "of", "a", "command", "-", "line", "option", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/runtime/AbstractSREInstall.java#L497-L508
OpenLiberty/open-liberty
dev/com.ibm.ws.rest.handler.config/src/com/ibm/ws/rest/handler/config/internal/ConfigRESTHandler.java
ConfigRESTHandler.getUID
@Trivial private static final String getUID(String configDisplayId, String id) { """ Compute the unique identifier from the id and config.displayId. If a top level configuration element has an id, the id is the unique identifier. Otherwise, the config.displayId is the unique identifier. @param configDispl...
java
@Trivial private static final String getUID(String configDisplayId, String id) { return id == null || configDisplayId.matches(".*/.*\\[.*\\].*") ? configDisplayId : id; }
[ "@", "Trivial", "private", "static", "final", "String", "getUID", "(", "String", "configDisplayId", ",", "String", "id", ")", "{", "return", "id", "==", "null", "||", "configDisplayId", ".", "matches", "(", "\".*/.*\\\\[.*\\\\].*\"", ")", "?", "configDisplayId",...
Compute the unique identifier from the id and config.displayId. If a top level configuration element has an id, the id is the unique identifier. Otherwise, the config.displayId is the unique identifier. @param configDisplayId config.displayId of configuration element. @param id id of configuration element...
[ "Compute", "the", "unique", "identifier", "from", "the", "id", "and", "config", ".", "displayId", ".", "If", "a", "top", "level", "configuration", "element", "has", "an", "id", "the", "id", "is", "the", "unique", "identifier", ".", "Otherwise", "the", "con...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.rest.handler.config/src/com/ibm/ws/rest/handler/config/internal/ConfigRESTHandler.java#L363-L366
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/TemplatesApi.java
TemplatesApi.listRecipients
public Recipients listRecipients(String accountId, String templateId) throws ApiException { """ Gets recipient information from a template. Retrieves the information for all recipients in the specified template. @param accountId The external account number (int) or account ID Guid. (required) @param templateId ...
java
public Recipients listRecipients(String accountId, String templateId) throws ApiException { return listRecipients(accountId, templateId, null); }
[ "public", "Recipients", "listRecipients", "(", "String", "accountId", ",", "String", "templateId", ")", "throws", "ApiException", "{", "return", "listRecipients", "(", "accountId", ",", "templateId", ",", "null", ")", ";", "}" ]
Gets recipient information from a template. Retrieves the information for all recipients in the specified template. @param accountId The external account number (int) or account ID Guid. (required) @param templateId The ID of the template being accessed. (required) @return Recipients
[ "Gets", "recipient", "information", "from", "a", "template", ".", "Retrieves", "the", "information", "for", "all", "recipients", "in", "the", "specified", "template", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/TemplatesApi.java#L2268-L2270
Grasia/phatsim
phat-env/src/main/java/phat/world/WorldAppState.java
WorldAppState.setCalendar
public void setCalendar(int year, int month, int dayOfMonth, int hour, int minute, int second) { """ It sets the simulation time. @param year @param month @param dayOfMonth @param hour @param minute @param second """ this.year = year; this.month = month; this.dayOfMonth = dayOfM...
java
public void setCalendar(int year, int month, int dayOfMonth, int hour, int minute, int second) { this.year = year; this.month = month; this.dayOfMonth = dayOfMonth; this.hour = hour; this.minute = minute; this.second = second; this.createCalendar(); }
[ "public", "void", "setCalendar", "(", "int", "year", ",", "int", "month", ",", "int", "dayOfMonth", ",", "int", "hour", ",", "int", "minute", ",", "int", "second", ")", "{", "this", ".", "year", "=", "year", ";", "this", ".", "month", "=", "month", ...
It sets the simulation time. @param year @param month @param dayOfMonth @param hour @param minute @param second
[ "It", "sets", "the", "simulation", "time", "." ]
train
https://github.com/Grasia/phatsim/blob/2d4fc8189be9730b34c8e3e1a08fb4800e01c5df/phat-env/src/main/java/phat/world/WorldAppState.java#L368-L376
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java
DatabaseInformationFull.SYSTEM_UDTS
Table SYSTEM_UDTS() { """ Retrieves a <code>Table</code> object describing the accessible user-defined types defined in this database. <p> Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT. <P>Each row is a UDT descripion with the following columns: <OL> <LI><B>TYPE_CAT</B> <code>VARCHAR...
java
Table SYSTEM_UDTS() { Table t = sysTables[SYSTEM_UDTS]; if (t == null) { t = createBlankTable(sysTableHsqlNames[SYSTEM_UDTS]); addColumn(t, "TYPE_CAT", SQL_IDENTIFIER); addColumn(t, "TYPE_SCHEM", SQL_IDENTIFIER); addColumn(t, "TYPE_NAME", SQL_IDENTIFIER...
[ "Table", "SYSTEM_UDTS", "(", ")", "{", "Table", "t", "=", "sysTables", "[", "SYSTEM_UDTS", "]", ";", "if", "(", "t", "==", "null", ")", "{", "t", "=", "createBlankTable", "(", "sysTableHsqlNames", "[", "SYSTEM_UDTS", "]", ")", ";", "addColumn", "(", "t...
Retrieves a <code>Table</code> object describing the accessible user-defined types defined in this database. <p> Schema-specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT. <P>Each row is a UDT descripion with the following columns: <OL> <LI><B>TYPE_CAT</B> <code>VARCHAR</code> => the type's catalog <LI><B>T...
[ "Retrieves", "a", "<code", ">", "Table<", "/", "code", ">", "object", "describing", "the", "accessible", "user", "-", "defined", "types", "defined", "in", "this", "database", ".", "<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/dbinfo/DatabaseInformationFull.java#L1064-L1090
bazaarvoice/emodb
mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/LocationUtil.java
LocationUtil.getHostDiscoveryForLocation
public static HostDiscovery getHostDiscoveryForLocation(URI location, Optional<CuratorFramework> curator, String serviceName, MetricRegistry metricRegistry) { """ Returns the HostDiscovery for a given location. The curator should come from a previous call to {@link #getCuratorForLocation(java.net.URI)} to the sa...
java
public static HostDiscovery getHostDiscoveryForLocation(URI location, Optional<CuratorFramework> curator, String serviceName, MetricRegistry metricRegistry) { checkArgument(getLocationType(location) == LocationType.EMO_HOST_DISCOVERY, "Location does not use host discovery"); Optional<List<String>> hosts...
[ "public", "static", "HostDiscovery", "getHostDiscoveryForLocation", "(", "URI", "location", ",", "Optional", "<", "CuratorFramework", ">", "curator", ",", "String", "serviceName", ",", "MetricRegistry", "metricRegistry", ")", "{", "checkArgument", "(", "getLocationType"...
Returns the HostDiscovery for a given location. The curator should come from a previous call to {@link #getCuratorForLocation(java.net.URI)} to the same location.
[ "Returns", "the", "HostDiscovery", "for", "a", "given", "location", ".", "The", "curator", "should", "come", "from", "a", "previous", "call", "to", "{" ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/LocationUtil.java#L264-L273
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/settings/Factories.java
Factories.newInstance
public static <T> T newInstance(Settings settings, Key<String> key) throws ServiceLocationException { """ Creates a new instance of a class whose full qualified name is specified under the given key. <br /> The class will be loaded using the current context ClassLoader. <br /> If the given settings is null, or...
java
public static <T> T newInstance(Settings settings, Key<String> key) throws ServiceLocationException { // Workaround for compiler bug (#6302954) return Factories.<T>newInstance(settings, key, Thread.currentThread().getContextClassLoader()); }
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "Settings", "settings", ",", "Key", "<", "String", ">", "key", ")", "throws", "ServiceLocationException", "{", "// Workaround for compiler bug (#6302954)", "return", "Factories", ".", "<", "T", ">", "ne...
Creates a new instance of a class whose full qualified name is specified under the given key. <br /> The class will be loaded using the current context ClassLoader. <br /> If the given settings is null, or it does not contain the specified key, the default value of the key is taken from the {@link Defaults defaults}. ...
[ "Creates", "a", "new", "instance", "of", "a", "class", "whose", "full", "qualified", "name", "is", "specified", "under", "the", "given", "key", ".", "<br", "/", ">", "The", "class", "will", "be", "loaded", "using", "the", "current", "context", "ClassLoader...
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/settings/Factories.java#L43-L47
camunda/camunda-commons
logging/src/main/java/org/camunda/commons/logging/BaseLogger.java
BaseLogger.createLogger
public static <T extends BaseLogger> T createLogger(Class<T> loggerClass, String projectCode, String name, String componentId) { """ Creates a new instance of the {@link BaseLogger Logger}. @param loggerClass the type of the logger @param projectCode the unique code for a complete project. @param name the nam...
java
public static <T extends BaseLogger> T createLogger(Class<T> loggerClass, String projectCode, String name, String componentId) { try { T logger = loggerClass.newInstance(); logger.projectCode = projectCode; logger.componentId = componentId; logger.delegateLogger = LoggerFactory.getLogger(nam...
[ "public", "static", "<", "T", "extends", "BaseLogger", ">", "T", "createLogger", "(", "Class", "<", "T", ">", "loggerClass", ",", "String", "projectCode", ",", "String", "name", ",", "String", "componentId", ")", "{", "try", "{", "T", "logger", "=", "log...
Creates a new instance of the {@link BaseLogger Logger}. @param loggerClass the type of the logger @param projectCode the unique code for a complete project. @param name the name of the slf4j logger to use. @param componentId the unique id of the component.
[ "Creates", "a", "new", "instance", "of", "the", "{", "@link", "BaseLogger", "Logger", "}", "." ]
train
https://github.com/camunda/camunda-commons/blob/bd3195db47c92c25717288fe9e6735f8e882f247/logging/src/main/java/org/camunda/commons/logging/BaseLogger.java#L90-L106
Hygieia/Hygieia
collectors/feature/versionone/src/main/java/com/capitalone/dashboard/datafactory/versionone/VersionOneDataFactoryImpl.java
VersionOneDataFactoryImpl.versionOneAuthentication
private V1Connector versionOneAuthentication(Map<String, String> auth) throws HygieiaException { """ Used for establishing connection to VersionOne based on authentication @param auth A key-value pairing of authentication values @return A V1Connector connection instance """ V1Connector connector; ...
java
private V1Connector versionOneAuthentication(Map<String, String> auth) throws HygieiaException { V1Connector connector; try { if (!StringUtils.isEmpty(auth.get("v1ProxyUrl"))) { ProxyProvider proxyProvider = new ProxyProvider(new URI(auth.get("v1ProxyUrl")), "", ...
[ "private", "V1Connector", "versionOneAuthentication", "(", "Map", "<", "String", ",", "String", ">", "auth", ")", "throws", "HygieiaException", "{", "V1Connector", "connector", ";", "try", "{", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "auth", ".", ...
Used for establishing connection to VersionOne based on authentication @param auth A key-value pairing of authentication values @return A V1Connector connection instance
[ "Used", "for", "establishing", "connection", "to", "VersionOne", "based", "on", "authentication" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/versionone/src/main/java/com/capitalone/dashboard/datafactory/versionone/VersionOneDataFactoryImpl.java#L90-L116
kirgor/enklib
sql/src/main/java/com/kirgor/enklib/sql/Session.java
Session.createConnection
private static Connection createConnection(String driver, String url, String user, String password) throws SQLException, ClassNotFoundException { """ Creates {@link Connection} instance from supplied driver, JDBC URL and user credentials. """ Class.forName(driver); return DriverMana...
java
private static Connection createConnection(String driver, String url, String user, String password) throws SQLException, ClassNotFoundException { Class.forName(driver); return DriverManager.getConnection(url, user, password); }
[ "private", "static", "Connection", "createConnection", "(", "String", "driver", ",", "String", "url", ",", "String", "user", ",", "String", "password", ")", "throws", "SQLException", ",", "ClassNotFoundException", "{", "Class", ".", "forName", "(", "driver", ")"...
Creates {@link Connection} instance from supplied driver, JDBC URL and user credentials.
[ "Creates", "{" ]
train
https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Session.java#L213-L217
Azure/azure-sdk-for-java
privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/VirtualNetworkLinksInner.java
VirtualNetworkLinksInner.updateAsync
public Observable<VirtualNetworkLinkInner> updateAsync(String resourceGroupName, String privateZoneName, String virtualNetworkLinkName, VirtualNetworkLinkInner parameters, String ifMatch) { """ Updates a virtual network link to the specified Private DNS zone. @param resourceGroupName The name of the resource gr...
java
public Observable<VirtualNetworkLinkInner> updateAsync(String resourceGroupName, String privateZoneName, String virtualNetworkLinkName, VirtualNetworkLinkInner parameters, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, ifMatch).map...
[ "public", "Observable", "<", "VirtualNetworkLinkInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "privateZoneName", ",", "String", "virtualNetworkLinkName", ",", "VirtualNetworkLinkInner", "parameters", ",", "String", "ifMatch", ")", "{", "...
Updates a virtual network link to the specified Private DNS zone. @param resourceGroupName The name of the resource group. @param privateZoneName The name of the Private DNS zone (without a terminating dot). @param virtualNetworkLinkName The name of the virtual network link. @param parameters Parameters supplied to th...
[ "Updates", "a", "virtual", "network", "link", "to", "the", "specified", "Private", "DNS", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/privatedns/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/privatedns/v2018_09_01/implementation/VirtualNetworkLinksInner.java#L615-L622
micronaut-projects/micronaut-core
discovery-client/src/main/java/io/micronaut/discovery/client/EndpointUtil.java
EndpointUtil.getZoneBasedDiscoveryUrlsFromRegion
private static Map<String, List<String>> getZoneBasedDiscoveryUrlsFromRegion( DiscoveryClientConfiguration discoveryClientConfiguration, String region) { """ Get the zone based CNAMES that are bound to a region. @param discoveryClientConfiguration The discovery client configuration @p...
java
private static Map<String, List<String>> getZoneBasedDiscoveryUrlsFromRegion( DiscoveryClientConfiguration discoveryClientConfiguration, String region) { String discoveryDnsName = null; try { discoveryDnsName = "txt." + region + "." + discoveryClientConfiguration.getH...
[ "private", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "getZoneBasedDiscoveryUrlsFromRegion", "(", "DiscoveryClientConfiguration", "discoveryClientConfiguration", ",", "String", "region", ")", "{", "String", "discoveryDnsName", "=", "null", "...
Get the zone based CNAMES that are bound to a region. @param discoveryClientConfiguration The discovery client configuration @param region The region in use - The region for which the zone names need to be retrieved @return - The list of CNAMES from which the zone-related information can be retrieved
[ "Get", "the", "zone", "based", "CNAMES", "that", "are", "bound", "to", "a", "region", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/client/EndpointUtil.java#L235-L265
wildfly/wildfly-core
embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java
EmbeddedProcessFactory.createStandaloneServer
public static StandaloneServer createStandaloneServer(final Configuration configuration) { """ Create an embedded standalone server with an already established module loader. @param configuration the configuration for the embedded server @return the running embedded server. Will not be {@code null} """ ...
java
public static StandaloneServer createStandaloneServer(final Configuration configuration) { final ChainedContext context = new ChainedContext(); context.add(new StandaloneSystemPropertyContext(configuration.getJBossHome())); context.add(new LoggerContext(configuration.getModuleLoader())); ...
[ "public", "static", "StandaloneServer", "createStandaloneServer", "(", "final", "Configuration", "configuration", ")", "{", "final", "ChainedContext", "context", "=", "new", "ChainedContext", "(", ")", ";", "context", ".", "add", "(", "new", "StandaloneSystemPropertyC...
Create an embedded standalone server with an already established module loader. @param configuration the configuration for the embedded server @return the running embedded server. Will not be {@code null}
[ "Create", "an", "embedded", "standalone", "server", "with", "an", "already", "established", "module", "loader", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java#L148-L192
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/IOUtil.java
IOUtil.copy
public static void copy(InputStream input, OutputStream output) throws IOException { """ Copies the contents from an InputStream to an OutputStream. It is the responsibility of the caller to close the streams passed in when done, though the {@link OutputStream} will be fully flushed. @param input @param outpu...
java
public static void copy(InputStream input, OutputStream output) throws IOException { final byte[] buffer = new byte[4096]; int read = 0; while ((read = input.read(buffer)) != -1) { output.write(buffer, 0, read); } output.flush(); }
[ "public", "static", "void", "copy", "(", "InputStream", "input", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "4096", "]", ";", "int", "read", "=", "0", ";", "while", "(...
Copies the contents from an InputStream to an OutputStream. It is the responsibility of the caller to close the streams passed in when done, though the {@link OutputStream} will be fully flushed. @param input @param output @throws IOException If a problem occurred during any I/O operations
[ "Copies", "the", "contents", "from", "an", "InputStream", "to", "an", "OutputStream", ".", "It", "is", "the", "responsibility", "of", "the", "caller", "to", "close", "the", "streams", "passed", "in", "when", "done", "though", "the", "{", "@link", "OutputStre...
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/IOUtil.java#L135-L143
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java
ListManagementImagesImpl.addImageAsync
public Observable<Image> addImageAsync(String listId, AddImageOptionalParameter addImageOptionalParameter) { """ Add an image to the list with list Id equal to list Id passed. @param listId List Id of the image list. @param addImageOptionalParameter the object representing the optional parameters to be set bef...
java
public Observable<Image> addImageAsync(String listId, AddImageOptionalParameter addImageOptionalParameter) { return addImageWithServiceResponseAsync(listId, addImageOptionalParameter).map(new Func1<ServiceResponse<Image>, Image>() { @Override public Image call(ServiceResponse<Image> resp...
[ "public", "Observable", "<", "Image", ">", "addImageAsync", "(", "String", "listId", ",", "AddImageOptionalParameter", "addImageOptionalParameter", ")", "{", "return", "addImageWithServiceResponseAsync", "(", "listId", ",", "addImageOptionalParameter", ")", ".", "map", ...
Add an image to the list with list Id equal to list Id passed. @param listId List Id of the image list. @param addImageOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to ...
[ "Add", "an", "image", "to", "the", "list", "with", "list", "Id", "equal", "to", "list", "Id", "passed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java#L130-L137
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/openal/AudioLoader.java
AudioLoader.getStreamingAudio
public static Audio getStreamingAudio(String format, URL url) throws IOException { """ Get audio data in a playable state by setting up a stream that can be piped into OpenAL - i.e. streaming audio @param format The format of the audio to be loaded (something like "XM" or "OGG") @param url The location of the...
java
public static Audio getStreamingAudio(String format, URL url) throws IOException { init(); if (format.equals(OGG)) { return SoundStore.get().getOggStream(url); } if (format.equals(MOD)) { return SoundStore.get().getMOD(url.openStream()); } if (format.equals(XM)) { return SoundStore.get...
[ "public", "static", "Audio", "getStreamingAudio", "(", "String", "format", ",", "URL", "url", ")", "throws", "IOException", "{", "init", "(", ")", ";", "if", "(", "format", ".", "equals", "(", "OGG", ")", ")", "{", "return", "SoundStore", ".", "get", "...
Get audio data in a playable state by setting up a stream that can be piped into OpenAL - i.e. streaming audio @param format The format of the audio to be loaded (something like "XM" or "OGG") @param url The location of the data that should be streamed @return An object representing the audio data @throws IOException ...
[ "Get", "audio", "data", "in", "a", "playable", "state", "by", "setting", "up", "a", "stream", "that", "can", "be", "piped", "into", "OpenAL", "-", "i", ".", "e", ".", "streaming", "audio" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/openal/AudioLoader.java#L72-L86
facebookarchive/hadoop-20
src/tools/org/apache/hadoop/tools/Logalyzer.java
Logalyzer.doArchive
public void doArchive(String logListURI, String archiveDirectory) throws IOException { """ doArchive: Workhorse function to archive log-files. @param logListURI : The uri which will serve list of log-files to archive. @param archiveDirectory : The directory to store archived logfiles. @throws IOExcepti...
java
public void doArchive(String logListURI, String archiveDirectory) throws IOException { String destURL = FileSystem.getDefaultUri(fsConfig) + archiveDirectory; DistCp.copy(new JobConf(fsConfig), logListURI, destURL, null, true, false); }
[ "public", "void", "doArchive", "(", "String", "logListURI", ",", "String", "archiveDirectory", ")", "throws", "IOException", "{", "String", "destURL", "=", "FileSystem", ".", "getDefaultUri", "(", "fsConfig", ")", "+", "archiveDirectory", ";", "DistCp", ".", "co...
doArchive: Workhorse function to archive log-files. @param logListURI : The uri which will serve list of log-files to archive. @param archiveDirectory : The directory to store archived logfiles. @throws IOException
[ "doArchive", ":", "Workhorse", "function", "to", "archive", "log", "-", "files", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/tools/org/apache/hadoop/tools/Logalyzer.java#L181-L187
OpenLiberty/open-liberty
dev/com.ibm.ws.webserver.plugin.utility/src/com/ibm/ws/webserver/plugin/utility/utils/CommonMBeanConnection.java
CommonMBeanConnection.getMBeanServerConnection
private JMXConnector getMBeanServerConnection(String controllerHost, int controllerPort, HashMap<String, Object> environment) throws MalformedURLException, IOException { """ Get the MBeanServerConnection for the target controller host and port. @param controllerHost @param controllerPort @param environment @...
java
private JMXConnector getMBeanServerConnection(String controllerHost, int controllerPort, HashMap<String, Object> environment) throws MalformedURLException, IOException { JMXServiceURL serviceURL = new JMXServiceURL("REST", controllerHost, controllerPort, "/IBMJMXConnectorREST"); return new ClientProvide...
[ "private", "JMXConnector", "getMBeanServerConnection", "(", "String", "controllerHost", ",", "int", "controllerPort", ",", "HashMap", "<", "String", ",", "Object", ">", "environment", ")", "throws", "MalformedURLException", ",", "IOException", "{", "JMXServiceURL", "s...
Get the MBeanServerConnection for the target controller host and port. @param controllerHost @param controllerPort @param environment @return @throws MalformedURLException @throws IOException
[ "Get", "the", "MBeanServerConnection", "for", "the", "target", "controller", "host", "and", "port", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webserver.plugin.utility/src/com/ibm/ws/webserver/plugin/utility/utils/CommonMBeanConnection.java#L114-L117
facebookarchive/hadoop-20
src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/HadoopLogParser.java
HadoopLogParser.parseDate
protected Calendar parseDate(String strDate, String strTime) { """ Parse a date found in the Hadoop log. @return a Calendar representing the date """ Calendar retval = Calendar.getInstance(); // set date String[] fields = strDate.split("-"); retval.set(Calendar.YEAR, Integer.parseInt(fields[...
java
protected Calendar parseDate(String strDate, String strTime) { Calendar retval = Calendar.getInstance(); // set date String[] fields = strDate.split("-"); retval.set(Calendar.YEAR, Integer.parseInt(fields[0])); retval.set(Calendar.MONTH, Integer.parseInt(fields[1])); retval.set(Calendar.DATE, In...
[ "protected", "Calendar", "parseDate", "(", "String", "strDate", ",", "String", "strTime", ")", "{", "Calendar", "retval", "=", "Calendar", ".", "getInstance", "(", ")", ";", "// set date", "String", "[", "]", "fields", "=", "strDate", ".", "split", "(", "\...
Parse a date found in the Hadoop log. @return a Calendar representing the date
[ "Parse", "a", "date", "found", "in", "the", "Hadoop", "log", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/HadoopLogParser.java#L94-L107
trustathsh/ironcommon
src/main/java/de/hshannover/f4/trust/ironcommon/properties/Properties.java
Properties.addToRootMap
@SuppressWarnings("unchecked") private void addToRootMap(String propertyPath, Object propertyValue) throws PropertyException { """ Adds a given value object to the properties {@link Map} corresponding to the configuration file, creates deeper nested maps if necessary. @param propertyPath a property path w...
java
@SuppressWarnings("unchecked") private void addToRootMap(String propertyPath, Object propertyValue) throws PropertyException { // split propertyPath String[] propertyKeyArray = propertyPath.split("\\."); // load configMap from disk Map<String, Object> configMap = load(); // if simple token add too root ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "addToRootMap", "(", "String", "propertyPath", ",", "Object", "propertyValue", ")", "throws", "PropertyException", "{", "// split propertyPath", "String", "[", "]", "propertyKeyArray", "=", "proper...
Adds a given value object to the properties {@link Map} corresponding to the configuration file, creates deeper nested maps if necessary. @param propertyPath a property path where the value will be stored at @param propertyValue the value to be added to the root map @throws PropertyException If the propertyKey-Path is...
[ "Adds", "a", "given", "value", "object", "to", "the", "properties", "{", "@link", "Map", "}", "corresponding", "to", "the", "configuration", "file", "creates", "deeper", "nested", "maps", "if", "necessary", "." ]
train
https://github.com/trustathsh/ironcommon/blob/fee589a9300ab16744ca12fafae4357dd18c9fcb/src/main/java/de/hshannover/f4/trust/ironcommon/properties/Properties.java#L412-L457
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps_network_config.java
mps_network_config.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ mps_network_config_responses result = (mps_network_config_responses) se...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { mps_network_config_responses result = (mps_network_config_responses) service.get_payload_formatter().string_to_resource(mps_network_config_responses.class, response); if(result.errorcode != 0) { i...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "mps_network_config_responses", "result", "=", "(", "mps_network_config_responses", ")", "service", ".", "get_...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps_network_config.java#L245-L262
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedSecretAsync
public ServiceFuture<DeletedSecretBundle> getDeletedSecretAsync(String vaultBaseUrl, String secretName, final ServiceCallback<DeletedSecretBundle> serviceCallback) { """ Gets the specified deleted secret. The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operati...
java
public ServiceFuture<DeletedSecretBundle> getDeletedSecretAsync(String vaultBaseUrl, String secretName, final ServiceCallback<DeletedSecretBundle> serviceCallback) { return ServiceFuture.fromResponse(getDeletedSecretWithServiceResponseAsync(vaultBaseUrl, secretName), serviceCallback); }
[ "public", "ServiceFuture", "<", "DeletedSecretBundle", ">", "getDeletedSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ",", "final", "ServiceCallback", "<", "DeletedSecretBundle", ">", "serviceCallback", ")", "{", "return", "ServiceFuture", "."...
Gets the specified deleted secret. The Get Deleted Secret operation returns the specified deleted secret along with its attributes. This operation requires the secrets/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param secretName The name of the secret. @param servi...
[ "Gets", "the", "specified", "deleted", "secret", ".", "The", "Get", "Deleted", "Secret", "operation", "returns", "the", "specified", "deleted", "secret", "along", "with", "its", "attributes", ".", "This", "operation", "requires", "the", "secrets", "/", "get", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L4657-L4659
DiUS/pact-jvm
pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithPath.java
PactDslRequestWithPath.matchPath
public PactDslRequestWithPath matchPath(String pathRegex, String path) { """ The path of the request @param path string path to use when generating requests @param pathRegex regular expression to use to match paths """ requestMatchers.addCategory("path").addRule(new RegexMatcher(pathRegex)); ...
java
public PactDslRequestWithPath matchPath(String pathRegex, String path) { requestMatchers.addCategory("path").addRule(new RegexMatcher(pathRegex)); this.path = path; return this; }
[ "public", "PactDslRequestWithPath", "matchPath", "(", "String", "pathRegex", ",", "String", "path", ")", "{", "requestMatchers", ".", "addCategory", "(", "\"path\"", ")", ".", "addRule", "(", "new", "RegexMatcher", "(", "pathRegex", ")", ")", ";", "this", ".",...
The path of the request @param path string path to use when generating requests @param pathRegex regular expression to use to match paths
[ "The", "path", "of", "the", "request" ]
train
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslRequestWithPath.java#L323-L327
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java
BigComplex.valueOfPolar
public static BigComplex valueOfPolar(BigDecimal radius, BigDecimal angle, MathContext mathContext) { """ Returns a complex number with the specified polar {@link BigDecimal} radius and angle using the specified {@link MathContext}. @param radius the {@link BigDecimal} radius of the polar representation @param...
java
public static BigComplex valueOfPolar(BigDecimal radius, BigDecimal angle, MathContext mathContext) { if (radius.signum() == 0) { return ZERO; } return valueOf( radius.multiply(BigDecimalMath.cos(angle, mathContext), mathContext), radius.multiply(BigDecimalMath.sin(angle, mathContext), mathContext)); ...
[ "public", "static", "BigComplex", "valueOfPolar", "(", "BigDecimal", "radius", ",", "BigDecimal", "angle", ",", "MathContext", "mathContext", ")", "{", "if", "(", "radius", ".", "signum", "(", ")", "==", "0", ")", "{", "return", "ZERO", ";", "}", "return",...
Returns a complex number with the specified polar {@link BigDecimal} radius and angle using the specified {@link MathContext}. @param radius the {@link BigDecimal} radius of the polar representation @param angle the {@link BigDecimal} angle in radians of the polar representation @param mathContext the {@link MathConte...
[ "Returns", "a", "complex", "number", "with", "the", "specified", "polar", "{", "@link", "BigDecimal", "}", "radius", "and", "angle", "using", "the", "specified", "{", "@link", "MathContext", "}", "." ]
train
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigComplex.java#L543-L551
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javadoc/SerializedForm.java
SerializedForm.addMethodIfExist
private void addMethodIfExist(DocEnv env, ClassSymbol def, String methodName) { """ /* Catalog Serializable method if it exists in current ClassSymbol. Do not look for method in superclasses. Serialization requires these methods to be non-static. @param method should be an unqualified Serializable method ...
java
private void addMethodIfExist(DocEnv env, ClassSymbol def, String methodName) { Names names = def.name.table.names; for (Scope.Entry e = def.members().lookup(names.fromString(methodName)); e.scope != null; e = e.next()) { if (e.sym.kind == Kinds.MTH) { MethodSymbol md = (Met...
[ "private", "void", "addMethodIfExist", "(", "DocEnv", "env", ",", "ClassSymbol", "def", ",", "String", "methodName", ")", "{", "Names", "names", "=", "def", ".", "name", ".", "table", ".", "names", ";", "for", "(", "Scope", ".", "Entry", "e", "=", "def...
/* Catalog Serializable method if it exists in current ClassSymbol. Do not look for method in superclasses. Serialization requires these methods to be non-static. @param method should be an unqualified Serializable method name either READOBJECT, WRITEOBJECT, READRESOLVE or WRITEREPLACE. @param visibility the visibili...
[ "/", "*", "Catalog", "Serializable", "method", "if", "it", "exists", "in", "current", "ClassSymbol", ".", "Do", "not", "look", "for", "method", "in", "superclasses", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/SerializedForm.java#L209-L226
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.pauseSession
public PauseSessionResponse pauseSession(PauseSessionRequest request) { """ Pause your live session by live session id. @param request The request object containing all parameters for pausing live session. @return the response """ checkNotNull(request, "The parameter request should NOT be null."); ...
java
public PauseSessionResponse pauseSession(PauseSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createRequest(...
[ "public", "PauseSessionResponse", "pauseSession", "(", "PauseSessionRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getSessionId", "(", ")", ",", ...
Pause your live session by live session id. @param request The request object containing all parameters for pausing live session. @return the response
[ "Pause", "your", "live", "session", "by", "live", "session", "id", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L771-L778
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/watcher/ResourceWatcher.java
ResourceWatcher.registerPathMapping
private void registerPathMapping(PathMapping pathMapping, String filePath) throws IOException { """ Register the path mapping @param pathMapping the path mapping @param filePath the file path @throws IOException if an IOException occurs """ if (filePath != null) { Path p = Paths.get(filePath); ...
java
private void registerPathMapping(PathMapping pathMapping, String filePath) throws IOException { if (filePath != null) { Path p = Paths.get(filePath); boolean isDir = Files.isDirectory(p); if (!isDir) { p = p.getParent(); } if (pathMapping.isRecursive()) { registerAll(p, Arrays.asList(pathMapp...
[ "private", "void", "registerPathMapping", "(", "PathMapping", "pathMapping", ",", "String", "filePath", ")", "throws", "IOException", "{", "if", "(", "filePath", "!=", "null", ")", "{", "Path", "p", "=", "Paths", ".", "get", "(", "filePath", ")", ";", "boo...
Register the path mapping @param pathMapping the path mapping @param filePath the file path @throws IOException if an IOException occurs
[ "Register", "the", "path", "mapping" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/watcher/ResourceWatcher.java#L232-L247
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
AuthenticationAPIClient.loginWithEmail
@SuppressWarnings("WeakerAccess") public AuthenticationRequest loginWithEmail(@NonNull String email, @NonNull String verificationCode) { """ Log in a user using an email and a verification code received via Email (Part of passwordless login flow) By default it will try to authenticate using the "email" connec...
java
@SuppressWarnings("WeakerAccess") public AuthenticationRequest loginWithEmail(@NonNull String email, @NonNull String verificationCode) { return loginWithEmail(email, verificationCode, EMAIL_CONNECTION); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "AuthenticationRequest", "loginWithEmail", "(", "@", "NonNull", "String", "email", ",", "@", "NonNull", "String", "verificationCode", ")", "{", "return", "loginWithEmail", "(", "email", ",", "verificat...
Log in a user using an email and a verification code received via Email (Part of passwordless login flow) By default it will try to authenticate using the "email" connection. Example usage: <pre> {@code client.loginWithEmail("{email}", "{code}") .start(new BaseCallback<Credentials>() { {@literal}Override public void on...
[ "Log", "in", "a", "user", "using", "an", "email", "and", "a", "verification", "code", "received", "via", "Email", "(", "Part", "of", "passwordless", "login", "flow", ")", "By", "default", "it", "will", "try", "to", "authenticate", "using", "the", "email", ...
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java#L434-L437
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.post_requestEx
private base_resource post_requestEx(nitro_service service, options option) throws Exception { """ Use this method to perform a POST operation on netscaler resource. @param service nitro_service object. @param option Options class object. @return requested resource. @throws Exception if invalid input is given...
java
private base_resource post_requestEx(nitro_service service, options option) throws Exception { String sessionid = service.get_sessionid(); String request = resource_to_string(service, sessionid, option); return post_dataEx(service, request); }
[ "private", "base_resource", "post_requestEx", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "String", "sessionid", "=", "service", ".", "get_sessionid", "(", ")", ";", "String", "request", "=", "resource_to_string", "(...
Use this method to perform a POST operation on netscaler resource. @param service nitro_service object. @param option Options class object. @return requested resource. @throws Exception if invalid input is given.
[ "Use", "this", "method", "to", "perform", "a", "POST", "operation", "on", "netscaler", "resource", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L108-L113
OpenTSDB/opentsdb
src/tsd/HttpSerializer.java
HttpSerializer.formatVersionV1
public ChannelBuffer formatVersionV1(final Map<String, String> version) { """ Format a hash map of information about the OpenTSDB version @param version A hash map with version information @return A ChannelBuffer object to pass on to the caller @throws BadRequestException if the plugin has not implemented this ...
java
public ChannelBuffer formatVersionV1(final Map<String, String> version) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, "The requested API endpoint has not been implemented", this.getClass().getCanonicalName() + " has not implemented formatVersionV1"); }
[ "public", "ChannelBuffer", "formatVersionV1", "(", "final", "Map", "<", "String", ",", "String", ">", "version", ")", "{", "throw", "new", "BadRequestException", "(", "HttpResponseStatus", ".", "NOT_IMPLEMENTED", ",", "\"The requested API endpoint has not been implemented...
Format a hash map of information about the OpenTSDB version @param version A hash map with version information @return A ChannelBuffer object to pass on to the caller @throws BadRequestException if the plugin has not implemented this method
[ "Format", "a", "hash", "map", "of", "information", "about", "the", "OpenTSDB", "version" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpSerializer.java#L443-L448
qos-ch/slf4j
jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLog.java
SLF4JLog.trace
public void trace(Object message, Throwable t) { """ Converts the first input parameter to String and then delegates to the debug method of the wrapped <code>org.slf4j.Logger</code> instance. @param message the message to log. Converted to {@link String} @param t the exception to log """ logger....
java
public void trace(Object message, Throwable t) { logger.trace(String.valueOf(message), t); }
[ "public", "void", "trace", "(", "Object", "message", ",", "Throwable", "t", ")", "{", "logger", ".", "trace", "(", "String", ".", "valueOf", "(", "message", ")", ",", "t", ")", ";", "}" ]
Converts the first input parameter to String and then delegates to the debug method of the wrapped <code>org.slf4j.Logger</code> instance. @param message the message to log. Converted to {@link String} @param t the exception to log
[ "Converts", "the", "first", "input", "parameter", "to", "String", "and", "then", "delegates", "to", "the", "debug", "method", "of", "the", "wrapped", "<code", ">", "org", ".", "slf4j", ".", "Logger<", "/", "code", ">", "instance", "." ]
train
https://github.com/qos-ch/slf4j/blob/905443f39fadd88a8dd2c467e44affd8cb072a4d/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLog.java#L116-L118
aboutsip/pkts
pkts-sip/src/main/java/io/pkts/packet/sip/impl/SipParser.java
SipParser.expectDigit
public static Buffer expectDigit(final Buffer buffer) throws SipParseException { """ Will expect at least 1 digit and will continue consuming bytes until a non-digit is encountered @param buffer the buffer to consume the digits from @return the buffer containing digits only @throws SipParseException in cas...
java
public static Buffer expectDigit(final Buffer buffer) throws SipParseException { final int start = buffer.getReaderIndex(); try { while (buffer.hasReadableBytes() && isNextDigit(buffer)) { // consume it buffer.readByte(); } if (start ...
[ "public", "static", "Buffer", "expectDigit", "(", "final", "Buffer", "buffer", ")", "throws", "SipParseException", "{", "final", "int", "start", "=", "buffer", ".", "getReaderIndex", "(", ")", ";", "try", "{", "while", "(", "buffer", ".", "hasReadableBytes", ...
Will expect at least 1 digit and will continue consuming bytes until a non-digit is encountered @param buffer the buffer to consume the digits from @return the buffer containing digits only @throws SipParseException in case there is not one digit at the first position in the buffer (where the current reader index is p...
[ "Will", "expect", "at", "least", "1", "digit", "and", "will", "continue", "consuming", "bytes", "until", "a", "non", "-", "digit", "is", "encountered" ]
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-sip/src/main/java/io/pkts/packet/sip/impl/SipParser.java#L552-L571
vkostyukov/la4j
src/main/java/org/la4j/Vectors.java
Vectors.asProductFunctionAccumulator
public static VectorAccumulator asProductFunctionAccumulator(final double neutral, final VectorFunction function) { """ Creates a product function accumulator, that calculates the product of all elements in the vector after applying given {@code fun...
java
public static VectorAccumulator asProductFunctionAccumulator(final double neutral, final VectorFunction function) { return new VectorAccumulator() { private final VectorAccumulator productAccumulator = Vectors.asProductAccumulator(neut...
[ "public", "static", "VectorAccumulator", "asProductFunctionAccumulator", "(", "final", "double", "neutral", ",", "final", "VectorFunction", "function", ")", "{", "return", "new", "VectorAccumulator", "(", ")", "{", "private", "final", "VectorAccumulator", "productAccumu...
Creates a product function accumulator, that calculates the product of all elements in the vector after applying given {@code function} to each of them. @param neutral the neutral value @param function the vector function @return a product function accumulator
[ "Creates", "a", "product", "function", "accumulator", "that", "calculates", "the", "product", "of", "all", "elements", "in", "the", "vector", "after", "applying", "given", "{", "@code", "function", "}", "to", "each", "of", "them", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Vectors.java#L431-L446
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/cql/CqlFilterTransformation.java
CqlFilterTransformation.transform
public Boolean transform(T input) throws TransformationException { """ Checks whether the given input object passes the cql filter. @param input The object to evaluate @return True if the given object passes the cql filter, false otherwise. """ try { return cqlFilter.evalu...
java
public Boolean transform(T input) throws TransformationException { try { return cqlFilter.evaluate(input); } catch (ParseException e) { throw new TransformationException(e, input); } }
[ "public", "Boolean", "transform", "(", "T", "input", ")", "throws", "TransformationException", "{", "try", "{", "return", "cqlFilter", ".", "evaluate", "(", "input", ")", ";", "}", "catch", "(", "ParseException", "e", ")", "{", "throw", "new", "Transformatio...
Checks whether the given input object passes the cql filter. @param input The object to evaluate @return True if the given object passes the cql filter, false otherwise.
[ "Checks", "whether", "the", "given", "input", "object", "passes", "the", "cql", "filter", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/cql/CqlFilterTransformation.java#L62-L73
lukas-krecan/JsonUnit
json-unit/src/main/java/net/javacrumbs/jsonunit/JsonAssert.java
JsonAssert.assertJsonPartStructureEquals
@Deprecated public static void assertJsonPartStructureEquals(Object expected, Object fullJson, String path) { """ Compares structure of part of the JSON. Path has this format "root.array[0].value". Is too lenient, ignores types, prefer IGNORING_VALUES option instead. @deprecated Use IGNORING_VALUES option ...
java
@Deprecated public static void assertJsonPartStructureEquals(Object expected, Object fullJson, String path) { Diff diff = create(expected, fullJson, FULL_JSON, path, configuration.withOptions(COMPARING_ONLY_STRUCTURE)); diff.failIfDifferent(); }
[ "@", "Deprecated", "public", "static", "void", "assertJsonPartStructureEquals", "(", "Object", "expected", ",", "Object", "fullJson", ",", "String", "path", ")", "{", "Diff", "diff", "=", "create", "(", "expected", ",", "fullJson", ",", "FULL_JSON", ",", "path...
Compares structure of part of the JSON. Path has this format "root.array[0].value". Is too lenient, ignores types, prefer IGNORING_VALUES option instead. @deprecated Use IGNORING_VALUES option instead
[ "Compares", "structure", "of", "part", "of", "the", "JSON", ".", "Path", "has", "this", "format", "root", ".", "array", "[", "0", "]", ".", "value", ".", "Is", "too", "lenient", "ignores", "types", "prefer", "IGNORING_VALUES", "option", "instead", "." ]
train
https://github.com/lukas-krecan/JsonUnit/blob/2b12ed792e8dd787bddd6f3b8eb2325737435791/json-unit/src/main/java/net/javacrumbs/jsonunit/JsonAssert.java#L140-L144
bazaarvoice/emodb
common/stash/src/main/java/com/bazaarvoice/emodb/common/stash/StashReader.java
StashReader.getTableMetadata
public StashTableMetadata getTableMetadata(String table) throws StashNotAvailableException, TableNotStashedException { """ Gets the metadata for a single table in this stash. This is similar to getting the splits for the table except that it exposes lower level information about the underlying S3 fil...
java
public StashTableMetadata getTableMetadata(String table) throws StashNotAvailableException, TableNotStashedException { ImmutableList.Builder<StashFileMetadata> filesBuilder = ImmutableList.builder(); Iterator<S3ObjectSummary> objectSummaries = getS3ObjectSummariesForTable(table); wh...
[ "public", "StashTableMetadata", "getTableMetadata", "(", "String", "table", ")", "throws", "StashNotAvailableException", ",", "TableNotStashedException", "{", "ImmutableList", ".", "Builder", "<", "StashFileMetadata", ">", "filesBuilder", "=", "ImmutableList", ".", "build...
Gets the metadata for a single table in this stash. This is similar to getting the splits for the table except that it exposes lower level information about the underlying S3 files. For clients who will use their own system for reading the files from S3, such as source files for a map-reduce job, this method provides...
[ "Gets", "the", "metadata", "for", "a", "single", "table", "in", "this", "stash", ".", "This", "is", "similar", "to", "getting", "the", "splits", "for", "the", "table", "except", "that", "it", "exposes", "lower", "level", "information", "about", "the", "und...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/stash/src/main/java/com/bazaarvoice/emodb/common/stash/StashReader.java#L280-L297
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/HttpClientRequestActionBuilder.java
HttpClientRequestActionBuilder.queryParam
public HttpClientRequestActionBuilder queryParam(String name, String value) { """ Adds a query param to the request uri. @param name @param value @return """ httpMessage.queryParam(name, value); return this; }
java
public HttpClientRequestActionBuilder queryParam(String name, String value) { httpMessage.queryParam(name, value); return this; }
[ "public", "HttpClientRequestActionBuilder", "queryParam", "(", "String", "name", ",", "String", "value", ")", "{", "httpMessage", ".", "queryParam", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a query param to the request uri. @param name @param value @return
[ "Adds", "a", "query", "param", "to", "the", "request", "uri", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/HttpClientRequestActionBuilder.java#L144-L147
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/mapping/Mapper.java
Mapper.toDBObject
public DBObject toDBObject(final Object entity, final Map<Object, DBObject> involvedObjects) { """ Converts an entity (POJO) to a DBObject. A special field will be added to keep track of the class type. @param entity The POJO @param involvedObjects A Map of (already converted) POJOs @return the DBOb...
java
public DBObject toDBObject(final Object entity, final Map<Object, DBObject> involvedObjects) { return toDBObject(entity, involvedObjects, true); }
[ "public", "DBObject", "toDBObject", "(", "final", "Object", "entity", ",", "final", "Map", "<", "Object", ",", "DBObject", ">", "involvedObjects", ")", "{", "return", "toDBObject", "(", "entity", ",", "involvedObjects", ",", "true", ")", ";", "}" ]
Converts an entity (POJO) to a DBObject. A special field will be added to keep track of the class type. @param entity The POJO @param involvedObjects A Map of (already converted) POJOs @return the DBObject
[ "Converts", "an", "entity", "(", "POJO", ")", "to", "a", "DBObject", ".", "A", "special", "field", "will", "be", "added", "to", "keep", "track", "of", "the", "class", "type", "." ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/mapping/Mapper.java#L622-L624
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/loader/PersistenceXMLLoader.java
PersistenceXMLLoader.parseDocument
private static Document parseDocument(final InputStream is) throws InvalidConfigurationException { """ Reads the content of the persistence.xml file into an object model, with the root node of type {@link Document}. @param is {@link InputStream} of the persistence.xml content @return root node of the parsed ...
java
private static Document parseDocument(final InputStream is) throws InvalidConfigurationException { Document persistenceXmlDoc; final List parsingErrors = new ArrayList(); final InputSource source = new InputSource(is); final DocumentBuilderFactory docBuilderFactory = DocumentBui...
[ "private", "static", "Document", "parseDocument", "(", "final", "InputStream", "is", ")", "throws", "InvalidConfigurationException", "{", "Document", "persistenceXmlDoc", ";", "final", "List", "parsingErrors", "=", "new", "ArrayList", "(", ")", ";", "final", "InputS...
Reads the content of the persistence.xml file into an object model, with the root node of type {@link Document}. @param is {@link InputStream} of the persistence.xml content @return root node of the parsed xml content @throws InvalidConfigurationException if the content could not be read due to an I/O error or could n...
[ "Reads", "the", "content", "of", "the", "persistence", ".", "xml", "file", "into", "an", "object", "model", "with", "the", "root", "node", "of", "type", "{", "@link", "Document", "}", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/loader/PersistenceXMLLoader.java#L139-L173
lightblueseas/swing-components
src/main/java/de/alpharogroup/swing/base/ApplicationFrame.java
ApplicationFrame.replaceInternalFrame
public void replaceInternalFrame(final String title, final Component component) { """ Replace the current internal frame with a new internal frame with the given {@link Component} as content. @param title the title @param component the component """ if (getCurrentVisibleInternalFrame() != null) { ...
java
public void replaceInternalFrame(final String title, final Component component) { if (getCurrentVisibleInternalFrame() != null) { getCurrentVisibleInternalFrame().dispose(); } // create internal frame final JInternalFrame internalFrame = JComponentFactory.newInternalFrame(title, true, true, true, true)...
[ "public", "void", "replaceInternalFrame", "(", "final", "String", "title", ",", "final", "Component", "component", ")", "{", "if", "(", "getCurrentVisibleInternalFrame", "(", ")", "!=", "null", ")", "{", "getCurrentVisibleInternalFrame", "(", ")", ".", "dispose", ...
Replace the current internal frame with a new internal frame with the given {@link Component} as content. @param title the title @param component the component
[ "Replace", "the", "current", "internal", "frame", "with", "a", "new", "internal", "frame", "with", "the", "given", "{", "@link", "Component", "}", "as", "content", "." ]
train
https://github.com/lightblueseas/swing-components/blob/4045e85cabd8f0ce985cbfff134c3c9873930c79/src/main/java/de/alpharogroup/swing/base/ApplicationFrame.java#L97-L109
to2mbn/JMCCC
jmccc/src/main/java/org/to2mbn/jmccc/internal/org/json/JSONObject.java
JSONObject.optBigInteger
public BigInteger optBigInteger(String key, BigInteger defaultValue) { """ Get an optional BigInteger associated with a key, or the defaultValue if there is no such key or if its value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. @param key A key string. @par...
java
public BigInteger optBigInteger(String key, BigInteger defaultValue) { try { return this.getBigInteger(key); } catch (Exception e) { return defaultValue; } }
[ "public", "BigInteger", "optBigInteger", "(", "String", "key", ",", "BigInteger", "defaultValue", ")", "{", "try", "{", "return", "this", ".", "getBigInteger", "(", "key", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "defaultValue", "...
Get an optional BigInteger associated with a key, or the defaultValue if there is no such key or if its value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. @param key A key string. @param defaultValue The default. @return An object which is the value.
[ "Get", "an", "optional", "BigInteger", "associated", "with", "a", "key", "or", "the", "defaultValue", "if", "there", "is", "no", "such", "key", "or", "if", "its", "value", "is", "not", "a", "number", ".", "If", "the", "value", "is", "a", "string", "an"...
train
https://github.com/to2mbn/JMCCC/blob/17e5b1b56ff18255cfd60976dca1a24598946647/jmccc/src/main/java/org/to2mbn/jmccc/internal/org/json/JSONObject.java#L846-L852
dita-ot/dita-ot
src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java
EclipseIndexWriter.getIndexFileName
@Override public String getIndexFileName(final String outputFileRoot) { """ Get index file name. @param outputFileRoot root path @return index file name """ final File indexDir = new File(outputFileRoot).getParentFile(); setFilePath(indexDir.getAbsolutePath()); return new File(ind...
java
@Override public String getIndexFileName(final String outputFileRoot) { final File indexDir = new File(outputFileRoot).getParentFile(); setFilePath(indexDir.getAbsolutePath()); return new File(indexDir, "index.xml").getAbsolutePath(); }
[ "@", "Override", "public", "String", "getIndexFileName", "(", "final", "String", "outputFileRoot", ")", "{", "final", "File", "indexDir", "=", "new", "File", "(", "outputFileRoot", ")", ".", "getParentFile", "(", ")", ";", "setFilePath", "(", "indexDir", ".", ...
Get index file name. @param outputFileRoot root path @return index file name
[ "Get", "index", "file", "name", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java#L162-L167
googleapis/google-cloud-java
google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient.java
WebSecurityScannerClient.listFindings
public final ListFindingsPagedResponse listFindings(String parent, String filter) { """ List Findings under a given ScanRun. <p>Sample code: <pre><code> try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) { ScanRunName parent = ScanRunName.of("[PROJECT]", "[SCAN_CONF...
java
public final ListFindingsPagedResponse listFindings(String parent, String filter) { ListFindingsRequest request = ListFindingsRequest.newBuilder().setParent(parent).setFilter(filter).build(); return listFindings(request); }
[ "public", "final", "ListFindingsPagedResponse", "listFindings", "(", "String", "parent", ",", "String", "filter", ")", "{", "ListFindingsRequest", "request", "=", "ListFindingsRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "setFi...
List Findings under a given ScanRun. <p>Sample code: <pre><code> try (WebSecurityScannerClient webSecurityScannerClient = WebSecurityScannerClient.create()) { ScanRunName parent = ScanRunName.of("[PROJECT]", "[SCAN_CONFIG]", "[SCAN_RUN]"); String filter = ""; for (Finding element : webSecurityScannerClient.listFindin...
[ "List", "Findings", "under", "a", "given", "ScanRun", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient.java#L1352-L1356
greese/dasein-util
src/main/java/org/dasein/util/BrowseIterator.java
BrowseIterator.setup
private void setup(Collection<T> items, int ps, Comparator<T> sort) { """ Sets the collection up using the specified parameters. @param items the items in the iterator @param ps the page size for the structure @param sort the sorter, if any, to use for sorting """ Collection<T> list; Iterator<T> it; ...
java
private void setup(Collection<T> items, int ps, Comparator<T> sort) { Collection<T> list; Iterator<T> it; if( sort == null ) { list = items; } else { list = new TreeSet<T>(sort); list.addAll(items); } sorter = sort; pageSize = ps; pages = new ArrayList<Collection<T>>(); it = list....
[ "private", "void", "setup", "(", "Collection", "<", "T", ">", "items", ",", "int", "ps", ",", "Comparator", "<", "T", ">", "sort", ")", "{", "Collection", "<", "T", ">", "list", ";", "Iterator", "<", "T", ">", "it", ";", "if", "(", "sort", "==", ...
Sets the collection up using the specified parameters. @param items the items in the iterator @param ps the page size for the structure @param sort the sorter, if any, to use for sorting
[ "Sets", "the", "collection", "up", "using", "the", "specified", "parameters", "." ]
train
https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/util/BrowseIterator.java#L401-L430
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/connection/ConnectionDecoratorFactory.java
ConnectionDecoratorFactory.proxyConnection
@Override protected Connection proxyConnection(Connection target, ConnectionCallback callback) { """ Create a {@link ConnectionDecorator} delegate to the actual target {@link Connection} @param target connection to proxy @param callback attaching connection lifecycle listener @return {@link Connection} ...
java
@Override protected Connection proxyConnection(Connection target, ConnectionCallback callback) { return new ConnectionDecorator(target, callback); }
[ "@", "Override", "protected", "Connection", "proxyConnection", "(", "Connection", "target", ",", "ConnectionCallback", "callback", ")", "{", "return", "new", "ConnectionDecorator", "(", "target", ",", "callback", ")", ";", "}" ]
Create a {@link ConnectionDecorator} delegate to the actual target {@link Connection} @param target connection to proxy @param callback attaching connection lifecycle listener @return {@link Connection} delegate
[ "Create", "a", "{", "@link", "ConnectionDecorator", "}", "delegate", "to", "the", "actual", "target", "{", "@link", "Connection", "}" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/connection/ConnectionDecoratorFactory.java#L22-L25
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java
BaseApplet.makeRemoteSession
public RemoteSession makeRemoteSession(RemoteSession parentSessionObject, String strSessionClass) { """ Create this session with this class name at the remote server. @param parentSessionObject The (optional) parent session. @param strSessionClass The class name of the remote session to create. @return The new ...
java
public RemoteSession makeRemoteSession(RemoteSession parentSessionObject, String strSessionClass) { RemoteTask server = (RemoteTask)this.getRemoteTask(); try { synchronized (server) { // In case this is called from another task if (parentSessionObject == n...
[ "public", "RemoteSession", "makeRemoteSession", "(", "RemoteSession", "parentSessionObject", ",", "String", "strSessionClass", ")", "{", "RemoteTask", "server", "=", "(", "RemoteTask", ")", "this", ".", "getRemoteTask", "(", ")", ";", "try", "{", "synchronized", "...
Create this session with this class name at the remote server. @param parentSessionObject The (optional) parent session. @param strSessionClass The class name of the remote session to create. @return The new remote session (or null if not found).
[ "Create", "this", "session", "with", "this", "class", "name", "at", "the", "remote", "server", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java#L1166-L1183
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/abst/feature/tracker/DetectDescribeAssociateTwoPass.java
DetectDescribeAssociateTwoPass.updateTrackLocation
protected void updateTrackLocation( SetTrackInfo<Desc> info, FastQueue<AssociatedIndex> matches) { """ Update each track's location only and not its description. Update the active list too """ info.matches.resize(matches.size); for (int i = 0; i < matches.size; i++) { info.matches.get(i).set(matches.ge...
java
protected void updateTrackLocation( SetTrackInfo<Desc> info, FastQueue<AssociatedIndex> matches) { info.matches.resize(matches.size); for (int i = 0; i < matches.size; i++) { info.matches.get(i).set(matches.get(i)); } tracksActive.clear(); for( int i = 0; i < info.matches.size; i++ ) { AssociatedIndex ...
[ "protected", "void", "updateTrackLocation", "(", "SetTrackInfo", "<", "Desc", ">", "info", ",", "FastQueue", "<", "AssociatedIndex", ">", "matches", ")", "{", "info", ".", "matches", ".", "resize", "(", "matches", ".", "size", ")", ";", "for", "(", "int", ...
Update each track's location only and not its description. Update the active list too
[ "Update", "each", "track", "s", "location", "only", "and", "not", "its", "description", ".", "Update", "the", "active", "list", "too" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/abst/feature/tracker/DetectDescribeAssociateTwoPass.java#L139-L153
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/TextFormatter.java
TextFormatter.appendEpochMillis
public static void appendEpochMillis(StringBuilder buf, long timeMillis) { """ Formats the given epoch time in milliseconds to typical human-readable format "yyyy-MM-dd'T'HH_mm:ss.SSSX" and appends it to the specified {@link StringBuilder}. """ buf.append(dateTimeFormatter.format(Instant.ofEpochMilli(...
java
public static void appendEpochMillis(StringBuilder buf, long timeMillis) { buf.append(dateTimeFormatter.format(Instant.ofEpochMilli(timeMillis))) .append('(').append(timeMillis).append(')'); }
[ "public", "static", "void", "appendEpochMillis", "(", "StringBuilder", "buf", ",", "long", "timeMillis", ")", "{", "buf", ".", "append", "(", "dateTimeFormatter", ".", "format", "(", "Instant", ".", "ofEpochMilli", "(", "timeMillis", ")", ")", ")", ".", "app...
Formats the given epoch time in milliseconds to typical human-readable format "yyyy-MM-dd'T'HH_mm:ss.SSSX" and appends it to the specified {@link StringBuilder}.
[ "Formats", "the", "given", "epoch", "time", "in", "milliseconds", "to", "typical", "human", "-", "readable", "format", "yyyy", "-", "MM", "-", "dd", "T", "HH_mm", ":", "ss", ".", "SSSX", "and", "appends", "it", "to", "the", "specified", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/TextFormatter.java#L173-L176
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/server/WebServiceEndpoint.java
WebServiceEndpoint.addSoapBody
private void addSoapBody(SoapMessage response, Message replyMessage) throws TransformerException { """ Add message payload as SOAP body element to the SOAP response. @param response @param replyMessage """ if (!(replyMessage.getPayload() instanceof String) || StringUtils.hasText(repl...
java
private void addSoapBody(SoapMessage response, Message replyMessage) throws TransformerException { if (!(replyMessage.getPayload() instanceof String) || StringUtils.hasText(replyMessage.getPayload(String.class))) { Source responseSource = getPayloadAsSource(replyMessage.getPayload()...
[ "private", "void", "addSoapBody", "(", "SoapMessage", "response", ",", "Message", "replyMessage", ")", "throws", "TransformerException", "{", "if", "(", "!", "(", "replyMessage", ".", "getPayload", "(", ")", "instanceof", "String", ")", "||", "StringUtils", ".",...
Add message payload as SOAP body element to the SOAP response. @param response @param replyMessage
[ "Add", "message", "payload", "as", "SOAP", "body", "element", "to", "the", "SOAP", "response", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/server/WebServiceEndpoint.java#L201-L211
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java
RpcWrapper.callRpcWrapped
public void callRpcWrapped(S request, RpcResponseHandler<? extends T> responseHandler) throws IOException { """ Make the wrapped call and unmarshall the returned Xdr to a response, getting the IP key from the request. If an RPC Exception is being thrown, and retries remain, then log the exception and retry. @...
java
public void callRpcWrapped(S request, RpcResponseHandler<? extends T> responseHandler) throws IOException { for (int i = 0; i < _maximumRetries; ++i) { try { callRpcChecked(request, responseHandler); return; } catch (RpcException e) { handl...
[ "public", "void", "callRpcWrapped", "(", "S", "request", ",", "RpcResponseHandler", "<", "?", "extends", "T", ">", "responseHandler", ")", "throws", "IOException", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "_maximumRetries", ";", "++", "i", "...
Make the wrapped call and unmarshall the returned Xdr to a response, getting the IP key from the request. If an RPC Exception is being thrown, and retries remain, then log the exception and retry. @param request The request to send. @param responseHandler A response handler. @throws IOException
[ "Make", "the", "wrapped", "call", "and", "unmarshall", "the", "returned", "Xdr", "to", "a", "response", "getting", "the", "IP", "key", "from", "the", "request", ".", "If", "an", "RPC", "Exception", "is", "being", "thrown", "and", "retries", "remain", "then...
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/rpc/RpcWrapper.java#L128-L137
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java
Constraints.inRange
public PropertyConstraint inRange(String propertyName, Object min, Object max, Comparator comparator) { """ Apply a inclusive "range" constraint to a bean property. @param propertyName the property with the range constraint. @param min the low edge of the range @param max the high edge of the range @param co...
java
public PropertyConstraint inRange(String propertyName, Object min, Object max, Comparator comparator) { return value(propertyName, range(min, max, comparator)); }
[ "public", "PropertyConstraint", "inRange", "(", "String", "propertyName", ",", "Object", "min", ",", "Object", "max", ",", "Comparator", "comparator", ")", "{", "return", "value", "(", "propertyName", ",", "range", "(", "min", ",", "max", ",", "comparator", ...
Apply a inclusive "range" constraint to a bean property. @param propertyName the property with the range constraint. @param min the low edge of the range @param max the high edge of the range @param comparator the comparator to use while comparing the values @return The range constraint constraint @since 0.3.0
[ "Apply", "a", "inclusive", "range", "constraint", "to", "a", "bean", "property", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L813-L815
JM-Lab/utils-java8
src/main/java/kr/jm/utils/datastructure/JMCollections.java
JMCollections.addAndGet
public static <T> T addAndGet(Collection<T> collection, T item) { """ Add and get t. @param <T> the type parameter @param collection the collection @param item the item @return the t """ collection.add(item); return item; }
java
public static <T> T addAndGet(Collection<T> collection, T item) { collection.add(item); return item; }
[ "public", "static", "<", "T", ">", "T", "addAndGet", "(", "Collection", "<", "T", ">", "collection", ",", "T", "item", ")", "{", "collection", ".", "add", "(", "item", ")", ";", "return", "item", ";", "}" ]
Add and get t. @param <T> the type parameter @param collection the collection @param item the item @return the t
[ "Add", "and", "get", "t", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/datastructure/JMCollections.java#L277-L280
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WButtonExample.java
WButtonExample.makeImageButton
private WButton makeImageButton(final String text, final Boolean asLink) { """ Helper to create a button with an image and an action. @param text the text content of the button @param asLink indicates the button should be rendered as a link @return a button """ return makeImageButtonWithPosition(text, n...
java
private WButton makeImageButton(final String text, final Boolean asLink) { return makeImageButtonWithPosition(text, null, asLink); }
[ "private", "WButton", "makeImageButton", "(", "final", "String", "text", ",", "final", "Boolean", "asLink", ")", "{", "return", "makeImageButtonWithPosition", "(", "text", ",", "null", ",", "asLink", ")", ";", "}" ]
Helper to create a button with an image and an action. @param text the text content of the button @param asLink indicates the button should be rendered as a link @return a button
[ "Helper", "to", "create", "a", "button", "with", "an", "image", "and", "an", "action", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WButtonExample.java#L273-L275