repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
Twitter4J/Twitter4J
twitter4j-core/src/internal-http/java/twitter4j/HttpParameter.java
HttpParameter.decodeParameters
public static List<HttpParameter> decodeParameters(String queryParameters) { """ Parses a query string without the leading "?" @param queryParameters a query parameter string, like a=hello&amp;b=world @return decoded parameters """ List<HttpParameter> result=new ArrayList<HttpParameter>(); ...
java
public static List<HttpParameter> decodeParameters(String queryParameters) { List<HttpParameter> result=new ArrayList<HttpParameter>(); for (String pair : queryParameters.split("&")) { String[] parts=pair.split("=", 2); if(parts.length == 2) { String name=decode(p...
[ "public", "static", "List", "<", "HttpParameter", ">", "decodeParameters", "(", "String", "queryParameters", ")", "{", "List", "<", "HttpParameter", ">", "result", "=", "new", "ArrayList", "<", "HttpParameter", ">", "(", ")", ";", "for", "(", "String", "pair...
Parses a query string without the leading "?" @param queryParameters a query parameter string, like a=hello&amp;b=world @return decoded parameters
[ "Parses", "a", "query", "string", "without", "the", "leading", "?" ]
train
https://github.com/Twitter4J/Twitter4J/blob/8376fade8d557896bb9319fb46e39a55b134b166/twitter4j-core/src/internal-http/java/twitter4j/HttpParameter.java#L332-L344
ZieIony/Carbon
carbon/src/main/java/carbon/internal/Menu.java
Menu.addInternal
private android.view.MenuItem addInternal(int group, int id, int categoryOrder, CharSequence title) { """ Adds an item to the menu. The other add methods funnel to this. """ final int ordering = getOrdering(categoryOrder); final MenuItem item = createNewMenuItem(group, id, categoryOrder, orde...
java
private android.view.MenuItem addInternal(int group, int id, int categoryOrder, CharSequence title) { final int ordering = getOrdering(categoryOrder); final MenuItem item = createNewMenuItem(group, id, categoryOrder, ordering, title, mDefaultShowAsAction); /* if (mCurrentMenuInf...
[ "private", "android", ".", "view", ".", "MenuItem", "addInternal", "(", "int", "group", ",", "int", "id", ",", "int", "categoryOrder", ",", "CharSequence", "title", ")", "{", "final", "int", "ordering", "=", "getOrdering", "(", "categoryOrder", ")", ";", "...
Adds an item to the menu. The other add methods funnel to this.
[ "Adds", "an", "item", "to", "the", "menu", ".", "The", "other", "add", "methods", "funnel", "to", "this", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/internal/Menu.java#L240-L255
groupon/robo-remote
RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/QueryBuilder.java
QueryBuilder.genericRequest
private QueryBuilder genericRequest(String type, String value) throws Exception { """ Creates a key value request @param type @param value @return @throws Exception """ JSONObject op = new JSONObject(); op.put(type, value); JSONArray operations = (JSONArray) request.get(Constants.RE...
java
private QueryBuilder genericRequest(String type, String value) throws Exception { JSONObject op = new JSONObject(); op.put(type, value); JSONArray operations = (JSONArray) request.get(Constants.REQUEST_OPERATIONS); operations.put(op); request.remove(Constants.REQUEST_OPERATIONS);...
[ "private", "QueryBuilder", "genericRequest", "(", "String", "type", ",", "String", "value", ")", "throws", "Exception", "{", "JSONObject", "op", "=", "new", "JSONObject", "(", ")", ";", "op", ".", "put", "(", "type", ",", "value", ")", ";", "JSONArray", ...
Creates a key value request @param type @param value @return @throws Exception
[ "Creates", "a", "key", "value", "request" ]
train
https://github.com/groupon/robo-remote/blob/12d242faad50bf90f98657ca9a0c0c3ae1993f07/RoboRemoteClientCommon/src/main/com/groupon/roboremote/roboremoteclientcommon/QueryBuilder.java#L227-L235
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverRf.java
JCusolverRf.cusolverRfAccessBundledFactorsDevice
public static int cusolverRfAccessBundledFactorsDevice( cusolverRfHandle handle, /** Output (in the host memory) */ Pointer nnzM, /** Output (in the device memory) */ Pointer Mp, Pointer Mi, Pointer Mx) { """ CUSOLVERRF extraction: Get L & U packed...
java
public static int cusolverRfAccessBundledFactorsDevice( cusolverRfHandle handle, /** Output (in the host memory) */ Pointer nnzM, /** Output (in the device memory) */ Pointer Mp, Pointer Mi, Pointer Mx) { return checkResult(cusolverRfAcces...
[ "public", "static", "int", "cusolverRfAccessBundledFactorsDevice", "(", "cusolverRfHandle", "handle", ",", "/** Output (in the host memory) */", "Pointer", "nnzM", ",", "/** Output (in the device memory) */", "Pointer", "Mp", ",", "Pointer", "Mi", ",", "Pointer", "Mx", ")",...
CUSOLVERRF extraction: Get L & U packed into a single matrix M
[ "CUSOLVERRF", "extraction", ":", "Get", "L", "&", "U", "packed", "into", "a", "single", "matrix", "M" ]
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverRf.java#L334-L344
synchronoss/cpo-api
cpo-jdbc/src/main/java/org/synchronoss/cpo/transform/jdbc/TransformTimestampToCalendar.java
TransformTimestampToCalendar.transformOut
@Override public Timestamp transformOut(JdbcCallableStatementFactory jcsf, Calendar cal) throws CpoException { """ Transforms a <code>java.util.Calendar</code> from the CPO Bean into a <code>java.sql.Timestamp</code> to be stored by JDBC @param jcsf a reference to the JdbcCallableStatementFactory. This is n...
java
@Override public Timestamp transformOut(JdbcCallableStatementFactory jcsf, Calendar cal) throws CpoException { Timestamp ts = null; if (cal != null) { ts = new Timestamp(cal.getTimeInMillis()); } return ts; }
[ "@", "Override", "public", "Timestamp", "transformOut", "(", "JdbcCallableStatementFactory", "jcsf", ",", "Calendar", "cal", ")", "throws", "CpoException", "{", "Timestamp", "ts", "=", "null", ";", "if", "(", "cal", "!=", "null", ")", "{", "ts", "=", "new", ...
Transforms a <code>java.util.Calendar</code> from the CPO Bean into a <code>java.sql.Timestamp</code> to be stored by JDBC @param jcsf a reference to the JdbcCallableStatementFactory. This is necessary as some DBMSs (ORACLE !#$%^&!) that require access to the connection to deal with certain datatypes. @param A Calenda...
[ "Transforms", "a", "<code", ">", "java", ".", "util", ".", "Calendar<", "/", "code", ">", "from", "the", "CPO", "Bean", "into", "a", "<code", ">", "java", ".", "sql", ".", "Timestamp<", "/", "code", ">", "to", "be", "stored", "by", "JDBC" ]
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/transform/jdbc/TransformTimestampToCalendar.java#L70-L77
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getValue
private <O> O getValue(Map<String, O> nameValueMap, String attributeName, O defaultValue) { """ Gets the value, or default value, of an attribute. @param nameValueMap The name attribute value map which maps attribute names to attribute values. @param attributeName The name of the attribute to retrieve. @param d...
java
private <O> O getValue(Map<String, O> nameValueMap, String attributeName, O defaultValue) { if(attributeName == null) { throw new NullPointerException("name must not be null"); } if(nameValueMap == null) { return defaultValue; } O value = nameValueMap.get(...
[ "private", "<", "O", ">", "O", "getValue", "(", "Map", "<", "String", ",", "O", ">", "nameValueMap", ",", "String", "attributeName", ",", "O", "defaultValue", ")", "{", "if", "(", "attributeName", "==", "null", ")", "{", "throw", "new", "NullPointerExcep...
Gets the value, or default value, of an attribute. @param nameValueMap The name attribute value map which maps attribute names to attribute values. @param attributeName The name of the attribute to retrieve. @param defaultValue A default value, which will be returned if there is no set value for the specified attribute...
[ "Gets", "the", "value", "or", "default", "value", "of", "an", "attribute", "." ]
train
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L178-L190
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
FutureUtils.orTimeout
public static <T> CompletableFuture<T> orTimeout(CompletableFuture<T> future, long timeout, TimeUnit timeUnit) { """ Times the given future out after the timeout. @param future to time out @param timeout after which the given future is timed out @param timeUnit time unit of the timeout @param <T> type of the...
java
public static <T> CompletableFuture<T> orTimeout(CompletableFuture<T> future, long timeout, TimeUnit timeUnit) { return orTimeout(future, timeout, timeUnit, Executors.directExecutor()); }
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "T", ">", "orTimeout", "(", "CompletableFuture", "<", "T", ">", "future", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "return", "orTimeout", "(", "future", ",", "timeout", ",",...
Times the given future out after the timeout. @param future to time out @param timeout after which the given future is timed out @param timeUnit time unit of the timeout @param <T> type of the given future @return The timeout enriched future
[ "Times", "the", "given", "future", "out", "after", "the", "timeout", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L338-L340
lessthanoptimal/ddogleg
src/org/ddogleg/nn/alg/ExhaustiveNeighbor.java
ExhaustiveNeighbor.findClosest
public int findClosest( P p , double maxDistance ) { """ Finds the index of the point which has the smallest Euclidean distance to 'p' and is {@code <} maxDistance away. @param p A point. @param maxDistance The maximum distance (Euclidean squared) the neighbor can be. @return Index of the closest point. ...
java
public int findClosest( P p , double maxDistance ) { int best = -1; bestDistance = maxDistance; for( int i = 0; i < points.size(); i++ ) { P c = points.get(i); double distanceC = distance.distance(p,c); if( distanceC <= bestDistance ) { bestDistance = distanceC; best = i; } } return be...
[ "public", "int", "findClosest", "(", "P", "p", ",", "double", "maxDistance", ")", "{", "int", "best", "=", "-", "1", ";", "bestDistance", "=", "maxDistance", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "points", ".", "size", "(", ")", "...
Finds the index of the point which has the smallest Euclidean distance to 'p' and is {@code <} maxDistance away. @param p A point. @param maxDistance The maximum distance (Euclidean squared) the neighbor can be. @return Index of the closest point.
[ "Finds", "the", "index", "of", "the", "point", "which", "has", "the", "smallest", "Euclidean", "distance", "to", "p", "and", "is", "{", "@code", "<", "}", "maxDistance", "away", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/ExhaustiveNeighbor.java#L70-L86
tweea/matrixjavalib-main-common
src/main/java/net/matrix/lang/Reflections.java
Reflections.getFieldValue
public static <T> T getFieldValue(final Object target, final String name) { """ 直接读取对象成员值,无视 private/protected 修饰符,不经过 getter 函数。 @param target 目标对象 @param name 成员名 @param <T> 期待的成员值类型 @return 成员值 """ Field field = FieldUtils.getDeclaredField(target.getClass(), name, true); if (field == null) ...
java
public static <T> T getFieldValue(final Object target, final String name) { Field field = FieldUtils.getDeclaredField(target.getClass(), name, true); if (field == null) { throw new IllegalArgumentException("Could not find field [" + name + "] on target [" + target + ']'); } T result = null; try {...
[ "public", "static", "<", "T", ">", "T", "getFieldValue", "(", "final", "Object", "target", ",", "final", "String", "name", ")", "{", "Field", "field", "=", "FieldUtils", ".", "getDeclaredField", "(", "target", ".", "getClass", "(", ")", ",", "name", ",",...
直接读取对象成员值,无视 private/protected 修饰符,不经过 getter 函数。 @param target 目标对象 @param name 成员名 @param <T> 期待的成员值类型 @return 成员值
[ "直接读取对象成员值,无视", "private", "/", "protected", "修饰符,不经过", "getter", "函数。" ]
train
https://github.com/tweea/matrixjavalib-main-common/blob/ac8f98322a422e3ef76c3e12d47b98268cec7006/src/main/java/net/matrix/lang/Reflections.java#L88-L102
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/DisabledJob.java
DisabledJob.fromDeprecatedObject
static public DisabledJob fromDeprecatedObject(Object obj) { """ Create a DisabledJob from the original Object/JSON format, for {@link azkaban.sla.SlaOptionDeprecated}. @param obj the Object/JSON (in {@link azkaban.sla.SlaOptionDeprecated} format) value. @return the disabled job. """ if (obj == null) ...
java
static public DisabledJob fromDeprecatedObject(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { return new DisabledJob((String)obj); } else if (obj instanceof Map) { Map<String, Object> map = (Map<String, Object>)obj; String name = (String)map.get(SUBF...
[ "static", "public", "DisabledJob", "fromDeprecatedObject", "(", "Object", "obj", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "obj", "instanceof", "String", ")", "{", "return", "new", "DisabledJob", "(", "(",...
Create a DisabledJob from the original Object/JSON format, for {@link azkaban.sla.SlaOptionDeprecated}. @param obj the Object/JSON (in {@link azkaban.sla.SlaOptionDeprecated} format) value. @return the disabled job.
[ "Create", "a", "DisabledJob", "from", "the", "original", "Object", "/", "JSON", "format", "for", "{", "@link", "azkaban", ".", "sla", ".", "SlaOptionDeprecated", "}", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/DisabledJob.java#L114-L130
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.recoverDeletedCertificateAsync
public Observable<CertificateBundle> recoverDeletedCertificateAsync(String vaultBaseUrl, String certificateName) { """ Recovers the deleted certificate back to its current version under /certificates. The RecoverDeletedCertificate operation performs the reversal of the Delete operation. The operation is applicabl...
java
public Observable<CertificateBundle> recoverDeletedCertificateAsync(String vaultBaseUrl, String certificateName) { return recoverDeletedCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<CertificateBundle>, CertificateBundle>() { @Override pu...
[ "public", "Observable", "<", "CertificateBundle", ">", "recoverDeletedCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "recoverDeletedCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")",...
Recovers the deleted certificate back to its current version under /certificates. The RecoverDeletedCertificate operation performs the reversal of the Delete operation. The operation is applicable in vaults enabled for soft-delete, and must be issued during the retention interval (available in the deleted certificate's...
[ "Recovers", "the", "deleted", "certificate", "back", "to", "its", "current", "version", "under", "/", "certificates", ".", "The", "RecoverDeletedCertificate", "operation", "performs", "the", "reversal", "of", "the", "Delete", "operation", ".", "The", "operation", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L8736-L8743
derari/cthul
xml/src/main/java/org/cthul/resolve/ResolvingException.java
ResolvingException.throwIf
public <T1 extends Throwable> RuntimeException throwIf(Class<T1> t1) throws T1 { """ Throws the {@linkplain #getResolvingCause() cause} if it is the specified type, otherwise returns a {@linkplain #asRuntimeException() runtime exception}. @param <T1> @param t1 @return runti...
java
public <T1 extends Throwable> RuntimeException throwIf(Class<T1> t1) throws T1 { return throwIf(t1, NULL_EX, NULL_EX, NULL_EX); }
[ "public", "<", "T1", "extends", "Throwable", ">", "RuntimeException", "throwIf", "(", "Class", "<", "T1", ">", "t1", ")", "throws", "T1", "{", "return", "throwIf", "(", "t1", ",", "NULL_EX", ",", "NULL_EX", ",", "NULL_EX", ")", ";", "}" ]
Throws the {@linkplain #getResolvingCause() cause} if it is the specified type, otherwise returns a {@linkplain #asRuntimeException() runtime exception}. @param <T1> @param t1 @return runtime exception @throws T1
[ "Throws", "the", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/xml/src/main/java/org/cthul/resolve/ResolvingException.java#L227-L231
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java
FileSystem.toJarURL
@Pure @Inline("toJarURL(($1).toURI().toURL(), ($2))") public static URL toJarURL(File jarFile, String insideFile) throws MalformedURLException { """ Replies the jar-schemed URL composed of the two given components. <p>If the inputs are {@code /path1/archive.jar} and @{code /path2/file}, the output of this fu...
java
@Pure @Inline("toJarURL(($1).toURI().toURL(), ($2))") public static URL toJarURL(File jarFile, String insideFile) throws MalformedURLException { return toJarURL(jarFile.toURI().toURL(), insideFile); }
[ "@", "Pure", "@", "Inline", "(", "\"toJarURL(($1).toURI().toURL(), ($2))\"", ")", "public", "static", "URL", "toJarURL", "(", "File", "jarFile", ",", "String", "insideFile", ")", "throws", "MalformedURLException", "{", "return", "toJarURL", "(", "jarFile", ".", "t...
Replies the jar-schemed URL composed of the two given components. <p>If the inputs are {@code /path1/archive.jar} and @{code /path2/file}, the output of this function is {@code jar:file:/path1/archive.jar!/path2/file}. @param jarFile is the URL to the jar file. @param insideFile is the name of the file inside the jar...
[ "Replies", "the", "jar", "-", "schemed", "URL", "composed", "of", "the", "two", "given", "components", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L316-L320
pmwmedia/tinylog
tinylog-impl/src/main/java/org/tinylog/writers/RollingFileWriter.java
RollingFileWriter.deleteBackups
private static void deleteBackups(final List<File> files, final int count) { """ Deletes old log files. @param files All existing log files @param count Number of log files to keep """ if (count >= 0) { for (int i = files.size() - Math.max(0, files.size() - count); i < files.size(); ++i) { if (!...
java
private static void deleteBackups(final List<File> files, final int count) { if (count >= 0) { for (int i = files.size() - Math.max(0, files.size() - count); i < files.size(); ++i) { if (!files.get(i).delete()) { InternalLogger.log(Level.WARN, "Failed to delete log file '" + files.get(i).getAbsolutePath()...
[ "private", "static", "void", "deleteBackups", "(", "final", "List", "<", "File", ">", "files", ",", "final", "int", "count", ")", "{", "if", "(", "count", ">=", "0", ")", "{", "for", "(", "int", "i", "=", "files", ".", "size", "(", ")", "-", "Mat...
Deletes old log files. @param files All existing log files @param count Number of log files to keep
[ "Deletes", "old", "log", "files", "." ]
train
https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-impl/src/main/java/org/tinylog/writers/RollingFileWriter.java#L239-L247
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java
TypesafeConfigUtils.loadConfig
public static Config loadConfig(ConfigParseOptions parseOptions, ConfigResolveOptions resolveOptions, String configFile) { """ Load, Parse & Resolve configurations from a file, specifying parse & resolve options. @param parseOptions @param resolveOptions @param configFile @return """ ...
java
public static Config loadConfig(ConfigParseOptions parseOptions, ConfigResolveOptions resolveOptions, String configFile) { return loadConfig(parseOptions, resolveOptions, new File(configFile)); }
[ "public", "static", "Config", "loadConfig", "(", "ConfigParseOptions", "parseOptions", ",", "ConfigResolveOptions", "resolveOptions", ",", "String", "configFile", ")", "{", "return", "loadConfig", "(", "parseOptions", ",", "resolveOptions", ",", "new", "File", "(", ...
Load, Parse & Resolve configurations from a file, specifying parse & resolve options. @param parseOptions @param resolveOptions @param configFile @return
[ "Load", "Parse", "&", "Resolve", "configurations", "from", "a", "file", "specifying", "parse", "&", "resolve", "options", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/TypesafeConfigUtils.java#L117-L120
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/executors/ScalingThreadPoolExecutor.java
ScalingThreadPoolExecutor.newScalingThreadPool
public static ScalingThreadPoolExecutor newScalingThreadPool(int min, int max, long keepAliveTime, ThreadFactory threadFactory) { """ Creates a {@link ScalingThreadPoolExecutor}. @param min Core thread pool size. @param max Max number of threads allowed. @param keepAliveTime Keep alive time for unused thr...
java
public static ScalingThreadPoolExecutor newScalingThreadPool(int min, int max, long keepAliveTime, ThreadFactory threadFactory) { ScalingQueue queue = new ScalingQueue(); ScalingThreadPoolExecutor executor = new ScalingThreadPoolExecutor(min, max, keepAliveTime, TimeUnit.MILLISECONDS, queue, threa...
[ "public", "static", "ScalingThreadPoolExecutor", "newScalingThreadPool", "(", "int", "min", ",", "int", "max", ",", "long", "keepAliveTime", ",", "ThreadFactory", "threadFactory", ")", "{", "ScalingQueue", "queue", "=", "new", "ScalingQueue", "(", ")", ";", "Scali...
Creates a {@link ScalingThreadPoolExecutor}. @param min Core thread pool size. @param max Max number of threads allowed. @param keepAliveTime Keep alive time for unused threads in milliseconds. @param threadFactory thread factory to use. @return A {@link ScalingThreadPoolExecutor}.
[ "Creates", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/executors/ScalingThreadPoolExecutor.java#L52-L60
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/util/convert/Converter.java
Converter.registerConverter
public static void registerConverter(final Class<?> pType, final PropertyConverter pConverter) { """ Registers a converter for a given type. This converter will also be used for all subclasses, unless a more specific version is registered. </p> By default, converters for {@link com.twelvemonkeys.util.Time}, {@...
java
public static void registerConverter(final Class<?> pType, final PropertyConverter pConverter) { getInstance().converters.put(pType, pConverter); }
[ "public", "static", "void", "registerConverter", "(", "final", "Class", "<", "?", ">", "pType", ",", "final", "PropertyConverter", "pConverter", ")", "{", "getInstance", "(", ")", ".", "converters", ".", "put", "(", "pType", ",", "pConverter", ")", ";", "}...
Registers a converter for a given type. This converter will also be used for all subclasses, unless a more specific version is registered. </p> By default, converters for {@link com.twelvemonkeys.util.Time}, {@link Date} and {@link Object} (the {@link DefaultConverter}) are registered by this class' static initializer....
[ "Registers", "a", "converter", "for", "a", "given", "type", ".", "This", "converter", "will", "also", "be", "used", "for", "all", "subclasses", "unless", "a", "more", "specific", "version", "is", "registered", ".", "<", "/", "p", ">", "By", "default", "c...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/util/convert/Converter.java#L120-L122
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.setupTableLookup
public ScreenComponent setupTableLookup(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Rec record, String iQueryKeySeq, String iDisplayFieldSeq, boolean bIncludeBlankOption, boolean bIncludeFormButton) { """ Same as setupTablePopup for larger files (that don't fit in...
java
public ScreenComponent setupTableLookup(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Rec record, String iQueryKeySeq, String iDisplayFieldSeq, boolean bIncludeBlankOption, boolean bIncludeFormButton) { Converter fldDisplayFieldDesc = null; if (iDispl...
[ "public", "ScreenComponent", "setupTableLookup", "(", "ScreenLoc", "itsLocation", ",", "ComponentParent", "targetScreen", ",", "Convert", "converter", ",", "int", "iDisplayFieldDesc", ",", "Rec", "record", ",", "String", "iQueryKeySeq", ",", "String", "iDisplayFieldSeq"...
Same as setupTablePopup for larger files (that don't fit in a popup). @return Return the component or ScreenField that is created for this field.
[ "Same", "as", "setupTablePopup", "for", "larger", "files", "(", "that", "don", "t", "fit", "in", "a", "popup", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L1286-L1294
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/io/scan/AnnotationClassReader.java
AnnotationClassReader.readUTF
private String readUTF(int index, final int utfLen, final char[] buf) { """ Reads UTF8 string in {@link #b b}. @param index start offset of the UTF8 string to be read. @param utfLen length of the UTF8 string to be read. @param buf buffer to be used to read the string. This buffer must be sufficiently lar...
java
private String readUTF(int index, final int utfLen, final char[] buf) { int endIndex = index + utfLen; byte[] b = this.b; int strLen = 0; int c; int st = 0; char cc = 0; while (index < endIndex) { c = b[index++]; switch (st) { ...
[ "private", "String", "readUTF", "(", "int", "index", ",", "final", "int", "utfLen", ",", "final", "char", "[", "]", "buf", ")", "{", "int", "endIndex", "=", "index", "+", "utfLen", ";", "byte", "[", "]", "b", "=", "this", ".", "b", ";", "int", "s...
Reads UTF8 string in {@link #b b}. @param index start offset of the UTF8 string to be read. @param utfLen length of the UTF8 string to be read. @param buf buffer to be used to read the string. This buffer must be sufficiently large. It is not automatically resized. @return the String corresponding to the specified...
[ "Reads", "UTF8", "string", "in", "{", "@link", "#b", "b", "}", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/io/scan/AnnotationClassReader.java#L922-L959
tvesalainen/util
util/src/main/java/org/vesalainen/nio/IntArray.java
IntArray.getInstance
public static IntArray getInstance(byte[] buffer, int bitCount, ByteOrder order) { """ Creates IntArray backed by byte array with given bit-count and byte-order. @param buffer @param bitCount @param order @return """ return getInstance(buffer, 0, buffer.length, bitCount, order); }
java
public static IntArray getInstance(byte[] buffer, int bitCount, ByteOrder order) { return getInstance(buffer, 0, buffer.length, bitCount, order); }
[ "public", "static", "IntArray", "getInstance", "(", "byte", "[", "]", "buffer", ",", "int", "bitCount", ",", "ByteOrder", "order", ")", "{", "return", "getInstance", "(", "buffer", ",", "0", ",", "buffer", ".", "length", ",", "bitCount", ",", "order", ")...
Creates IntArray backed by byte array with given bit-count and byte-order. @param buffer @param bitCount @param order @return
[ "Creates", "IntArray", "backed", "by", "byte", "array", "with", "given", "bit", "-", "count", "and", "byte", "-", "order", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/IntArray.java#L62-L65
threerings/nenya
core/src/main/java/com/threerings/media/image/Quantize.java
Quantize.quantizeImage
public static int[] quantizeImage(int pixels[][], int max_colors) { """ Reduce the image to the given number of colors. @param pixels an in/out parameter that should initially contain [A]RGB values but that will contain color palette indicies upon return. @return The new color palette. """ Cube ...
java
public static int[] quantizeImage(int pixels[][], int max_colors) { Cube cube = new Cube(pixels, max_colors); cube.classification(); cube.reduction(); cube.assignment(); return cube.colormap; }
[ "public", "static", "int", "[", "]", "quantizeImage", "(", "int", "pixels", "[", "]", "[", "]", ",", "int", "max_colors", ")", "{", "Cube", "cube", "=", "new", "Cube", "(", "pixels", ",", "max_colors", ")", ";", "cube", ".", "classification", "(", ")...
Reduce the image to the given number of colors. @param pixels an in/out parameter that should initially contain [A]RGB values but that will contain color palette indicies upon return. @return The new color palette.
[ "Reduce", "the", "image", "to", "the", "given", "number", "of", "colors", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/Quantize.java#L310-L316
scireum/s3ninja
src/main/java/ninja/Bucket.java
Bucket.outputObjects
public void outputObjects(XMLStructuredOutput output, int limit, @Nullable String marker, @Nullable String prefix) { """ Returns a list of at most the provided number of stored objects @param output the xml structured output the list of objects should be written to @param limit controls the maximum number of ...
java
public void outputObjects(XMLStructuredOutput output, int limit, @Nullable String marker, @Nullable String prefix) { ListFileTreeVisitor visitor = new ListFileTreeVisitor(output, limit, marker, prefix); output.beginOutput("ListBucketResult", Attribute.set("xmlns", "http://s3.amazonaws.com/doc/2006-03-0...
[ "public", "void", "outputObjects", "(", "XMLStructuredOutput", "output", ",", "int", "limit", ",", "@", "Nullable", "String", "marker", ",", "@", "Nullable", "String", "prefix", ")", "{", "ListFileTreeVisitor", "visitor", "=", "new", "ListFileTreeVisitor", "(", ...
Returns a list of at most the provided number of stored objects @param output the xml structured output the list of objects should be written to @param limit controls the maximum number of objects returned @param marker the key to start with when listing objects in a bucket @param prefix limits the response to keys t...
[ "Returns", "a", "list", "of", "at", "most", "the", "provided", "number", "of", "stored", "objects" ]
train
https://github.com/scireum/s3ninja/blob/445eec55c91780267a7f987818b3fedecae009c5/src/main/java/ninja/Bucket.java#L92-L107
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java
TreeUtil.collateVisibles
public static List<ComponentWithContext> collateVisibles(final WComponent comp) { """ Obtains a list of components which are visible in the given tree. Repeated components will be returned multiple times, one for each row which they are visible in. @param comp the root component to search from. @return a list...
java
public static List<ComponentWithContext> collateVisibles(final WComponent comp) { final List<ComponentWithContext> list = new ArrayList<>(); WComponentTreeVisitor visitor = new WComponentTreeVisitor() { @Override public VisitorResult visit(final WComponent comp) { // In traversing the tree, special compo...
[ "public", "static", "List", "<", "ComponentWithContext", ">", "collateVisibles", "(", "final", "WComponent", "comp", ")", "{", "final", "List", "<", "ComponentWithContext", ">", "list", "=", "new", "ArrayList", "<>", "(", ")", ";", "WComponentTreeVisitor", "visi...
Obtains a list of components which are visible in the given tree. Repeated components will be returned multiple times, one for each row which they are visible in. @param comp the root component to search from. @return a list of components which are visible in the given context.
[ "Obtains", "a", "list", "of", "components", "which", "are", "visible", "in", "the", "given", "tree", ".", "Repeated", "components", "will", "be", "returned", "multiple", "times", "one", "for", "each", "row", "which", "they", "are", "visible", "in", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java#L45-L63
RuedigerMoeller/kontraktor
src/main/java/org/nustaq/kontraktor/Actors.java
Actors.AsActor
public static <T extends Actor> T AsActor(Class<T> actorClazz, Scheduler scheduler, int qsize) { """ create an new actor dispatched in the given DispatcherThread @param actorClazz @param <T> @return """ return (T) instance.newProxy(actorClazz,scheduler,qsize); }
java
public static <T extends Actor> T AsActor(Class<T> actorClazz, Scheduler scheduler, int qsize) { return (T) instance.newProxy(actorClazz,scheduler,qsize); }
[ "public", "static", "<", "T", "extends", "Actor", ">", "T", "AsActor", "(", "Class", "<", "T", ">", "actorClazz", ",", "Scheduler", "scheduler", ",", "int", "qsize", ")", "{", "return", "(", "T", ")", "instance", ".", "newProxy", "(", "actorClazz", ","...
create an new actor dispatched in the given DispatcherThread @param actorClazz @param <T> @return
[ "create", "an", "new", "actor", "dispatched", "in", "the", "given", "DispatcherThread" ]
train
https://github.com/RuedigerMoeller/kontraktor/blob/d5f3817f9476f3786187b8ef00400b7a4f25a404/src/main/java/org/nustaq/kontraktor/Actors.java#L224-L226
facebookarchive/hadoop-20
src/contrib/index/src/java/org/apache/hadoop/contrib/index/mapred/DocumentAndOp.java
DocumentAndOp.setUpdate
public void setUpdate(Document doc, Term term) { """ Set the instance to be an update operation. @param doc @param term """ this.op = Op.UPDATE; this.doc = doc; this.term = term; }
java
public void setUpdate(Document doc, Term term) { this.op = Op.UPDATE; this.doc = doc; this.term = term; }
[ "public", "void", "setUpdate", "(", "Document", "doc", ",", "Term", "term", ")", "{", "this", ".", "op", "=", "Op", ".", "UPDATE", ";", "this", ".", "doc", "=", "doc", ";", "this", ".", "term", "=", "term", ";", "}" ]
Set the instance to be an update operation. @param doc @param term
[ "Set", "the", "instance", "to", "be", "an", "update", "operation", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/index/src/java/org/apache/hadoop/contrib/index/mapred/DocumentAndOp.java#L139-L143
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java
SQLiteDatabase.compileStatement
public SQLiteStatement compileStatement(String sql) throws SQLException { """ Compiles an SQL statement into a reusable pre-compiled statement object. The parameters are identical to {@link #execSQL(String)}. You may put ?s in the statement and fill in those values with {@link SQLiteProgram#bindString} and {@li...
java
public SQLiteStatement compileStatement(String sql) throws SQLException { acquireReference(); try { return new SQLiteStatement(this, sql, null); } finally { releaseReference(); } }
[ "public", "SQLiteStatement", "compileStatement", "(", "String", "sql", ")", "throws", "SQLException", "{", "acquireReference", "(", ")", ";", "try", "{", "return", "new", "SQLiteStatement", "(", "this", ",", "sql", ",", "null", ")", ";", "}", "finally", "{",...
Compiles an SQL statement into a reusable pre-compiled statement object. The parameters are identical to {@link #execSQL(String)}. You may put ?s in the statement and fill in those values with {@link SQLiteProgram#bindString} and {@link SQLiteProgram#bindLong} each time you want to run the statement. Statements may not...
[ "Compiles", "an", "SQL", "statement", "into", "a", "reusable", "pre", "-", "compiled", "statement", "object", ".", "The", "parameters", "are", "identical", "to", "{", "@link", "#execSQL", "(", "String", ")", "}", ".", "You", "may", "put", "?s", "in", "th...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java#L995-L1002
googleads/googleads-java-lib
modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/utils/v201805/ReportDownloader.java
ReportDownloader.getDownloadUrl
public URL getDownloadUrl(ReportDownloadOptions options) throws RemoteException, MalformedURLException { """ Gets the download URL for a GZip or plain-text format report. If you requested a compressed report, you may want to save your file with a gz or zip extension. <pre><code> URL url = reportDownload...
java
public URL getDownloadUrl(ReportDownloadOptions options) throws RemoteException, MalformedURLException { ReportJobStatus status = reportService.getReportJobStatus(reportJobId); Preconditions.checkState(status == ReportJobStatus.COMPLETED, "Report " + reportJobId + " must be completed before downlo...
[ "public", "URL", "getDownloadUrl", "(", "ReportDownloadOptions", "options", ")", "throws", "RemoteException", ",", "MalformedURLException", "{", "ReportJobStatus", "status", "=", "reportService", ".", "getReportJobStatus", "(", "reportJobId", ")", ";", "Preconditions", ...
Gets the download URL for a GZip or plain-text format report. If you requested a compressed report, you may want to save your file with a gz or zip extension. <pre><code> URL url = reportDownloader.getDownloadUrl(options); Resources.asByteSource(url).copyTo(Files.asByteSink(file)); </code></pre> @param options the op...
[ "Gets", "the", "download", "URL", "for", "a", "GZip", "or", "plain", "-", "text", "format", "report", ".", "If", "you", "requested", "a", "compressed", "report", "you", "may", "want", "to", "save", "your", "file", "with", "a", "gz", "or", "zip", "exten...
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_axis/src/main/java/com/google/api/ads/admanager/axis/utils/v201805/ReportDownloader.java#L182-L188
codeprimate-software/cp-elements
src/main/java/org/cp/elements/beans/AbstractBean.java
AbstractBean.mapPropertyNameToFieldName
protected boolean mapPropertyNameToFieldName(final String propertyName, final String fieldName) { """ Creates a mapping from the specified property on this Bean class to one of the Bean object's fields. @param propertyName a String value specifying the name of a property on this Bean class. @param fieldName a ...
java
protected boolean mapPropertyNameToFieldName(final String propertyName, final String fieldName) { // TODO add possible validation for the property name and field name of this Bean class. propertyNameToFieldNameMapping.put(propertyName, fieldName); return propertyNameToFieldNameMapping.containsKey(propertyNa...
[ "protected", "boolean", "mapPropertyNameToFieldName", "(", "final", "String", "propertyName", ",", "final", "String", "fieldName", ")", "{", "// TODO add possible validation for the property name and field name of this Bean class.", "propertyNameToFieldNameMapping", ".", "put", "("...
Creates a mapping from the specified property on this Bean class to one of the Bean object's fields. @param propertyName a String value specifying the name of a property on this Bean class. @param fieldName a String value specifying the name of the Bean object's field. @return a boolean value indicating whether the ma...
[ "Creates", "a", "mapping", "from", "the", "specified", "property", "on", "this", "Bean", "class", "to", "one", "of", "the", "Bean", "object", "s", "fields", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/beans/AbstractBean.java#L602-L606
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java
SubItemUtil.countItems
public static int countItems(final IItemAdapter adapter, boolean countHeaders) { """ counts the items in the adapter, respecting subitems regardless of there current visibility @param adapter the adapter instance @param countHeaders if true, headers will be counted as well @return number of items in the ...
java
public static int countItems(final IItemAdapter adapter, boolean countHeaders) { return countItems(adapter.getAdapterItems(), countHeaders, false, null); }
[ "public", "static", "int", "countItems", "(", "final", "IItemAdapter", "adapter", ",", "boolean", "countHeaders", ")", "{", "return", "countItems", "(", "adapter", ".", "getAdapterItems", "(", ")", ",", "countHeaders", ",", "false", ",", "null", ")", ";", "}...
counts the items in the adapter, respecting subitems regardless of there current visibility @param adapter the adapter instance @param countHeaders if true, headers will be counted as well @return number of items in the adapter
[ "counts", "the", "items", "in", "the", "adapter", "respecting", "subitems", "regardless", "of", "there", "current", "visibility" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java#L78-L80
pravega/pravega
common/src/main/java/io/pravega/common/util/DelimitedStringParser.java
DelimitedStringParser.extractString
public DelimitedStringParser extractString(String key, Consumer<String> consumer) { """ Associates the given consumer with the given key. This consumer will be invoked every time a Key-Value pair with the given key is encountered (argument is the Value of the pair). Note that this may be invoked multiple times or...
java
public DelimitedStringParser extractString(String key, Consumer<String> consumer) { this.extractors.put(key, new Extractor<>(consumer, s -> s)); return this; }
[ "public", "DelimitedStringParser", "extractString", "(", "String", "key", ",", "Consumer", "<", "String", ">", "consumer", ")", "{", "this", ".", "extractors", ".", "put", "(", "key", ",", "new", "Extractor", "<>", "(", "consumer", ",", "s", "->", "s", "...
Associates the given consumer with the given key. This consumer will be invoked every time a Key-Value pair with the given key is encountered (argument is the Value of the pair). Note that this may be invoked multiple times or not at all, based on the given input. @param key The key for which to invoke the consum...
[ "Associates", "the", "given", "consumer", "with", "the", "given", "key", ".", "This", "consumer", "will", "be", "invoked", "every", "time", "a", "Key", "-", "Value", "pair", "with", "the", "given", "key", "is", "encountered", "(", "argument", "is", "the", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/DelimitedStringParser.java#L115-L118
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/TableCellWithActionExample.java
TableCellWithActionExample.createTableModel
private TableDataModel createTableModel() { """ Creates a table data model containing some dummy person data. @return a new data model. """ return new AbstractTableDataModel() { /** * Column id for the first name column. */ private static final int FIRST_NAME = 0; /** * Column id for...
java
private TableDataModel createTableModel() { return new AbstractTableDataModel() { /** * Column id for the first name column. */ private static final int FIRST_NAME = 0; /** * Column id for the last name column. */ private static final int LAST_NAME = 1; /** * Column id for the dat...
[ "private", "TableDataModel", "createTableModel", "(", ")", "{", "return", "new", "AbstractTableDataModel", "(", ")", "{", "/**\n\t\t\t * Column id for the first name column.\n\t\t\t */", "private", "static", "final", "int", "FIRST_NAME", "=", "0", ";", "/**\n\t\t\t * Column...
Creates a table data model containing some dummy person data. @return a new data model.
[ "Creates", "a", "table", "data", "model", "containing", "some", "dummy", "person", "data", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/datatable/TableCellWithActionExample.java#L103-L170
netty/netty
transport/src/main/java/io/netty/channel/socket/nio/NioChannelOption.java
NioChannelOption.setOption
static <T> boolean setOption(Channel jdkChannel, NioChannelOption<T> option, T value) { """ Internal helper methods to remove code duplication between Nio*Channel implementations. """ java.nio.channels.NetworkChannel channel = (java.nio.channels.NetworkChannel) jdkChannel; if (!channel.supporte...
java
static <T> boolean setOption(Channel jdkChannel, NioChannelOption<T> option, T value) { java.nio.channels.NetworkChannel channel = (java.nio.channels.NetworkChannel) jdkChannel; if (!channel.supportedOptions().contains(option.option)) { return false; } if (channel instanceof ...
[ "static", "<", "T", ">", "boolean", "setOption", "(", "Channel", "jdkChannel", ",", "NioChannelOption", "<", "T", ">", "option", ",", "T", "value", ")", "{", "java", ".", "nio", ".", "channels", ".", "NetworkChannel", "channel", "=", "(", "java", ".", ...
Internal helper methods to remove code duplication between Nio*Channel implementations.
[ "Internal", "helper", "methods", "to", "remove", "code", "duplication", "between", "Nio", "*", "Channel", "implementations", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/socket/nio/NioChannelOption.java#L56-L72
Red5/red5-io
src/main/java/org/red5/io/mp3/impl/MP3Stream.java
MP3Stream.calculateBitRate
private static int calculateBitRate(int mpegVer, int layer, int code) { """ Calculates the bit rate based on the given parameters. @param mpegVer the MPEG version @param layer the layer @param code the code for the bit rate @return the bit rate in bits per second """ int[] arr = null; ...
java
private static int calculateBitRate(int mpegVer, int layer, int code) { int[] arr = null; if (mpegVer == AudioFrame.MPEG_V1) { switch (layer) { case AudioFrame.LAYER_1: arr = BIT_RATE_MPEG1_L1; break; case AudioFrame.LAY...
[ "private", "static", "int", "calculateBitRate", "(", "int", "mpegVer", ",", "int", "layer", ",", "int", "code", ")", "{", "int", "[", "]", "arr", "=", "null", ";", "if", "(", "mpegVer", "==", "AudioFrame", ".", "MPEG_V1", ")", "{", "switch", "(", "la...
Calculates the bit rate based on the given parameters. @param mpegVer the MPEG version @param layer the layer @param code the code for the bit rate @return the bit rate in bits per second
[ "Calculates", "the", "bit", "rate", "based", "on", "the", "given", "parameters", "." ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/mp3/impl/MP3Stream.java#L262-L284
phax/ph-schedule
ph-schedule/src/main/java/com/helger/schedule/quartz/trigger/JDK8TriggerBuilder.java
JDK8TriggerBuilder.forJob
@Nonnull public JDK8TriggerBuilder <T> forJob (final String jobName, final String jobGroup) { """ Set the identity of the Job which should be fired by the produced Trigger - a <code>JobKey</code> will be produced with the given name and group. @param jobName the name of the job to fire. @param jobGroup th...
java
@Nonnull public JDK8TriggerBuilder <T> forJob (final String jobName, final String jobGroup) { m_aJobKey = new JobKey (jobName, jobGroup); return this; }
[ "@", "Nonnull", "public", "JDK8TriggerBuilder", "<", "T", ">", "forJob", "(", "final", "String", "jobName", ",", "final", "String", "jobGroup", ")", "{", "m_aJobKey", "=", "new", "JobKey", "(", "jobName", ",", "jobGroup", ")", ";", "return", "this", ";", ...
Set the identity of the Job which should be fired by the produced Trigger - a <code>JobKey</code> will be produced with the given name and group. @param jobName the name of the job to fire. @param jobGroup the group of the job to fire. @return the updated JDK8TriggerBuilder @see ITrigger#getJobKey()
[ "Set", "the", "identity", "of", "the", "Job", "which", "should", "be", "fired", "by", "the", "produced", "Trigger", "-", "a", "<code", ">", "JobKey<", "/", "code", ">", "will", "be", "produced", "with", "the", "given", "name", "and", "group", "." ]
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-schedule/src/main/java/com/helger/schedule/quartz/trigger/JDK8TriggerBuilder.java#L352-L357
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java
WebSiteManagementClientImpl.listGeoRegionsWithServiceResponseAsync
public Observable<ServiceResponse<Page<GeoRegionInner>>> listGeoRegionsWithServiceResponseAsync(final SkuName sku, final Boolean linuxWorkersEnabled) { """ Get a list of available geographical regions. Get a list of available geographical regions. @param sku Name of SKU used to filter the regions. Possible val...
java
public Observable<ServiceResponse<Page<GeoRegionInner>>> listGeoRegionsWithServiceResponseAsync(final SkuName sku, final Boolean linuxWorkersEnabled) { return listGeoRegionsSinglePageAsync(sku, linuxWorkersEnabled) .concatMap(new Func1<ServiceResponse<Page<GeoRegionInner>>, Observable<ServiceRespons...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "GeoRegionInner", ">", ">", ">", "listGeoRegionsWithServiceResponseAsync", "(", "final", "SkuName", "sku", ",", "final", "Boolean", "linuxWorkersEnabled", ")", "{", "return", "listGeoRegionsSinglePageAsyn...
Get a list of available geographical regions. Get a list of available geographical regions. @param sku Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', 'PremiumV2' @param linuxWorkersEnabled Specify &lt;code&gt;true&lt;/code&gt; i...
[ "Get", "a", "list", "of", "available", "geographical", "regions", ".", "Get", "a", "list", "of", "available", "geographical", "regions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java#L1589-L1601
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Parameters.java
Parameters.setArray
@NonNull public Parameters setArray(@NonNull String name, Array value) { """ Set the Array value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The Array value. @ret...
java
@NonNull public Parameters setArray(@NonNull String name, Array value) { return setValue(name, value); }
[ "@", "NonNull", "public", "Parameters", "setArray", "(", "@", "NonNull", "String", "name", ",", "Array", "value", ")", "{", "return", "setValue", "(", "name", ",", "value", ")", ";", "}" ]
Set the Array value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The Array value. @return The self object.
[ "Set", "the", "Array", "value", "to", "the", "query", "parameter", "referenced", "by", "the", "given", "name", ".", "A", "query", "parameter", "is", "defined", "by", "using", "the", "Expression", "s", "parameter", "(", "String", "name", ")", "function", "....
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Parameters.java#L209-L212
threerings/narya
core/src/main/java/com/threerings/io/ObjectInputStream.java
ObjectInputStream.mapClass
protected ClassMapping mapClass (short code, String cname) throws IOException, ClassNotFoundException { """ Creates, adds, and returns the class mapping for the specified code and class name. """ // create a class mapping record, and cache it ClassMapping cmap = createClassMapping(code,...
java
protected ClassMapping mapClass (short code, String cname) throws IOException, ClassNotFoundException { // create a class mapping record, and cache it ClassMapping cmap = createClassMapping(code, cname); _classmap.add(code, cmap); return cmap; }
[ "protected", "ClassMapping", "mapClass", "(", "short", "code", ",", "String", "cname", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "// create a class mapping record, and cache it", "ClassMapping", "cmap", "=", "createClassMapping", "(", "code", ",", ...
Creates, adds, and returns the class mapping for the specified code and class name.
[ "Creates", "adds", "and", "returns", "the", "class", "mapping", "for", "the", "specified", "code", "and", "class", "name", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/io/ObjectInputStream.java#L226-L233
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/NodeManager.java
NodeManager.getAppInfo
public String getAppInfo(ClusterNode node, ResourceType type) { """ Get information about applications running on a node. @param node The node. @param type The type of resources. @return The application-specific information """ Map<ResourceType, String> resourceInfos = nameToApps.get(node.getName()); ...
java
public String getAppInfo(ClusterNode node, ResourceType type) { Map<ResourceType, String> resourceInfos = nameToApps.get(node.getName()); if (resourceInfos == null) { return null; } else { return resourceInfos.get(type); } }
[ "public", "String", "getAppInfo", "(", "ClusterNode", "node", ",", "ResourceType", "type", ")", "{", "Map", "<", "ResourceType", ",", "String", ">", "resourceInfos", "=", "nameToApps", ".", "get", "(", "node", ".", "getName", "(", ")", ")", ";", "if", "(...
Get information about applications running on a node. @param node The node. @param type The type of resources. @return The application-specific information
[ "Get", "information", "about", "applications", "running", "on", "a", "node", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/NodeManager.java#L1053-L1060
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/layout/LayoutFactory.java
LayoutFactory.layoutFor
public Layout layoutFor(Class<? extends Storable> type, LayoutOptions options) throws FetchException, PersistException { """ Returns the layout matching the current definition of the given type. @throws PersistException if type represents a new generation, but persisting this information failed ""...
java
public Layout layoutFor(Class<? extends Storable> type, LayoutOptions options) throws FetchException, PersistException { return layoutFor(false, type, options); }
[ "public", "Layout", "layoutFor", "(", "Class", "<", "?", "extends", "Storable", ">", "type", ",", "LayoutOptions", "options", ")", "throws", "FetchException", ",", "PersistException", "{", "return", "layoutFor", "(", "false", ",", "type", ",", "options", ")", ...
Returns the layout matching the current definition of the given type. @throws PersistException if type represents a new generation, but persisting this information failed
[ "Returns", "the", "layout", "matching", "the", "current", "definition", "of", "the", "given", "type", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/LayoutFactory.java#L109-L113
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/WhiteBlackList.java
WhiteBlackList.matchesPatternList
private static boolean matchesPatternList(final String str, final List<Pattern> patterns) { """ Check if a string matches one of the patterns in the provided list. @param str the string to test @param patterns the patterns @return true, if successful """ if (patterns != null) { for (...
java
private static boolean matchesPatternList(final String str, final List<Pattern> patterns) { if (patterns != null) { for (final Pattern pattern : patterns) { if (pattern.matcher(str).matches()) { return true; } } } return...
[ "private", "static", "boolean", "matchesPatternList", "(", "final", "String", "str", ",", "final", "List", "<", "Pattern", ">", "patterns", ")", "{", "if", "(", "patterns", "!=", "null", ")", "{", "for", "(", "final", "Pattern", "pattern", ":", "patterns",...
Check if a string matches one of the patterns in the provided list. @param str the string to test @param patterns the patterns @return true, if successful
[ "Check", "if", "a", "string", "matches", "one", "of", "the", "patterns", "in", "the", "provided", "list", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/WhiteBlackList.java#L578-L587
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identity.java
Identity.extendedIdentifierEquals
private boolean extendedIdentifierEquals(String eid1, String eid2) { """ Compare two extended identifiers @param eid1 Extended identifier XML string @param eid2 Extended identifier XML string @return boolean true if both are equal @since 0.1.5 """ try { return DomHelpers.compare(DomHelpers.toDocumen...
java
private boolean extendedIdentifierEquals(String eid1, String eid2) { try { return DomHelpers.compare(DomHelpers.toDocument(eid1, null), DomHelpers.toDocument(eid2, null)); } catch (MarshalException e) { return false; } }
[ "private", "boolean", "extendedIdentifierEquals", "(", "String", "eid1", ",", "String", "eid2", ")", "{", "try", "{", "return", "DomHelpers", ".", "compare", "(", "DomHelpers", ".", "toDocument", "(", "eid1", ",", "null", ")", ",", "DomHelpers", ".", "toDocu...
Compare two extended identifiers @param eid1 Extended identifier XML string @param eid2 Extended identifier XML string @return boolean true if both are equal @since 0.1.5
[ "Compare", "two", "extended", "identifiers" ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/identifier/Identity.java#L181-L188
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/workspace/ReportingApi.java
ReportingApi.peek
public List<StatisticValue> peek(String subscriptionId) throws WorkspaceApiException { """ Get the statistics for the specified subscription ID. @param subscriptionId The unique ID of the subscription. """ try { InlineResponse2002 resp = api.peek(subscriptionId); Util.throwI...
java
public List<StatisticValue> peek(String subscriptionId) throws WorkspaceApiException { try { InlineResponse2002 resp = api.peek(subscriptionId); Util.throwIfNotOk(resp.getStatus()); InlineResponse2002Data data = resp.getData(); if(data == null) ...
[ "public", "List", "<", "StatisticValue", ">", "peek", "(", "String", "subscriptionId", ")", "throws", "WorkspaceApiException", "{", "try", "{", "InlineResponse2002", "resp", "=", "api", ".", "peek", "(", "subscriptionId", ")", ";", "Util", ".", "throwIfNotOk", ...
Get the statistics for the specified subscription ID. @param subscriptionId The unique ID of the subscription.
[ "Get", "the", "statistics", "for", "the", "specified", "subscription", "ID", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/workspace/ReportingApi.java#L33-L48
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetExtensionsInner.java
VirtualMachineScaleSetExtensionsInner.createOrUpdate
public VirtualMachineScaleSetExtensionInner createOrUpdate(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, VirtualMachineScaleSetExtensionInner extensionParameters) { """ The operation to create or update an extension. @param resourceGroupName The name of the resource group. @param v...
java
public VirtualMachineScaleSetExtensionInner createOrUpdate(String resourceGroupName, String vmScaleSetName, String vmssExtensionName, VirtualMachineScaleSetExtensionInner extensionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, vmssExtensionName, extensionParameter...
[ "public", "VirtualMachineScaleSetExtensionInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "String", "vmssExtensionName", ",", "VirtualMachineScaleSetExtensionInner", "extensionParameters", ")", "{", "return", "createOrUpdateWith...
The operation to create or update an extension. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set where the extension should be create or updated. @param vmssExtensionName The name of the VM scale set extension. @param extensionParameters Parameters supplied to...
[ "The", "operation", "to", "create", "or", "update", "an", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetExtensionsInner.java#L106-L108
graphql-java/java-dataloader
src/main/java/org/dataloader/DataLoader.java
DataLoader.newMappedDataLoader
public static <K, V> DataLoader<K, V> newMappedDataLoader(MappedBatchLoader<K, V> batchLoadFunction) { """ Creates new DataLoader with the specified batch loader function and default options (batching, caching and unlimited batch size). @param batchLoadFunction the batch load function to use @param <K> ...
java
public static <K, V> DataLoader<K, V> newMappedDataLoader(MappedBatchLoader<K, V> batchLoadFunction) { return newMappedDataLoader(batchLoadFunction, null); }
[ "public", "static", "<", "K", ",", "V", ">", "DataLoader", "<", "K", ",", "V", ">", "newMappedDataLoader", "(", "MappedBatchLoader", "<", "K", ",", "V", ">", "batchLoadFunction", ")", "{", "return", "newMappedDataLoader", "(", "batchLoadFunction", ",", "null...
Creates new DataLoader with the specified batch loader function and default options (batching, caching and unlimited batch size). @param batchLoadFunction the batch load function to use @param <K> the key type @param <V> the value type @return a new DataLoader
[ "Creates", "new", "DataLoader", "with", "the", "specified", "batch", "loader", "function", "and", "default", "options", "(", "batching", "caching", "and", "unlimited", "batch", "size", ")", "." ]
train
https://github.com/graphql-java/java-dataloader/blob/dfdc8133ead10aa723f896b4a1fa4a1cec9a6fbc/src/main/java/org/dataloader/DataLoader.java#L209-L211
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.notNull
@Throws(IllegalNullArgumentException.class) public static <T> void notNull(final boolean condition, @Nonnull final T reference) { """ Ensures that an object reference passed as a parameter to the calling method is not {@code null}. <p> We recommend to use the overloaded method {@link Check#notNull(Object, Str...
java
@Throws(IllegalNullArgumentException.class) public static <T> void notNull(final boolean condition, @Nonnull final T reference) { if (condition) { Check.notNull(reference); } }
[ "@", "Throws", "(", "IllegalNullArgumentException", ".", "class", ")", "public", "static", "<", "T", ">", "void", "notNull", "(", "final", "boolean", "condition", ",", "@", "Nonnull", "final", "T", "reference", ")", "{", "if", "(", "condition", ")", "{", ...
Ensures that an object reference passed as a parameter to the calling method is not {@code null}. <p> We recommend to use the overloaded method {@link Check#notNull(Object, String)} and pass as second argument the name of the parameter to enhance the exception message. @param condition condition must be {@code true}^...
[ "Ensures", "that", "an", "object", "reference", "passed", "as", "a", "parameter", "to", "the", "calling", "method", "is", "not", "{", "@code", "null", "}", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L2001-L2006
SonarSource/sonarqube
server/sonar-main/src/main/java/org/sonar/application/process/SQProcess.java
SQProcess.stop
public void stop(long timeout, TimeUnit timeoutUnit) { """ Sends kill signal and awaits termination. No guarantee that process is gracefully terminated (=shutdown hooks executed). It depends on OS. """ if (lifecycle.tryToMoveTo(Lifecycle.State.STOPPING)) { stopGracefully(timeout, timeoutUnit); ...
java
public void stop(long timeout, TimeUnit timeoutUnit) { if (lifecycle.tryToMoveTo(Lifecycle.State.STOPPING)) { stopGracefully(timeout, timeoutUnit); if (process != null && process.isAlive()) { LOG.info("{} failed to stop in a timely fashion. Killing it.", processId.getKey()); } // enf...
[ "public", "void", "stop", "(", "long", "timeout", ",", "TimeUnit", "timeoutUnit", ")", "{", "if", "(", "lifecycle", ".", "tryToMoveTo", "(", "Lifecycle", ".", "State", ".", "STOPPING", ")", ")", "{", "stopGracefully", "(", "timeout", ",", "timeoutUnit", ")...
Sends kill signal and awaits termination. No guarantee that process is gracefully terminated (=shutdown hooks executed). It depends on OS.
[ "Sends", "kill", "signal", "and", "awaits", "termination", ".", "No", "guarantee", "that", "process", "is", "gracefully", "terminated", "(", "=", "shutdown", "hooks", "executed", ")", ".", "It", "depends", "on", "OS", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-main/src/main/java/org/sonar/application/process/SQProcess.java#L98-L110
shekhargulati/strman-java
src/main/java/strman/Strman.java
Strman.safeTruncate
public static String safeTruncate(final String value, final int length, final String filler) { """ Truncate the string securely, not cutting a word in half. It always returns the last full word. @param value The input String @param length Max size of the truncated String @param filler String that will be add...
java
public static String safeTruncate(final String value, final int length, final String filler) { validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER); if (length == 0) { return ""; } if (length >= value.length()) { return value; } String...
[ "public", "static", "String", "safeTruncate", "(", "final", "String", "value", ",", "final", "int", "length", ",", "final", "String", "filler", ")", "{", "validate", "(", "value", ",", "NULL_STRING_PREDICATE", ",", "NULL_STRING_MSG_SUPPLIER", ")", ";", "if", "...
Truncate the string securely, not cutting a word in half. It always returns the last full word. @param value The input String @param length Max size of the truncated String @param filler String that will be added to the end of the return string. Example: '...' @return The truncated String
[ "Truncate", "the", "string", "securely", "not", "cutting", "a", "word", "in", "half", ".", "It", "always", "returns", "the", "last", "full", "word", "." ]
train
https://github.com/shekhargulati/strman-java/blob/d0c2a10a6273fd6082f084e95156653ca55ce1be/src/main/java/strman/Strman.java#L872-L893
j256/ormlite-core
src/main/java/com/j256/ormlite/dao/DaoManager.java
DaoManager.registerDao
public static synchronized void registerDao(ConnectionSource connectionSource, Dao<?, ?> dao) { """ Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be used internally as necessary. <p> <b>NOTE:</b> By default this registers the DAO to be associated ...
java
public static synchronized void registerDao(ConnectionSource connectionSource, Dao<?, ?> dao) { if (connectionSource == null) { throw new IllegalArgumentException("connectionSource argument cannot be null"); } addDaoToClassMap(new ClassConnectionSource(connectionSource, dao.getDataClass()), dao); }
[ "public", "static", "synchronized", "void", "registerDao", "(", "ConnectionSource", "connectionSource", ",", "Dao", "<", "?", ",", "?", ">", "dao", ")", "{", "if", "(", "connectionSource", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "("...
Register the DAO with the cache. This will allow folks to build a DAO externally and then register so it can be used internally as necessary. <p> <b>NOTE:</b> By default this registers the DAO to be associated with the class that it uses. If you need to register multiple dao's that use different {@link DatabaseTableCo...
[ "Register", "the", "DAO", "with", "the", "cache", ".", "This", "will", "allow", "folks", "to", "build", "a", "DAO", "externally", "and", "then", "register", "so", "it", "can", "be", "used", "internally", "as", "necessary", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/dao/DaoManager.java#L168-L173
alkacon/opencms-core
src/org/opencms/gwt/CmsPropertyEditorHelper.java
CmsPropertyEditorHelper.shouldChangeTitle
private boolean shouldChangeTitle(Map<String, CmsProperty> properties) { """ Determines if the title property should be changed in case of a 'NavText' change.<p> @param properties the current resource properties @return <code>true</code> if the title property should be changed in case of a 'NavText' change ...
java
private boolean shouldChangeTitle(Map<String, CmsProperty> properties) { return (properties == null) || (properties.get(CmsPropertyDefinition.PROPERTY_TITLE) == null) || (properties.get(CmsPropertyDefinition.PROPERTY_TITLE).getValue() == null) || ((properties.get(CmsProperty...
[ "private", "boolean", "shouldChangeTitle", "(", "Map", "<", "String", ",", "CmsProperty", ">", "properties", ")", "{", "return", "(", "properties", "==", "null", ")", "||", "(", "properties", ".", "get", "(", "CmsPropertyDefinition", ".", "PROPERTY_TITLE", ")"...
Determines if the title property should be changed in case of a 'NavText' change.<p> @param properties the current resource properties @return <code>true</code> if the title property should be changed in case of a 'NavText' change
[ "Determines", "if", "the", "title", "property", "should", "be", "changed", "in", "case", "of", "a", "NavText", "change", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsPropertyEditorHelper.java#L457-L465
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/service/rest/Rules.java
Rules.post
@Override @Path("/ { """ Apply rules designated in asset path against incoming JSONObject. """assetPath}") @ApiOperation(value="Apply rules identified by assetPath.", notes="Query may contain runtime values") @ApiImplicitParams({ @ApiImplicitParam(name="FactsObject", paramType="body", requi...
java
@Override @Path("/{assetPath}") @ApiOperation(value="Apply rules identified by assetPath.", notes="Query may contain runtime values") @ApiImplicitParams({ @ApiImplicitParam(name="FactsObject", paramType="body", required=true, value="Input to apply rules against"), @ApiImplicitParam(name="ass...
[ "@", "Override", "@", "Path", "(", "\"/{assetPath}\"", ")", "@", "ApiOperation", "(", "value", "=", "\"Apply rules identified by assetPath.\"", ",", "notes", "=", "\"Query may contain runtime values\"", ")", "@", "ApiImplicitParams", "(", "{", "@", "ApiImplicitParam", ...
Apply rules designated in asset path against incoming JSONObject.
[ "Apply", "rules", "designated", "in", "asset", "path", "against", "incoming", "JSONObject", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/service/rest/Rules.java#L92-L120
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
FutureUtils.retryOperation
private static <T> void retryOperation( final CompletableFuture<T> resultFuture, final Supplier<CompletableFuture<T>> operation, final int retries, final Executor executor) { """ Helper method which retries the provided operation in case of a failure. @param resultFuture to complete @param operatio...
java
private static <T> void retryOperation( final CompletableFuture<T> resultFuture, final Supplier<CompletableFuture<T>> operation, final int retries, final Executor executor) { if (!resultFuture.isDone()) { final CompletableFuture<T> operationFuture = operation.get(); operationFuture.whenCompleteAsy...
[ "private", "static", "<", "T", ">", "void", "retryOperation", "(", "final", "CompletableFuture", "<", "T", ">", "resultFuture", ",", "final", "Supplier", "<", "CompletableFuture", "<", "T", ">", ">", "operation", ",", "final", "int", "retries", ",", "final",...
Helper method which retries the provided operation in case of a failure. @param resultFuture to complete @param operation to retry @param retries until giving up @param executor to run the futures @param <T> type of the future's result
[ "Helper", "method", "which", "retries", "the", "provided", "operation", "in", "case", "of", "a", "failure", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java#L97-L132
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.refundTransaction
public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) { """ Refund a transaction @param transactionId recurly transaction id @param amount amount to refund, null for full refund """ String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId; ...
java
public void refundTransaction(final String transactionId, @Nullable final BigDecimal amount) { String url = Transactions.TRANSACTIONS_RESOURCE + "/" + transactionId; if (amount != null) { url = url + "?amount_in_cents=" + (amount.intValue() * 100); } doDELETE(url); }
[ "public", "void", "refundTransaction", "(", "final", "String", "transactionId", ",", "@", "Nullable", "final", "BigDecimal", "amount", ")", "{", "String", "url", "=", "Transactions", ".", "TRANSACTIONS_RESOURCE", "+", "\"/\"", "+", "transactionId", ";", "if", "(...
Refund a transaction @param transactionId recurly transaction id @param amount amount to refund, null for full refund
[ "Refund", "a", "transaction" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L956-L962
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaGLMapBufferObjectAsync
@Deprecated public static int cudaGLMapBufferObjectAsync(Pointer devPtr, int bufObj, cudaStream_t stream) { """ Maps a buffer object for access by CUDA. <pre> cudaError_t cudaGLMapBufferObjectAsync ( void** devPtr, GLuint bufObj, cudaStream_t stream ) </pre> <div> <p>Maps a buffer object for access ...
java
@Deprecated public static int cudaGLMapBufferObjectAsync(Pointer devPtr, int bufObj, cudaStream_t stream) { return checkResult(cudaGLMapBufferObjectAsyncNative(devPtr, bufObj, stream)); }
[ "@", "Deprecated", "public", "static", "int", "cudaGLMapBufferObjectAsync", "(", "Pointer", "devPtr", ",", "int", "bufObj", ",", "cudaStream_t", "stream", ")", "{", "return", "checkResult", "(", "cudaGLMapBufferObjectAsyncNative", "(", "devPtr", ",", "bufObj", ",", ...
Maps a buffer object for access by CUDA. <pre> cudaError_t cudaGLMapBufferObjectAsync ( void** devPtr, GLuint bufObj, cudaStream_t stream ) </pre> <div> <p>Maps a buffer object for access by CUDA. Deprecated<span>This function is deprecated as of CUDA 3.0.</span>Maps the buffer object of ID <tt>bufObj</tt> into the ad...
[ "Maps", "a", "buffer", "object", "for", "access", "by", "CUDA", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L10988-L10992
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.newlineShowText
public void newlineShowText(float wordSpacing, float charSpacing, String text) { """ Moves to the next line and shows text string, using the given values of the character and word spacing parameters. @param wordSpacing a parameter @param charSpacing a parameter @param text the text to writ...
java
public void newlineShowText(float wordSpacing, float charSpacing, String text) { state.yTLM -= state.leading; content.append(wordSpacing).append(' ').append(charSpacing); showText2(text); content.append("\"").append_i(separator); // The " operator sets charSpace and wordSpace in...
[ "public", "void", "newlineShowText", "(", "float", "wordSpacing", ",", "float", "charSpacing", ",", "String", "text", ")", "{", "state", ".", "yTLM", "-=", "state", ".", "leading", ";", "content", ".", "append", "(", "wordSpacing", ")", ".", "append", "(",...
Moves to the next line and shows text string, using the given values of the character and word spacing parameters. @param wordSpacing a parameter @param charSpacing a parameter @param text the text to write
[ "Moves", "to", "the", "next", "line", "and", "shows", "text", "string", "using", "the", "given", "values", "of", "the", "character", "and", "word", "spacing", "parameters", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1508-L1518
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.updateVnetGatewayAsync
public Observable<VnetGatewayInner> updateVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { """ Update a Virtual Network gateway. Update a Virtual Network gateway. @param resourceGroupName Name of the resource group to which the ...
java
public Observable<VnetGatewayInner> updateVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { return updateVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).map(new Func1<Service...
[ "public", "Observable", "<", "VnetGatewayInner", ">", "updateVnetGatewayAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "vnetName", ",", "String", "gatewayName", ",", "VnetGatewayInner", "connectionEnvelope", ")", "{", "return", "upda...
Update a Virtual Network gateway. Update a Virtual Network gateway. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param vnetName Name of the Virtual Network. @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. ...
[ "Update", "a", "Virtual", "Network", "gateway", ".", "Update", "a", "Virtual", "Network", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L3312-L3319
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_instanceId_resume_POST
public void project_serviceName_instance_instanceId_resume_POST(String serviceName, String instanceId) throws IOException { """ Resume a suspended instance REST: POST /cloud/project/{serviceName}/instance/{instanceId}/resume @param instanceId [required] Instance id @param serviceName [required] Service name ...
java
public void project_serviceName_instance_instanceId_resume_POST(String serviceName, String instanceId) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/resume"; StringBuilder sb = path(qPath, serviceName, instanceId); exec(qPath, "POST", sb.toString(), null); }
[ "public", "void", "project_serviceName_instance_instanceId_resume_POST", "(", "String", "serviceName", ",", "String", "instanceId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance/{instanceId}/resume\"", ";", "StringBuilder", ...
Resume a suspended instance REST: POST /cloud/project/{serviceName}/instance/{instanceId}/resume @param instanceId [required] Instance id @param serviceName [required] Service name
[ "Resume", "a", "suspended", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2001-L2005
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.div
public static BigDecimal div(String v1, String v2, int scale) { """ 提供(相对)精确的除法运算,当发生除不尽的情况时,由scale指定精确度,后面的四舍五入 @param v1 被除数 @param v2 除数 @param scale 精确度,如果为负值,取绝对值 @return 两个参数的商 """ return div(v1, v2, scale, RoundingMode.HALF_UP); }
java
public static BigDecimal div(String v1, String v2, int scale) { return div(v1, v2, scale, RoundingMode.HALF_UP); }
[ "public", "static", "BigDecimal", "div", "(", "String", "v1", ",", "String", "v2", ",", "int", "scale", ")", "{", "return", "div", "(", "v1", ",", "v2", ",", "scale", ",", "RoundingMode", ".", "HALF_UP", ")", ";", "}" ]
提供(相对)精确的除法运算,当发生除不尽的情况时,由scale指定精确度,后面的四舍五入 @param v1 被除数 @param v2 除数 @param scale 精确度,如果为负值,取绝对值 @return 两个参数的商
[ "提供", "(", "相对", ")", "精确的除法运算", "当发生除不尽的情况时", "由scale指定精确度", "后面的四舍五入" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L635-L637
geomajas/geomajas-project-geometry
core/src/main/java/org/geomajas/geometry/service/BboxService.java
BboxService.setCenterPoint
public static Bbox setCenterPoint(Bbox bbox, Coordinate center) { """ Translate a bounding box by applying a new center point. @param bbox The original bounding box to translate. This one will remain untouched. @param center The new center point. @return The result as a new bounding box. """ double x ...
java
public static Bbox setCenterPoint(Bbox bbox, Coordinate center) { double x = center.getX() - 0.5 * bbox.getWidth(); double y = center.getY() - 0.5 * bbox.getHeight(); return new Bbox(x, y, bbox.getWidth(), bbox.getHeight()); }
[ "public", "static", "Bbox", "setCenterPoint", "(", "Bbox", "bbox", ",", "Coordinate", "center", ")", "{", "double", "x", "=", "center", ".", "getX", "(", ")", "-", "0.5", "*", "bbox", ".", "getWidth", "(", ")", ";", "double", "y", "=", "center", ".",...
Translate a bounding box by applying a new center point. @param bbox The original bounding box to translate. This one will remain untouched. @param center The new center point. @return The result as a new bounding box.
[ "Translate", "a", "bounding", "box", "by", "applying", "a", "new", "center", "point", "." ]
train
https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/BboxService.java#L80-L84
westnordost/osmapi
src/main/java/de/westnordost/osmapi/map/MapDataHistoryDao.java
MapDataHistoryDao.getNodeHistory
public void getNodeHistory(long id, Handler<Node> handler) { """ Feeds all versions of the given node to the handler. The elements are sorted by version, the oldest version is the first, the newest version is the last element.<br> If not logged in, the Changeset for each returned element will be null @throws ...
java
public void getNodeHistory(long id, Handler<Node> handler) { MapDataHandler mapDataHandler = new WrapperOsmElementHandler<>(Node.class, handler); boolean authenticate = osm.getOAuth() != null; osm.makeRequest(NODE + "/" + id + "/" + HISTORY, authenticate, new MapDataParser(mapDataHandler, factory)); }
[ "public", "void", "getNodeHistory", "(", "long", "id", ",", "Handler", "<", "Node", ">", "handler", ")", "{", "MapDataHandler", "mapDataHandler", "=", "new", "WrapperOsmElementHandler", "<>", "(", "Node", ".", "class", ",", "handler", ")", ";", "boolean", "a...
Feeds all versions of the given node to the handler. The elements are sorted by version, the oldest version is the first, the newest version is the last element.<br> If not logged in, the Changeset for each returned element will be null @throws OsmNotFoundException if the node has not been found.
[ "Feeds", "all", "versions", "of", "the", "given", "node", "to", "the", "handler", ".", "The", "elements", "are", "sorted", "by", "version", "the", "oldest", "version", "is", "the", "first", "the", "newest", "version", "is", "the", "last", "element", ".", ...
train
https://github.com/westnordost/osmapi/blob/dda6978fd12e117d0cf17812bc22037f61e22c4b/src/main/java/de/westnordost/osmapi/map/MapDataHistoryDao.java#L47-L53
javagl/ND
nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/j/LongTupleIterators.java
LongTupleIterators.clampingIterator
public static Iterator<MutableLongTuple> clampingIterator( LongTuple min, LongTuple max, Iterator<? extends MutableLongTuple> delegate) { """ Returns an iterator that returns the {@link MutableLongTuple}s from the given delegate that are contained in the given bounds.<br> @param min The mini...
java
public static Iterator<MutableLongTuple> clampingIterator( LongTuple min, LongTuple max, Iterator<? extends MutableLongTuple> delegate) { Utils.checkForEqualSize(min, max); LongTuple localMin = LongTuples.copy(min); LongTuple localMax = LongTuples.copy(max); r...
[ "public", "static", "Iterator", "<", "MutableLongTuple", ">", "clampingIterator", "(", "LongTuple", "min", ",", "LongTuple", "max", ",", "Iterator", "<", "?", "extends", "MutableLongTuple", ">", "delegate", ")", "{", "Utils", ".", "checkForEqualSize", "(", "min"...
Returns an iterator that returns the {@link MutableLongTuple}s from the given delegate that are contained in the given bounds.<br> @param min The minimum, inclusive. A copy of this tuple will be stored internally. @param max The maximum, exclusive. A copy of this tuple will be stored internally. @param delegate The de...
[ "Returns", "an", "iterator", "that", "returns", "the", "{", "@link", "MutableLongTuple", "}", "s", "from", "the", "given", "delegate", "that", "are", "contained", "in", "the", "given", "bounds", ".", "<br", ">" ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-iteration/src/main/java/de/javagl/nd/iteration/tuples/j/LongTupleIterators.java#L197-L205
jeluard/semantic-versioning
api/src/main/java/org/osjava/jardiff/JarDiff.java
JarDiff.loadClasses
private void loadClasses(Map infoMap, URL path) throws DiffException { """ Load all the classes from the specified URL and store information about them in the specified map. This currently only works for jar files, <b>not</b> directories which contain classes in subdirectories or in the current directory. @p...
java
private void loadClasses(Map infoMap, URL path) throws DiffException { try { File jarFile = null; if(!"file".equals(path.getProtocol()) || path.getHost() != null) { // If it's not a local file, store it as a temporary jar file. // java.util.jar.JarFile req...
[ "private", "void", "loadClasses", "(", "Map", "infoMap", ",", "URL", "path", ")", "throws", "DiffException", "{", "try", "{", "File", "jarFile", "=", "null", ";", "if", "(", "!", "\"file\"", ".", "equals", "(", "path", ".", "getProtocol", "(", ")", ")"...
Load all the classes from the specified URL and store information about them in the specified map. This currently only works for jar files, <b>not</b> directories which contain classes in subdirectories or in the current directory. @param infoMap the map to store the ClassInfo in. @throws DiffException if there is an ...
[ "Load", "all", "the", "classes", "from", "the", "specified", "URL", "and", "store", "information", "about", "them", "in", "the", "specified", "map", ".", "This", "currently", "only", "works", "for", "jar", "files", "<b", ">", "not<", "/", "b", ">", "dire...
train
https://github.com/jeluard/semantic-versioning/blob/d0bfbeddca8ac4202f5225810227c72a708360a9/api/src/main/java/org/osjava/jardiff/JarDiff.java#L178-L204
nathanmarz/dfs-datastores
dfs-datastores-cascading/src/main/java/com/backtype/cascading/tap/PailTap.java
PailTap.sourceConfInit
@Override public void sourceConfInit(FlowProcess<JobConf> process, JobConf conf) { """ no good way to override this, just had to copy/paste and modify """ try { Path root = getQualifiedPath(conf); if (_options.attrs != null && _options.attrs.length > 0) { Pail pail = new Pail(_pailRoo...
java
@Override public void sourceConfInit(FlowProcess<JobConf> process, JobConf conf) { try { Path root = getQualifiedPath(conf); if (_options.attrs != null && _options.attrs.length > 0) { Pail pail = new Pail(_pailRoot, conf); for (List<String> attr : _options.attrs) { String rel...
[ "@", "Override", "public", "void", "sourceConfInit", "(", "FlowProcess", "<", "JobConf", ">", "process", ",", "JobConf", "conf", ")", "{", "try", "{", "Path", "root", "=", "getQualifiedPath", "(", "conf", ")", ";", "if", "(", "_options", ".", "attrs", "!...
no good way to override this, just had to copy/paste and modify
[ "no", "good", "way", "to", "override", "this", "just", "had", "to", "copy", "/", "paste", "and", "modify" ]
train
https://github.com/nathanmarz/dfs-datastores/blob/ad2ce6d1ef748bab8444e81fa1617ab5e8b1a43e/dfs-datastores-cascading/src/main/java/com/backtype/cascading/tap/PailTap.java#L227-L250
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.createView
public JenkinsServer createView(FolderJob folder, String viewName, String viewXml) throws IOException { """ Create a view on the server using the provided xml and in the provided folder. @param folder {@link FolderJob} @param viewName name of the view to be created. @param viewXml The configuration for the v...
java
public JenkinsServer createView(FolderJob folder, String viewName, String viewXml) throws IOException { return createView(folder, viewName, viewXml, false); }
[ "public", "JenkinsServer", "createView", "(", "FolderJob", "folder", ",", "String", "viewName", ",", "String", "viewXml", ")", "throws", "IOException", "{", "return", "createView", "(", "folder", ",", "viewName", ",", "viewXml", ",", "false", ")", ";", "}" ]
Create a view on the server using the provided xml and in the provided folder. @param folder {@link FolderJob} @param viewName name of the view to be created. @param viewXml The configuration for the view. @throws IOException in case of an error.
[ "Create", "a", "view", "on", "the", "server", "using", "the", "provided", "xml", "and", "in", "the", "provided", "folder", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L427-L429
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsyncThrowing
public static <T1, T2, T3, T4, T5, R> Func5<T1, T2, T3, T4, T5, Observable<R>> toAsyncThrowing(ThrowingFunc5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> func) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src=...
java
public static <T1, T2, T3, T4, T5, R> Func5<T1, T2, T3, T4, T5, Observable<R>> toAsyncThrowing(ThrowingFunc5<? super T1, ? super T2, ? super T3, ? super T4, ? super T5, ? extends R> func) { return toAsyncThrowing(func, Schedulers.computation()); }
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "R", ">", "Func5", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "T5", ",", "Observable", "<", "R", ">", ">", "toAsyncThrowing", "(", "ThrowingFunc5", "<", "?", ...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <T3> the third parameter type @...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L441-L443
fcrepo4/fcrepo4
fcrepo-http-api/src/main/java/org/fcrepo/http/api/ContentExposingResource.java
ContentExposingResource.getContent
protected Response getContent(final String rangeValue, final int limit, final RdfStream rdfStream, final FedoraResource resource) throws IOException { """ This method returns an HTTP response with content body app...
java
protected Response getContent(final String rangeValue, final int limit, final RdfStream rdfStream, final FedoraResource resource) throws IOException { final RdfNamespacedStream outputStream; if (resou...
[ "protected", "Response", "getContent", "(", "final", "String", "rangeValue", ",", "final", "int", "limit", ",", "final", "RdfStream", "rdfStream", ",", "final", "FedoraResource", "resource", ")", "throws", "IOException", "{", "final", "RdfNamespacedStream", "outputS...
This method returns an HTTP response with content body appropriate to the following arguments. @param rangeValue starting and ending byte offsets, see {@link Range} @param limit is the number of child resources returned in the response, -1 for all @param rdfStream to which response RDF will be concatenated @param reso...
[ "This", "method", "returns", "an", "HTTP", "response", "with", "content", "body", "appropriate", "to", "the", "following", "arguments", "." ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ContentExposingResource.java#L263-L280
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/spi/index/provider/IndexChangeAdapters.java
IndexChangeAdapters.forNodeName
public static IndexChangeAdapter forNodeName( ExecutionContext context, NodeTypePredicate matcher, String workspaceName, ProvidedIndex<?> index ) { """ Create an {@l...
java
public static IndexChangeAdapter forNodeName( ExecutionContext context, NodeTypePredicate matcher, String workspaceName, ProvidedIndex<?> index ) { return new Nod...
[ "public", "static", "IndexChangeAdapter", "forNodeName", "(", "ExecutionContext", "context", ",", "NodeTypePredicate", "matcher", ",", "String", "workspaceName", ",", "ProvidedIndex", "<", "?", ">", "index", ")", "{", "return", "new", "NodeNameChangeAdapter", "(", "...
Create an {@link IndexChangeAdapter} implementation that handles the "jcr:name" property. @param context the execution context; may not be null @param matcher the node type matcher used to determine which nodes should be included in the index; may not be null @param workspaceName the name of the workspace; may not be ...
[ "Create", "an", "{", "@link", "IndexChangeAdapter", "}", "implementation", "that", "handles", "the", "jcr", ":", "name", "property", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/spi/index/provider/IndexChangeAdapters.java#L96-L101
spacecowboy/NoNonsense-FilePicker
library/src/main/java/com/nononsenseapps/filepicker/Utils.java
Utils.getFileForUri
@NonNull public static File getFileForUri(@NonNull Uri uri) { """ Convert a uri generated by a fileprovider, like content://AUTHORITY/ROOT/actual/path to a file pointing to file:///actual/path Note that it only works for paths generated with `ROOT` as the path element. This is done if nnf_provider_paths.x...
java
@NonNull public static File getFileForUri(@NonNull Uri uri) { String path = uri.getEncodedPath(); final int splitIndex = path.indexOf('/', 1); final String tag = Uri.decode(path.substring(1, splitIndex)); path = Uri.decode(path.substring(splitIndex + 1)); if (!"root".equalsI...
[ "@", "NonNull", "public", "static", "File", "getFileForUri", "(", "@", "NonNull", "Uri", "uri", ")", "{", "String", "path", "=", "uri", ".", "getEncodedPath", "(", ")", ";", "final", "int", "splitIndex", "=", "path", ".", "indexOf", "(", "'", "'", ",",...
Convert a uri generated by a fileprovider, like content://AUTHORITY/ROOT/actual/path to a file pointing to file:///actual/path Note that it only works for paths generated with `ROOT` as the path element. This is done if nnf_provider_paths.xml is used to define the file provider in the manifest. @param uri generated f...
[ "Convert", "a", "uri", "generated", "by", "a", "fileprovider", "like", "content", ":", "//", "AUTHORITY", "/", "ROOT", "/", "actual", "/", "path", "to", "a", "file", "pointing", "to", "file", ":", "///", "actual", "/", "path" ]
train
https://github.com/spacecowboy/NoNonsense-FilePicker/blob/396ef7fa5e87791170791f9d94c78f6e42a7679a/library/src/main/java/com/nononsenseapps/filepicker/Utils.java#L70-L97
alkacon/opencms-core
src/org/opencms/util/CmsMacroResolver.java
CmsMacroResolver.addMacro
public void addMacro(String key, String value) { """ Adds a customized macro to this macro resolver.<p> @param key the macro to add @param value the value to return if the macro is encountered """ if (m_additionalMacros == null) { // use lazy initializing m_additionalMacros...
java
public void addMacro(String key, String value) { if (m_additionalMacros == null) { // use lazy initializing m_additionalMacros = new HashMap<String, String>(); } m_additionalMacros.put(key, value); }
[ "public", "void", "addMacro", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "m_additionalMacros", "==", "null", ")", "{", "// use lazy initializing", "m_additionalMacros", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")...
Adds a customized macro to this macro resolver.<p> @param key the macro to add @param value the value to return if the macro is encountered
[ "Adds", "a", "customized", "macro", "to", "this", "macro", "resolver", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsMacroResolver.java#L791-L798
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceTableAccess.java
ICUResourceTableAccess.getTableString
public static String getTableString(String path, ULocale locale, String tableName, String itemName, String defaultValue) { """ Utility to fetch locale display data from resource bundle tables. Convenience wrapper for {@link #getTableString(ICUResourceBundle, String, String, String, String)}. """ ...
java
public static String getTableString(String path, ULocale locale, String tableName, String itemName, String defaultValue) { ICUResourceBundle bundle = (ICUResourceBundle) UResourceBundle. getBundleInstance(path, locale.getBaseName()); return getTableString(bundle, tableName, null,...
[ "public", "static", "String", "getTableString", "(", "String", "path", ",", "ULocale", "locale", ",", "String", "tableName", ",", "String", "itemName", ",", "String", "defaultValue", ")", "{", "ICUResourceBundle", "bundle", "=", "(", "ICUResourceBundle", ")", "U...
Utility to fetch locale display data from resource bundle tables. Convenience wrapper for {@link #getTableString(ICUResourceBundle, String, String, String, String)}.
[ "Utility", "to", "fetch", "locale", "display", "data", "from", "resource", "bundle", "tables", ".", "Convenience", "wrapper", "for", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceTableAccess.java#L25-L30
stephanenicolas/mimic
mimic-library/src/main/java/com/github/stephanenicolas/mimic/MimicCreator.java
MimicCreator.mimicClass
public void mimicClass(CtClass src, CtClass dst, MimicMode defaultMimicMode, MimicMethod[] mimicMethods) throws NotFoundException, CannotCompileException, MimicException { """ Copies all fields, constructors and methods declared in class src into dst. All interfaces implemented by src will also be implemented by ...
java
public void mimicClass(CtClass src, CtClass dst, MimicMode defaultMimicMode, MimicMethod[] mimicMethods) throws NotFoundException, CannotCompileException, MimicException { mimicInterfaces(src, dst); mimicFields(src, dst); mimicConstructors(src, dst); mimicMethods(src, dst, defaultMimicMo...
[ "public", "void", "mimicClass", "(", "CtClass", "src", ",", "CtClass", "dst", ",", "MimicMode", "defaultMimicMode", ",", "MimicMethod", "[", "]", "mimicMethods", ")", "throws", "NotFoundException", ",", "CannotCompileException", ",", "MimicException", "{", "mimicInt...
Copies all fields, constructors and methods declared in class src into dst. All interfaces implemented by src will also be implemented by dst. @param src the src class. @param dst the dst class. @param defaultMimicMode the default mimic mode for methods. @param mimicMethods @throws NotFoundException should not be thro...
[ "Copies", "all", "fields", "constructors", "and", "methods", "declared", "in", "class", "src", "into", "dst", ".", "All", "interfaces", "implemented", "by", "src", "will", "also", "be", "implemented", "by", "dst", "." ]
train
https://github.com/stephanenicolas/mimic/blob/28991c5a10a87eb1c58d834f5a1e07fe1f731c48/mimic-library/src/main/java/com/github/stephanenicolas/mimic/MimicCreator.java#L161-L166
Alluxio/alluxio
minicluster/src/main/java/alluxio/multi/process/Master.java
Master.updateConf
public void updateConf(PropertyKey key, @Nullable String value) { """ Updates the master's configuration. This update will take effect the next time the master is started. @param key the conf key to update @param value the value to set, or null to unset the key """ if (value == null) { mProperti...
java
public void updateConf(PropertyKey key, @Nullable String value) { if (value == null) { mProperties.remove(key); } else { mProperties.put(key, value); } }
[ "public", "void", "updateConf", "(", "PropertyKey", "key", ",", "@", "Nullable", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "mProperties", ".", "remove", "(", "key", ")", ";", "}", "else", "{", "mProperties", ".", "put", ...
Updates the master's configuration. This update will take effect the next time the master is started. @param key the conf key to update @param value the value to set, or null to unset the key
[ "Updates", "the", "master", "s", "configuration", ".", "This", "update", "will", "take", "effect", "the", "next", "time", "the", "master", "is", "started", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/minicluster/src/main/java/alluxio/multi/process/Master.java#L57-L63
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/concurrent/ExecutorServiceHelper.java
ExecutorServiceHelper.shutdownAndWaitUntilAllTasksAreFinished
@Nonnull public static EInterrupt shutdownAndWaitUntilAllTasksAreFinished (@Nonnull final ExecutorService aES, @Nonnegative final long nTimeout, @Nonnull final TimeUnit eUnit) { ...
java
@Nonnull public static EInterrupt shutdownAndWaitUntilAllTasksAreFinished (@Nonnull final ExecutorService aES, @Nonnegative final long nTimeout, @Nonnull final TimeUnit eUnit) { ...
[ "@", "Nonnull", "public", "static", "EInterrupt", "shutdownAndWaitUntilAllTasksAreFinished", "(", "@", "Nonnull", "final", "ExecutorService", "aES", ",", "@", "Nonnegative", "final", "long", "nTimeout", ",", "@", "Nonnull", "final", "TimeUnit", "eUnit", ")", "{", ...
Call shutdown on the {@link ExecutorService} and wait indefinitely until it terminated. @param aES The {@link ExecutorService} to operate on. May not be <code>null</code>. @param nTimeout the maximum time to wait. Must be &gt; 0. @param eUnit the time unit of the timeout argument. Must not be <code>null</code> . @retu...
[ "Call", "shutdown", "on", "the", "{", "@link", "ExecutorService", "}", "and", "wait", "indefinitely", "until", "it", "terminated", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/concurrent/ExecutorServiceHelper.java#L129-L144
tvesalainen/util
util/src/main/java/org/vesalainen/util/stream/Streams.java
Streams.reducingStream
public static final IntStream reducingStream(IntStream stream, ReducingFunction func) { """ Converts Stream to Stream where one or more int items are mapped to one int item. Mapping is done by func method. Func must return true after calling consumer method. Otherwise behavior is unpredictable. @param stream ...
java
public static final IntStream reducingStream(IntStream stream, ReducingFunction func) { return StreamSupport.intStream(new ReducingSpliterator(stream, func), false); }
[ "public", "static", "final", "IntStream", "reducingStream", "(", "IntStream", "stream", ",", "ReducingFunction", "func", ")", "{", "return", "StreamSupport", ".", "intStream", "(", "new", "ReducingSpliterator", "(", "stream", ",", "func", ")", ",", "false", ")",...
Converts Stream to Stream where one or more int items are mapped to one int item. Mapping is done by func method. Func must return true after calling consumer method. Otherwise behavior is unpredictable. @param stream @param func @return @throws IllegalStateException if Stream ends when mapping is unfinished. @depreca...
[ "Converts", "Stream", "to", "Stream", "where", "one", "or", "more", "int", "items", "are", "mapped", "to", "one", "int", "item", ".", "Mapping", "is", "done", "by", "func", "method", ".", "Func", "must", "return", "true", "after", "calling", "consumer", ...
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/stream/Streams.java#L52-L55
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/HttpMessageSecurity.java
HttpMessageSecurity.protectRequest
public Request protectRequest(Request request) throws IOException { """ Protects existing request. Replaces its body with encrypted version. @param request existing request. @return new request with encrypted body if supported or existing request. @throws IOException throws IOException """ tr...
java
public Request protectRequest(Request request) throws IOException { try { Request result = request.newBuilder().header(AUTHENTICATE, BEARER_TOKEP_REFIX + clientSecurityToken) .build(); if (!supportsProtection()) { return result; } ...
[ "public", "Request", "protectRequest", "(", "Request", "request", ")", "throws", "IOException", "{", "try", "{", "Request", "result", "=", "request", ".", "newBuilder", "(", ")", ".", "header", "(", "AUTHENTICATE", ",", "BEARER_TOKEP_REFIX", "+", "clientSecurity...
Protects existing request. Replaces its body with encrypted version. @param request existing request. @return new request with encrypted body if supported or existing request. @throws IOException throws IOException
[ "Protects", "existing", "request", ".", "Replaces", "its", "body", "with", "encrypted", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/HttpMessageSecurity.java#L154-L204
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java
AsyncMutateInBuilder.arrayAppend
@Deprecated public <T> AsyncMutateInBuilder arrayAppend(String path, T value, boolean createPath) { """ Append to an existing array, pushing the value to the back/last position in the array. @param path the path of the array. @param value the value to insert at the back of the array. @param createPath tr...
java
@Deprecated public <T> AsyncMutateInBuilder arrayAppend(String path, T value, boolean createPath) { return arrayAppend(path, value, new SubdocOptionsBuilder().createPath(createPath)); }
[ "@", "Deprecated", "public", "<", "T", ">", "AsyncMutateInBuilder", "arrayAppend", "(", "String", "path", ",", "T", "value", ",", "boolean", "createPath", ")", "{", "return", "arrayAppend", "(", "path", ",", "value", ",", "new", "SubdocOptionsBuilder", "(", ...
Append to an existing array, pushing the value to the back/last position in the array. @param path the path of the array. @param value the value to insert at the back of the array. @param createPath true to create missing intermediary nodes. @deprecated Use {@link #arrayAppend(String, Object, SubdocOptionsBuilder)} in...
[ "Append", "to", "an", "existing", "array", "pushing", "the", "value", "to", "the", "back", "/", "last", "position", "in", "the", "array", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java#L972-L975
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XCostExtension.java
XCostExtension.assignAmounts
public void assignAmounts(XEvent event, Map<String, Double> amounts) { """ Assigns (to the given event) multiple amounts given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call: <pre> assignAmounts(event, [[a...
java
public void assignAmounts(XEvent event, Map<String, Double> amounts) { XCostAmount.instance().assignValues(event, amounts); }
[ "public", "void", "assignAmounts", "(", "XEvent", "event", ",", "Map", "<", "String", ",", "Double", ">", "amounts", ")", "{", "XCostAmount", ".", "instance", "(", ")", ".", "assignValues", "(", "event", ",", "amounts", ")", ";", "}" ]
Assigns (to the given event) multiple amounts given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. For example, the call: <pre> assignAmounts(event, [[a 10.00] [b 15.00] [c 25.00]]) </pre> should result into the following XES fragment: <...
[ "Assigns", "(", "to", "the", "given", "event", ")", "multiple", "amounts", "given", "their", "keys", ".", "Note", "that", "as", "a", "side", "effect", "this", "method", "creates", "attributes", "when", "it", "does", "not", "find", "an", "attribute", "with"...
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L608-L610
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.lastIndexOfAny
public static int lastIndexOfAny(final CharSequence str, final CharSequence... searchStrs) { """ <p>Find the latest index of any of a set of potential substrings.</p> <p>A {@code null} CharSequence will return {@code -1}. A {@code null} search array will return {@code -1}. A {@code null} or zero length search...
java
public static int lastIndexOfAny(final CharSequence str, final CharSequence... searchStrs) { if (str == null || searchStrs == null) { return INDEX_NOT_FOUND; } int ret = INDEX_NOT_FOUND; int tmp = 0; for (final CharSequence search : searchStrs) { if (searc...
[ "public", "static", "int", "lastIndexOfAny", "(", "final", "CharSequence", "str", ",", "final", "CharSequence", "...", "searchStrs", ")", "{", "if", "(", "str", "==", "null", "||", "searchStrs", "==", "null", ")", "{", "return", "INDEX_NOT_FOUND", ";", "}", ...
<p>Find the latest index of any of a set of potential substrings.</p> <p>A {@code null} CharSequence will return {@code -1}. A {@code null} search array will return {@code -1}. A {@code null} or zero length search array entry will be ignored, but a search array containing "" will return the length of {@code str} if {@...
[ "<p", ">", "Find", "the", "latest", "index", "of", "any", "of", "a", "set", "of", "potential", "substrings", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L2593-L2609
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/TargetsApi.java
TargetsApi.getTargets
public TargetsResponse getTargets(String searchTerm, String filterName, String types, String excludeGroup, String restrictGroup, String excludeFromGroup, String restrictToGroup, String sort, BigDecimal limit, String matchType) throws ApiException { """ Search for targets Search for targets by the specified search...
java
public TargetsResponse getTargets(String searchTerm, String filterName, String types, String excludeGroup, String restrictGroup, String excludeFromGroup, String restrictToGroup, String sort, BigDecimal limit, String matchType) throws ApiException { ApiResponse<TargetsResponse> resp = getTargetsWithHttpInfo(sear...
[ "public", "TargetsResponse", "getTargets", "(", "String", "searchTerm", ",", "String", "filterName", ",", "String", "types", ",", "String", "excludeGroup", ",", "String", "restrictGroup", ",", "String", "excludeFromGroup", ",", "String", "restrictToGroup", ",", "Str...
Search for targets Search for targets by the specified search term. @param searchTerm The text to search for in targets. (required) @param filterName Filter the search based on this field. (optional) @param types A comma-separated list of types to include in the search. Valid values are &#x60;acd-queue&#x60;, &#x60;age...
[ "Search", "for", "targets", "Search", "for", "targets", "by", "the", "specified", "search", "term", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/TargetsApi.java#L909-L912
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/CallableUtils.java
CallableUtils.updateDirections
public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { """ Clones @original and updates it's direction - taken from @source. @param original QueryParameters which would be updated @param source QueryParameters directions of which would be read @return updated clon...
java
public static QueryParameters updateDirections(QueryParameters original, QueryParameters source) { QueryParameters updatedParams = new QueryParameters(original); Integer position = null; String originalKey = null; if (source != null) { for (String sourceKey : source.ke...
[ "public", "static", "QueryParameters", "updateDirections", "(", "QueryParameters", "original", ",", "QueryParameters", "source", ")", "{", "QueryParameters", "updatedParams", "=", "new", "QueryParameters", "(", "original", ")", ";", "Integer", "position", "=", "null",...
Clones @original and updates it's direction - taken from @source. @param original QueryParameters which would be updated @param source QueryParameters directions of which would be read @return updated clone on @original with updated directions
[ "Clones", "@original", "and", "updates", "it", "s", "direction", "-", "taken", "from", "@source", "." ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/CallableUtils.java#L112-L131
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/interactions/Actions.java
Actions.contextClick
public Actions contextClick(WebElement target) { """ Performs a context-click at middle of the given element. First performs a mouseMove to the location of the element. @param target Element to move to. @return A self reference. """ if (isBuildingActions()) { action.addAction(new ContextClickAct...
java
public Actions contextClick(WebElement target) { if (isBuildingActions()) { action.addAction(new ContextClickAction(jsonMouse, (Locatable) target)); } return moveInTicks(target, 0, 0).clickInTicks(RIGHT); }
[ "public", "Actions", "contextClick", "(", "WebElement", "target", ")", "{", "if", "(", "isBuildingActions", "(", ")", ")", "{", "action", ".", "addAction", "(", "new", "ContextClickAction", "(", "jsonMouse", ",", "(", "Locatable", ")", "target", ")", ")", ...
Performs a context-click at middle of the given element. First performs a mouseMove to the location of the element. @param target Element to move to. @return A self reference.
[ "Performs", "a", "context", "-", "click", "at", "middle", "of", "the", "given", "element", ".", "First", "performs", "a", "mouseMove", "to", "the", "location", "of", "the", "element", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/interactions/Actions.java#L421-L426
web3j/web3j
core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java
Bip44WalletUtils.generateBip44Wallet
public static Bip39Wallet generateBip44Wallet(String password, File destinationDirectory) throws CipherException, IOException { """ Generates a BIP-44 compatible Ethereum wallet on top of BIP-39 generated seed. @param password Will be used for both wallet encryption and passphrase for BIP-39 seed @...
java
public static Bip39Wallet generateBip44Wallet(String password, File destinationDirectory) throws CipherException, IOException { return generateBip44Wallet(password, destinationDirectory, false); }
[ "public", "static", "Bip39Wallet", "generateBip44Wallet", "(", "String", "password", ",", "File", "destinationDirectory", ")", "throws", "CipherException", ",", "IOException", "{", "return", "generateBip44Wallet", "(", "password", ",", "destinationDirectory", ",", "fals...
Generates a BIP-44 compatible Ethereum wallet on top of BIP-39 generated seed. @param password Will be used for both wallet encryption and passphrase for BIP-39 seed @param destinationDirectory The directory containing the wallet @return A BIP-39 compatible Ethereum wallet @throws CipherException if the underlying cip...
[ "Generates", "a", "BIP", "-", "44", "compatible", "Ethereum", "wallet", "on", "top", "of", "BIP", "-", "39", "generated", "seed", "." ]
train
https://github.com/web3j/web3j/blob/f99ceb19cdd65895c18e0a565034767ca18ea9fc/core/src/main/java/org/web3j/crypto/Bip44WalletUtils.java#L19-L22
RKumsher/utils
src/main/java/com/github/rkumsher/number/RandomNumberUtils.java
RandomNumberUtils.randomInt
public static int randomInt(int startInclusive, int endExclusive) { """ Returns a random int within the specified range. @param startInclusive the earliest int that can be returned @param endExclusive the upper bound (not included) @return the random int @throws IllegalArgumentException if endExclusive is le...
java
public static int randomInt(int startInclusive, int endExclusive) { checkArgument(startInclusive <= endExclusive, "End must be greater than or equal to start"); if (startInclusive == endExclusive) { return startInclusive; } return RANDOM.ints(1, startInclusive, endExclusive).sum(); }
[ "public", "static", "int", "randomInt", "(", "int", "startInclusive", ",", "int", "endExclusive", ")", "{", "checkArgument", "(", "startInclusive", "<=", "endExclusive", ",", "\"End must be greater than or equal to start\"", ")", ";", "if", "(", "startInclusive", "=="...
Returns a random int within the specified range. @param startInclusive the earliest int that can be returned @param endExclusive the upper bound (not included) @return the random int @throws IllegalArgumentException if endExclusive is less than startInclusive
[ "Returns", "a", "random", "int", "within", "the", "specified", "range", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/number/RandomNumberUtils.java#L52-L58
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.deleteVnetRoute
public void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { """ Delete a Virtual Network route in an App Service plan. Delete a Virtual Network route in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param na...
java
public void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().body(); }
[ "public", "void", "deleteVnetRoute", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "vnetName", ",", "String", "routeName", ")", "{", "deleteVnetRouteWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "vnetName", ",", "...
Delete a Virtual Network route in an App Service plan. Delete a Virtual Network route in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param vnetName Name of the Virtual Network. @param routeName Name of the Virtual Ne...
[ "Delete", "a", "Virtual", "Network", "route", "in", "an", "App", "Service", "plan", ".", "Delete", "a", "Virtual", "Network", "route", "in", "an", "App", "Service", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L3705-L3707
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java
HawkbitCommonUtil.removePrefix
public static String removePrefix(final String text, final String prefix) { """ Remove the prefix from text. @param text name @param prefix text to be removed @return String name """ if (text != null) { return text.replaceFirst(prefix, ""); } return null; }
java
public static String removePrefix(final String text, final String prefix) { if (text != null) { return text.replaceFirst(prefix, ""); } return null; }
[ "public", "static", "String", "removePrefix", "(", "final", "String", "text", ",", "final", "String", "prefix", ")", "{", "if", "(", "text", "!=", "null", ")", "{", "return", "text", ".", "replaceFirst", "(", "prefix", ",", "\"\"", ")", ";", "}", "retu...
Remove the prefix from text. @param text name @param prefix text to be removed @return String name
[ "Remove", "the", "prefix", "from", "text", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L234-L239
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/MappeableRunContainer.java
MappeableRunContainer.copyToOffset
private void copyToOffset(int offset) { """ Push all values length to the end of the array (resize array if needed) """ final int minCapacity = 2 * (offset + nbrruns); if (valueslength.capacity() < minCapacity) { // expensive case where we need to reallocate int newCapacity = valueslength.c...
java
private void copyToOffset(int offset) { final int minCapacity = 2 * (offset + nbrruns); if (valueslength.capacity() < minCapacity) { // expensive case where we need to reallocate int newCapacity = valueslength.capacity(); while (newCapacity < minCapacity) { newCapacity = (newCapacity =...
[ "private", "void", "copyToOffset", "(", "int", "offset", ")", "{", "final", "int", "minCapacity", "=", "2", "*", "(", "offset", "+", "nbrruns", ")", ";", "if", "(", "valueslength", ".", "capacity", "(", ")", "<", "minCapacity", ")", "{", "// expensive ca...
Push all values length to the end of the array (resize array if needed)
[ "Push", "all", "values", "length", "to", "the", "end", "of", "the", "array", "(", "resize", "array", "if", "needed", ")" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/MappeableRunContainer.java#L770-L787
jpmml/jpmml-sklearn
src/main/java/numpy/core/NDArrayUtil.java
NDArrayUtil.getContent
static public List<?> getContent(NDArray array, String key) { """ Gets the payload of the specified dimension of a multi-dimensional array. @param key The dimension. """ Map<String, ?> content = (Map<String, ?>)array.getContent(); return asJavaList(array, (List<?>)content.get(key)); }
java
static public List<?> getContent(NDArray array, String key){ Map<String, ?> content = (Map<String, ?>)array.getContent(); return asJavaList(array, (List<?>)content.get(key)); }
[ "static", "public", "List", "<", "?", ">", "getContent", "(", "NDArray", "array", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "?", ">", "content", "=", "(", "Map", "<", "String", ",", "?", ">", ")", "array", ".", "getContent", "(", ...
Gets the payload of the specified dimension of a multi-dimensional array. @param key The dimension.
[ "Gets", "the", "payload", "of", "the", "specified", "dimension", "of", "a", "multi", "-", "dimensional", "array", "." ]
train
https://github.com/jpmml/jpmml-sklearn/blob/6cd8bbd44faa4344857c085defa71d49cb663406/src/main/java/numpy/core/NDArrayUtil.java#L71-L76
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/ActivityManagerUtils.java
ActivityManagerUtils.isServiceRunning
public static boolean isServiceRunning(Context context, Class<? extends Service> service, int maxCheckCount) { """ Checks if the specified service is currently running or not. @param context the context. @param service the {@link java.lang.Class} of the service. @param maxCheckCount maximum value of the running...
java
public static boolean isServiceRunning(Context context, Class<? extends Service> service, int maxCheckCount) { if (context == null || service == null) { return false; } ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<Runni...
[ "public", "static", "boolean", "isServiceRunning", "(", "Context", "context", ",", "Class", "<", "?", "extends", "Service", ">", "service", ",", "int", "maxCheckCount", ")", "{", "if", "(", "context", "==", "null", "||", "service", "==", "null", ")", "{", ...
Checks if the specified service is currently running or not. @param context the context. @param service the {@link java.lang.Class} of the service. @param maxCheckCount maximum value of the running service count for this check. @return true if the service is running, false otherwise.
[ "Checks", "if", "the", "specified", "service", "is", "currently", "running", "or", "not", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/ActivityManagerUtils.java#L60-L73
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_user_userId_objectRight_POST
public OvhTask serviceName_user_userId_objectRight_POST(String serviceName, Long userId, Boolean propagate, OvhRightEnum right, OvhUserObjectRightTypeEnum type, String vmwareObjectId) throws IOException { """ Add a new object right to user in datacenter on Private Cloud REST: POST /dedicatedCloud/{serviceName}/...
java
public OvhTask serviceName_user_userId_objectRight_POST(String serviceName, Long userId, Boolean propagate, OvhRightEnum right, OvhUserObjectRightTypeEnum type, String vmwareObjectId) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/objectRight"; StringBuilder sb = path(qPath, servic...
[ "public", "OvhTask", "serviceName_user_userId_objectRight_POST", "(", "String", "serviceName", ",", "Long", "userId", ",", "Boolean", "propagate", ",", "OvhRightEnum", "right", ",", "OvhUserObjectRightTypeEnum", "type", ",", "String", "vmwareObjectId", ")", "throws", "I...
Add a new object right to user in datacenter on Private Cloud REST: POST /dedicatedCloud/{serviceName}/user/{userId}/objectRight @param type [required] Type of the object @param vmwareObjectId [required] The VMware MoRef of the object @param propagate [required] Right propagation on children objects @param right [requ...
[ "Add", "a", "new", "object", "right", "to", "user", "in", "datacenter", "on", "Private", "Cloud" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L666-L676
tvbarthel/Cheerleader
library/src/main/java/fr/tvbarthel/cheerleader/library/helpers/SoundCloudArtworkHelper.java
SoundCloudArtworkHelper.getCoverUrl
public static String getCoverUrl(SoundCloudUser user, String size) { """ Retrieve the cover url of a user pointing to the requested size. <p/> By default, {@link SoundCloudUser#getAvatarUrl()} points to the {@link fr.tvbarthel.cheerleader.library.helpers.SoundCloudArtworkHelper#LARGE} <p/> Available size are ...
java
public static String getCoverUrl(SoundCloudUser user, String size) { String defaultUrl = user.getAvatarUrl(); if (defaultUrl == null) { return null; } switch (size) { case MINI: case TINY: case SMALL: case BADGE: cas...
[ "public", "static", "String", "getCoverUrl", "(", "SoundCloudUser", "user", ",", "String", "size", ")", "{", "String", "defaultUrl", "=", "user", ".", "getAvatarUrl", "(", ")", ";", "if", "(", "defaultUrl", "==", "null", ")", "{", "return", "null", ";", ...
Retrieve the cover url of a user pointing to the requested size. <p/> By default, {@link SoundCloudUser#getAvatarUrl()} points to the {@link fr.tvbarthel.cheerleader.library.helpers.SoundCloudArtworkHelper#LARGE} <p/> Available size are : {@link fr.tvbarthel.cheerleader.library.helpers.SoundCloudArtworkHelper#MINI} {@l...
[ "Retrieve", "the", "cover", "url", "of", "a", "user", "pointing", "to", "the", "requested", "size", ".", "<p", "/", ">", "By", "default", "{", "@link", "SoundCloudUser#getAvatarUrl", "()", "}", "points", "to", "the", "{", "@link", "fr", ".", "tvbarthel", ...
train
https://github.com/tvbarthel/Cheerleader/blob/f61527e4cc44fcd0ed2e1e98aca285f8c236f24e/library/src/main/java/fr/tvbarthel/cheerleader/library/helpers/SoundCloudArtworkHelper.java#L118-L136
networknt/light-4j
mask/src/main/java/com/networknt/mask/Mask.java
Mask.maskString
public static String maskString(String input, String key) { """ Mask the input string with a list of patterns indexed by key in string section in mask.json This is usually used to mask header values, query parameters and uri parameters @param input String The source of the string that needs to be masked @para...
java
public static String maskString(String input, String key) { String output = input; Map<String, Object> stringConfig = (Map<String, Object>) config.get(MASK_TYPE_STRING); if (stringConfig != null) { Map<String, Object> keyConfig = (Map<String, Object>) stringConfig.get(key); ...
[ "public", "static", "String", "maskString", "(", "String", "input", ",", "String", "key", ")", "{", "String", "output", "=", "input", ";", "Map", "<", "String", ",", "Object", ">", "stringConfig", "=", "(", "Map", "<", "String", ",", "Object", ">", ")"...
Mask the input string with a list of patterns indexed by key in string section in mask.json This is usually used to mask header values, query parameters and uri parameters @param input String The source of the string that needs to be masked @param key String The key that maps to a list of patterns for masking in con...
[ "Mask", "the", "input", "string", "with", "a", "list", "of", "patterns", "indexed", "by", "key", "in", "string", "section", "in", "mask", ".", "json", "This", "is", "usually", "used", "to", "mask", "header", "values", "query", "parameters", "and", "uri", ...
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/mask/src/main/java/com/networknt/mask/Mask.java#L65-L78
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addConstraintsLengthMessage
public FessMessages addConstraintsLengthMessage(String property, String min, String max) { """ Add the created action message for the key 'constraints.Length.message' with parameters. <pre> message: Length of {item} must be between {min} and {max}. </pre> @param property The property name for the message. (Not...
java
public FessMessages addConstraintsLengthMessage(String property, String min, String max) { assertPropertyNotNull(property); add(property, new UserMessage(CONSTRAINTS_Length_MESSAGE, min, max)); return this; }
[ "public", "FessMessages", "addConstraintsLengthMessage", "(", "String", "property", ",", "String", "min", ",", "String", "max", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "CONSTRAINTS_Lengt...
Add the created action message for the key 'constraints.Length.message' with parameters. <pre> message: Length of {item} must be between {min} and {max}. </pre> @param property The property name for the message. (NotNull) @param min The parameter min for message. (NotNull) @param max The parameter max for message. (Not...
[ "Add", "the", "created", "action", "message", "for", "the", "key", "constraints", ".", "Length", ".", "message", "with", "parameters", ".", "<pre", ">", "message", ":", "Length", "of", "{", "item", "}", "must", "be", "between", "{", "min", "}", "and", ...
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L844-L848
bazaarvoice/emodb
mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/HadoopDataStoreManager.java
HadoopDataStoreManager.createDataStoreWithHostDiscovery
private CloseableDataStore createDataStoreWithHostDiscovery(final URI location, String apiKey, MetricRegistry metricRegistry) { """ Creates a DataStore using host discovery (ZooKeeper and Ostrich). """ // Get the service factory for this cluster. String cluster = LocationUtil.getClusterForLocat...
java
private CloseableDataStore createDataStoreWithHostDiscovery(final URI location, String apiKey, MetricRegistry metricRegistry) { // Get the service factory for this cluster. String cluster = LocationUtil.getClusterForLocation(location); MultiThreadedServiceFactory<AuthDataStore> dataStoreFactory ...
[ "private", "CloseableDataStore", "createDataStoreWithHostDiscovery", "(", "final", "URI", "location", ",", "String", "apiKey", ",", "MetricRegistry", "metricRegistry", ")", "{", "// Get the service factory for this cluster.", "String", "cluster", "=", "LocationUtil", ".", "...
Creates a DataStore using host discovery (ZooKeeper and Ostrich).
[ "Creates", "a", "DataStore", "using", "host", "discovery", "(", "ZooKeeper", "and", "Ostrich", ")", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/mapreduce/sor-hadoop/src/main/java/com/bazaarvoice/emodb/hadoop/io/HadoopDataStoreManager.java#L101-L135
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.cosAngle
public static double cosAngle(NumberVector v1, NumberVector v2) { """ Compute the absolute cosine of the angle between two vectors. To convert it to radians, use <code>Math.acos(angle)</code>! @param v1 first vector @param v2 second vector @return Angle """ // Java Hotspot appears to optimize these...
java
public static double cosAngle(NumberVector v1, NumberVector v2) { // Java Hotspot appears to optimize these better than if-then-else: return v1 instanceof SparseNumberVector ? // v2 instanceof SparseNumberVector ? // angleSparse((SparseNumberVector) v1, (SparseNumberVector) v2) : // ...
[ "public", "static", "double", "cosAngle", "(", "NumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "// Java Hotspot appears to optimize these better than if-then-else:", "return", "v1", "instanceof", "SparseNumberVector", "?", "//", "v2", "instanceof", "SparseNumberV...
Compute the absolute cosine of the angle between two vectors. To convert it to radians, use <code>Math.acos(angle)</code>! @param v1 first vector @param v2 second vector @return Angle
[ "Compute", "the", "absolute", "cosine", "of", "the", "angle", "between", "two", "vectors", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L227-L236
podio/podio-java
src/main/java/com/podio/space/SpaceAPI.java
SpaceAPI.updateSpace
public void updateSpace(int spaceId, SpaceUpdate data) { """ Updates the space with the given id @param spaceId The id of the space to update @param data The updated data of the space """ getResourceFactory().getApiResource("/space/" + spaceId) .entity(data, MediaType.APPLICATION_JSON_TYPE).put()...
java
public void updateSpace(int spaceId, SpaceUpdate data) { getResourceFactory().getApiResource("/space/" + spaceId) .entity(data, MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "updateSpace", "(", "int", "spaceId", ",", "SpaceUpdate", "data", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/space/\"", "+", "spaceId", ")", ".", "entity", "(", "data", ",", "MediaType", ".", "APPLICATION_JSON_T...
Updates the space with the given id @param spaceId The id of the space to update @param data The updated data of the space
[ "Updates", "the", "space", "with", "the", "given", "id" ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/space/SpaceAPI.java#L53-L56
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/SubReportBuilder.java
SubReportBuilder.setDataSource
public SubReportBuilder setDataSource(int origin, String expression) { """ like addDataSource(int origin, int type, String expression) but the type will be of the {@link JRDataSource} @param origin @param expression @return """ return setDataSource(origin, DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE, expre...
java
public SubReportBuilder setDataSource(int origin, String expression) { return setDataSource(origin, DJConstants.DATA_SOURCE_TYPE_JRDATASOURCE, expression); }
[ "public", "SubReportBuilder", "setDataSource", "(", "int", "origin", ",", "String", "expression", ")", "{", "return", "setDataSource", "(", "origin", ",", "DJConstants", ".", "DATA_SOURCE_TYPE_JRDATASOURCE", ",", "expression", ")", ";", "}" ]
like addDataSource(int origin, int type, String expression) but the type will be of the {@link JRDataSource} @param origin @param expression @return
[ "like", "addDataSource", "(", "int", "origin", "int", "type", "String", "expression", ")", "but", "the", "type", "will", "be", "of", "the", "{" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/SubReportBuilder.java#L120-L122
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/widgets/tabs/Packer.java
Packer.setInsetRight
public Packer setInsetRight(final int val) { """ sets right Insets on the constraints for the current component to the value specified. """ Insets i = gc.insets; if (i == null) { i = new Insets(0, 0, 0, 0); } gc.insets = new Insets(i.top, i.left, i.bottom, val); ...
java
public Packer setInsetRight(final int val) { Insets i = gc.insets; if (i == null) { i = new Insets(0, 0, 0, 0); } gc.insets = new Insets(i.top, i.left, i.bottom, val); setConstraints(comp, gc); return this; }
[ "public", "Packer", "setInsetRight", "(", "final", "int", "val", ")", "{", "Insets", "i", "=", "gc", ".", "insets", ";", "if", "(", "i", "==", "null", ")", "{", "i", "=", "new", "Insets", "(", "0", ",", "0", ",", "0", ",", "0", ")", ";", "}",...
sets right Insets on the constraints for the current component to the value specified.
[ "sets", "right", "Insets", "on", "the", "constraints", "for", "the", "current", "component", "to", "the", "value", "specified", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/widgets/tabs/Packer.java#L869-L877
mgormley/optimize
src/main/java/edu/jhu/hlt/optimize/LBFGS_port.java
LBFGS_port.QUARD_MINIMIZER2
private static double QUARD_MINIMIZER2(double qm, double u, double du, double v, double dv) { """ Find a minimizer of an interpolated quadratic function. @param qm The minimizer of the interpolated quadratic. @param u The value of one point, u. @param du The value of f'(u). @param v T...
java
private static double QUARD_MINIMIZER2(double qm, double u, double du, double v, double dv) { double a, d, gamma, theta, p, q, r, s; a = (u) - (v); (qm) = (v) + (dv) / ((dv) - (du)) * a; return qm; }
[ "private", "static", "double", "QUARD_MINIMIZER2", "(", "double", "qm", ",", "double", "u", ",", "double", "du", ",", "double", "v", ",", "double", "dv", ")", "{", "double", "a", ",", "d", ",", "gamma", ",", "theta", ",", "p", ",", "q", ",", "r", ...
Find a minimizer of an interpolated quadratic function. @param qm The minimizer of the interpolated quadratic. @param u The value of one point, u. @param du The value of f'(u). @param v The value of another point, v. @param dv The value of f'(v).
[ "Find", "a", "minimizer", "of", "an", "interpolated", "quadratic", "function", "." ]
train
https://github.com/mgormley/optimize/blob/3d1b93260b99febb8a5ecd9e8543c223e151a8d3/src/main/java/edu/jhu/hlt/optimize/LBFGS_port.java#L1866-L1871
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/reader/JsonWriter.java
JsonWriter.registerWriterInterfaceFirst
public void registerWriterInterfaceFirst(Class<?> interFace, JsonWriterI<?> writer) { """ associate an Writer to a interface With Hi priority @param interFace interface to map @param writer writer Object """ writerInterfaces.addFirst(new WriterByInterface(interFace, writer)); }
java
public void registerWriterInterfaceFirst(Class<?> interFace, JsonWriterI<?> writer) { writerInterfaces.addFirst(new WriterByInterface(interFace, writer)); }
[ "public", "void", "registerWriterInterfaceFirst", "(", "Class", "<", "?", ">", "interFace", ",", "JsonWriterI", "<", "?", ">", "writer", ")", "{", "writerInterfaces", ".", "addFirst", "(", "new", "WriterByInterface", "(", "interFace", ",", "writer", ")", ")", ...
associate an Writer to a interface With Hi priority @param interFace interface to map @param writer writer Object
[ "associate", "an", "Writer", "to", "a", "interface", "With", "Hi", "priority" ]
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/reader/JsonWriter.java#L352-L354
EsupPortail/esup-smsu-api
src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java
StatisticBuilder.buildStatisticForAMonth
private void buildStatisticForAMonth(Application application, Account account, Date month) { """ Create stats in DB for the specified application and account for the month. @param application @param account @param month """ buildStatistics( application, account, getFirstDa...
java
private void buildStatisticForAMonth(Application application, Account account, Date month) { buildStatistics( application, account, getFirstDayOfMonth(month), getLastDayOfMonth(month), getMarkerDateOfMonth(month)); }
[ "private", "void", "buildStatisticForAMonth", "(", "Application", "application", ",", "Account", "account", ",", "Date", "month", ")", "{", "buildStatistics", "(", "application", ",", "account", ",", "getFirstDayOfMonth", "(", "month", ")", ",", "getLastDayOfMonth",...
Create stats in DB for the specified application and account for the month. @param application @param account @param month
[ "Create", "stats", "in", "DB", "for", "the", "specified", "application", "and", "account", "for", "the", "month", "." ]
train
https://github.com/EsupPortail/esup-smsu-api/blob/7b6a4388065adfd84655dbc83f37080874953b20/src/main/java/org/esupportail/smsuapi/business/stats/StatisticBuilder.java#L65-L71
dadoonet/spring-elasticsearch
src/main/java/fr/pilato/spring/elasticsearch/type/TypeElasticsearchUpdater.java
TypeElasticsearchUpdater.createMappingWithJson
private static void createMappingWithJson(RestHighLevelClient client, String index, String mapping, boolean merge) throws Exception { """ Create a new type in Elasticsearch @param client Elasticsearch client @param index Index name @param mapping Mapping if any, null if no specific mapping @param m...
java
private static void createMappingWithJson(RestHighLevelClient client, String index, String mapping, boolean merge) throws Exception { boolean mappingExist = isMappingExist(client, index); if (merge || !mappingExist) { if (mappingExist) { logger.debug("Updating typ...
[ "private", "static", "void", "createMappingWithJson", "(", "RestHighLevelClient", "client", ",", "String", "index", ",", "String", "mapping", ",", "boolean", "merge", ")", "throws", "Exception", "{", "boolean", "mappingExist", "=", "isMappingExist", "(", "client", ...
Create a new type in Elasticsearch @param client Elasticsearch client @param index Index name @param mapping Mapping if any, null if no specific mapping @param merge Try to merge mapping if type already exists @throws Exception if the elasticsearch call is failing
[ "Create", "a", "new", "type", "in", "Elasticsearch" ]
train
https://github.com/dadoonet/spring-elasticsearch/blob/b338223818a5bdf5d9c06c88cb98589c843fd293/src/main/java/fr/pilato/spring/elasticsearch/type/TypeElasticsearchUpdater.java#L64-L83