repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
apache/incubator-druid
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3Utils.java
S3Utils.getSingleObjectSummary
public static S3ObjectSummary getSingleObjectSummary(ServerSideEncryptingAmazonS3 s3Client, String bucket, String key) { final ListObjectsV2Request request = new ListObjectsV2Request() .withBucketName(bucket) .withPrefix(key) .withMaxKeys(1); final ListObjectsV2Result result = s3Client...
java
public static S3ObjectSummary getSingleObjectSummary(ServerSideEncryptingAmazonS3 s3Client, String bucket, String key) { final ListObjectsV2Request request = new ListObjectsV2Request() .withBucketName(bucket) .withPrefix(key) .withMaxKeys(1); final ListObjectsV2Result result = s3Client...
[ "public", "static", "S3ObjectSummary", "getSingleObjectSummary", "(", "ServerSideEncryptingAmazonS3", "s3Client", ",", "String", "bucket", ",", "String", "key", ")", "{", "final", "ListObjectsV2Request", "request", "=", "new", "ListObjectsV2Request", "(", ")", ".", "w...
Gets a single {@link S3ObjectSummary} from s3. Since this method might return a wrong object if there are multiple objects that match the given key, this method should be used only when it's guaranteed that the given key is unique in the given bucket. @param s3Client s3 client @param bucket s3 bucket @param key ...
[ "Gets", "a", "single", "{", "@link", "S3ObjectSummary", "}", "from", "s3", ".", "Since", "this", "method", "might", "return", "a", "wrong", "object", "if", "there", "are", "multiple", "objects", "that", "match", "the", "given", "key", "this", "method", "sh...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3Utils.java#L241-L261
redisson/redisson
redisson/src/main/java/org/redisson/executor/CronExpression.java
CronExpression.setCalendarHour
protected void setCalendarHour(Calendar cal, int hour) { cal.set(java.util.Calendar.HOUR_OF_DAY, hour); if (cal.get(java.util.Calendar.HOUR_OF_DAY) != hour && hour != 24) { cal.set(java.util.Calendar.HOUR_OF_DAY, hour + 1); } }
java
protected void setCalendarHour(Calendar cal, int hour) { cal.set(java.util.Calendar.HOUR_OF_DAY, hour); if (cal.get(java.util.Calendar.HOUR_OF_DAY) != hour && hour != 24) { cal.set(java.util.Calendar.HOUR_OF_DAY, hour + 1); } }
[ "protected", "void", "setCalendarHour", "(", "Calendar", "cal", ",", "int", "hour", ")", "{", "cal", ".", "set", "(", "java", ".", "util", ".", "Calendar", ".", "HOUR_OF_DAY", ",", "hour", ")", ";", "if", "(", "cal", ".", "get", "(", "java", ".", "...
Advance the calendar to the particular hour paying particular attention to daylight saving problems. @param cal the calendar to operate on @param hour the hour to set
[ "Advance", "the", "calendar", "to", "the", "particular", "hour", "paying", "particular", "attention", "to", "daylight", "saving", "problems", "." ]
train
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/executor/CronExpression.java#L1434-L1439
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/wrapper/SQLSelect.java
SQLSelect.addTablePart
public SQLSelect addTablePart(final String _tableName, final Integer _tableIndex) { parts.add(new FromTable(tablePrefix, _tableName, _tableIndex)); return this; }
java
public SQLSelect addTablePart(final String _tableName, final Integer _tableIndex) { parts.add(new FromTable(tablePrefix, _tableName, _tableIndex)); return this; }
[ "public", "SQLSelect", "addTablePart", "(", "final", "String", "_tableName", ",", "final", "Integer", "_tableIndex", ")", "{", "parts", ".", "add", "(", "new", "FromTable", "(", "tablePrefix", ",", "_tableName", ",", "_tableIndex", ")", ")", ";", "return", "...
Add a table as part. @param _tableName name of the table @param _tableIndex index of the table @return this
[ "Add", "a", "table", "as", "part", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/wrapper/SQLSelect.java#L405-L410
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.beginSetSharedKey
public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).toBlocking().single().body(); }
java
public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).toBlocking().single().body(); }
[ "public", "ConnectionSharedKeyInner", "beginSetSharedKey", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ",", "String", "value", ")", "{", "return", "beginSetSharedKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualN...
The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnect...
[ "The", "Put", "VirtualNetworkGatewayConnectionSharedKey", "operation", "sets", "the", "virtual", "network", "gateway", "connection", "shared", "key", "for", "passed", "virtual", "network", "gateway", "connection", "in", "the", "specified", "resource", "group", "through"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java#L932-L934
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
@SuppressWarnings("unchecked") public static List<Character> getAt(char[] array, Collection indices) { return primitiveArrayGet(array, indices); }
java
@SuppressWarnings("unchecked") public static List<Character> getAt(char[] array, Collection indices) { return primitiveArrayGet(array, indices); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "List", "<", "Character", ">", "getAt", "(", "char", "[", "]", "array", ",", "Collection", "indices", ")", "{", "return", "primitiveArrayGet", "(", "array", ",", "indices", ")", ";", "...
Support the subscript operator with a collection for a char array @param array a char array @param indices a collection of indices for the items to retrieve @return list of the chars at the given indices @since 1.0
[ "Support", "the", "subscript", "operator", "with", "a", "collection", "for", "a", "char", "array" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L13951-L13954
Alluxio/alluxio
core/common/src/main/java/alluxio/util/UnderFileSystemUtils.java
UnderFileSystemUtils.deleteDirIfExists
public static void deleteDirIfExists(UnderFileSystem ufs, String path) throws IOException { if (ufs.isDirectory(path) && !ufs.deleteDirectory(path, DeleteOptions.defaults().setRecursive(true))) { throw new IOException("Folder " + path + " already exists but can not be deleted."); } }
java
public static void deleteDirIfExists(UnderFileSystem ufs, String path) throws IOException { if (ufs.isDirectory(path) && !ufs.deleteDirectory(path, DeleteOptions.defaults().setRecursive(true))) { throw new IOException("Folder " + path + " already exists but can not be deleted."); } }
[ "public", "static", "void", "deleteDirIfExists", "(", "UnderFileSystem", "ufs", ",", "String", "path", ")", "throws", "IOException", "{", "if", "(", "ufs", ".", "isDirectory", "(", "path", ")", "&&", "!", "ufs", ".", "deleteDirectory", "(", "path", ",", "D...
Deletes the directory at the given path if it exists. @param ufs instance of {@link UnderFileSystem} @param path path to the directory
[ "Deletes", "the", "directory", "at", "the", "given", "path", "if", "it", "exists", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/UnderFileSystemUtils.java#L36-L41
jboss-integration/fuse-bxms-integ
switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/exchange/KnowledgeExchangeHandler.java
KnowledgeExchangeHandler.getObject
protected Object getObject(Exchange exchange, Message message, String name) { Context context = message != null ? exchange.getContext(message) : exchange.getContext(); return context.getPropertyValue(name); }
java
protected Object getObject(Exchange exchange, Message message, String name) { Context context = message != null ? exchange.getContext(message) : exchange.getContext(); return context.getPropertyValue(name); }
[ "protected", "Object", "getObject", "(", "Exchange", "exchange", ",", "Message", "message", ",", "String", "name", ")", "{", "Context", "context", "=", "message", "!=", "null", "?", "exchange", ".", "getContext", "(", "message", ")", ":", "exchange", ".", ...
Gets an Object context property. @param exchange the exchange @param message the message @param name the name @return the property
[ "Gets", "an", "Object", "context", "property", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/switchyard/switchyard-component-common-knowledge/src/main/java/org/switchyard/component/common/knowledge/exchange/KnowledgeExchangeHandler.java#L254-L257
threerings/narya
core/src/main/java/com/threerings/presents/dobj/DObject.java
DObject.clearLock
protected void clearLock (String name) { // clear the lock from the list if (ListUtil.clear(_locks, name) == null) { // complain if we didn't find the lock log.info("Unable to clear non-existent lock", "lock", name, "dobj", this); } }
java
protected void clearLock (String name) { // clear the lock from the list if (ListUtil.clear(_locks, name) == null) { // complain if we didn't find the lock log.info("Unable to clear non-existent lock", "lock", name, "dobj", this); } }
[ "protected", "void", "clearLock", "(", "String", "name", ")", "{", "// clear the lock from the list", "if", "(", "ListUtil", ".", "clear", "(", "_locks", ",", "name", ")", "==", "null", ")", "{", "// complain if we didn't find the lock", "log", ".", "info", "(",...
Don't call this function! It is called by a remove lock event when that event is processed and shouldn't be called at any other time. If you mean to release a lock that was acquired with <code>acquireLock</code> you should be using <code>releaseLock</code>. @see #acquireLock @see #releaseLock
[ "Don", "t", "call", "this", "function!", "It", "is", "called", "by", "a", "remove", "lock", "event", "when", "that", "event", "is", "processed", "and", "shouldn", "t", "be", "called", "at", "any", "other", "time", ".", "If", "you", "mean", "to", "relea...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/dobj/DObject.java#L341-L348
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/dml/With.java
With.andWith
public With andWith(final String alias, final Expression expression) { this.clauses.add(new ImmutablePair<>(new Name(alias), expression)); return this; }
java
public With andWith(final String alias, final Expression expression) { this.clauses.add(new ImmutablePair<>(new Name(alias), expression)); return this; }
[ "public", "With", "andWith", "(", "final", "String", "alias", ",", "final", "Expression", "expression", ")", "{", "this", ".", "clauses", ".", "add", "(", "new", "ImmutablePair", "<>", "(", "new", "Name", "(", "alias", ")", ",", "expression", ")", ")", ...
Adds an alias and expression to the with clause. @param alias expression alias @param expression expression to be aliased. @return this object.
[ "Adds", "an", "alias", "and", "expression", "to", "the", "with", "clause", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/dml/With.java#L76-L79
ineunetOS/knife-commons
knife-commons-qlmap/src/main/java/com/ineunet/knife/qlmap/criteria/Restrictors.java
Restrictors.and
public static Restrictor and(Restrictor c1, Restrictor c2) { return new LogicRestrictor(c1, c2, RestrictType.and); }
java
public static Restrictor and(Restrictor c1, Restrictor c2) { return new LogicRestrictor(c1, c2, RestrictType.and); }
[ "public", "static", "Restrictor", "and", "(", "Restrictor", "c1", ",", "Restrictor", "c2", ")", "{", "return", "new", "LogicRestrictor", "(", "c1", ",", "c2", ",", "RestrictType", ".", "and", ")", ";", "}" ]
对两个ICriterion进行 "逻辑与" 合并 @param c1 Restrictor left @param c2 Restrictor right @return Restrictor
[ "对两个ICriterion进行", "逻辑与", "合并" ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-qlmap/src/main/java/com/ineunet/knife/qlmap/criteria/Restrictors.java#L42-L44
JodaOrg/joda-time
src/main/java/org/joda/time/LocalDate.java
LocalDate.withField
public LocalDate withField(DateTimeFieldType fieldType, int value) { if (fieldType == null) { throw new IllegalArgumentException("Field must not be null"); } if (isSupported(fieldType) == false) { throw new IllegalArgumentException("Field '" + fieldType + "' is not suppor...
java
public LocalDate withField(DateTimeFieldType fieldType, int value) { if (fieldType == null) { throw new IllegalArgumentException("Field must not be null"); } if (isSupported(fieldType) == false) { throw new IllegalArgumentException("Field '" + fieldType + "' is not suppor...
[ "public", "LocalDate", "withField", "(", "DateTimeFieldType", "fieldType", ",", "int", "value", ")", "{", "if", "(", "fieldType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field must not be null\"", ")", ";", "}", "if", "(", "...
Returns a copy of this date with the specified field set to a new value. <p> For example, if the field type is <code>monthOfYear</code> then the month of year field will be changed in the returned instance. If the field type is null, then <code>this</code> is returned. <p> These two lines are equivalent: <pre> LocalDat...
[ "Returns", "a", "copy", "of", "this", "date", "with", "the", "specified", "field", "set", "to", "a", "new", "value", ".", "<p", ">", "For", "example", "if", "the", "field", "type", "is", "<code", ">", "monthOfYear<", "/", "code", ">", "then", "the", ...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDate.java#L1097-L1106
googlegenomics/gatk-tools-java
src/main/java/com/google/cloud/genomics/gatk/picard/runner/GA4GHPicardRunner.java
GA4GHPicardRunner.processGA4GHInput
private Input processGA4GHInput(String input) throws IOException, GeneralSecurityException, URISyntaxException { GA4GHUrl url = new GA4GHUrl(input); SAMFilePump pump; if (usingGrpc) { factoryGrpc.configure(url.getRootUrl(), new Settings(clientSecretsFilename, apiKey, noLocalServer)); pu...
java
private Input processGA4GHInput(String input) throws IOException, GeneralSecurityException, URISyntaxException { GA4GHUrl url = new GA4GHUrl(input); SAMFilePump pump; if (usingGrpc) { factoryGrpc.configure(url.getRootUrl(), new Settings(clientSecretsFilename, apiKey, noLocalServer)); pu...
[ "private", "Input", "processGA4GHInput", "(", "String", "input", ")", "throws", "IOException", ",", "GeneralSecurityException", ",", "URISyntaxException", "{", "GA4GHUrl", "url", "=", "new", "GA4GHUrl", "(", "input", ")", ";", "SAMFilePump", "pump", ";", "if", "...
Processes GA4GH based input, creates required API connections and data pump
[ "Processes", "GA4GH", "based", "input", "creates", "required", "API", "connections", "and", "data", "pump" ]
train
https://github.com/googlegenomics/gatk-tools-java/blob/5521664e8d6274b113962659f2737c27cc361065/src/main/java/com/google/cloud/genomics/gatk/picard/runner/GA4GHPicardRunner.java#L212-L237
audit4j/audit4j-core
src/main/java/org/audit4j/core/annotation/DeIdentifyUtil.java
DeIdentifyUtil.deidentifyEdge
public static String deidentifyEdge(String str, int start, int end) { return deidentifyLeft(deidentifyRight(str, end), start); }
java
public static String deidentifyEdge(String str, int start, int end) { return deidentifyLeft(deidentifyRight(str, end), start); }
[ "public", "static", "String", "deidentifyEdge", "(", "String", "str", ",", "int", "start", ",", "int", "end", ")", "{", "return", "deidentifyLeft", "(", "deidentifyRight", "(", "str", ",", "end", ")", ",", "start", ")", ";", "}" ]
Deidentify edge. @param str the str @param start the start @param end the end @return the string @since 2.0.0
[ "Deidentify", "edge", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/annotation/DeIdentifyUtil.java#L150-L152
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PandaApi.java
PandaApi.getPhotos
public Photos getPhotos(String pandaName, EnumSet<JinxConstants.PhotoExtras> extras, int perPage, int page, boolean sign) throws Exception { JinxUtils.validateParams(pandaName); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.panda.getPhotos"); params.put("panda_name", pandaNa...
java
public Photos getPhotos(String pandaName, EnumSet<JinxConstants.PhotoExtras> extras, int perPage, int page, boolean sign) throws Exception { JinxUtils.validateParams(pandaName); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.panda.getPhotos"); params.put("panda_name", pandaNa...
[ "public", "Photos", "getPhotos", "(", "String", "pandaName", ",", "EnumSet", "<", "JinxConstants", ".", "PhotoExtras", ">", "extras", ",", "int", "perPage", ",", "int", "page", ",", "boolean", "sign", ")", "throws", "Exception", "{", "JinxUtils", ".", "valid...
Ask the Flickr Pandas for a list of recent public (and "safe") photos. <br> More information about the pandas can be found on the <a href="http://code.flickr.com/blog/2009/03/03/panda-tuesday-the-history-of-the-panda-new-apis-explore-and-you/">dev blog</a>. Authentication <br> This method does not require authentic...
[ "Ask", "the", "Flickr", "Pandas", "for", "a", "list", "of", "recent", "public", "(", "and", "safe", ")", "photos", ".", "<br", ">", "More", "information", "about", "the", "pandas", "can", "be", "found", "on", "the", "<a", "href", "=", "http", ":", "/...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PandaApi.java#L82-L97
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java
Contract.notZero
public static void notZero(final Integer input, final String inputName) { notNull(input, inputName); if (input == 0) { throw new IllegalArgumentException("a zero value for was unexpected for " + maskNullArgument(inputName) + ", it is expected to be non zero"); } }
java
public static void notZero(final Integer input, final String inputName) { notNull(input, inputName); if (input == 0) { throw new IllegalArgumentException("a zero value for was unexpected for " + maskNullArgument(inputName) + ", it is expected to be non zero"); } }
[ "public", "static", "void", "notZero", "(", "final", "Integer", "input", ",", "final", "String", "inputName", ")", "{", "notNull", "(", "input", ",", "inputName", ")", ";", "if", "(", "input", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException"...
Checks that the input value is non-zero @param input the input to check @param inputName the name of the input @throws IllegalArgumentException if input is null or if the input is zero
[ "Checks", "that", "the", "input", "value", "is", "non", "-", "zero" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java#L177-L183
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java
CachingXmlDataStore.createCachingXmlDataStore
@Nonnull public static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final URL dataUrl, @Nonnull final URL versionURL, @Nonnull final DataStore fallback) { return createCachingXmlDataStore(findOrCreateCacheFile(), dataUrl, versionURL, DEFAULT_CHARSET, fallback); }
java
@Nonnull public static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final URL dataUrl, @Nonnull final URL versionURL, @Nonnull final DataStore fallback) { return createCachingXmlDataStore(findOrCreateCacheFile(), dataUrl, versionURL, DEFAULT_CHARSET, fallback); }
[ "@", "Nonnull", "public", "static", "CachingXmlDataStore", "createCachingXmlDataStore", "(", "@", "Nonnull", "final", "URL", "dataUrl", ",", "@", "Nonnull", "final", "URL", "versionURL", ",", "@", "Nonnull", "final", "DataStore", "fallback", ")", "{", "return", ...
Constructs a new instance of {@code CachingXmlDataStore} with the given arguments. The given {@code cacheFile} can be empty or filled with previously cached data in XML format. The file must be writable otherwise an exception will be thrown. @param dataUrl URL for online version of <em>UAS data</em> @param versionURL ...
[ "Constructs", "a", "new", "instance", "of", "{", "@code", "CachingXmlDataStore", "}", "with", "the", "given", "arguments", ".", "The", "given", "{", "@code", "cacheFile", "}", "can", "be", "empty", "or", "filled", "with", "previously", "cached", "data", "in"...
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java#L115-L119
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java
JBBPUtils.assertNotNull
public static void assertNotNull(final Object object, final String message) { if (object == null) { throw new NullPointerException(message == null ? "Object is null" : message); } }
java
public static void assertNotNull(final Object object, final String message) { if (object == null) { throw new NullPointerException(message == null ? "Object is null" : message); } }
[ "public", "static", "void", "assertNotNull", "(", "final", "Object", "object", ",", "final", "String", "message", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "message", "==", "null", "?", "\"Object is n...
Check that an object is null and throw NullPointerException in the case. @param object an object to be checked @param message message to be used as the exception message @throws NullPointerException it will be thrown if the object is null
[ "Check", "that", "an", "object", "is", "null", "and", "throw", "NullPointerException", "in", "the", "case", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPUtils.java#L478-L482
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/internal/io/SchemaTypeAdapter.java
SchemaTypeAdapter.readArray
private Schema readArray(JsonReader reader, Set<String> knownRecords) throws IOException { return Schema.arrayOf(readInnerSchema(reader, "items", knownRecords)); }
java
private Schema readArray(JsonReader reader, Set<String> knownRecords) throws IOException { return Schema.arrayOf(readInnerSchema(reader, "items", knownRecords)); }
[ "private", "Schema", "readArray", "(", "JsonReader", "reader", ",", "Set", "<", "String", ">", "knownRecords", ")", "throws", "IOException", "{", "return", "Schema", ".", "arrayOf", "(", "readInnerSchema", "(", "reader", ",", "\"items\"", ",", "knownRecords", ...
Constructs {@link Schema.Type#ARRAY ARRAY} type schema from the json input. @param reader The {@link JsonReader} for streaming json input tokens. @param knownRecords Set of record name already encountered during the reading. @return A {@link Schema} of type {@link Schema.Type#ARRAY ARRAY}. @throws java.io.IOException ...
[ "Constructs", "{", "@link", "Schema", ".", "Type#ARRAY", "ARRAY", "}", "type", "schema", "from", "the", "json", "input", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/internal/io/SchemaTypeAdapter.java#L165-L167
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.lastIndexOf
public int lastIndexOf(final StrMatcher matcher, int startIndex) { startIndex = (startIndex >= size ? size - 1 : startIndex); if (matcher == null || startIndex < 0) { return -1; } final char[] buf = buffer; final int endIndex = startIndex + 1; for (int i = sta...
java
public int lastIndexOf(final StrMatcher matcher, int startIndex) { startIndex = (startIndex >= size ? size - 1 : startIndex); if (matcher == null || startIndex < 0) { return -1; } final char[] buf = buffer; final int endIndex = startIndex + 1; for (int i = sta...
[ "public", "int", "lastIndexOf", "(", "final", "StrMatcher", "matcher", ",", "int", "startIndex", ")", "{", "startIndex", "=", "(", "startIndex", ">=", "size", "?", "size", "-", "1", ":", "startIndex", ")", ";", "if", "(", "matcher", "==", "null", "||", ...
Searches the string builder using the matcher to find the last match searching from the given index. <p> Matchers can be used to perform advanced searching behaviour. For example you could write a matcher to find the character 'a' followed by a number. @param matcher the matcher to use, null returns -1 @param startIn...
[ "Searches", "the", "string", "builder", "using", "the", "matcher", "to", "find", "the", "last", "match", "searching", "from", "the", "given", "index", ".", "<p", ">", "Matchers", "can", "be", "used", "to", "perform", "advanced", "searching", "behaviour", "."...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L2629-L2642
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/BaseSessionProxy.java
BaseSessionProxy.doRemoteAction
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { BaseTransport transport = this.createProxyTransport(DO_REMOTE_ACTION); transport.addParam(NAME, strCommand); // Don't use COMMAND transport.addParam(PROPERTIES, properties)...
java
public Object doRemoteAction(String strCommand, Map<String, Object> properties) throws DBException, RemoteException { BaseTransport transport = this.createProxyTransport(DO_REMOTE_ACTION); transport.addParam(NAME, strCommand); // Don't use COMMAND transport.addParam(PROPERTIES, properties)...
[ "public", "Object", "doRemoteAction", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "DBException", ",", "RemoteException", "{", "BaseTransport", "transport", "=", "this", ".", "createProxyTransport", "(", ...
Do a remote action. @param strCommand Command to perform remotely. @return boolean success.
[ "Do", "a", "remote", "action", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/BaseSessionProxy.java#L82-L96
inloop/easygcm
easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java
EasyGcm.storeRegistrationId
private static void storeRegistrationId(Context context, String regId) { final int appVersion = GcmUtils.getAppVersion(context); Logger.d("Saving regId on app version " + appVersion); final SharedPreferences.Editor editor = getGcmPreferences(context).edit(); editor.putString(PROPERTY_RE...
java
private static void storeRegistrationId(Context context, String regId) { final int appVersion = GcmUtils.getAppVersion(context); Logger.d("Saving regId on app version " + appVersion); final SharedPreferences.Editor editor = getGcmPreferences(context).edit(); editor.putString(PROPERTY_RE...
[ "private", "static", "void", "storeRegistrationId", "(", "Context", "context", ",", "String", "regId", ")", "{", "final", "int", "appVersion", "=", "GcmUtils", ".", "getAppVersion", "(", "context", ")", ";", "Logger", ".", "d", "(", "\"Saving regId on app versio...
Stores the registration ID and the app versionCode in the application's {@code SharedPreferences}. @param context application's context. @param regId registration ID
[ "Stores", "the", "registration", "ID", "and", "the", "app", "versionCode", "in", "the", "application", "s", "{", "@code", "SharedPreferences", "}", "." ]
train
https://github.com/inloop/easygcm/blob/d06bbff11e52b956c3a7b1a2dc4f9799f20cf2c6/easygcm-lib/src/main/java/eu/inloop/easygcm/EasyGcm.java#L89-L97
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optBinder
@Nullable @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) public static IBinder optBinder(@Nullable Bundle bundle, @Nullable String key) { return optBinder(bundle, key, null); }
java
@Nullable @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) public static IBinder optBinder(@Nullable Bundle bundle, @Nullable String key) { return optBinder(bundle, key, null); }
[ "@", "Nullable", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "JELLY_BEAN_MR2", ")", "public", "static", "IBinder", "optBinder", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optBinder", "...
Returns a optional {@link android.os.IBinder} value. In other words, returns the value mapped by key if it exists and is a {@link android.os.IBinder}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will retur...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L93-L97
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java
JavacParser.filterJavaFileObject
private static JavaFileObject filterJavaFileObject(JavaFileObject fobj) { String path = fobj.getName(); if (path.endsWith("module-info.java")) { String pkgName = null; try { pkgName = moduleName(fobj.getCharContent(true).toString()); String source = "package " + pkgName + ";"; ...
java
private static JavaFileObject filterJavaFileObject(JavaFileObject fobj) { String path = fobj.getName(); if (path.endsWith("module-info.java")) { String pkgName = null; try { pkgName = moduleName(fobj.getCharContent(true).toString()); String source = "package " + pkgName + ";"; ...
[ "private", "static", "JavaFileObject", "filterJavaFileObject", "(", "JavaFileObject", "fobj", ")", "{", "String", "path", "=", "fobj", ".", "getName", "(", ")", ";", "if", "(", "path", ".", "endsWith", "(", "\"module-info.java\"", ")", ")", "{", "String", "p...
To allow Java 9 libraries like GSON to be transpiled using -source 1.8, stub out the module-info source. This creates an empty .o file, like package-info.java files without annotations. Skipping the file isn't feasible because of build tool output file expectations.
[ "To", "allow", "Java", "9", "libraries", "like", "GSON", "to", "be", "transpiled", "using", "-", "source", "1", ".", "8", "stub", "out", "the", "module", "-", "info", "source", ".", "This", "creates", "an", "empty", ".", "o", "file", "like", "package",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java#L220-L233
gfk-ba/senbot
SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/FormService.java
FormService.fillFormField_locator
public WebElement fillFormField_locator(String locator, String value) { WebElement fieldEl = seleniumElementService.translateLocatorToWebElement(locator); fieldEl.clear(); fieldEl.sendKeys(getReferenceService().namespaceString(value)); return fieldEl; }
java
public WebElement fillFormField_locator(String locator, String value) { WebElement fieldEl = seleniumElementService.translateLocatorToWebElement(locator); fieldEl.clear(); fieldEl.sendKeys(getReferenceService().namespaceString(value)); return fieldEl; }
[ "public", "WebElement", "fillFormField_locator", "(", "String", "locator", ",", "String", "value", ")", "{", "WebElement", "fieldEl", "=", "seleniumElementService", ".", "translateLocatorToWebElement", "(", "locator", ")", ";", "fieldEl", ".", "clear", "(", ")", "...
Fill out a form field with the passed value @param locator as specified in {@link ElementService#translateLocatorToWebElement(String)} @param value the value to fill the field with @return the {@link WebElement} representing the form field
[ "Fill", "out", "a", "form", "field", "with", "the", "passed", "value" ]
train
https://github.com/gfk-ba/senbot/blob/e9a152aa67be48b1bb13a4691655caf6d873b553/SenBotRunner/src/main/java/com/gfk/senbot/framework/services/selenium/FormService.java#L32-L37
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java
AbstractRedisStorage.settLastTriggerReleaseTime
protected void settLastTriggerReleaseTime(long time, T jedis){ jedis.set(redisSchema.lastTriggerReleaseTime(), Long.toString(time)); }
java
protected void settLastTriggerReleaseTime(long time, T jedis){ jedis.set(redisSchema.lastTriggerReleaseTime(), Long.toString(time)); }
[ "protected", "void", "settLastTriggerReleaseTime", "(", "long", "time", ",", "T", "jedis", ")", "{", "jedis", ".", "set", "(", "redisSchema", ".", "lastTriggerReleaseTime", "(", ")", ",", "Long", ".", "toString", "(", "time", ")", ")", ";", "}" ]
Set the last time at which orphaned triggers were released @param time a unix timestamp in milliseconds @param jedis a thread-safe Redis connection
[ "Set", "the", "last", "time", "at", "which", "orphaned", "triggers", "were", "released" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/AbstractRedisStorage.java#L726-L728
UrielCh/ovh-java-sdk
ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java
ApiOvhEmailpro.service_domain_domainName_disclaimer_PUT
public void service_domain_domainName_disclaimer_PUT(String service, String domainName, OvhDisclaimer body) throws IOException { String qPath = "/email/pro/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); exec(qPath, "PUT", sb.toString(), body); }
java
public void service_domain_domainName_disclaimer_PUT(String service, String domainName, OvhDisclaimer body) throws IOException { String qPath = "/email/pro/{service}/domain/{domainName}/disclaimer"; StringBuilder sb = path(qPath, service, domainName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "service_domain_domainName_disclaimer_PUT", "(", "String", "service", ",", "String", "domainName", ",", "OvhDisclaimer", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/pro/{service}/domain/{domainName}/disclaimer\"", ";", "Str...
Alter this object properties REST: PUT /email/pro/{service}/domain/{domainName}/disclaimer @param body [required] New object properties @param service [required] The internal name of your pro organization @param domainName [required] Domain name API beta
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailpro/src/main/java/net/minidev/ovh/api/ApiOvhEmailpro.java#L788-L792
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java
UnconditionalValueDerefAnalysis.checkUnconditionalDerefDatabase
private void checkUnconditionalDerefDatabase(Location location, ValueNumberFrame vnaFrame, UnconditionalValueDerefSet fact) throws DataflowAnalysisException { ConstantPoolGen constantPool = methodGen.getConstantPool(); for (ValueNumber vn : checkUnconditionalDerefDatabase(location, vnaFrame...
java
private void checkUnconditionalDerefDatabase(Location location, ValueNumberFrame vnaFrame, UnconditionalValueDerefSet fact) throws DataflowAnalysisException { ConstantPoolGen constantPool = methodGen.getConstantPool(); for (ValueNumber vn : checkUnconditionalDerefDatabase(location, vnaFrame...
[ "private", "void", "checkUnconditionalDerefDatabase", "(", "Location", "location", ",", "ValueNumberFrame", "vnaFrame", ",", "UnconditionalValueDerefSet", "fact", ")", "throws", "DataflowAnalysisException", "{", "ConstantPoolGen", "constantPool", "=", "methodGen", ".", "get...
Check method call at given location to see if it unconditionally dereferences a parameter. Mark any such arguments as derefs. @param location the Location of the method call @param vnaFrame ValueNumberFrame at the Location @param fact the dataflow value to modify @throws DataflowAnalysisException
[ "Check", "method", "call", "at", "given", "location", "to", "see", "if", "it", "unconditionally", "dereferences", "a", "parameter", ".", "Mark", "any", "such", "arguments", "as", "derefs", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java#L319-L327
elki-project/elki
elki-data-generator/src/main/java/de/lmu/ifi/dbs/elki/datasource/GeneratorXMLDatabaseConnection.java
GeneratorXMLDatabaseConnection.processElementPoint
private void processElementPoint(List<double[]> points, Node cur) { double[] point = null; String vstr = ((Element) cur).getAttribute(ATTR_VECTOR); if(vstr != null && vstr.length() > 0) { point = parseVector(vstr); } if(point == null) { throw new AbortException("No translation vector giv...
java
private void processElementPoint(List<double[]> points, Node cur) { double[] point = null; String vstr = ((Element) cur).getAttribute(ATTR_VECTOR); if(vstr != null && vstr.length() > 0) { point = parseVector(vstr); } if(point == null) { throw new AbortException("No translation vector giv...
[ "private", "void", "processElementPoint", "(", "List", "<", "double", "[", "]", ">", "points", ",", "Node", "cur", ")", "{", "double", "[", "]", "point", "=", "null", ";", "String", "vstr", "=", "(", "(", "Element", ")", "cur", ")", ".", "getAttribut...
Parse a 'point' element (point vector for a static cluster) @param points current list of points (to append to) @param cur Current document nod
[ "Parse", "a", "point", "element", "(", "point", "vector", "for", "a", "static", "cluster", ")" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-data-generator/src/main/java/de/lmu/ifi/dbs/elki/datasource/GeneratorXMLDatabaseConnection.java#L668-L689
grails/grails-core
buildSrc/src/main/groovy/JavadocFixTool.java
JavadocFixTool.replaceStringInFile
public void replaceStringInFile(File folder, File file, String template, String[] replacement) throws IOException { System.out.println("Patching file: "+file.getCanonicalPath()); String name = file.getName(); File origFile = new File(folder, name+".orig"); file.renameTo(origF...
java
public void replaceStringInFile(File folder, File file, String template, String[] replacement) throws IOException { System.out.println("Patching file: "+file.getCanonicalPath()); String name = file.getName(); File origFile = new File(folder, name+".orig"); file.renameTo(origF...
[ "public", "void", "replaceStringInFile", "(", "File", "folder", ",", "File", "file", ",", "String", "template", ",", "String", "[", "]", "replacement", ")", "throws", "IOException", "{", "System", ".", "out", ".", "println", "(", "\"Patching file: \"", "+", ...
/* Replace one line in the given file in the given folder with the lines given @param folder Folder in which file should be created @param file Original file to patch @param template Trimmed String with the pattern we are have to find @param replacement Array of String that has to be written in the place of first line ...
[ "/", "*", "Replace", "one", "line", "in", "the", "given", "file", "in", "the", "given", "folder", "with", "the", "lines", "given" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/buildSrc/src/main/groovy/JavadocFixTool.java#L317-L349
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java
ServerUpdater.setIcon
public ServerUpdater setIcon(InputStream icon, String fileType) { delegate.setIcon(icon, fileType); return this; }
java
public ServerUpdater setIcon(InputStream icon, String fileType) { delegate.setIcon(icon, fileType); return this; }
[ "public", "ServerUpdater", "setIcon", "(", "InputStream", "icon", ",", "String", "fileType", ")", "{", "delegate", ".", "setIcon", "(", "icon", ",", "fileType", ")", ";", "return", "this", ";", "}" ]
Queues the icon to be updated. @param icon The new icon of the server. @param fileType The type of the icon, e.g. "png" or "jpg". @return The current instance in order to chain call methods.
[ "Queues", "the", "icon", "to", "be", "updated", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java#L238-L241
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/ssl/jdbc4/LibPQFactory.java
LibPQFactory.verifyHostName
@Deprecated public static boolean verifyHostName(String hostname, String pattern) { String canonicalHostname; if (hostname.startsWith("[") && hostname.endsWith("]")) { // IPv6 address like [2001:db8:0:1:1:1:1:1] canonicalHostname = hostname.substring(1, hostname.length() - 1); } else { /...
java
@Deprecated public static boolean verifyHostName(String hostname, String pattern) { String canonicalHostname; if (hostname.startsWith("[") && hostname.endsWith("]")) { // IPv6 address like [2001:db8:0:1:1:1:1:1] canonicalHostname = hostname.substring(1, hostname.length() - 1); } else { /...
[ "@", "Deprecated", "public", "static", "boolean", "verifyHostName", "(", "String", "hostname", ",", "String", "pattern", ")", "{", "String", "canonicalHostname", ";", "if", "(", "hostname", ".", "startsWith", "(", "\"[\"", ")", "&&", "hostname", ".", "endsWith...
Verifies if given hostname matches pattern. @deprecated use {@link PGjdbcHostnameVerifier} @param hostname input hostname @param pattern domain name pattern @return true when domain matches pattern
[ "Verifies", "if", "given", "hostname", "matches", "pattern", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/ssl/jdbc4/LibPQFactory.java#L45-L61
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/VfsOld.java
VfsOld.lookup
public static PathImpl lookup(String url, Map<String,Object> attr) { return getPwd().lookup(url, attr); }
java
public static PathImpl lookup(String url, Map<String,Object> attr) { return getPwd().lookup(url, attr); }
[ "public", "static", "PathImpl", "lookup", "(", "String", "url", ",", "Map", "<", "String", ",", "Object", ">", "attr", ")", "{", "return", "getPwd", "(", ")", ".", "lookup", "(", "url", ",", "attr", ")", ";", "}" ]
Returns a new path, including attributes. <p>For example, an application may want to set locale headers for an HTTP request. @param url the relative url @param attr attributes used in searching for the url
[ "Returns", "a", "new", "path", "including", "attributes", ".", "<p", ">", "For", "example", "an", "application", "may", "want", "to", "set", "locale", "headers", "for", "an", "HTTP", "request", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/VfsOld.java#L191-L194
stackify/stackify-api-java
src/main/java/com/stackify/api/common/lang/Throwables.java
Throwables.toErrorItemBuilderWithoutCause
private static ErrorItem.Builder toErrorItemBuilderWithoutCause(final String logMessage, final Throwable t) { ErrorItem.Builder builder = ErrorItem.newBuilder(); builder.message(toErrorItemMessage(logMessage, t.getMessage())); builder.errorType(t.getClass().getCanonicalName()); List<TraceFrame> stackFrames =...
java
private static ErrorItem.Builder toErrorItemBuilderWithoutCause(final String logMessage, final Throwable t) { ErrorItem.Builder builder = ErrorItem.newBuilder(); builder.message(toErrorItemMessage(logMessage, t.getMessage())); builder.errorType(t.getClass().getCanonicalName()); List<TraceFrame> stackFrames =...
[ "private", "static", "ErrorItem", ".", "Builder", "toErrorItemBuilderWithoutCause", "(", "final", "String", "logMessage", ",", "final", "Throwable", "t", ")", "{", "ErrorItem", ".", "Builder", "builder", "=", "ErrorItem", ".", "newBuilder", "(", ")", ";", "build...
Converts a Throwable to an ErrorItem.Builder and ignores the cause @param logMessage The log message @param t The Throwable to be converted @return The ErrorItem.Builder without the innerError populated
[ "Converts", "a", "Throwable", "to", "an", "ErrorItem", ".", "Builder", "and", "ignores", "the", "cause" ]
train
https://github.com/stackify/stackify-api-java/blob/d3000b7c87ed53a88b302939b0c88405d63d7b67/src/main/java/com/stackify/api/common/lang/Throwables.java#L109-L131
js-lib-com/commons
src/main/java/js/util/Strings.java
Strings.save
public static void save(CharSequence chars, Writer writer) throws IOException { if(chars != null) { StringReader reader = new StringReader(chars.toString()); Files.copy(reader, writer); } }
java
public static void save(CharSequence chars, Writer writer) throws IOException { if(chars != null) { StringReader reader = new StringReader(chars.toString()); Files.copy(reader, writer); } }
[ "public", "static", "void", "save", "(", "CharSequence", "chars", ",", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "chars", "!=", "null", ")", "{", "StringReader", "reader", "=", "new", "StringReader", "(", "chars", ".", "toString", "...
Copy source characters to requested output characters stream. If given <code>chars</code> parameter is null or empty this method does nothing. @param chars source characters stream, @param writer target writer. @throws IOException if copy operation fails.
[ "Copy", "source", "characters", "to", "requested", "output", "characters", "stream", ".", "If", "given", "<code", ">", "chars<", "/", "code", ">", "parameter", "is", "null", "or", "empty", "this", "method", "does", "nothing", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1509-L1515
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/transition/TransitionFactory.java
TransitionFactory.getBuilder
public VMTransitionBuilder getBuilder(VMState srcState, VMState dstState) { Map<VMState, VMTransitionBuilder> dstCompliant = vmAMB2.get(dstState); if (dstCompliant == null) { return null; } return dstCompliant.get(srcState); }
java
public VMTransitionBuilder getBuilder(VMState srcState, VMState dstState) { Map<VMState, VMTransitionBuilder> dstCompliant = vmAMB2.get(dstState); if (dstCompliant == null) { return null; } return dstCompliant.get(srcState); }
[ "public", "VMTransitionBuilder", "getBuilder", "(", "VMState", "srcState", ",", "VMState", "dstState", ")", "{", "Map", "<", "VMState", ",", "VMTransitionBuilder", ">", "dstCompliant", "=", "vmAMB2", ".", "get", "(", "dstState", ")", ";", "if", "(", "dstCompli...
Get the model builder for a given transition @param srcState the current VM state @param dstState the current VM state @return the list of possible transitions. {@code null} if no transition is available
[ "Get", "the", "model", "builder", "for", "a", "given", "transition" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/transition/TransitionFactory.java#L108-L114
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/CDSComparator.java
CDSComparator.compare
@Override public int compare(CDSSequence o1, CDSSequence o2) { if(o1.getStrand() != o2.getStrand()){ return o1.getBioBegin() - o2.getBioBegin(); } if(o1.getStrand() == Strand.NEGATIVE){ return -1 * (o1.getBioBegin() - o2.getBioBegin()); } return o1.getBioBegin() - o2.getBioBegin(); }
java
@Override public int compare(CDSSequence o1, CDSSequence o2) { if(o1.getStrand() != o2.getStrand()){ return o1.getBioBegin() - o2.getBioBegin(); } if(o1.getStrand() == Strand.NEGATIVE){ return -1 * (o1.getBioBegin() - o2.getBioBegin()); } return o1.getBioBegin() - o2.getBioBegin(); }
[ "@", "Override", "public", "int", "compare", "(", "CDSSequence", "o1", ",", "CDSSequence", "o2", ")", "{", "if", "(", "o1", ".", "getStrand", "(", ")", "!=", "o2", ".", "getStrand", "(", ")", ")", "{", "return", "o1", ".", "getBioBegin", "(", ")", ...
Used to sort two CDSSequences where Negative Strand makes it tough @param o1 @param o2 @return val
[ "Used", "to", "sort", "two", "CDSSequences", "where", "Negative", "Strand", "makes", "it", "tough" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/CDSComparator.java#L40-L50
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/codec/CCITTG4Encoder.java
CCITTG4Encoder.fax4Encode
public void fax4Encode(byte[] data, int offset, int size) { dataBp = data; offsetData = offset; sizeData = size; while (sizeData > 0) { Fax3Encode2DRow(); System.arraycopy(dataBp, offsetData, refline, 0, rowbytes); offsetData += rowbytes; s...
java
public void fax4Encode(byte[] data, int offset, int size) { dataBp = data; offsetData = offset; sizeData = size; while (sizeData > 0) { Fax3Encode2DRow(); System.arraycopy(dataBp, offsetData, refline, 0, rowbytes); offsetData += rowbytes; s...
[ "public", "void", "fax4Encode", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "size", ")", "{", "dataBp", "=", "data", ";", "offsetData", "=", "offset", ";", "sizeData", "=", "size", ";", "while", "(", "sizeData", ">", "0", ")", ...
Encodes a number of lines. @param data the data to be encoded @param offset the offset into the data @param size the size of the data to be encoded
[ "Encodes", "a", "number", "of", "lines", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/codec/CCITTG4Encoder.java#L83-L93
google/flatbuffers
java/com/google/flatbuffers/Utf8Safe.java
Utf8Safe.decodeUtf8
@Override public String decodeUtf8(ByteBuffer buffer, int offset, int length) throws IllegalArgumentException { if (buffer.hasArray()) { return decodeUtf8Array(buffer.array(), buffer.arrayOffset() + offset, length); } else { return decodeUtf8Buffer(buffer, offset, length); } }
java
@Override public String decodeUtf8(ByteBuffer buffer, int offset, int length) throws IllegalArgumentException { if (buffer.hasArray()) { return decodeUtf8Array(buffer.array(), buffer.arrayOffset() + offset, length); } else { return decodeUtf8Buffer(buffer, offset, length); } }
[ "@", "Override", "public", "String", "decodeUtf8", "(", "ByteBuffer", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IllegalArgumentException", "{", "if", "(", "buffer", ".", "hasArray", "(", ")", ")", "{", "return", "decodeUtf8Array", ...
Decodes the given UTF-8 portion of the {@link ByteBuffer} into a {@link String}. @throws IllegalArgumentException if the input is not valid UTF-8.
[ "Decodes", "the", "given", "UTF", "-", "8", "portion", "of", "the", "{", "@link", "ByteBuffer", "}", "into", "a", "{", "@link", "String", "}", "." ]
train
https://github.com/google/flatbuffers/blob/6cc30b3272d79c85db7d4871ac0aa69541dc89de/java/com/google/flatbuffers/Utf8Safe.java#L286-L294
Abnaxos/markdown-doclet
doclet/jdk8/src/main/java/ch/raffael/mddoclet/Options.java
Options.validOptions
public static boolean validOptions(String[][] options, DocErrorReporter errorReporter) { options = new Options().load(options, errorReporter); if ( options != null ) { return Standard.validOptions(options, errorReporter); } else { return false; } }
java
public static boolean validOptions(String[][] options, DocErrorReporter errorReporter) { options = new Options().load(options, errorReporter); if ( options != null ) { return Standard.validOptions(options, errorReporter); } else { return false; } }
[ "public", "static", "boolean", "validOptions", "(", "String", "[", "]", "[", "]", "options", ",", "DocErrorReporter", "errorReporter", ")", "{", "options", "=", "new", "Options", "(", ")", ".", "load", "(", "options", ",", "errorReporter", ")", ";", "if", ...
As specified by the Doclet specification. @param options The command line options. @param errorReporter An error reporter to print messages. @return `true` if the options are valid. @see com.sun.javadoc.Doclet#validOptions(String[][], com.sun.javadoc.DocErrorReporter)
[ "As", "specified", "by", "the", "Doclet", "specification", "." ]
train
https://github.com/Abnaxos/markdown-doclet/blob/e98a9630206fc9c8d813cf2349ff594be8630054/doclet/jdk8/src/main/java/ch/raffael/mddoclet/Options.java#L577-L585
box/box-java-sdk
src/main/java/com/box/sdk/BoxLegalHoldPolicy.java
BoxLegalHoldPolicy.createOngoing
public static BoxLegalHoldPolicy.Info createOngoing(BoxAPIConnection api, String name, String description) { URL url = ALL_LEGAL_HOLD_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, "POST"); JsonObject requestJSON = new JsonObject() .ad...
java
public static BoxLegalHoldPolicy.Info createOngoing(BoxAPIConnection api, String name, String description) { URL url = ALL_LEGAL_HOLD_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, "POST"); JsonObject requestJSON = new JsonObject() .ad...
[ "public", "static", "BoxLegalHoldPolicy", ".", "Info", "createOngoing", "(", "BoxAPIConnection", "api", ",", "String", "name", ",", "String", "description", ")", "{", "URL", "url", "=", "ALL_LEGAL_HOLD_URL_TEMPLATE", ".", "build", "(", "api", ".", "getBaseURL", ...
Creates a new ongoing Legal Hold Policy. @param api the API connection to be used by the resource. @param name the name of Legal Hold Policy. @param description the description of Legal Hold Policy. @return information about the Legal Hold Policy created.
[ "Creates", "a", "new", "ongoing", "Legal", "Hold", "Policy", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxLegalHoldPolicy.java#L116-L130
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/current_hostname.java
current_hostname.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { current_hostname_responses result = (current_hostname_responses) service.get_payload_formatter().string_to_resource(current_hostname_responses.class, response); if(result.errorcode != 0) { if (res...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { current_hostname_responses result = (current_hostname_responses) service.get_payload_formatter().string_to_resource(current_hostname_responses.class, response); if(result.errorcode != 0) { if (res...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "current_hostname_responses", "result", "=", "(", "current_hostname_responses", ")", "service", ".", "get_payl...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/current_hostname.java#L226-L243
dasein-cloud/dasein-cloud-aws
src/main/java/org/dasein/cloud/aws/AWSCloud.java
AWSCloud.addIndexedParameters
public static void addIndexedParameters( @Nonnull Map<String, String> parameters, @Nonnull String prefix, Map<String, String> extraParameters ) { if( extraParameters == null || extraParameters.size() == 0 ) { return; } int i = 1; for( Map.Entry<String, String> entry : extraPa...
java
public static void addIndexedParameters( @Nonnull Map<String, String> parameters, @Nonnull String prefix, Map<String, String> extraParameters ) { if( extraParameters == null || extraParameters.size() == 0 ) { return; } int i = 1; for( Map.Entry<String, String> entry : extraPa...
[ "public", "static", "void", "addIndexedParameters", "(", "@", "Nonnull", "Map", "<", "String", ",", "String", ">", "parameters", ",", "@", "Nonnull", "String", "prefix", ",", "Map", "<", "String", ",", "String", ">", "extraParameters", ")", "{", "if", "(",...
Helper method for adding indexed member parameters, e.g. <i>AlarmNames.member.N</i>. Will overwrite existing parameters if present. Assumes indexing starts at 1. @param parameters the existing parameters map to add to @param prefix the prefix value for each parameter key @param extraParameters the values...
[ "Helper", "method", "for", "adding", "indexed", "member", "parameters", "e", ".", "g", ".", "<i", ">", "AlarmNames", ".", "member", ".", "N<", "/", "i", ">", ".", "Will", "overwrite", "existing", "parameters", "if", "present", ".", "Assumes", "indexing", ...
train
https://github.com/dasein-cloud/dasein-cloud-aws/blob/05098574197a1f573f77447cadc39a76bf00b99d/src/main/java/org/dasein/cloud/aws/AWSCloud.java#L1415-L1427
openbase/jul
exception/src/main/java/org/openbase/jul/exception/MultiException.java
MultiException.checkAndThrow
@Deprecated public static void checkAndThrow(final String message, final ExceptionStack exceptionStack) throws MultiException { if (exceptionStack == null || exceptionStack.isEmpty()) { return; } throw new MultiException(message, exceptionStack); }
java
@Deprecated public static void checkAndThrow(final String message, final ExceptionStack exceptionStack) throws MultiException { if (exceptionStack == null || exceptionStack.isEmpty()) { return; } throw new MultiException(message, exceptionStack); }
[ "@", "Deprecated", "public", "static", "void", "checkAndThrow", "(", "final", "String", "message", ",", "final", "ExceptionStack", "exceptionStack", ")", "throws", "MultiException", "{", "if", "(", "exceptionStack", "==", "null", "||", "exceptionStack", ".", "isEm...
@param message the message used as {@code MultiException} headline message.. @param exceptionStack the stack to check. @throws MultiException @deprecated since v2.0 and will be removed in v3.0. Please use {@code checkAndThrow(final Callable<String> messageProvider, final ExceptionStack exceptionStack)} out of perform...
[ "@param", "message", "the", "message", "used", "as", "{", "@code", "MultiException", "}", "headline", "message", "..", "@param", "exceptionStack", "the", "stack", "to", "check", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/MultiException.java#L92-L98
ggrandes/packer
src/main/java/org/javastack/packer/Packer.java
Packer.getHexStringLower
public String getHexStringLower() { int len = getVInt(); byte[] hex = new byte[len]; System.arraycopy(buf, bufPosition, hex, 0, hex.length); bufPosition += hex.length; return toHex(hex, false); }
java
public String getHexStringLower() { int len = getVInt(); byte[] hex = new byte[len]; System.arraycopy(buf, bufPosition, hex, 0, hex.length); bufPosition += hex.length; return toHex(hex, false); }
[ "public", "String", "getHexStringLower", "(", ")", "{", "int", "len", "=", "getVInt", "(", ")", ";", "byte", "[", "]", "hex", "=", "new", "byte", "[", "len", "]", ";", "System", ".", "arraycopy", "(", "buf", ",", "bufPosition", ",", "hex", ",", "0"...
Get Hex String in lower case ("0123456789abcdef") @return @see #putHexString(String) @see #getHexStringUpper()
[ "Get", "Hex", "String", "in", "lower", "case", "(", "0123456789abcdef", ")" ]
train
https://github.com/ggrandes/packer/blob/0b37b286a3d0555050eb2e65419dd74f8d8d3e78/src/main/java/org/javastack/packer/Packer.java#L1221-L1227
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.ruleExists
public Boolean ruleExists(String topicPath, String subscriptionName, String ruleName) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.ruleExistsAsync(topicPath, subscriptionName, ruleName)); }
java
public Boolean ruleExists(String topicPath, String subscriptionName, String ruleName) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.ruleExistsAsync(topicPath, subscriptionName, ruleName)); }
[ "public", "Boolean", "ruleExists", "(", "String", "topicPath", ",", "String", "subscriptionName", ",", "String", "ruleName", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asyncCli...
Checks whether a given rule exists or not for a given subscription. @param topicPath - Path of the topic @param subscriptionName - Name of the subscription. @param ruleName - Name of the rule @return - True if the entity exists. False otherwise. @throws IllegalArgumentException - path is not null / empty / too long / i...
[ "Checks", "whether", "a", "given", "rule", "exists", "or", "not", "for", "a", "given", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L552-L554
jfoenixadmin/JFoenix
jfoenix/src/main/java/com/jfoenix/skins/PromptLinesWrapper.java
PromptLinesWrapper.animateFloatingLabel
private void animateFloatingLabel(boolean up, boolean animation) { if (promptTextSupplier.get() == null) { return; } if (up) { if (promptTextSupplier.get().getTranslateY() != -contentHeight) { unfocusTimer.stop(); runTimer(focusTimer, anima...
java
private void animateFloatingLabel(boolean up, boolean animation) { if (promptTextSupplier.get() == null) { return; } if (up) { if (promptTextSupplier.get().getTranslateY() != -contentHeight) { unfocusTimer.stop(); runTimer(focusTimer, anima...
[ "private", "void", "animateFloatingLabel", "(", "boolean", "up", ",", "boolean", "animation", ")", "{", "if", "(", "promptTextSupplier", ".", "get", "(", ")", "==", "null", ")", "{", "return", ";", "}", "if", "(", "up", ")", "{", "if", "(", "promptText...
this method is called when the text property is changed when the field is not focused (changed in code) @param up
[ "this", "method", "is", "called", "when", "the", "text", "property", "is", "changed", "when", "the", "field", "is", "not", "focused", "(", "changed", "in", "code", ")" ]
train
https://github.com/jfoenixadmin/JFoenix/blob/53235b5f561da4a515ef716059b8a8df5239ffa1/jfoenix/src/main/java/com/jfoenix/skins/PromptLinesWrapper.java#L271-L286
OpenLiberty/open-liberty
dev/com.ibm.ws.security.mp.jwt_fat/fat/src/com/ibm/ws/security/mp/jwt/fat/CommonMpJwtFat.java
CommonMpJwtFat.setUpAndStartBuilderServer
protected static void setUpAndStartBuilderServer(LibertyServer server, String configFile, boolean jwtEnabled) throws Exception { bootstrapUtils.writeBootstrapProperty(server, "oidcJWKEnabled", String.valueOf(jwtEnabled)); serverTracker.addServer(server); server.startServerUsingExpandedConfigurat...
java
protected static void setUpAndStartBuilderServer(LibertyServer server, String configFile, boolean jwtEnabled) throws Exception { bootstrapUtils.writeBootstrapProperty(server, "oidcJWKEnabled", String.valueOf(jwtEnabled)); serverTracker.addServer(server); server.startServerUsingExpandedConfigurat...
[ "protected", "static", "void", "setUpAndStartBuilderServer", "(", "LibertyServer", "server", ",", "String", "configFile", ",", "boolean", "jwtEnabled", ")", "throws", "Exception", "{", "bootstrapUtils", ".", "writeBootstrapProperty", "(", "server", ",", "\"oidcJWKEnable...
Startup a Liberty Server with the JWT Builder enabled @param server - the server to startup @param configFile - the config file to use when starting the serever @param jwtEnabled - flag indicating if jwt should be enabled (used to set a bootstrap property that the config will use) @throws Exception
[ "Startup", "a", "Liberty", "Server", "with", "the", "JWT", "Builder", "enabled" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.mp.jwt_fat/fat/src/com/ibm/ws/security/mp/jwt/fat/CommonMpJwtFat.java#L67-L72
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/utils/CodecUtils.java
CodecUtils.hexSHA512
public static String hexSHA512(String data, String salt) { Objects.requireNonNull(data, Required.DATA.toString()); Objects.requireNonNull(salt, Required.SALT.toString()); return DigestUtils.sha512Hex(data + salt); }
java
public static String hexSHA512(String data, String salt) { Objects.requireNonNull(data, Required.DATA.toString()); Objects.requireNonNull(salt, Required.SALT.toString()); return DigestUtils.sha512Hex(data + salt); }
[ "public", "static", "String", "hexSHA512", "(", "String", "data", ",", "String", "salt", ")", "{", "Objects", ".", "requireNonNull", "(", "data", ",", "Required", ".", "DATA", ".", "toString", "(", ")", ")", ";", "Objects", ".", "requireNonNull", "(", "s...
Hashes a given cleartext data with SHA512 and an appended salt @param data The cleartext data @param salt The salt to use @return SHA512 hashed value
[ "Hashes", "a", "given", "cleartext", "data", "with", "SHA512", "and", "an", "appended", "salt" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/utils/CodecUtils.java#L57-L62
JOML-CI/JOML
src/org/joml/Vector4i.java
Vector4i.setComponent
public Vector4i setComponent(int component, int value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; case 2: z = value; ...
java
public Vector4i setComponent(int component, int value) throws IllegalArgumentException { switch (component) { case 0: x = value; break; case 1: y = value; break; case 2: z = value; ...
[ "public", "Vector4i", "setComponent", "(", "int", "component", ",", "int", "value", ")", "throws", "IllegalArgumentException", "{", "switch", "(", "component", ")", "{", "case", "0", ":", "x", "=", "value", ";", "break", ";", "case", "1", ":", "y", "=", ...
Set the value of the specified component of this vector. @param component the component whose value to set, within <code>[0..3]</code> @param value the value to set @return this @throws IllegalArgumentException if <code>component</code> is not within <code>[0..3]</code>
[ "Set", "the", "value", "of", "the", "specified", "component", "of", "this", "vector", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector4i.java#L504-L522
op4j/op4j
src/main/java/org/op4j/functions/FnFunc.java
FnFunc.ifNullOrTrueThen
public static final <T> Function<T,T> ifNullOrTrueThen(final Type<T> targetType, final IFunction<? super T, Boolean> condition, final IFunction<? super T,? extends T> thenFunction) { return ifTrueThen(targetType, FnBoolean.or(FnObject.isNull(),condition), thenFunction); }
java
public static final <T> Function<T,T> ifNullOrTrueThen(final Type<T> targetType, final IFunction<? super T, Boolean> condition, final IFunction<? super T,? extends T> thenFunction) { return ifTrueThen(targetType, FnBoolean.or(FnObject.isNull(),condition), thenFunction); }
[ "public", "static", "final", "<", "T", ">", "Function", "<", "T", ",", "T", ">", "ifNullOrTrueThen", "(", "final", "Type", "<", "T", ">", "targetType", ",", "final", "IFunction", "<", "?", "super", "T", ",", "Boolean", ">", "condition", ",", "final", ...
<p> Builds a function that will execute the specified function <tt>thenFunction</tt> only if the target object is null or the result of executing <tt>condition</tt> on it is true. </p> <p> The built function cannot change the return type (receives <tt>T</tt> and returns <tt>T</tt>) because the <tt>thenFunction</tt> cou...
[ "<p", ">", "Builds", "a", "function", "that", "will", "execute", "the", "specified", "function", "<tt", ">", "thenFunction<", "/", "tt", ">", "only", "if", "the", "target", "object", "is", "null", "or", "the", "result", "of", "executing", "<tt", ">", "co...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnFunc.java#L269-L271
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/S3RequestEndpointResolver.java
S3RequestEndpointResolver.convertToVirtualHostEndpoint
private static URI convertToVirtualHostEndpoint(URI endpoint, String bucketName) { try { return new URI(String.format("%s://%s.%s", endpoint.getScheme(), bucketName, endpoint.getAuthority())); } catch (URISyntaxException e) { throw new IllegalArgumentException("Invalid bucket nam...
java
private static URI convertToVirtualHostEndpoint(URI endpoint, String bucketName) { try { return new URI(String.format("%s://%s.%s", endpoint.getScheme(), bucketName, endpoint.getAuthority())); } catch (URISyntaxException e) { throw new IllegalArgumentException("Invalid bucket nam...
[ "private", "static", "URI", "convertToVirtualHostEndpoint", "(", "URI", "endpoint", ",", "String", "bucketName", ")", "{", "try", "{", "return", "new", "URI", "(", "String", ".", "format", "(", "\"%s://%s.%s\"", ",", "endpoint", ".", "getScheme", "(", ")", "...
Converts the current endpoint set for this client into virtual addressing style, by placing the name of the specified bucket before the S3 service endpoint. @param bucketName The name of the bucket to use in the virtual addressing style of the returned URI. @return A new URI, creating from the current service endpoint...
[ "Converts", "the", "current", "endpoint", "set", "for", "this", "client", "into", "virtual", "addressing", "style", "by", "placing", "the", "name", "of", "the", "specified", "bucket", "before", "the", "S3", "service", "endpoint", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/S3RequestEndpointResolver.java#L73-L79
realexpayments/rxp-hpp-java
src/main/java/com/realexpayments/hpp/sdk/RealexHpp.java
RealexHpp.requestFromJson
public HppRequest requestFromJson(String json, boolean encoded) { LOGGER.info("Converting JSON to HppRequest."); //convert to HppRequest from JSON HppRequest hppRequest = JsonUtils.fromJsonHppRequest(json); //decode if necessary if (encoded) { LOGGER.debug("Decoding object."); try { hppRequest = ...
java
public HppRequest requestFromJson(String json, boolean encoded) { LOGGER.info("Converting JSON to HppRequest."); //convert to HppRequest from JSON HppRequest hppRequest = JsonUtils.fromJsonHppRequest(json); //decode if necessary if (encoded) { LOGGER.debug("Decoding object."); try { hppRequest = ...
[ "public", "HppRequest", "requestFromJson", "(", "String", "json", ",", "boolean", "encoded", ")", "{", "LOGGER", ".", "info", "(", "\"Converting JSON to HppRequest.\"", ")", ";", "//convert to HppRequest from JSON", "HppRequest", "hppRequest", "=", "JsonUtils", ".", "...
<p> Method produces <code>HppRequest</code> object from JSON. Carries out the following actions: <ul> <li>Deserialises JSON to request object</li> <li>Decodes Base64 inputs</li> <li>Validates inputs</li> </ul> </p> @param json @param encoded <code>true</code> if the JSON values have been encoded. @return HppRequest
[ "<p", ">", "Method", "produces", "<code", ">", "HppRequest<", "/", "code", ">", "object", "from", "JSON", ".", "Carries", "out", "the", "following", "actions", ":", "<ul", ">", "<li", ">", "Deserialises", "JSON", "to", "request", "object<", "/", "li", ">...
train
https://github.com/realexpayments/rxp-hpp-java/blob/29cc5df036af09a6d8ea16ccd7e02e856f72620f/src/main/java/com/realexpayments/hpp/sdk/RealexHpp.java#L147-L170
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.summarizeForSubscriptionAsync
public Observable<SummarizeResultsInner> summarizeForSubscriptionAsync(String subscriptionId, QueryOptions queryOptions) { return summarizeForSubscriptionWithServiceResponseAsync(subscriptionId, queryOptions).map(new Func1<ServiceResponse<SummarizeResultsInner>, SummarizeResultsInner>() { @Override ...
java
public Observable<SummarizeResultsInner> summarizeForSubscriptionAsync(String subscriptionId, QueryOptions queryOptions) { return summarizeForSubscriptionWithServiceResponseAsync(subscriptionId, queryOptions).map(new Func1<ServiceResponse<SummarizeResultsInner>, SummarizeResultsInner>() { @Override ...
[ "public", "Observable", "<", "SummarizeResultsInner", ">", "summarizeForSubscriptionAsync", "(", "String", "subscriptionId", ",", "QueryOptions", "queryOptions", ")", "{", "return", "summarizeForSubscriptionWithServiceResponseAsync", "(", "subscriptionId", ",", "queryOptions", ...
Summarizes policy states for the resources under the subscription. @param subscriptionId Microsoft Azure subscription ID. @param queryOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the SummarizeResultsInner object
[ "Summarizes", "policy", "states", "for", "the", "resources", "under", "the", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L816-L823
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/cloning/BasicCloner.java
BasicCloner.setImplementors
public void setImplementors(Map<Class<?>, CloneImplementor> implementors) { // this.implementors = implementors; this.allImplementors = new HashMap<Class<?>, CloneImplementor>(); allImplementors.putAll(builtInImplementors); allImplementors.putAll(implementors); }
java
public void setImplementors(Map<Class<?>, CloneImplementor> implementors) { // this.implementors = implementors; this.allImplementors = new HashMap<Class<?>, CloneImplementor>(); allImplementors.putAll(builtInImplementors); allImplementors.putAll(implementors); }
[ "public", "void", "setImplementors", "(", "Map", "<", "Class", "<", "?", ">", ",", "CloneImplementor", ">", "implementors", ")", "{", "// this.implementors = implementors;", "this", ".", "allImplementors", "=", "new", "HashMap", "<", "Class", "<", "?", ">", ",...
Sets CloneImplementors to be used. @param implementors The implementors
[ "Sets", "CloneImplementors", "to", "be", "used", "." ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/cloning/BasicCloner.java#L248-L254
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java
CPDisplayLayoutPersistenceImpl.removeByC_C
@Override public CPDisplayLayout removeByC_C(long classNameId, long classPK) throws NoSuchCPDisplayLayoutException { CPDisplayLayout cpDisplayLayout = findByC_C(classNameId, classPK); return remove(cpDisplayLayout); }
java
@Override public CPDisplayLayout removeByC_C(long classNameId, long classPK) throws NoSuchCPDisplayLayoutException { CPDisplayLayout cpDisplayLayout = findByC_C(classNameId, classPK); return remove(cpDisplayLayout); }
[ "@", "Override", "public", "CPDisplayLayout", "removeByC_C", "(", "long", "classNameId", ",", "long", "classPK", ")", "throws", "NoSuchCPDisplayLayoutException", "{", "CPDisplayLayout", "cpDisplayLayout", "=", "findByC_C", "(", "classNameId", ",", "classPK", ")", ";",...
Removes the cp display layout where classNameId = &#63; and classPK = &#63; from the database. @param classNameId the class name ID @param classPK the class pk @return the cp display layout that was removed
[ "Removes", "the", "cp", "display", "layout", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDisplayLayoutPersistenceImpl.java#L1633-L1639
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPdfWriter.java
MPdfWriter.renderList
protected void renderList(final MBasicTable table, final Table datatable) throws BadElementException { final int columnCount = table.getColumnCount(); final int rowCount = table.getRowCount(); // data rows final Font font = FontFactory.getFont(FontFactory.HELVETICA, 10, Font.NORMAL); datatable.getDef...
java
protected void renderList(final MBasicTable table, final Table datatable) throws BadElementException { final int columnCount = table.getColumnCount(); final int rowCount = table.getRowCount(); // data rows final Font font = FontFactory.getFont(FontFactory.HELVETICA, 10, Font.NORMAL); datatable.getDef...
[ "protected", "void", "renderList", "(", "final", "MBasicTable", "table", ",", "final", "Table", "datatable", ")", "throws", "BadElementException", "{", "final", "int", "columnCount", "=", "table", ".", "getColumnCount", "(", ")", ";", "final", "int", "rowCount",...
Effectue le rendu de la liste. @param table MBasicTable @param datatable Table @throws BadElementException e
[ "Effectue", "le", "rendu", "de", "la", "liste", "." ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/print/MPdfWriter.java#L289-L316
b3log/latke
latke-core/src/main/java/org/json/JSONArray.java
JSONArray.optFloat
public float optFloat(int index, float defaultValue) { final Number val = this.optNumber(index, null); if (val == null) { return defaultValue; } final float floatValue = val.floatValue(); // if (Float.isNaN(floatValue) || Float.isInfinite(floatValue)) { // ret...
java
public float optFloat(int index, float defaultValue) { final Number val = this.optNumber(index, null); if (val == null) { return defaultValue; } final float floatValue = val.floatValue(); // if (Float.isNaN(floatValue) || Float.isInfinite(floatValue)) { // ret...
[ "public", "float", "optFloat", "(", "int", "index", ",", "float", "defaultValue", ")", "{", "final", "Number", "val", "=", "this", ".", "optNumber", "(", "index", ",", "null", ")", ";", "if", "(", "val", "==", "null", ")", "{", "return", "defaultValue"...
Get the optional float value associated with an index. The defaultValue is returned if there is no value for the index, or if the value is not a number and cannot be converted to a number. @param index subscript @param defaultValue The default value. @return The value.
[ "Get", "the", "optional", "float", "value", "associated", "with", "an", "index", ".", "The", "defaultValue", "is", "returned", "if", "there", "is", "no", "value", "for", "the", "index", "or", "if", "the", "value", "is", "not", "a", "number", "and", "cann...
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONArray.java#L605-L615
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectUnionOfImpl_CustomFieldSerializer.java
OWLObjectUnionOfImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectUnionOfImpl instance) throws SerializationException { serialize(streamWriter, instance); }
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectUnionOfImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectUnionOfImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectUnionOfImpl_CustomFieldSerializer.java#L69-L72
alkacon/opencms-core
src/org/opencms/ui/login/CmsLoginUI.java
CmsLoginUI.generateLoginHtmlFragment
public static String generateLoginHtmlFragment(CmsObject cms, VaadinRequest request) throws IOException { LoginParameters parameters = CmsLoginHelper.getLoginParameters(cms, (HttpServletRequest)request, true); request.getWrappedSession().setAttribute(CmsLoginUI.INIT_DATA_SESSION_ATTR, parameters); ...
java
public static String generateLoginHtmlFragment(CmsObject cms, VaadinRequest request) throws IOException { LoginParameters parameters = CmsLoginHelper.getLoginParameters(cms, (HttpServletRequest)request, true); request.getWrappedSession().setAttribute(CmsLoginUI.INIT_DATA_SESSION_ATTR, parameters); ...
[ "public", "static", "String", "generateLoginHtmlFragment", "(", "CmsObject", "cms", ",", "VaadinRequest", "request", ")", "throws", "IOException", "{", "LoginParameters", "parameters", "=", "CmsLoginHelper", ".", "getLoginParameters", "(", "cms", ",", "(", "HttpServle...
Returns the bootstrap html fragment required to display the login dialog.<p> @param cms the cms context @param request the request @return the html fragment @throws IOException in case reading the html template fails
[ "Returns", "the", "bootstrap", "html", "fragment", "required", "to", "display", "the", "login", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsLoginUI.java#L308-L333
james-hu/jabb-core
src/main/java/net/sf/jabb/util/perf/RunTime.java
RunTime.addDetail
public void addDetail(String desc, long milliStartTime, long nanoDurationTime){ this.getDetail(desc).add(milliStartTime, nanoDurationTime); }
java
public void addDetail(String desc, long milliStartTime, long nanoDurationTime){ this.getDetail(desc).add(milliStartTime, nanoDurationTime); }
[ "public", "void", "addDetail", "(", "String", "desc", ",", "long", "milliStartTime", ",", "long", "nanoDurationTime", ")", "{", "this", ".", "getDetail", "(", "desc", ")", ".", "add", "(", "milliStartTime", ",", "nanoDurationTime", ")", ";", "}" ]
Add one run time to a specified detail record.<br> 给指定的详细记录增加一次RunTime。 @param desc Description of the detail record.<br> 详细记录的Description @param milliStartTime Start time in milliseconds (usually from System.currentTimeMillis()) @param nanoDurationTime Run time duration in nanoseconds.
[ "Add", "one", "run", "time", "to", "a", "specified", "detail", "record", ".", "<br", ">", "给指定的详细记录增加一次RunTime。" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/perf/RunTime.java#L197-L199
RobertStewart/privateer
src/main/java/com/wombatnation/privateer/Privateer.java
Privateer.findSupertypeMethod
private Method findSupertypeMethod(Object o, String methodName, Class<?>[] types) { Method matchingMethod = null; Method[] methods = o.getClass().getDeclaredMethods(); methodloop: for (Method method : methods) { if (methodName.equals(method.getName())) { Class<?>[] params = metho...
java
private Method findSupertypeMethod(Object o, String methodName, Class<?>[] types) { Method matchingMethod = null; Method[] methods = o.getClass().getDeclaredMethods(); methodloop: for (Method method : methods) { if (methodName.equals(method.getName())) { Class<?>[] params = metho...
[ "private", "Method", "findSupertypeMethod", "(", "Object", "o", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "types", ")", "{", "Method", "matchingMethod", "=", "null", ";", "Method", "[", "]", "methods", "=", "o", ".", "getClass",...
Examines each argument to see if a param in the same position is a supertype. This method is needed because getDeclaredMethod() does a formal type match. For example, if the method takes a java.util.List as a parameter, getDeclaredMethod() will never match, since the formal type of whatever you pass will be a concrete ...
[ "Examines", "each", "argument", "to", "see", "if", "a", "param", "in", "the", "same", "position", "is", "a", "supertype", ".", "This", "method", "is", "needed", "because", "getDeclaredMethod", "()", "does", "a", "formal", "type", "match", ".", "For", "exam...
train
https://github.com/RobertStewart/privateer/blob/766603021ff406c950e798ce3fb259c9f1f460c7/src/main/java/com/wombatnation/privateer/Privateer.java#L163-L187
groupon/monsoon
intf/src/main/java/com/groupon/lex/metrics/timeseries/TimeSeriesMetricDeltaSet.java
TimeSeriesMetricDeltaSet.mapOptional
public TimeSeriesMetricDeltaSet mapOptional(Function<? super MetricValue, Optional<? extends MetricValue>> fn) { return values_ .map( fn, (x) -> x.entrySet().stream() .map((entry) -> apply_fn_optional_(entry, fn)) ...
java
public TimeSeriesMetricDeltaSet mapOptional(Function<? super MetricValue, Optional<? extends MetricValue>> fn) { return values_ .map( fn, (x) -> x.entrySet().stream() .map((entry) -> apply_fn_optional_(entry, fn)) ...
[ "public", "TimeSeriesMetricDeltaSet", "mapOptional", "(", "Function", "<", "?", "super", "MetricValue", ",", "Optional", "<", "?", "extends", "MetricValue", ">", ">", "fn", ")", "{", "return", "values_", ".", "map", "(", "fn", ",", "(", "x", ")", "-", ">...
Apply a single-argument function to the set. @param fn A function that takes a TimeSeriesMetricDelta and returns a TimeSeriesMetricDelta. @return The mapped TimeSeriesMetricDelta from this set.
[ "Apply", "a", "single", "-", "argument", "function", "to", "the", "set", "." ]
train
https://github.com/groupon/monsoon/blob/eb68d72ba4c01fe018dc981097dbee033908f5c7/intf/src/main/java/com/groupon/lex/metrics/timeseries/TimeSeriesMetricDeltaSet.java#L173-L184
operasoftware/operaprestodriver
src/com/opera/core/systems/scope/stp/services/desktop/ScopeDesktopWindowManager.java
ScopeDesktopWindowManager.getQuickWindow
public QuickWindow getQuickWindow(QuickWidgetSearchType property, String value) { QuickWindow lastFound = null; List<QuickWindow> windows = getQuickWindowList(); for (QuickWindow window : windows) { if (property.equals(QuickWidgetSearchType.NAME)) { if (window.getName().equals(value)) { ...
java
public QuickWindow getQuickWindow(QuickWidgetSearchType property, String value) { QuickWindow lastFound = null; List<QuickWindow> windows = getQuickWindowList(); for (QuickWindow window : windows) { if (property.equals(QuickWidgetSearchType.NAME)) { if (window.getName().equals(value)) { ...
[ "public", "QuickWindow", "getQuickWindow", "(", "QuickWidgetSearchType", "property", ",", "String", "value", ")", "{", "QuickWindow", "lastFound", "=", "null", ";", "List", "<", "QuickWindow", ">", "windows", "=", "getQuickWindowList", "(", ")", ";", "for", "(",...
Note: This grabs the first window with a matching name, there might be more
[ "Note", ":", "This", "grabs", "the", "first", "window", "with", "a", "matching", "name", "there", "might", "be", "more" ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/scope/stp/services/desktop/ScopeDesktopWindowManager.java#L78-L94
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java
BitWriter.writeValue
public void writeValue(final int length, final int value) throws EncodingException { if (length > 31) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + value); } for (int i = length - 1; i >= 0; i--) { writeBit((value >...
java
public void writeValue(final int length, final int value) throws EncodingException { if (length > 31) { throw ErrorFactory.createEncodingException( ErrorKeys.DIFFTOOL_ENCODING_VALUE_OUT_OF_RANGE, "more than maximum length: " + value); } for (int i = length - 1; i >= 0; i--) { writeBit((value >...
[ "public", "void", "writeValue", "(", "final", "int", "length", ",", "final", "int", "value", ")", "throws", "EncodingException", "{", "if", "(", "length", ">", "31", ")", "{", "throw", "ErrorFactory", ".", "createEncodingException", "(", "ErrorKeys", ".", "D...
Writes a positive integer to the buffer. @param length the number of bits to write @param value an integer value @throws EncodingException if the length of the input is more than 31 bits.
[ "Writes", "a", "positive", "integer", "to", "the", "buffer", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/data/codec/BitWriter.java#L127-L139
spring-cloud/spring-cloud-sleuth
spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SleuthAnnotationUtils.java
SleuthAnnotationUtils.findAnnotation
static <T extends Annotation> T findAnnotation(Method method, Class<T> clazz) { T annotation = AnnotationUtils.findAnnotation(method, clazz); if (annotation == null) { try { annotation = AnnotationUtils.findAnnotation(method.getDeclaringClass() .getMethod(method.getName(), method.getParameterTypes()), ...
java
static <T extends Annotation> T findAnnotation(Method method, Class<T> clazz) { T annotation = AnnotationUtils.findAnnotation(method, clazz); if (annotation == null) { try { annotation = AnnotationUtils.findAnnotation(method.getDeclaringClass() .getMethod(method.getName(), method.getParameterTypes()), ...
[ "static", "<", "T", "extends", "Annotation", ">", "T", "findAnnotation", "(", "Method", "method", ",", "Class", "<", "T", ">", "clazz", ")", "{", "T", "annotation", "=", "AnnotationUtils", ".", "findAnnotation", "(", "method", ",", "clazz", ")", ";", "if...
Searches for an annotation either on a method or inside the method parameters. @param <T> - annotation @param clazz - class with annotation @param method - annotated method @return annotation
[ "Searches", "for", "an", "annotation", "either", "on", "a", "method", "or", "inside", "the", "method", "parameters", "." ]
train
https://github.com/spring-cloud/spring-cloud-sleuth/blob/f29c05fb8fba33e23aa21bb13aeb13ab8d27b485/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SleuthAnnotationUtils.java#L77-L92
cdk/cdk
tool/group/src/main/java/org/openscience/cdk/group/AtomContainerDiscretePartitionRefinerImpl.java
AtomContainerDiscretePartitionRefinerImpl.getAutomorphismGroup
public PermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition) { setup(atomContainer); super.refine(initialPartition); return super.getAutomorphismGroup(); }
java
public PermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition) { setup(atomContainer); super.refine(initialPartition); return super.getAutomorphismGroup(); }
[ "public", "PermutationGroup", "getAutomorphismGroup", "(", "IAtomContainer", "atomContainer", ",", "Partition", "initialPartition", ")", "{", "setup", "(", "atomContainer", ")", ";", "super", ".", "refine", "(", "initialPartition", ")", ";", "return", "super", ".", ...
Get the automorphism group of the molecule given an initial partition. @param atomContainer the atom container to use @param initialPartition an initial partition of the atoms @return the automorphism group starting with this partition
[ "Get", "the", "automorphism", "group", "of", "the", "molecule", "given", "an", "initial", "partition", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/group/src/main/java/org/openscience/cdk/group/AtomContainerDiscretePartitionRefinerImpl.java#L115-L119
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/DefaultOptionParser.java
DefaultOptionParser.isShortOption
private boolean isShortOption(String token) { // short options (-S, -SV, -S=V, -SV1=V2, -S1S2) if (!token.startsWith("-") || token.length() == 1) { return false; } // remove leading "-" and "=value" int pos = token.indexOf("="); String name = (pos == -1 ? toke...
java
private boolean isShortOption(String token) { // short options (-S, -SV, -S=V, -SV1=V2, -S1S2) if (!token.startsWith("-") || token.length() == 1) { return false; } // remove leading "-" and "=value" int pos = token.indexOf("="); String name = (pos == -1 ? toke...
[ "private", "boolean", "isShortOption", "(", "String", "token", ")", "{", "// short options (-S, -SV, -S=V, -SV1=V2, -S1S2)", "if", "(", "!", "token", ".", "startsWith", "(", "\"-\"", ")", "||", "token", ".", "length", "(", ")", "==", "1", ")", "{", "return", ...
Tells if the token looks like a short option. @param token the command line token to handle @return true if the token like a short option
[ "Tells", "if", "the", "token", "looks", "like", "a", "short", "option", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/DefaultOptionParser.java#L493-L506
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java
CommercePriceEntryPersistenceImpl.findByCompanyId
@Override public List<CommercePriceEntry> findByCompanyId(long companyId, int start, int end, OrderByComparator<CommercePriceEntry> orderByComparator) { return findByCompanyId(companyId, start, end, orderByComparator, true); }
java
@Override public List<CommercePriceEntry> findByCompanyId(long companyId, int start, int end, OrderByComparator<CommercePriceEntry> orderByComparator) { return findByCompanyId(companyId, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CommercePriceEntry", ">", "findByCompanyId", "(", "long", "companyId", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommercePriceEntry", ">", "orderByComparator", ")", "{", "return", "findByCompan...
Returns an ordered range of all the commerce price entries where companyId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first res...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "price", "entries", "where", "companyId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java#L2065-L2069
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
InternalUtils.ensureModuleConfig
public static ModuleConfig ensureModuleConfig( String modulePath, ServletContext context ) { try { ModuleConfig ret = getModuleConfig( modulePath, context ); if ( ret != null ) { return ret; } else { ...
java
public static ModuleConfig ensureModuleConfig( String modulePath, ServletContext context ) { try { ModuleConfig ret = getModuleConfig( modulePath, context ); if ( ret != null ) { return ret; } else { ...
[ "public", "static", "ModuleConfig", "ensureModuleConfig", "(", "String", "modulePath", ",", "ServletContext", "context", ")", "{", "try", "{", "ModuleConfig", "ret", "=", "getModuleConfig", "(", "modulePath", ",", "context", ")", ";", "if", "(", "ret", "!=", "...
Get the Struts ModuleConfig for the given module path. If there is none registered, and if it is possible to register one automatically, do so.
[ "Get", "the", "Struts", "ModuleConfig", "for", "the", "given", "module", "path", ".", "If", "there", "is", "none", "registered", "and", "if", "it", "is", "possible", "to", "register", "one", "automatically", "do", "so", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L473-L503
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/TouchState.java
TouchState.canBeFoldedWith
boolean canBeFoldedWith(TouchState ts, boolean ignoreIDs) { if (ts.pointCount != pointCount) { return false; } if (ignoreIDs) { return true; } for (int i = 0; i < pointCount; i++) { if (ts.points[i].id != points[i].id) { return ...
java
boolean canBeFoldedWith(TouchState ts, boolean ignoreIDs) { if (ts.pointCount != pointCount) { return false; } if (ignoreIDs) { return true; } for (int i = 0; i < pointCount; i++) { if (ts.points[i].id != points[i].id) { return ...
[ "boolean", "canBeFoldedWith", "(", "TouchState", "ts", ",", "boolean", "ignoreIDs", ")", "{", "if", "(", "ts", ".", "pointCount", "!=", "pointCount", ")", "{", "return", "false", ";", "}", "if", "(", "ignoreIDs", ")", "{", "return", "true", ";", "}", "...
Finds out whether two non-null states are identical in everything but their touch point coordinates @param ts the TouchState to compare to @param ignoreIDs if true, ignore IDs when comparing points
[ "Finds", "out", "whether", "two", "non", "-", "null", "states", "are", "identical", "in", "everything", "but", "their", "touch", "point", "coordinates" ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/TouchState.java#L272-L285
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/RecountOnValidHandler.java
RecountOnValidHandler.init
public void init(Record record, Record recordSub, boolean bRestoreCurrentRecord) { m_recordSub = recordSub; m_bRestoreCurrentRecord = bRestoreCurrentRecord; super.init(record); }
java
public void init(Record record, Record recordSub, boolean bRestoreCurrentRecord) { m_recordSub = recordSub; m_bRestoreCurrentRecord = bRestoreCurrentRecord; super.init(record); }
[ "public", "void", "init", "(", "Record", "record", ",", "Record", "recordSub", ",", "boolean", "bRestoreCurrentRecord", ")", "{", "m_recordSub", "=", "recordSub", ";", "m_bRestoreCurrentRecord", "=", "bRestoreCurrentRecord", ";", "super", ".", "init", "(", "record...
Constructor. @param record My owner (usually passed as null, and set on addListener in setOwner()). @param recordSub The sub-record.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/RecountOnValidHandler.java#L65-L70
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/tuple/Triple.java
Triple.compareTo
@Override public int compareTo(final Triple<L, M, R> other) { return new CompareToBuilder().append(getLeft(), other.getLeft()) .append(getMiddle(), other.getMiddle()) .append(getRight(), other.getRight()).toComparison(); }
java
@Override public int compareTo(final Triple<L, M, R> other) { return new CompareToBuilder().append(getLeft(), other.getLeft()) .append(getMiddle(), other.getMiddle()) .append(getRight(), other.getRight()).toComparison(); }
[ "@", "Override", "public", "int", "compareTo", "(", "final", "Triple", "<", "L", ",", "M", ",", "R", ">", "other", ")", "{", "return", "new", "CompareToBuilder", "(", ")", ".", "append", "(", "getLeft", "(", ")", ",", "other", ".", "getLeft", "(", ...
<p>Compares the triple based on the left element, followed by the middle element, finally the right element. The types must be {@code Comparable}.</p> @param other the other triple, not null @return negative if this is less, zero if equal, positive if greater
[ "<p", ">", "Compares", "the", "triple", "based", "on", "the", "left", "element", "followed", "by", "the", "middle", "element", "finally", "the", "right", "element", ".", "The", "types", "must", "be", "{", "@code", "Comparable", "}", ".", "<", "/", "p", ...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/tuple/Triple.java#L96-L101
voldemort/voldemort
src/java/voldemort/versioning/VectorClock.java
VectorClock.incrementVersion
public void incrementVersion(int node, long time) { if(node < 0 || node > Short.MAX_VALUE) throw new IllegalArgumentException(node + " is outside the acceptable range of node ids."); this.timestamp = time; Long version = versionMap.get...
java
public void incrementVersion(int node, long time) { if(node < 0 || node > Short.MAX_VALUE) throw new IllegalArgumentException(node + " is outside the acceptable range of node ids."); this.timestamp = time; Long version = versionMap.get...
[ "public", "void", "incrementVersion", "(", "int", "node", ",", "long", "time", ")", "{", "if", "(", "node", "<", "0", "||", "node", ">", "Short", ".", "MAX_VALUE", ")", "throw", "new", "IllegalArgumentException", "(", "node", "+", "\" is outside the acceptab...
Increment the version info associated with the given node @param node The node
[ "Increment", "the", "version", "info", "associated", "with", "the", "given", "node" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/versioning/VectorClock.java#L205-L224
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/Address.java
Address.fromKey
public static Address fromKey(final NetworkParameters params, final ECKey key, final ScriptType outputScriptType) { if (outputScriptType == Script.ScriptType.P2PKH) return LegacyAddress.fromKey(params, key); else if (outputScriptType == Script.ScriptType.P2WPKH) return SegwitAddr...
java
public static Address fromKey(final NetworkParameters params, final ECKey key, final ScriptType outputScriptType) { if (outputScriptType == Script.ScriptType.P2PKH) return LegacyAddress.fromKey(params, key); else if (outputScriptType == Script.ScriptType.P2WPKH) return SegwitAddr...
[ "public", "static", "Address", "fromKey", "(", "final", "NetworkParameters", "params", ",", "final", "ECKey", "key", ",", "final", "ScriptType", "outputScriptType", ")", "{", "if", "(", "outputScriptType", "==", "Script", ".", "ScriptType", ".", "P2PKH", ")", ...
Construct an {@link Address} that represents the public part of the given {@link ECKey}. @param params network this address is valid for @param key only the public part is used @param outputScriptType script type the address should use @return constructed address
[ "Construct", "an", "{", "@link", "Address", "}", "that", "represents", "the", "public", "part", "of", "the", "given", "{", "@link", "ECKey", "}", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/Address.java#L82-L89
ggrandes/kvstore
src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java
BplusTree.ceilingEntry
public synchronized TreeEntry<K, V> ceilingEntry(final K key) { // Retorna la clave mas cercana mayor o igual a la clave indicada return getRoundEntry(key, true, true); }
java
public synchronized TreeEntry<K, V> ceilingEntry(final K key) { // Retorna la clave mas cercana mayor o igual a la clave indicada return getRoundEntry(key, true, true); }
[ "public", "synchronized", "TreeEntry", "<", "K", ",", "V", ">", "ceilingEntry", "(", "final", "K", "key", ")", "{", "// Retorna la clave mas cercana mayor o igual a la clave indicada", "return", "getRoundEntry", "(", "key", ",", "true", ",", "true", ")", ";", "}" ...
Returns the least key greater than or equal to the given key, or null if there is no such key. @param key the key @return the Entry with least key greater than or equal to key, or null if there is no such key
[ "Returns", "the", "least", "key", "greater", "than", "or", "equal", "to", "the", "given", "key", "or", "null", "if", "there", "is", "no", "such", "key", "." ]
train
https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java#L649-L652
jparsec/jparsec
jparsec/src/main/java/org/jparsec/SourceLocator.java
SourceLocator.scanTo
@Private Location scanTo(int index) { boolean eof = false; if (index == source.length()) { // The eof has index size() + 1 eof = true; index--; } int columnIndex = nextColumnIndex; for (int i = nextIndex; i <= index; i++) { char c = source.charAt(i); if (c == LINE_BREAK) { ...
java
@Private Location scanTo(int index) { boolean eof = false; if (index == source.length()) { // The eof has index size() + 1 eof = true; index--; } int columnIndex = nextColumnIndex; for (int i = nextIndex; i <= index; i++) { char c = source.charAt(i); if (c == LINE_BREAK) { ...
[ "@", "Private", "Location", "scanTo", "(", "int", "index", ")", "{", "boolean", "eof", "=", "false", ";", "if", "(", "index", "==", "source", ".", "length", "(", ")", ")", "{", "// The eof has index size() + 1", "eof", "=", "true", ";", "index", "--", ...
Scans from {@code nextIndex} to {@code ind} and saves all indices of line break characters into {@code lineBreakIndices} and adjusts the current column number as it goes. The location of the character on {@code ind} is returned. <p> After this method returns, {@code nextIndex} and {@code nextColumnIndex} will point to...
[ "Scans", "from", "{", "@code", "nextIndex", "}", "to", "{", "@code", "ind", "}", "and", "saves", "all", "indices", "of", "line", "break", "characters", "into", "{", "@code", "lineBreakIndices", "}", "and", "adjusts", "the", "current", "column", "number", "...
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/SourceLocator.java#L102-L123
terrestris/shogun-core
src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java
HttpUtil.getHeadersFromRequest
public static Header[] getHeadersFromRequest(HttpServletRequest request) { List<Header> returnHeaderList = new ArrayList<>(); Enumeration<String> headerNames = request.getHeaderNames(); while (headerNames.hasMoreElements()) { String headerName = headerNames.nextElement(); ...
java
public static Header[] getHeadersFromRequest(HttpServletRequest request) { List<Header> returnHeaderList = new ArrayList<>(); Enumeration<String> headerNames = request.getHeaderNames(); while (headerNames.hasMoreElements()) { String headerName = headerNames.nextElement(); ...
[ "public", "static", "Header", "[", "]", "getHeadersFromRequest", "(", "HttpServletRequest", "request", ")", "{", "List", "<", "Header", ">", "returnHeaderList", "=", "new", "ArrayList", "<>", "(", ")", ";", "Enumeration", "<", "String", ">", "headerNames", "="...
Extract headers from {@link HttpServletRequest} @param request {@link HttpServletRequest} to extract headers from @return Array with {@link Header}s
[ "Extract", "headers", "from", "{", "@link", "HttpServletRequest", "}" ]
train
https://github.com/terrestris/shogun-core/blob/3dbabda35ae63235265913c865dba389b050b6e6/src/shogun-core-main/src/main/java/de/terrestris/shoguncore/util/http/HttpUtil.java#L2001-L2037
protostuff/protostuff
protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java
GraphIOUtil.mergeDelimitedFrom
public static <T> int mergeDelimitedFrom(InputStream in, T message, Schema<T> schema) throws IOException { final int size = in.read(); if (size == -1) throw ProtobufException.truncatedMessage(); final int len = size < 0x80 ? size : CodedInput.readRawVarint32(in, size...
java
public static <T> int mergeDelimitedFrom(InputStream in, T message, Schema<T> schema) throws IOException { final int size = in.read(); if (size == -1) throw ProtobufException.truncatedMessage(); final int len = size < 0x80 ? size : CodedInput.readRawVarint32(in, size...
[ "public", "static", "<", "T", ">", "int", "mergeDelimitedFrom", "(", "InputStream", "in", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ")", "throws", "IOException", "{", "final", "int", "size", "=", "in", ".", "read", "(", ")", ";", "...
Merges the {@code message} (delimited) from the {@link InputStream} using the given {@code schema}. @return the size of the message
[ "Merges", "the", "{", "@code", "message", "}", "(", "delimited", ")", "from", "the", "{", "@link", "InputStream", "}", "using", "the", "given", "{", "@code", "schema", "}", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-core/src/main/java/io/protostuff/GraphIOUtil.java#L99-L142
google/truth
extensions/proto/src/main/java/com/google/common/truth/extensions/proto/MapWithProtoValuesSubject.java
MapWithProtoValuesSubject.usingFloatToleranceForFieldsForValues
public MapWithProtoValuesFluentAssertion<M> usingFloatToleranceForFieldsForValues( float tolerance, Iterable<Integer> fieldNumbers) { return usingConfig(config.usingFloatToleranceForFields(tolerance, fieldNumbers)); }
java
public MapWithProtoValuesFluentAssertion<M> usingFloatToleranceForFieldsForValues( float tolerance, Iterable<Integer> fieldNumbers) { return usingConfig(config.usingFloatToleranceForFields(tolerance, fieldNumbers)); }
[ "public", "MapWithProtoValuesFluentAssertion", "<", "M", ">", "usingFloatToleranceForFieldsForValues", "(", "float", "tolerance", ",", "Iterable", "<", "Integer", ">", "fieldNumbers", ")", "{", "return", "usingConfig", "(", "config", ".", "usingFloatToleranceForFields", ...
Compares float fields with these explicitly specified top-level field numbers using the provided absolute tolerance. @param tolerance A finite, non-negative tolerance.
[ "Compares", "float", "fields", "with", "these", "explicitly", "specified", "top", "-", "level", "field", "numbers", "using", "the", "provided", "absolute", "tolerance", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/extensions/proto/src/main/java/com/google/common/truth/extensions/proto/MapWithProtoValuesSubject.java#L585-L588
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ModifyInstanceAttributeRequest.java
ModifyInstanceAttributeRequest.getBlockDeviceMappings
public java.util.List<InstanceBlockDeviceMappingSpecification> getBlockDeviceMappings() { if (blockDeviceMappings == null) { blockDeviceMappings = new com.amazonaws.internal.SdkInternalList<InstanceBlockDeviceMappingSpecification>(); } return blockDeviceMappings; }
java
public java.util.List<InstanceBlockDeviceMappingSpecification> getBlockDeviceMappings() { if (blockDeviceMappings == null) { blockDeviceMappings = new com.amazonaws.internal.SdkInternalList<InstanceBlockDeviceMappingSpecification>(); } return blockDeviceMappings; }
[ "public", "java", ".", "util", ".", "List", "<", "InstanceBlockDeviceMappingSpecification", ">", "getBlockDeviceMappings", "(", ")", "{", "if", "(", "blockDeviceMappings", "==", "null", ")", "{", "blockDeviceMappings", "=", "new", "com", ".", "amazonaws", ".", "...
<p> Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is deleted when the instance is terminated. </p> <p> To add instance...
[ "<p", ">", "Modifies", "the", "<code", ">", "DeleteOnTermination<", "/", "code", ">", "attribute", "for", "volumes", "that", "are", "currently", "attached", ".", "The", "volume", "must", "be", "owned", "by", "the", "caller", ".", "If", "no", "value", "is",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ModifyInstanceAttributeRequest.java#L357-L362
weld/core
impl/src/main/java/org/jboss/weld/injection/producer/AbstractMemberProducer.java
AbstractMemberProducer.getReceiver
protected Object getReceiver(CreationalContext<?> productCreationalContext, CreationalContext<?> receiverCreationalContext) { // This is a bit dangerous, as it means that producer methods can end up // executing on partially constructed instances. Also, it's not required // by the spec... ...
java
protected Object getReceiver(CreationalContext<?> productCreationalContext, CreationalContext<?> receiverCreationalContext) { // This is a bit dangerous, as it means that producer methods can end up // executing on partially constructed instances. Also, it's not required // by the spec... ...
[ "protected", "Object", "getReceiver", "(", "CreationalContext", "<", "?", ">", "productCreationalContext", ",", "CreationalContext", "<", "?", ">", "receiverCreationalContext", ")", "{", "// This is a bit dangerous, as it means that producer methods can end up", "// executing on ...
Gets the receiver of the product. The two creational contexts need to be separated because the receiver only serves the product creation (it is not a dependent instance of the created instance). @param productCreationalContext the creational context of the produced instance @param receiverCreationalContext the creatio...
[ "Gets", "the", "receiver", "of", "the", "product", ".", "The", "two", "creational", "contexts", "need", "to", "be", "separated", "because", "the", "receiver", "only", "serves", "the", "product", "creation", "(", "it", "is", "not", "a", "dependent", "instance...
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/injection/producer/AbstractMemberProducer.java#L108-L125
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_lan_lanName_GET
public OvhLAN serviceName_modem_lan_lanName_GET(String serviceName, String lanName) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}"; StringBuilder sb = path(qPath, serviceName, lanName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhLAN.class); }
java
public OvhLAN serviceName_modem_lan_lanName_GET(String serviceName, String lanName) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}"; StringBuilder sb = path(qPath, serviceName, lanName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhLAN.class); }
[ "public", "OvhLAN", "serviceName_modem_lan_lanName_GET", "(", "String", "serviceName", ",", "String", "lanName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/xdsl/{serviceName}/modem/lan/{lanName}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPat...
Get this object properties REST: GET /xdsl/{serviceName}/modem/lan/{lanName} @param serviceName [required] The internal name of your XDSL offer @param lanName [required] Name of the LAN
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L979-L984
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/fit/SoapCallMapColumnFixture.java
SoapCallMapColumnFixture.callSoapService
protected void callSoapService(String url, String templateName, String soapAction, XmlHttpResponse response) { Map<String, Object> headers = soapAction != null ? Collections.singletonMap("SOAPAction", (Object) soapAction) : null; getEnvironment().callService(url, templateName, getCurrentRowValues(), res...
java
protected void callSoapService(String url, String templateName, String soapAction, XmlHttpResponse response) { Map<String, Object> headers = soapAction != null ? Collections.singletonMap("SOAPAction", (Object) soapAction) : null; getEnvironment().callService(url, templateName, getCurrentRowValues(), res...
[ "protected", "void", "callSoapService", "(", "String", "url", ",", "String", "templateName", ",", "String", "soapAction", ",", "XmlHttpResponse", "response", ")", "{", "Map", "<", "String", ",", "Object", ">", "headers", "=", "soapAction", "!=", "null", "?", ...
Calls SOAP service using template and current row's values. @param url url of service to call. @param templateName name of template to use to create POST body. @param soapAction SOAPAction header value (null if no header is required). @param response response to fill based on call.
[ "Calls", "SOAP", "service", "using", "template", "and", "current", "row", "s", "values", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/fit/SoapCallMapColumnFixture.java#L83-L86
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/MapExpressionBase.java
MapExpressionBase.contains
@SuppressWarnings("unchecked") public final BooleanExpression contains(Expression<K> key, Expression<V> value) { return get(key).eq((Expression) value); }
java
@SuppressWarnings("unchecked") public final BooleanExpression contains(Expression<K> key, Expression<V> value) { return get(key).eq((Expression) value); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "BooleanExpression", "contains", "(", "Expression", "<", "K", ">", "key", ",", "Expression", "<", "V", ">", "value", ")", "{", "return", "get", "(", "key", ")", ".", "eq", "(", "(", ...
Create a {@code (key, value) in this} expression @param key key of entry @param value value of entry @return expression
[ "Create", "a", "{", "@code", "(", "key", "value", ")", "in", "this", "}", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/MapExpressionBase.java#L66-L69
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTPCryptoContext.java
SRTPCryptoContext.deriveContext
public SRTPCryptoContext deriveContext(long ssrc, int roc, long deriveRate) { return new SRTPCryptoContext(ssrc, roc, deriveRate, masterKey, masterSalt, policy); }
java
public SRTPCryptoContext deriveContext(long ssrc, int roc, long deriveRate) { return new SRTPCryptoContext(ssrc, roc, deriveRate, masterKey, masterSalt, policy); }
[ "public", "SRTPCryptoContext", "deriveContext", "(", "long", "ssrc", ",", "int", "roc", ",", "long", "deriveRate", ")", "{", "return", "new", "SRTPCryptoContext", "(", "ssrc", ",", "roc", ",", "deriveRate", ",", "masterKey", ",", "masterSalt", ",", "policy", ...
Derive a new SRTPCryptoContext for use with a new SSRC This method returns a new SRTPCryptoContext initialized with the data of this SRTPCryptoContext. Replacing the SSRC, Roll-over-Counter, and the key derivation rate the application cab use this SRTPCryptoContext to encrypt / decrypt a new stream (Synchronization so...
[ "Derive", "a", "new", "SRTPCryptoContext", "for", "use", "with", "a", "new", "SSRC" ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtp/crypto/SRTPCryptoContext.java#L731-L733
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/AbstractMOEAD.java
AbstractMOEAD.updateNeighborhood
@SuppressWarnings("unchecked") protected void updateNeighborhood(S individual, int subProblemId, NeighborType neighborType) throws JMetalException { int size; int time; time = 0; if (neighborType == NeighborType.NEIGHBOR) { size = neighborhood[subProblemId].length; } else { size = p...
java
@SuppressWarnings("unchecked") protected void updateNeighborhood(S individual, int subProblemId, NeighborType neighborType) throws JMetalException { int size; int time; time = 0; if (neighborType == NeighborType.NEIGHBOR) { size = neighborhood[subProblemId].length; } else { size = p...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "updateNeighborhood", "(", "S", "individual", ",", "int", "subProblemId", ",", "NeighborType", "neighborType", ")", "throws", "JMetalException", "{", "int", "size", ";", "int", "time", ";", ...
Update neighborhood method @param individual @param subProblemId @param neighborType @throws JMetalException
[ "Update", "neighborhood", "method" ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/AbstractMOEAD.java#L230-L267
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArray
public static <T> Level0ArrayOperator<Short[],Short> onArray(final Short[] target) { return onArrayOf(Types.SHORT, target); }
java
public static <T> Level0ArrayOperator<Short[],Short> onArray(final Short[] target) { return onArrayOf(Types.SHORT, target); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Short", "[", "]", ",", "Short", ">", "onArray", "(", "final", "Short", "[", "]", "target", ")", "{", "return", "onArrayOf", "(", "Types", ".", "SHORT", ",", "target", ")", ";", "}" ]
<p> Creates an <i>operation expression</i> on the specified target object. </p> @param target the target object on which the expression will execute @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "the", "specified", "target", "object", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L676-L678
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/OntRelationMention.java
OntRelationMention.setDomainList
public void setDomainList(int i, Annotation v) { if (OntRelationMention_Type.featOkTst && ((OntRelationMention_Type)jcasType).casFeat_domainList == null) jcasType.jcas.throwFeatMissing("domainList", "de.julielab.jules.types.OntRelationMention"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefVal...
java
public void setDomainList(int i, Annotation v) { if (OntRelationMention_Type.featOkTst && ((OntRelationMention_Type)jcasType).casFeat_domainList == null) jcasType.jcas.throwFeatMissing("domainList", "de.julielab.jules.types.OntRelationMention"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefVal...
[ "public", "void", "setDomainList", "(", "int", "i", ",", "Annotation", "v", ")", "{", "if", "(", "OntRelationMention_Type", ".", "featOkTst", "&&", "(", "(", "OntRelationMention_Type", ")", "jcasType", ")", ".", "casFeat_domainList", "==", "null", ")", "jcasTy...
indexed setter for domainList - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "domainList", "-", "sets", "an", "indexed", "value", "-" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/OntRelationMention.java#L160-L164
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.hincrBy
@Override public Long hincrBy(final byte[] key, final byte[] field, final long value) { checkIsInMultiOrPipeline(); client.hincrBy(key, field, value); return client.getIntegerReply(); }
java
@Override public Long hincrBy(final byte[] key, final byte[] field, final long value) { checkIsInMultiOrPipeline(); client.hincrBy(key, field, value); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "hincrBy", "(", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "field", ",", "final", "long", "value", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "hincrBy", "(", "key", ",",...
Increment the number stored at field in the hash at key by value. If key does not exist, a new key holding a hash is created. If field does not exist or holds a string, the value is set to 0 before applying the operation. Since the value argument is signed you can use this command to perform both increments and decreme...
[ "Increment", "the", "number", "stored", "at", "field", "in", "the", "hash", "at", "key", "by", "value", ".", "If", "key", "does", "not", "exist", "a", "new", "key", "holding", "a", "hash", "is", "created", ".", "If", "field", "does", "not", "exist", ...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L990-L995
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/pyramid/PyramidOps.java
PyramidOps.reshapeOutput
public static <O extends ImageGray<O>> void reshapeOutput( ImagePyramid<?> pyramid , O[] output ) { for( int i = 0; i < output.length; i++ ) { int w = pyramid.getWidth(i); int h = pyramid.getHeight(i); output[i].reshape(w, h); } }
java
public static <O extends ImageGray<O>> void reshapeOutput( ImagePyramid<?> pyramid , O[] output ) { for( int i = 0; i < output.length; i++ ) { int w = pyramid.getWidth(i); int h = pyramid.getHeight(i); output[i].reshape(w, h); } }
[ "public", "static", "<", "O", "extends", "ImageGray", "<", "O", ">", ">", "void", "reshapeOutput", "(", "ImagePyramid", "<", "?", ">", "pyramid", ",", "O", "[", "]", "output", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "output", "...
Reshapes each image in the array to match the layers in the pyramid @param pyramid (Input) Image pyramid @param output (Output) List of images which is to be resized @param <O> Image type
[ "Reshapes", "each", "image", "in", "the", "array", "to", "match", "the", "layers", "in", "the", "pyramid" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/pyramid/PyramidOps.java#L70-L78
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/AttachmentManager.java
AttachmentManager.fileFromKey
public static File fileFromKey(SQLDatabase db, byte[] key, String attachmentsDir, boolean allowCreateName) throws AttachmentException { String keyString = keyToString(key); String filename = null; db.beginTransaction(); Cursor c = null; t...
java
public static File fileFromKey(SQLDatabase db, byte[] key, String attachmentsDir, boolean allowCreateName) throws AttachmentException { String keyString = keyToString(key); String filename = null; db.beginTransaction(); Cursor c = null; t...
[ "public", "static", "File", "fileFromKey", "(", "SQLDatabase", "db", ",", "byte", "[", "]", "key", ",", "String", "attachmentsDir", ",", "boolean", "allowCreateName", ")", "throws", "AttachmentException", "{", "String", "keyString", "=", "keyToString", "(", "key...
Lookup or create a on disk File representation of blob, in {@code db} using {@code key}. Existing attachments will have an entry in db, so the method just looks this up and returns the File object for the path. For new attachments, the {@code key} doesn't already have an associated filename, one is generated and inse...
[ "Lookup", "or", "create", "a", "on", "disk", "File", "representation", "of", "blob", "in", "{", "@code", "db", "}", "using", "{", "@code", "key", "}", "." ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/AttachmentManager.java#L497-L531
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/nullness/NullnessFixes.java
NullnessFixes.makeFix
static SuggestedFix makeFix(VisitorState state, Tree declaration) { SuggestedFix.Builder builder = SuggestedFix.builder(); String qualifiedName = getQualifiedName(state, builder); return builder.prefixWith(declaration, "@" + qualifiedName + " ").build(); }
java
static SuggestedFix makeFix(VisitorState state, Tree declaration) { SuggestedFix.Builder builder = SuggestedFix.builder(); String qualifiedName = getQualifiedName(state, builder); return builder.prefixWith(declaration, "@" + qualifiedName + " ").build(); }
[ "static", "SuggestedFix", "makeFix", "(", "VisitorState", "state", ",", "Tree", "declaration", ")", "{", "SuggestedFix", ".", "Builder", "builder", "=", "SuggestedFix", ".", "builder", "(", ")", ";", "String", "qualifiedName", "=", "getQualifiedName", "(", "stat...
Make the {@link SuggestedFix} to add the {@code Nullable} annotation.
[ "Make", "the", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/nullness/NullnessFixes.java#L36-L40
mockito/mockito
src/main/java/org/mockito/internal/util/reflection/Fields.java
Fields.declaredFieldsOf
public static InstanceFields declaredFieldsOf(Object instance) { List<InstanceField> instanceFields = new ArrayList<InstanceField>(); instanceFields.addAll(instanceFieldsIn(instance, instance.getClass().getDeclaredFields())); return new InstanceFields(instance, instanceFields); }
java
public static InstanceFields declaredFieldsOf(Object instance) { List<InstanceField> instanceFields = new ArrayList<InstanceField>(); instanceFields.addAll(instanceFieldsIn(instance, instance.getClass().getDeclaredFields())); return new InstanceFields(instance, instanceFields); }
[ "public", "static", "InstanceFields", "declaredFieldsOf", "(", "Object", "instance", ")", "{", "List", "<", "InstanceField", ">", "instanceFields", "=", "new", "ArrayList", "<", "InstanceField", ">", "(", ")", ";", "instanceFields", ".", "addAll", "(", "instance...
Instance fields declared in the class of the given instance. @param instance Instance from which declared fields will be retrieved. @return InstanceFields of this object instance.
[ "Instance", "fields", "declared", "in", "the", "class", "of", "the", "given", "instance", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/util/reflection/Fields.java#L43-L47
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java
NetworkInterfacesInner.beginListEffectiveNetworkSecurityGroupsAsync
public Observable<EffectiveNetworkSecurityGroupListResultInner> beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<Effe...
java
public Observable<EffectiveNetworkSecurityGroupListResultInner> beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1<ServiceResponse<Effe...
[ "public", "Observable", "<", "EffectiveNetworkSecurityGroupListResultInner", ">", "beginListEffectiveNetworkSecurityGroupsAsync", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ")", "{", "return", "beginListEffectiveNetworkSecurityGroupsWithServiceResponseAs...
Gets all network security groups applied to a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the EffectiveNetworkSecurityGroupL...
[ "Gets", "all", "network", "security", "groups", "applied", "to", "a", "network", "interface", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java#L1436-L1443
JavaMoney/jsr354-ri
moneta-core/src/main/java/org/javamoney/moneta/format/MonetaryAmountDecimalFormatBuilder.java
MonetaryAmountDecimalFormatBuilder.build
public MonetaryAmountFormat build() { if (Objects.isNull(locale)) { locale = Locale.getDefault(); } if (Objects.isNull(decimalFormat)) { decimalFormat = (DecimalFormat) NumberFormat.getCurrencyInstance(locale); } if (Objects.isNull(currencyUnit)) { ...
java
public MonetaryAmountFormat build() { if (Objects.isNull(locale)) { locale = Locale.getDefault(); } if (Objects.isNull(decimalFormat)) { decimalFormat = (DecimalFormat) NumberFormat.getCurrencyInstance(locale); } if (Objects.isNull(currencyUnit)) { ...
[ "public", "MonetaryAmountFormat", "build", "(", ")", "{", "if", "(", "Objects", ".", "isNull", "(", "locale", ")", ")", "{", "locale", "=", "Locale", ".", "getDefault", "(", ")", ";", "}", "if", "(", "Objects", ".", "isNull", "(", "decimalFormat", ")",...
Creates the {@link MonetaryAmountFormat} If @{link Locale} didn't set the default value is {@link Locale#getDefault()} If @{link MonetaryAmountProducer} didn't set the default value is {@link MoneyProducer} If @{link CurrencyUnit} didn't set the default value is a currency from {@link Locale} @return {@link MonetaryAmo...
[ "Creates", "the", "{" ]
train
https://github.com/JavaMoney/jsr354-ri/blob/cf8ff2bbaf9b115acc05eb9b0c76c8397c308284/moneta-core/src/main/java/org/javamoney/moneta/format/MonetaryAmountDecimalFormatBuilder.java#L129-L144
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/SpanId.java
SpanId.fromLowerBase16
public static SpanId fromLowerBase16(CharSequence src) { Utils.checkNotNull(src, "src"); // TODO: Remove this extra condition. Utils.checkArgument( src.length() == BASE16_SIZE, "Invalid size: expected %s, got %s", BASE16_SIZE, src.length()); return fromLowerBase16(src, 0)...
java
public static SpanId fromLowerBase16(CharSequence src) { Utils.checkNotNull(src, "src"); // TODO: Remove this extra condition. Utils.checkArgument( src.length() == BASE16_SIZE, "Invalid size: expected %s, got %s", BASE16_SIZE, src.length()); return fromLowerBase16(src, 0)...
[ "public", "static", "SpanId", "fromLowerBase16", "(", "CharSequence", "src", ")", "{", "Utils", ".", "checkNotNull", "(", "src", ",", "\"src\"", ")", ";", "// TODO: Remove this extra condition.", "Utils", ".", "checkArgument", "(", "src", ".", "length", "(", ")"...
Returns a {@code SpanId} built from a lowercase base16 representation. @param src the lowercase base16 representation. @return a {@code SpanId} built from a lowercase base16 representation. @throws NullPointerException if {@code src} is null. @throws IllegalArgumentException if {@code src.length} is not {@code 2 * Spa...
[ "Returns", "a", "{", "@code", "SpanId", "}", "built", "from", "a", "lowercase", "base16", "representation", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/SpanId.java#L100-L109
box/box-java-sdk
src/main/java/com/box/sdk/BoxUser.java
BoxUser.createEnterpriseUser
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name) { return createEnterpriseUser(api, login, name, null); }
java
public static BoxUser.Info createEnterpriseUser(BoxAPIConnection api, String login, String name) { return createEnterpriseUser(api, login, name, null); }
[ "public", "static", "BoxUser", ".", "Info", "createEnterpriseUser", "(", "BoxAPIConnection", "api", ",", "String", "login", ",", "String", "name", ")", "{", "return", "createEnterpriseUser", "(", "api", ",", "login", ",", "name", ",", "null", ")", ";", "}" ]
Provisions a new user in an enterprise. @param api the API connection to be used by the created user. @param login the email address the user will use to login. @param name the name of the user. @return the created user's info.
[ "Provisions", "a", "new", "user", "in", "an", "enterprise", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxUser.java#L108-L110
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XOrganizationalExtension.java
XOrganizationalExtension.assignResource
public void assignResource(XEvent event, String resource) { if (resource != null && resource.trim().length() > 0) { XAttributeLiteral attr = (XAttributeLiteral) ATTR_RESOURCE.clone(); attr.setValue(resource.trim()); event.getAttributes().put(KEY_RESOURCE, attr); } }
java
public void assignResource(XEvent event, String resource) { if (resource != null && resource.trim().length() > 0) { XAttributeLiteral attr = (XAttributeLiteral) ATTR_RESOURCE.clone(); attr.setValue(resource.trim()); event.getAttributes().put(KEY_RESOURCE, attr); } }
[ "public", "void", "assignResource", "(", "XEvent", "event", ",", "String", "resource", ")", "{", "if", "(", "resource", "!=", "null", "&&", "resource", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "XAttributeLiteral", "attr", "="...
Assigns the resource attribute value for a given event. @param event Event to be modified. @param resource Resource string to be assigned.
[ "Assigns", "the", "resource", "attribute", "value", "for", "a", "given", "event", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XOrganizationalExtension.java#L195-L201
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
AbstractDatabaseEngine.addBatch
@Override public synchronized void addBatch(final String name, final EntityEntry entry) throws DatabaseEngineException { try { final MappedEntity me = entities.get(name); if (me == null) { throw new DatabaseEngineException(String.format("Unknown entity '%s'", name)...
java
@Override public synchronized void addBatch(final String name, final EntityEntry entry) throws DatabaseEngineException { try { final MappedEntity me = entities.get(name); if (me == null) { throw new DatabaseEngineException(String.format("Unknown entity '%s'", name)...
[ "@", "Override", "public", "synchronized", "void", "addBatch", "(", "final", "String", "name", ",", "final", "EntityEntry", "entry", ")", "throws", "DatabaseEngineException", "{", "try", "{", "final", "MappedEntity", "me", "=", "entities", ".", "get", "(", "na...
Add an entry to the batch. @param name The entity name. @param entry The entry to persist. @throws DatabaseEngineException If something goes wrong while persisting data.
[ "Add", "an", "entry", "to", "the", "batch", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java#L1026-L1045
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/model/CMAEntry.java
CMAEntry.getField
@SuppressWarnings("unchecked") public <T> T getField(String key, String locale) { if (fields == null) { return null; } LinkedHashMap<String, Object> field = fields.get(key); if (field == null) { return null; } else { return (T) field.get(locale); } }
java
@SuppressWarnings("unchecked") public <T> T getField(String key, String locale) { if (fields == null) { return null; } LinkedHashMap<String, Object> field = fields.get(key); if (field == null) { return null; } else { return (T) field.get(locale); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getField", "(", "String", "key", ",", "String", "locale", ")", "{", "if", "(", "fields", "==", "null", ")", "{", "return", "null", ";", "}", "LinkedHashMap", "<", "Strin...
Return a specific localized field. @param key the key of the field @param locale the locale of the key @param <T> the type of the return value @return the value requested or null, if something (fields, key, locale) was not found.
[ "Return", "a", "specific", "localized", "field", "." ]
train
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/model/CMAEntry.java#L122-L134