repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
218
func_name
stringlengths
5
140
whole_func_string
stringlengths
79
3.99k
language
stringclasses
1 value
func_code_string
stringlengths
79
3.99k
func_code_tokens
listlengths
20
624
func_documentation_string
stringlengths
61
1.96k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
107
339
apache/groovy
src/main/java/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java
PluginDefaultGroovyMethods.leftShift
public static StringBuilder leftShift(StringBuilder self, Object value) { if (value instanceof GString) { // Force the conversion of the GString to string now, or appending // is going to be extremely expensive, due to calls to GString#charAt, // which is going to re-evaluate...
java
public static StringBuilder leftShift(StringBuilder self, Object value) { if (value instanceof GString) { // Force the conversion of the GString to string now, or appending // is going to be extremely expensive, due to calls to GString#charAt, // which is going to re-evaluate...
[ "public", "static", "StringBuilder", "leftShift", "(", "StringBuilder", "self", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "GString", ")", "{", "// Force the conversion of the GString to string now, or appending", "// is going to be extremely expensiv...
Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder. @param self a StringBuilder @param value a value to append @return the StringBuilder on which this operation was invoked
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "append", "multiple", "objects", "as", "string", "representations", "to", "a", "StringBuilder", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java#L97-L108
ops4j/org.ops4j.pax.exam2
core/pax-exam-spi/src/main/java/org/ops4j/pax/exam/spi/war/WarBuilder.java
WarBuilder.buildWar
public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuild...
java
public URI buildWar() { if (option.getName() == null) { option.name(UUID.randomUUID().toString()); } processClassPath(); try { File webResourceDir = getWebResourceDir(); File probeWar = new File(tempDir, option.getName() + ".war"); ZipBuild...
[ "public", "URI", "buildWar", "(", ")", "{", "if", "(", "option", ".", "getName", "(", ")", "==", "null", ")", "{", "option", ".", "name", "(", "UUID", ".", "randomUUID", "(", ")", ".", "toString", "(", ")", ")", ";", "}", "processClassPath", "(", ...
Builds a WAR from the given option. @return file URI referencing the WAR in a temporary directory
[ "Builds", "a", "WAR", "from", "the", "given", "option", "." ]
train
https://github.com/ops4j/org.ops4j.pax.exam2/blob/7f83796cbbb857123d8fc7fe817a7637218d5d77/core/pax-exam-spi/src/main/java/org/ops4j/pax/exam/spi/war/WarBuilder.java#L84-L117
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java
CPOptionCategoryPersistenceImpl.findAll
@Override public List<CPOptionCategory> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPOptionCategory> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPOptionCategory", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp option categories. @return the cp option categories
[ "Returns", "all", "the", "cp", "option", "categories", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionCategoryPersistenceImpl.java#L3436-L3439
sculptor/sculptor
sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/PropertiesBase.java
PropertiesBase.mapValidationAnnotation
public String mapValidationAnnotation(String annotation, String defaultAnnotation) { String key = "validation.annotation." + toFirstUpper(annotation); if (hasProperty(key)) { return getProperty(key); } else { return defaultAnnotation; } }
java
public String mapValidationAnnotation(String annotation, String defaultAnnotation) { String key = "validation.annotation." + toFirstUpper(annotation); if (hasProperty(key)) { return getProperty(key); } else { return defaultAnnotation; } }
[ "public", "String", "mapValidationAnnotation", "(", "String", "annotation", ",", "String", "defaultAnnotation", ")", "{", "String", "key", "=", "\"validation.annotation.\"", "+", "toFirstUpper", "(", "annotation", ")", ";", "if", "(", "hasProperty", "(", "key", ")...
Gets a single validation annotation from properties. @param annotation shortcut for annotation @param defaultAnnotation default annotation in case annotation could not be found @return fully qualified Annotation Class (without leading @)
[ "Gets", "a", "single", "validation", "annotation", "from", "properties", "." ]
train
https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-generator/sculptor-generator-core/src/main/java/org/sculptor/generator/util/PropertiesBase.java#L546-L553
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadialBargraph.java
AbstractRadialBargraph.create_BARGRAPH_TRACK_Image
protected BufferedImage create_BARGRAPH_TRACK_Image(final int WIDTH, final double START_ANGLE, final double ANGLE_EXTEND, final double APEX_ANGLE, ...
java
protected BufferedImage create_BARGRAPH_TRACK_Image(final int WIDTH, final double START_ANGLE, final double ANGLE_EXTEND, final double APEX_ANGLE, ...
[ "protected", "BufferedImage", "create_BARGRAPH_TRACK_Image", "(", "final", "int", "WIDTH", ",", "final", "double", "START_ANGLE", ",", "final", "double", "ANGLE_EXTEND", ",", "final", "double", "APEX_ANGLE", ",", "final", "double", "BARGRAPH_OFFSET", ")", "{", "retu...
Returns the bargraph track image with the given with and height. @param WIDTH @param START_ANGLE @param ANGLE_EXTEND @param APEX_ANGLE @param BARGRAPH_OFFSET @return buffered image containing the bargraph track image
[ "Returns", "the", "bargraph", "track", "image", "with", "the", "given", "with", "and", "height", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadialBargraph.java#L141-L146
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.isClassBelowPackage
public static boolean isClassBelowPackage(Class<?> theClass, List<?> packageList) { String classPackage = theClass.getPackage().getName(); for (Object packageName : packageList) { if (packageName != null) { if (classPackage.startsWith(packageName.toString())) { ...
java
public static boolean isClassBelowPackage(Class<?> theClass, List<?> packageList) { String classPackage = theClass.getPackage().getName(); for (Object packageName : packageList) { if (packageName != null) { if (classPackage.startsWith(packageName.toString())) { ...
[ "public", "static", "boolean", "isClassBelowPackage", "(", "Class", "<", "?", ">", "theClass", ",", "List", "<", "?", ">", "packageList", ")", "{", "String", "classPackage", "=", "theClass", ".", "getPackage", "(", ")", ".", "getName", "(", ")", ";", "fo...
Returns whether the specified class is either within one of the specified packages or within a subpackage of one of the packages @param theClass The class @param packageList The list of packages @return true if it is within the list of specified packages
[ "Returns", "whether", "the", "specified", "class", "is", "either", "within", "one", "of", "the", "specified", "packages", "or", "within", "a", "subpackage", "of", "one", "of", "the", "packages" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L952-L962
VoltDB/voltdb
src/frontend/org/voltdb/expressions/ExpressionUtil.java
ExpressionUtil.reduce
public static boolean reduce(AbstractExpression expr, Predicate<AbstractExpression> pred) { final boolean current = pred.test(expr); if (current) { return true; } else if (expr == null) { return pred.test(null); } else { return pred.test(expr.getLeft()...
java
public static boolean reduce(AbstractExpression expr, Predicate<AbstractExpression> pred) { final boolean current = pred.test(expr); if (current) { return true; } else if (expr == null) { return pred.test(null); } else { return pred.test(expr.getLeft()...
[ "public", "static", "boolean", "reduce", "(", "AbstractExpression", "expr", ",", "Predicate", "<", "AbstractExpression", ">", "pred", ")", "{", "final", "boolean", "current", "=", "pred", ".", "test", "(", "expr", ")", ";", "if", "(", "current", ")", "{", ...
Check if any node of given expression tree satisfies given predicate @param expr source expression tree @param pred predicate to check against any expression node to find if any node satisfies. Note that it should be able to handle null. @return true if there exists a node that satisfies the predicate
[ "Check", "if", "any", "node", "of", "given", "expression", "tree", "satisfies", "given", "predicate" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L311-L322
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imageclassify/AipImageClassify.java
AipImageClassify.animalDetect
public JSONObject animalDetect(byte[] image, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); String base64Content = Base64Util.encode(image); request.addBody("image", base64Content); if (options != null) { requ...
java
public JSONObject animalDetect(byte[] image, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); String base64Content = Base64Util.encode(image); request.addBody("image", base64Content); if (options != null) { requ...
[ "public", "JSONObject", "animalDetect", "(", "byte", "[", "]", "image", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "S...
动物识别接口 该请求用于识别一张图片。即对于输入的一张图片(可正常解码,且长宽比适宜),输出动物识别结果 @param image - 二进制图像数据 @param options - 可选参数对象,key: value都为string类型 options - options列表: top_num 返回预测得分top结果数,默认为6 baike_num 返回百科信息的结果数,默认不返回 @return JSONObject
[ "动物识别接口", "该请求用于识别一张图片。即对于输入的一张图片(可正常解码,且长宽比适宜),输出动物识别结果" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imageclassify/AipImageClassify.java#L335-L347
knowm/XChange
xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeServiceRaw.java
OkCoinTradeServiceRaw.trade
public OkCoinTradeResult trade(String symbol, String type, String price, String amount) throws IOException { OkCoinTradeResult tradeResult = okCoin.trade(apikey, symbol, type, price, amount, signatureCreator()); return returnOrThrow(tradeResult); }
java
public OkCoinTradeResult trade(String symbol, String type, String price, String amount) throws IOException { OkCoinTradeResult tradeResult = okCoin.trade(apikey, symbol, type, price, amount, signatureCreator()); return returnOrThrow(tradeResult); }
[ "public", "OkCoinTradeResult", "trade", "(", "String", "symbol", ",", "String", "type", ",", "String", "price", ",", "String", "amount", ")", "throws", "IOException", "{", "OkCoinTradeResult", "tradeResult", "=", "okCoin", ".", "trade", "(", "apikey", ",", "sy...
下单交易 @param symbol @param type @param price @param amount (只能是整数) @return @throws IOException
[ "下单交易" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-okcoin/src/main/java/org/knowm/xchange/okcoin/service/OkCoinTradeServiceRaw.java#L44-L49
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/expressions/StringLikeComparisonExpression.java
StringLikeComparisonExpression.wildCardMatch
public static boolean wildCardMatch(String text, String pattern, char multiCharacterWildCardChar, boolean caseInsensitive) { if (caseInsensitive) { text = text.toLowerCase(); pattern = pattern.toLowerCase(); } String wildCardString = "" + multiCharacterWildCa...
java
public static boolean wildCardMatch(String text, String pattern, char multiCharacterWildCardChar, boolean caseInsensitive) { if (caseInsensitive) { text = text.toLowerCase(); pattern = pattern.toLowerCase(); } String wildCardString = "" + multiCharacterWildCa...
[ "public", "static", "boolean", "wildCardMatch", "(", "String", "text", ",", "String", "pattern", ",", "char", "multiCharacterWildCardChar", ",", "boolean", "caseInsensitive", ")", "{", "if", "(", "caseInsensitive", ")", "{", "text", "=", "text", ".", "toLowerCas...
Matches the given text with the given pattern. Based on http://www.adarshr.com/papers/wildcard, added checks for wildcard at the start and at the end @param text The text to match @param pattern The pattern @param multiCharacterWildCardChar The character to use as wildcard. @param caseInsensitive Match is case insensit...
[ "Matches", "the", "given", "text", "with", "the", "given", "pattern", ".", "Based", "on", "http", ":", "//", "www", ".", "adarshr", ".", "com", "/", "papers", "/", "wildcard", "added", "checks", "for", "wildcard", "at", "the", "start", "and", "at", "th...
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/expressions/StringLikeComparisonExpression.java#L99-L138
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/core/memory/MemorySegment.java
MemorySegment.putLong
@SuppressWarnings("restriction") public final void putLong(int index, long value) { if (CHECKED) { if (index >= 0 && index <= this.memory.length - 8) { UNSAFE.putLong(this.memory, BASE_OFFSET + index, value); } else { throw new IndexOutOfBoundsException(); } } else { UNSAFE.putLong(this.memory,...
java
@SuppressWarnings("restriction") public final void putLong(int index, long value) { if (CHECKED) { if (index >= 0 && index <= this.memory.length - 8) { UNSAFE.putLong(this.memory, BASE_OFFSET + index, value); } else { throw new IndexOutOfBoundsException(); } } else { UNSAFE.putLong(this.memory,...
[ "@", "SuppressWarnings", "(", "\"restriction\"", ")", "public", "final", "void", "putLong", "(", "int", "index", ",", "long", "value", ")", "{", "if", "(", "CHECKED", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<=", "this", ".", "memory", ...
Writes the given long value (64bit, 8 bytes) to the given position in the system's native byte order. This method offers the best speed for long integer writing and should be used unless a specific byte order is required. In most cases, it suffices to know that the byte order in which the value is written is the same a...
[ "Writes", "the", "given", "long", "value", "(", "64bit", "8", "bytes", ")", "to", "the", "given", "position", "in", "the", "system", "s", "native", "byte", "order", ".", "This", "method", "offers", "the", "best", "speed", "for", "long", "integer", "writi...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/core/memory/MemorySegment.java#L571-L582
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.getAzureReachabilityReportAsync
public Observable<AzureReachabilityReportInner> getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceR...
java
public Observable<AzureReachabilityReportInner> getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParameters parameters) { return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceR...
[ "public", "Observable", "<", "AzureReachabilityReportInner", ">", "getAzureReachabilityReportAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "AzureReachabilityReportParameters", "parameters", ")", "{", "return", "getAzureReachabilityReportWit...
Gets the relative latency score for internet service providers from a specified location to Azure regions. @param resourceGroupName The name of the network watcher resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that determine Azure reachability report c...
[ "Gets", "the", "relative", "latency", "score", "for", "internet", "service", "providers", "from", "a", "specified", "location", "to", "Azure", "regions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L2335-L2342
wisdom-framework/wisdom
core/wisdom-ipojo-module/src/main/java/org/wisdom/bnd/plugins/ImportedPackageRangeFixer.java
ImportedPackageRangeFixer.analyzeJar
@Override public boolean analyzeJar(Analyzer analyzer) throws Exception { loadInternalRangeFix(); loadExternalRangeFix(); if (analyzer.getReferred() == null) { return false; } // Data loaded, start analysis for (Map.Entry<Descriptors.PackageRef, Attrs> e...
java
@Override public boolean analyzeJar(Analyzer analyzer) throws Exception { loadInternalRangeFix(); loadExternalRangeFix(); if (analyzer.getReferred() == null) { return false; } // Data loaded, start analysis for (Map.Entry<Descriptors.PackageRef, Attrs> e...
[ "@", "Override", "public", "boolean", "analyzeJar", "(", "Analyzer", "analyzer", ")", "throws", "Exception", "{", "loadInternalRangeFix", "(", ")", ";", "loadExternalRangeFix", "(", ")", ";", "if", "(", "analyzer", ".", "getReferred", "(", ")", "==", "null", ...
Analyzes the jar and update the version range. @param analyzer the analyzer @return {@code false} @throws Exception if the analaysis fails.
[ "Analyzes", "the", "jar", "and", "update", "the", "version", "range", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-ipojo-module/src/main/java/org/wisdom/bnd/plugins/ImportedPackageRangeFixer.java#L97-L119
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_email_volumes_GET
public ArrayList<OvhVolumeHistory> serviceName_email_volumes_GET(String serviceName) throws IOException { String qPath = "/hosting/web/{serviceName}/email/volumes"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t10); }
java
public ArrayList<OvhVolumeHistory> serviceName_email_volumes_GET(String serviceName) throws IOException { String qPath = "/hosting/web/{serviceName}/email/volumes"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t10); }
[ "public", "ArrayList", "<", "OvhVolumeHistory", ">", "serviceName_email_volumes_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/email/volumes\"", ";", "StringBuilder", "sb", "=", "path", "(", "...
Request the history volume of email sent REST: GET /hosting/web/{serviceName}/email/volumes @param serviceName [required] The internal name of your hosting
[ "Request", "the", "history", "volume", "of", "email", "sent" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1848-L1853
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optSparseParcelableArray
@Nullable public static <T extends Parcelable> SparseArray<T> optSparseParcelableArray(@Nullable Bundle bundle, @Nullable String key) { return optSparseParcelableArray(bundle, key, new SparseArray<T>()); }
java
@Nullable public static <T extends Parcelable> SparseArray<T> optSparseParcelableArray(@Nullable Bundle bundle, @Nullable String key) { return optSparseParcelableArray(bundle, key, new SparseArray<T>()); }
[ "@", "Nullable", "public", "static", "<", "T", "extends", "Parcelable", ">", "SparseArray", "<", "T", ">", "optSparseParcelableArray", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optSparseParcelableArray"...
Returns a optional {@link android.util.SparseArray} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.SparseArray}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this metho...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L935-L938
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/OperationProcessor.java
OperationProcessor.cancelIncompleteOperations
private void cancelIncompleteOperations(Iterable<CompletableOperation> operations, Throwable failException) { assert failException != null : "no exception to set"; int cancelCount = 0; for (CompletableOperation o : operations) { if (!o.isDone()) { this.state.failOpera...
java
private void cancelIncompleteOperations(Iterable<CompletableOperation> operations, Throwable failException) { assert failException != null : "no exception to set"; int cancelCount = 0; for (CompletableOperation o : operations) { if (!o.isDone()) { this.state.failOpera...
[ "private", "void", "cancelIncompleteOperations", "(", "Iterable", "<", "CompletableOperation", ">", "operations", ",", "Throwable", "failException", ")", "{", "assert", "failException", "!=", "null", ":", "\"no exception to set\"", ";", "int", "cancelCount", "=", "0",...
Cancels those Operations in the given list that have not yet completed with the given exception.
[ "Cancels", "those", "Operations", "in", "the", "given", "list", "that", "have", "not", "yet", "completed", "with", "the", "given", "exception", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/OperationProcessor.java#L392-L403
qos-ch/slf4j
slf4j-api/src/main/java/org/slf4j/MDC.java
MDC.putCloseable
public static MDCCloseable putCloseable(String key, String val) throws IllegalArgumentException { put(key, val); return new MDCCloseable(key); }
java
public static MDCCloseable putCloseable(String key, String val) throws IllegalArgumentException { put(key, val); return new MDCCloseable(key); }
[ "public", "static", "MDCCloseable", "putCloseable", "(", "String", "key", ",", "String", "val", ")", "throws", "IllegalArgumentException", "{", "put", "(", "key", ",", "val", ")", ";", "return", "new", "MDCCloseable", "(", "key", ")", ";", "}" ]
Put a diagnostic context value (the <code>val</code> parameter) as identified with the <code>key</code> parameter into the current thread's diagnostic context map. The <code>key</code> parameter cannot be null. The <code>val</code> parameter can be null only if the underlying implementation supports it. <p> This metho...
[ "Put", "a", "diagnostic", "context", "value", "(", "the", "<code", ">", "val<", "/", "code", ">", "parameter", ")", "as", "identified", "with", "the", "<code", ">", "key<", "/", "code", ">", "parameter", "into", "the", "current", "thread", "s", "diagnost...
train
https://github.com/qos-ch/slf4j/blob/905443f39fadd88a8dd2c467e44affd8cb072a4d/slf4j-api/src/main/java/org/slf4j/MDC.java#L152-L155
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.baseAssets
public Collection<BaseAsset> baseAssets(BaseAssetFilter filter) { return get(BaseAsset.class, (filter != null) ? filter : new BaseAssetFilter()); }
java
public Collection<BaseAsset> baseAssets(BaseAssetFilter filter) { return get(BaseAsset.class, (filter != null) ? filter : new BaseAssetFilter()); }
[ "public", "Collection", "<", "BaseAsset", ">", "baseAssets", "(", "BaseAssetFilter", "filter", ")", "{", "return", "get", "(", "BaseAsset", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "BaseAssetFilter", "(", ")", ")", ...
Get assets filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter.
[ "Get", "assets", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L98-L100
revapi/revapi
revapi-java-spi/src/main/java/org/revapi/java/spi/Util.java
Util.firstDotConstellation
private static void firstDotConstellation(int[] dollarPositions, int[] dotPositions, int nestingLevel) { int i = 0; int unassigned = dotPositions.length - nestingLevel; for (; i < unassigned; ++i) { dotPositions[i] = -1; } for (; i < dotPositions.length; ++i) { ...
java
private static void firstDotConstellation(int[] dollarPositions, int[] dotPositions, int nestingLevel) { int i = 0; int unassigned = dotPositions.length - nestingLevel; for (; i < unassigned; ++i) { dotPositions[i] = -1; } for (; i < dotPositions.length; ++i) { ...
[ "private", "static", "void", "firstDotConstellation", "(", "int", "[", "]", "dollarPositions", ",", "int", "[", "]", "dotPositions", ",", "int", "nestingLevel", ")", "{", "int", "i", "=", "0", ";", "int", "unassigned", "=", "dotPositions", ".", "length", "...
This will set the last nestingLevel elements in the dotPositions to the values present in the dollarPositions. The rest will be set to -1. <p>In another words the dotPositions array will contain the rightmost dollar positions. @param dollarPositions the positions of the $ in the binary class name @param dotPositions ...
[ "This", "will", "set", "the", "last", "nestingLevel", "elements", "in", "the", "dotPositions", "to", "the", "values", "present", "in", "the", "dollarPositions", ".", "The", "rest", "will", "be", "set", "to", "-", "1", "." ]
train
https://github.com/revapi/revapi/blob/e070b136d977441ab96fdce067a13e7e0423295b/revapi-java-spi/src/main/java/org/revapi/java/spi/Util.java#L1161-L1172
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotateAffine
public Matrix4f rotateAffine(float ang, float x, float y, float z) { return rotateAffine(ang, x, y, z, thisOrNew()); }
java
public Matrix4f rotateAffine(float ang, float x, float y, float z) { return rotateAffine(ang, x, y, z, thisOrNew()); }
[ "public", "Matrix4f", "rotateAffine", "(", "float", "ang", ",", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "return", "rotateAffine", "(", "ang", ",", "x", ",", "y", ",", "z", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Apply rotation to this {@link #isAffine() affine} matrix by rotating the given amount of radians about the specified <code>(x, y, z)</code> axis. <p> This method assumes <code>this</code> to be {@link #isAffine() affine}. <p> The axis described by the three components needs to be a unit vector. <p> When used with a rig...
[ "Apply", "rotation", "to", "this", "{", "@link", "#isAffine", "()", "affine", "}", "matrix", "by", "rotating", "the", "given", "amount", "of", "radians", "about", "the", "specified", "<code", ">", "(", "x", "y", "z", ")", "<", "/", "code", ">", "axis",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L6127-L6129
aragozin/jvm-tools
mxdump/src/main/java/org/gridkit/jvmtool/jackson/JsonGenerator.java
JsonGenerator.writeNumberField
public final void writeNumberField(String fieldName, int value) throws IOException, JsonGenerationException { writeFieldName(fieldName); writeNumber(value); }
java
public final void writeNumberField(String fieldName, int value) throws IOException, JsonGenerationException { writeFieldName(fieldName); writeNumber(value); }
[ "public", "final", "void", "writeNumberField", "(", "String", "fieldName", ",", "int", "value", ")", "throws", "IOException", ",", "JsonGenerationException", "{", "writeFieldName", "(", "fieldName", ")", ";", "writeNumber", "(", "value", ")", ";", "}" ]
Convenience method for outputting a field entry ("member") that has the specified numeric value. Equivalent to: <pre> writeFieldName(fieldName); writeNumber(value); </pre>
[ "Convenience", "method", "for", "outputting", "a", "field", "entry", "(", "member", ")", "that", "has", "the", "specified", "numeric", "value", ".", "Equivalent", "to", ":", "<pre", ">", "writeFieldName", "(", "fieldName", ")", ";", "writeNumber", "(", "valu...
train
https://github.com/aragozin/jvm-tools/blob/d3a4d0c6a47fb9317f274988569655f30dcd2f76/mxdump/src/main/java/org/gridkit/jvmtool/jackson/JsonGenerator.java#L735-L740
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java
KMLGeometry.toKMLLineString
public static void toKMLLineString(LineString lineString, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { sb.append("<LineString>"); appendExtrude(extrude, sb); appendAltitudeMode(altitudeModeEnum, sb); appendKMLCoordinates(lineString.getCoordinates(), sb); sb.appe...
java
public static void toKMLLineString(LineString lineString, ExtrudeMode extrude, int altitudeModeEnum, StringBuilder sb) { sb.append("<LineString>"); appendExtrude(extrude, sb); appendAltitudeMode(altitudeModeEnum, sb); appendKMLCoordinates(lineString.getCoordinates(), sb); sb.appe...
[ "public", "static", "void", "toKMLLineString", "(", "LineString", "lineString", ",", "ExtrudeMode", "extrude", ",", "int", "altitudeModeEnum", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"<LineString>\"", ")", ";", "appendExtrude", "(", "ex...
Defines a connected set of line segments. Syntax : <LineString id="ID"> <!-- specific to LineString --> <gx:altitudeOffset>0</gx:altitudeOffset> <!-- double --> <extrude>0</extrude> <!-- boolean --> <tessellate>0</tessellate> <!-- boolean --> <altitudeMode>clampToGround</altitudeMode> <!-- kml:altitudeModeEnum: clamp...
[ "Defines", "a", "connected", "set", "of", "line", "segments", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/kml/KMLGeometry.java#L140-L146
zafarkhaja/jsemver
src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
MetadataVersion.getLeastCommonArrayLength
private int getLeastCommonArrayLength(String[] arr1, String[] arr2) { return arr1.length <= arr2.length ? arr1.length : arr2.length; }
java
private int getLeastCommonArrayLength(String[] arr1, String[] arr2) { return arr1.length <= arr2.length ? arr1.length : arr2.length; }
[ "private", "int", "getLeastCommonArrayLength", "(", "String", "[", "]", "arr1", ",", "String", "[", "]", "arr2", ")", "{", "return", "arr1", ".", "length", "<=", "arr2", ".", "length", "?", "arr1", ".", "length", ":", "arr2", ".", "length", ";", "}" ]
Returns the size of the smallest array. @param arr1 the first array @param arr2 the second array @return the size of the smallest array
[ "Returns", "the", "size", "of", "the", "smallest", "array", "." ]
train
https://github.com/zafarkhaja/jsemver/blob/1f4996ea3dab06193c378fd66fd4f8fdc8334cc6/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java#L217-L219
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java
GalleryImagesInner.createOrUpdate
public GalleryImageInner createOrUpdate(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, galleryImageName, galleryImage).toBlocking().single().body(); }
java
public GalleryImageInner createOrUpdate(String resourceGroupName, String labAccountName, String galleryImageName, GalleryImageInner galleryImage) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, labAccountName, galleryImageName, galleryImage).toBlocking().single().body(); }
[ "public", "GalleryImageInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "galleryImageName", ",", "GalleryImageInner", "galleryImage", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroup...
Create or replace an existing Gallery Image. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param galleryImageName The name of the gallery Image. @param galleryImage Represents an image from the Azure Marketplace @throws IllegalArgumentException thrown if p...
[ "Create", "or", "replace", "an", "existing", "Gallery", "Image", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GalleryImagesInner.java#L551-L553
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java
ManualDescriptor.setGeneSymbolList
public void setGeneSymbolList(int i, String v) { if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_geneSymbolList == null) jcasType.jcas.throwFeatMissing("geneSymbolList", "de.julielab.jules.types.pubmed.ManualDescriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_...
java
public void setGeneSymbolList(int i, String v) { if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_geneSymbolList == null) jcasType.jcas.throwFeatMissing("geneSymbolList", "de.julielab.jules.types.pubmed.ManualDescriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_...
[ "public", "void", "setGeneSymbolList", "(", "int", "i", ",", "String", "v", ")", "{", "if", "(", "ManualDescriptor_Type", ".", "featOkTst", "&&", "(", "(", "ManualDescriptor_Type", ")", "jcasType", ")", ".", "casFeat_geneSymbolList", "==", "null", ")", "jcasTy...
indexed setter for geneSymbolList - sets an indexed value - GeneSymbolList in PubMed @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "geneSymbolList", "-", "sets", "an", "indexed", "value", "-", "GeneSymbolList", "in", "PubMed" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java#L297-L301
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.getRewrittenActionURI
public String getRewrittenActionURI( String actionName, Map parameters, boolean asValidXml ) throws URISyntaxException { if ( _perRequestState == null ) { throw new IllegalStateException( "getRewrittenActionURI was called outside of a valid context." ); } Serv...
java
public String getRewrittenActionURI( String actionName, Map parameters, boolean asValidXml ) throws URISyntaxException { if ( _perRequestState == null ) { throw new IllegalStateException( "getRewrittenActionURI was called outside of a valid context." ); } Serv...
[ "public", "String", "getRewrittenActionURI", "(", "String", "actionName", ",", "Map", "parameters", ",", "boolean", "asValidXml", ")", "throws", "URISyntaxException", "{", "if", "(", "_perRequestState", "==", "null", ")", "{", "throw", "new", "IllegalStateException"...
Create a fully-rewritten URI given an action and parameters. @param actionName the action name to convert into a fully-rewritten URI; may be qualified with a path from the webapp root, in which case the parent directory from the current request is <i>not</i> used. @param parameters the additional parameters to include...
[ "Create", "a", "fully", "-", "rewritten", "URI", "given", "an", "action", "and", "parameters", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L2070-L2083
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java
Util.getFloatAttribute
static float getFloatAttribute(Element element, String attr) throws ParsingException { String cx = element.getAttribute(attr); if ((cx == null) || (cx.equals(""))) { cx = element.getAttributeNS(SODIPODI, attr); } try { return Float.parseFloat(cx); } catch (NumberFormatException e) { throw...
java
static float getFloatAttribute(Element element, String attr) throws ParsingException { String cx = element.getAttribute(attr); if ((cx == null) || (cx.equals(""))) { cx = element.getAttributeNS(SODIPODI, attr); } try { return Float.parseFloat(cx); } catch (NumberFormatException e) { throw...
[ "static", "float", "getFloatAttribute", "(", "Element", "element", ",", "String", "attr", ")", "throws", "ParsingException", "{", "String", "cx", "=", "element", ".", "getAttribute", "(", "attr", ")", ";", "if", "(", "(", "cx", "==", "null", ")", "||", "...
Get a floating point attribute that may appear in either the default or SODIPODI namespace @param element The element from which the attribute should be read @param attr The attribute to be read @return The value from the given attribute @throws ParsingException Indicates the value in the attribute was not a float
[ "Get", "a", "floating", "point", "attribute", "that", "may", "appear", "in", "either", "the", "default", "or", "SODIPODI", "namespace" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/svg/inkscape/Util.java#L170-L181
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java
Transform2D.makeTranslationMatrix
public void makeTranslationMatrix(double dx, double dy) { this.m00 = 1.; this.m01 = 0.; this.m02 = dx; this.m10 = 0.; this.m11 = 1.; this.m12 = dy; this.m20 = 0.; this.m21 = 0.; this.m22 = 1.; }
java
public void makeTranslationMatrix(double dx, double dy) { this.m00 = 1.; this.m01 = 0.; this.m02 = dx; this.m10 = 0.; this.m11 = 1.; this.m12 = dy; this.m20 = 0.; this.m21 = 0.; this.m22 = 1.; }
[ "public", "void", "makeTranslationMatrix", "(", "double", "dx", ",", "double", "dy", ")", "{", "this", ".", "m00", "=", "1.", ";", "this", ".", "m01", "=", "0.", ";", "this", ".", "m02", "=", "dx", ";", "this", ".", "m10", "=", "0.", ";", "this",...
Sets the value of this matrix to the given translation, without rotation. <p>This function changes all the elements of the matrix including the scaling and the shearing. <p>After a call to this function, the matrix will contains (? means any value): <pre> [ 1 0 x ] [ 0 1 y ] [ 0 0 1 ] </...
[ "Sets", "the", "value", "of", "this", "matrix", "to", "the", "given", "translation", "without", "rotation", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java#L605-L617
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.convertDate
@Deprecated protected static ValidationBuilder convertDate(String attributeName, String format){ return ModelDelegate.convertDate(modelClass(), attributeName, format); }
java
@Deprecated protected static ValidationBuilder convertDate(String attributeName, String format){ return ModelDelegate.convertDate(modelClass(), attributeName, format); }
[ "@", "Deprecated", "protected", "static", "ValidationBuilder", "convertDate", "(", "String", "attributeName", ",", "String", "format", ")", "{", "return", "ModelDelegate", ".", "convertDate", "(", "modelClass", "(", ")", ",", "attributeName", ",", "format", ")", ...
Converts a named attribute to <code>java.sql.Date</code> if possible. Acts as a validator if cannot make a conversion. @param attributeName name of attribute to convert to <code>java.sql.Date</code>. @param format format for conversion. Refer to {@link java.text.SimpleDateFormat} @return message passing for custom val...
[ "Converts", "a", "named", "attribute", "to", "<code", ">", "java", ".", "sql", ".", "Date<", "/", "code", ">", "if", "possible", ".", "Acts", "as", "a", "validator", "if", "cannot", "make", "a", "conversion", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2080-L2083
stratosphere/stratosphere
stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java
ContextChecker.checkSingleInputContract
private void checkSingleInputContract(SingleInputOperator<?, ?, ?> singleInputContract) { Operator<?> input = singleInputContract.getInput(); // check if input exists if (input == null) { throw new MissingChildException(); } }
java
private void checkSingleInputContract(SingleInputOperator<?, ?, ?> singleInputContract) { Operator<?> input = singleInputContract.getInput(); // check if input exists if (input == null) { throw new MissingChildException(); } }
[ "private", "void", "checkSingleInputContract", "(", "SingleInputOperator", "<", "?", ",", "?", ",", "?", ">", "singleInputContract", ")", "{", "Operator", "<", "?", ">", "input", "=", "singleInputContract", ".", "getInput", "(", ")", ";", "// check if input exis...
Checks whether a SingleInputOperator is correctly connected. In case that the contract is incorrectly connected a RuntimeException is thrown. @param singleInputContract SingleInputOperator that is checked.
[ "Checks", "whether", "a", "SingleInputOperator", "is", "correctly", "connected", ".", "In", "case", "that", "the", "contract", "is", "incorrectly", "connected", "a", "RuntimeException", "is", "thrown", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-compiler/src/main/java/eu/stratosphere/compiler/contextcheck/ContextChecker.java#L177-L183
NextFaze/power-adapters
power-adapters/src/main/java/com/nextfaze/poweradapters/PowerAdapters.java
PowerAdapters.toSpinnerAdapter
@CheckResult @NonNull public static SpinnerAdapter toSpinnerAdapter(@NonNull PowerAdapter powerAdapter) { // SpinnerAdapter adds additional constraints to the ListAdapter contract: getViewTypeCount must return 1. // See android.widget.Spinner.setAdapter() return new ListAdapterConverterA...
java
@CheckResult @NonNull public static SpinnerAdapter toSpinnerAdapter(@NonNull PowerAdapter powerAdapter) { // SpinnerAdapter adds additional constraints to the ListAdapter contract: getViewTypeCount must return 1. // See android.widget.Spinner.setAdapter() return new ListAdapterConverterA...
[ "@", "CheckResult", "@", "NonNull", "public", "static", "SpinnerAdapter", "toSpinnerAdapter", "(", "@", "NonNull", "PowerAdapter", "powerAdapter", ")", "{", "// SpinnerAdapter adds additional constraints to the ListAdapter contract: getViewTypeCount must return 1.", "// See android.w...
Returns the specified {@link PowerAdapter} as a {@link SpinnerAdapter}. <p> <strong>Note that the supplied adapter must only ever use a single view type</strong>, due to constraints imposed by {@link Spinner#setAdapter(SpinnerAdapter)}. @param powerAdapter The adapter to be converted. @return A spinner adapter that pre...
[ "Returns", "the", "specified", "{" ]
train
https://github.com/NextFaze/power-adapters/blob/cdf00b1b723ed9d6bcd549ae9741a19dd59651e1/power-adapters/src/main/java/com/nextfaze/poweradapters/PowerAdapters.java#L44-L50
InsightLab/graphast
core/src/main/java/br/ufc/insightlab/graphast/utils/RandomGraphGenerator.java
RandomGraphGenerator.generateRandomMMapGraph
public Graph generateRandomMMapGraph(String graphName, int size, float dens) { Graph graph = null; String dir = "graphs/MMap/" + graphName; SerializationUtils.deleteMMapGraph(dir); graph = new Graph(new MMapGraphStructure(dir)); Random rand = new Random(); for (int i = 0; i < size; i++) graph...
java
public Graph generateRandomMMapGraph(String graphName, int size, float dens) { Graph graph = null; String dir = "graphs/MMap/" + graphName; SerializationUtils.deleteMMapGraph(dir); graph = new Graph(new MMapGraphStructure(dir)); Random rand = new Random(); for (int i = 0; i < size; i++) graph...
[ "public", "Graph", "generateRandomMMapGraph", "(", "String", "graphName", ",", "int", "size", ",", "float", "dens", ")", "{", "Graph", "graph", "=", "null", ";", "String", "dir", "=", "\"graphs/MMap/\"", "+", "graphName", ";", "SerializationUtils", ".", "delet...
Create a new Graph which has the given graphName, size and dens. @param graphName the graph's name. @param size the graph's size. @param dens the graph's dens. @return the graph generated.
[ "Create", "a", "new", "Graph", "which", "has", "the", "given", "graphName", "size", "and", "dens", "." ]
train
https://github.com/InsightLab/graphast/blob/b81d10c1ea8378e1fb9fcb545dd75d5e6308fd24/core/src/main/java/br/ufc/insightlab/graphast/utils/RandomGraphGenerator.java#L53-L81
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.prepareUpload
private <T extends IEntity> IntuitMessage prepareUpload(T entity, InputStream docContent, String boundaryId) throws FMSException { IntuitMessage intuitMessage = new IntuitMessage(); RequestElements requestElements = intuitMessage.getRequestElements(); //set the request parameters Map<St...
java
private <T extends IEntity> IntuitMessage prepareUpload(T entity, InputStream docContent, String boundaryId) throws FMSException { IntuitMessage intuitMessage = new IntuitMessage(); RequestElements requestElements = intuitMessage.getRequestElements(); //set the request parameters Map<St...
[ "private", "<", "T", "extends", "IEntity", ">", "IntuitMessage", "prepareUpload", "(", "T", "entity", ",", "InputStream", "docContent", ",", "String", "boundaryId", ")", "throws", "FMSException", "{", "IntuitMessage", "intuitMessage", "=", "new", "IntuitMessage", ...
Common method to prepare the request params for upload operation for both sync and async calls @param entity the entity @param docContent the content for document to upload @return IntuitMessage the intuit message @throws FMSException
[ "Common", "method", "to", "prepare", "the", "request", "params", "for", "upload", "operation", "for", "both", "sync", "and", "async", "calls" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L1289-L1308
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/util/concurrent/ExecutionList.java
ExecutionList.executeListener
private static void executeListener(Runnable runnable, Executor executor) { try { executor.execute(runnable); } catch (RuntimeException e) { // Log it and keep going -- bad runnable and/or executor. Don't punish the other runnables if // we're given a bad one. We only catch RuntimeException be...
java
private static void executeListener(Runnable runnable, Executor executor) { try { executor.execute(runnable); } catch (RuntimeException e) { // Log it and keep going -- bad runnable and/or executor. Don't punish the other runnables if // we're given a bad one. We only catch RuntimeException be...
[ "private", "static", "void", "executeListener", "(", "Runnable", "runnable", ",", "Executor", "executor", ")", "{", "try", "{", "executor", ".", "execute", "(", "runnable", ")", ";", "}", "catch", "(", "RuntimeException", "e", ")", "{", "// Log it and keep goi...
Submits the given runnable to the given {@link Executor} catching and logging all {@linkplain RuntimeException runtime exceptions} thrown by the executor.
[ "Submits", "the", "given", "runnable", "to", "the", "given", "{" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/ExecutionList.java#L139-L150
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/internal/rendering/strategy/TiledFeatureService.java
TiledFeatureService.getMaxScreenEnvelope
private Envelope getMaxScreenEnvelope(InternalTile tile, Coordinate panOrigin) { int nrOfTilesX = Math.max(1, MAXIMUM_TILE_COORDINATE / tile.getScreenWidth()); int nrOfTilesY = Math.max(1, MAXIMUM_TILE_COORDINATE / tile.getScreenHeight()); double x1 = panOrigin.x - nrOfTilesX * tile.getTileWidth(); // double x...
java
private Envelope getMaxScreenEnvelope(InternalTile tile, Coordinate panOrigin) { int nrOfTilesX = Math.max(1, MAXIMUM_TILE_COORDINATE / tile.getScreenWidth()); int nrOfTilesY = Math.max(1, MAXIMUM_TILE_COORDINATE / tile.getScreenHeight()); double x1 = panOrigin.x - nrOfTilesX * tile.getTileWidth(); // double x...
[ "private", "Envelope", "getMaxScreenEnvelope", "(", "InternalTile", "tile", ",", "Coordinate", "panOrigin", ")", "{", "int", "nrOfTilesX", "=", "Math", ".", "max", "(", "1", ",", "MAXIMUM_TILE_COORDINATE", "/", "tile", ".", "getScreenWidth", "(", ")", ")", ";"...
What is the maximum bounds in screen space? Needed for correct clipping calculation. @param tile tile @param panOrigin pan origin @return max screen bbox
[ "What", "is", "the", "maximum", "bounds", "in", "screen", "space?", "Needed", "for", "correct", "clipping", "calculation", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/rendering/strategy/TiledFeatureService.java#L205-L216
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java
PlatformBitmapFactory.checkFinalImageBounds
private static void checkFinalImageBounds(Bitmap source, int x, int y, int width, int height) { Preconditions.checkArgument( x + width <= source.getWidth(), "x + width must be <= bitmap.width()"); Preconditions.checkArgument( y + height <= source.getHeight(), "y + height must be ...
java
private static void checkFinalImageBounds(Bitmap source, int x, int y, int width, int height) { Preconditions.checkArgument( x + width <= source.getWidth(), "x + width must be <= bitmap.width()"); Preconditions.checkArgument( y + height <= source.getHeight(), "y + height must be ...
[ "private", "static", "void", "checkFinalImageBounds", "(", "Bitmap", "source", ",", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ")", "{", "Preconditions", ".", "checkArgument", "(", "x", "+", "width", "<=", "source", ".", "get...
Common code for checking that x + width and y + height are within image bounds @param source the source Bitmap @param x starting x coordinate of source image subset @param y starting y coordinate of source image subset @param width width of the source image subset @param height height of the source image subset
[ "Common", "code", "for", "checking", "that", "x", "+", "width", "and", "y", "+", "height", "are", "within", "image", "bounds" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L735-L742
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Index.java
Index.waitTask
public void waitTask(String taskID, long timeToWait, RequestOptions requestOptions) throws AlgoliaException { try { while (true) { JSONObject obj = client.getRequest("/1/indexes/" + encodedIndexName + "/task/" + URLEncoder.encode(taskID, "UTF-8"), false, requestOptions); if (obj.getString("sta...
java
public void waitTask(String taskID, long timeToWait, RequestOptions requestOptions) throws AlgoliaException { try { while (true) { JSONObject obj = client.getRequest("/1/indexes/" + encodedIndexName + "/task/" + URLEncoder.encode(taskID, "UTF-8"), false, requestOptions); if (obj.getString("sta...
[ "public", "void", "waitTask", "(", "String", "taskID", ",", "long", "timeToWait", ",", "RequestOptions", "requestOptions", ")", "throws", "AlgoliaException", "{", "try", "{", "while", "(", "true", ")", "{", "JSONObject", "obj", "=", "client", ".", "getRequest"...
Wait the publication of a task on the server. All server task are asynchronous and you can check with this method that the task is published. @param taskID the id of the task returned by server @param timeToWait time to sleep seed @param requestOptions Options to pass to this request
[ "Wait", "the", "publication", "of", "a", "task", "on", "the", "server", ".", "All", "server", "task", "are", "asynchronous", "and", "you", "can", "check", "with", "this", "method", "that", "the", "task", "is", "published", "." ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L853-L871
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/DoubleCheckedLocking.java
DoubleCheckedLocking.handleField
private Description handleField(IfTree outerIf, VarSymbol sym, VisitorState state) { if (sym.getModifiers().contains(Modifier.VOLATILE)) { return Description.NO_MATCH; } if (isImmutable(sym.type, state)) { return Description.NO_MATCH; } Description.Builder builder = buildDescription(oute...
java
private Description handleField(IfTree outerIf, VarSymbol sym, VisitorState state) { if (sym.getModifiers().contains(Modifier.VOLATILE)) { return Description.NO_MATCH; } if (isImmutable(sym.type, state)) { return Description.NO_MATCH; } Description.Builder builder = buildDescription(oute...
[ "private", "Description", "handleField", "(", "IfTree", "outerIf", ",", "VarSymbol", "sym", ",", "VisitorState", "state", ")", "{", "if", "(", "sym", ".", "getModifiers", "(", ")", ".", "contains", "(", "Modifier", ".", "VOLATILE", ")", ")", "{", "return",...
Report a {@link Description} if a field used in double-checked locking is not volatile. <p>If the AST node for the field declaration can be located in the current compilation unit, suggest adding the volatile modifier.
[ "Report", "a", "{", "@link", "Description", "}", "if", "a", "field", "used", "in", "double", "-", "checked", "locking", "is", "not", "volatile", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/DoubleCheckedLocking.java#L87-L100
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/TextWriter.java
TextWriter.getFilename
protected String getFilename(Object result, String filenamepre) { if(filenamepre == null || filenamepre.length() == 0) { filenamepre = "result"; } for(int i = 0;; i++) { String filename = i > 0 ? filenamepre + "-" + i : filenamepre; Object existing = filenames.get(filename); if(exist...
java
protected String getFilename(Object result, String filenamepre) { if(filenamepre == null || filenamepre.length() == 0) { filenamepre = "result"; } for(int i = 0;; i++) { String filename = i > 0 ? filenamepre + "-" + i : filenamepre; Object existing = filenames.get(filename); if(exist...
[ "protected", "String", "getFilename", "(", "Object", "result", ",", "String", "filenamepre", ")", "{", "if", "(", "filenamepre", "==", "null", "||", "filenamepre", ".", "length", "(", ")", "==", "0", ")", "{", "filenamepre", "=", "\"result\"", ";", "}", ...
Try to find a unique file name. @param result Result we print @param filenamepre File name prefix to use @return unique filename
[ "Try", "to", "find", "a", "unique", "file", "name", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/result/textwriter/TextWriter.java#L144-L156
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/ConstructorLeakChecker.java
ConstructorLeakChecker.matchClass
@Override public Description matchClass(ClassTree tree, VisitorState state) { // TODO(b/36395371): filter here to exclude some classes (e.g. not immutable) if (TEST_CLASS.matches(tree, state)) { return NO_MATCH; } for (Tree member : tree.getMembers()) { if (isSuppressed(member)) { ...
java
@Override public Description matchClass(ClassTree tree, VisitorState state) { // TODO(b/36395371): filter here to exclude some classes (e.g. not immutable) if (TEST_CLASS.matches(tree, state)) { return NO_MATCH; } for (Tree member : tree.getMembers()) { if (isSuppressed(member)) { ...
[ "@", "Override", "public", "Description", "matchClass", "(", "ClassTree", "tree", ",", "VisitorState", "state", ")", "{", "// TODO(b/36395371): filter here to exclude some classes (e.g. not immutable)", "if", "(", "TEST_CLASS", ".", "matches", "(", "tree", ",", "state", ...
For each class, visits constructors, instance variables, and instance initializers. Delegates further scanning of these "constructor-scope" constructs to {@link #traverse}.
[ "For", "each", "class", "visits", "constructors", "instance", "variables", "and", "instance", "initializers", ".", "Delegates", "further", "scanning", "of", "these", "constructor", "-", "scope", "constructs", "to", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/ConstructorLeakChecker.java#L45-L64
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.crossTrackDistanceDeg
public static double crossTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ) { return crossTrackDistanceRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2), deg2rad(latQ), deg2rad(lonQ)); }
java
public static double crossTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ) { return crossTrackDistanceRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2), deg2rad(latQ), deg2rad(lonQ)); }
[ "public", "static", "double", "crossTrackDistanceDeg", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ",", "double", "latQ", ",", "double", "lonQ", ")", "{", "return", "crossTrackDistanceRad", "(", "deg2rad", "(", ...
Compute the cross-track distance. <p> XTD = asin(sin(dist_1Q)*sin(crs_1Q-crs_12)) @param lat1 Latitude of starting point. @param lon1 Longitude of starting point. @param lat2 Latitude of destination point. @param lon2 Longitude of destination point. @param latQ Latitude of query point. @param lonQ Longitude of query p...
[ "Compute", "the", "cross", "-", "track", "distance", ".", "<p", ">", "XTD", "=", "asin", "(", "sin", "(", "dist_1Q", ")", "*", "sin", "(", "crs_1Q", "-", "crs_12", "))" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L419-L421
Stratio/stratio-cassandra
src/java/org/apache/cassandra/repair/StreamingRepairTask.java
StreamingRepairTask.onSuccess
public void onSuccess(StreamState state) { logger.info(String.format("[repair #%s] streaming task succeed, returning response to %s", desc.sessionId, request.initiator)); MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, true).createMessage(), request.initiator)...
java
public void onSuccess(StreamState state) { logger.info(String.format("[repair #%s] streaming task succeed, returning response to %s", desc.sessionId, request.initiator)); MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, true).createMessage(), request.initiator)...
[ "public", "void", "onSuccess", "(", "StreamState", "state", ")", "{", "logger", ".", "info", "(", "String", ".", "format", "(", "\"[repair #%s] streaming task succeed, returning response to %s\"", ",", "desc", ".", "sessionId", ",", "request", ".", "initiator", ")",...
If we succeeded on both stream in and out, reply back to the initiator.
[ "If", "we", "succeeded", "on", "both", "stream", "in", "and", "out", "reply", "back", "to", "the", "initiator", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/repair/StreamingRepairTask.java#L94-L98
UrielCh/ovh-java-sdk
ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java
ApiOvhSaascsp2.serviceName_usageStatistics_GET
public ArrayList<OvhStatistics> serviceName_usageStatistics_GET(String serviceName, OvhLicensePeriodEnum timePeriod) throws IOException { String qPath = "/saas/csp2/{serviceName}/usageStatistics"; StringBuilder sb = path(qPath, serviceName); query(sb, "timePeriod", timePeriod); String resp = exec(qPath, "GET", ...
java
public ArrayList<OvhStatistics> serviceName_usageStatistics_GET(String serviceName, OvhLicensePeriodEnum timePeriod) throws IOException { String qPath = "/saas/csp2/{serviceName}/usageStatistics"; StringBuilder sb = path(qPath, serviceName); query(sb, "timePeriod", timePeriod); String resp = exec(qPath, "GET", ...
[ "public", "ArrayList", "<", "OvhStatistics", ">", "serviceName_usageStatistics_GET", "(", "String", "serviceName", ",", "OvhLicensePeriodEnum", "timePeriod", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/saas/csp2/{serviceName}/usageStatistics\"", ";", "Str...
Get the usage statistics over the chose period REST: GET /saas/csp2/{serviceName}/usageStatistics @param timePeriod [required] The period to query @param serviceName [required] The unique identifier of your Office service API beta
[ "Get", "the", "usage", "statistics", "over", "the", "chose", "period" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java#L323-L329
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Popups.java
Popups.errorBelow
public static InfoPopup errorBelow (String message, Widget source) { return error(message, Position.BELOW, source); }
java
public static InfoPopup errorBelow (String message, Widget source) { return error(message, Position.BELOW, source); }
[ "public", "static", "InfoPopup", "errorBelow", "(", "String", "message", ",", "Widget", "source", ")", "{", "return", "error", "(", "message", ",", "Position", ".", "BELOW", ",", "source", ")", ";", "}" ]
Displays error feedback to the user in a non-offensive way. The error feedback is displayed near the supplied component and if the component supports focus, it is focused.
[ "Displays", "error", "feedback", "to", "the", "user", "in", "a", "non", "-", "offensive", "way", ".", "The", "error", "feedback", "is", "displayed", "near", "the", "supplied", "component", "and", "if", "the", "component", "supports", "focus", "it", "is", "...
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Popups.java#L136-L139
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
KeyGroupRangeAssignment.computeKeyGroupRangeForOperatorIndex
public static KeyGroupRange computeKeyGroupRangeForOperatorIndex( int maxParallelism, int parallelism, int operatorIndex) { checkParallelismPreconditions(parallelism); checkParallelismPreconditions(maxParallelism); Preconditions.checkArgument(maxParallelism >= parallelism, "Maximum parallelism must not...
java
public static KeyGroupRange computeKeyGroupRangeForOperatorIndex( int maxParallelism, int parallelism, int operatorIndex) { checkParallelismPreconditions(parallelism); checkParallelismPreconditions(maxParallelism); Preconditions.checkArgument(maxParallelism >= parallelism, "Maximum parallelism must not...
[ "public", "static", "KeyGroupRange", "computeKeyGroupRangeForOperatorIndex", "(", "int", "maxParallelism", ",", "int", "parallelism", ",", "int", "operatorIndex", ")", "{", "checkParallelismPreconditions", "(", "parallelism", ")", ";", "checkParallelismPreconditions", "(", ...
Computes the range of key-groups that are assigned to a given operator under the given parallelism and maximum parallelism. IMPORTANT: maxParallelism must be <= Short.MAX_VALUE to avoid rounding problems in this method. If we ever want to go beyond this boundary, this method must perform arithmetic on long values. @p...
[ "Computes", "the", "range", "of", "key", "-", "groups", "that", "are", "assigned", "to", "a", "given", "operator", "under", "the", "given", "parallelism", "and", "maximum", "parallelism", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java#L85-L99
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java
XScreenField.printData
public boolean printData(PrintWriter out, int iPrintOptions) { boolean bFieldsFound = false; String strFieldName = this.getScreenField().getSFieldParam(); String strFieldData = this.getScreenField().getSFieldValue(true, false); if ((this.getScreenField().getConverter() != null) ...
java
public boolean printData(PrintWriter out, int iPrintOptions) { boolean bFieldsFound = false; String strFieldName = this.getScreenField().getSFieldParam(); String strFieldData = this.getScreenField().getSFieldValue(true, false); if ((this.getScreenField().getConverter() != null) ...
[ "public", "boolean", "printData", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "boolean", "bFieldsFound", "=", "false", ";", "String", "strFieldName", "=", "this", ".", "getScreenField", "(", ")", ".", "getSFieldParam", "(", ")", ";", "S...
Print this field's data in XML format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception.
[ "Print", "this", "field", "s", "data", "in", "XML", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java#L112-L124
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/DeploymentCanarySettings.java
DeploymentCanarySettings.withStageVariableOverrides
public DeploymentCanarySettings withStageVariableOverrides(java.util.Map<String, String> stageVariableOverrides) { setStageVariableOverrides(stageVariableOverrides); return this; }
java
public DeploymentCanarySettings withStageVariableOverrides(java.util.Map<String, String> stageVariableOverrides) { setStageVariableOverrides(stageVariableOverrides); return this; }
[ "public", "DeploymentCanarySettings", "withStageVariableOverrides", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "stageVariableOverrides", ")", "{", "setStageVariableOverrides", "(", "stageVariableOverrides", ")", ";", "return", "this", ";"...
<p> A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values. </p> @param stageVariableOverrid...
[ "<p", ">", "A", "stage", "variable", "overrides", "used", "for", "the", "canary", "release", "deployment", ".", "They", "can", "override", "existing", "stage", "variables", "or", "add", "new", "stage", "variables", "for", "the", "canary", "release", "deploymen...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/DeploymentCanarySettings.java#L136-L139
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java
AttributeRenderer.renderDiv
public void renderDiv(DivTag.State state, TreeElement elem) { ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_DIV]; assert(al != null); if (al.size() == 0) return; int cnt = al.size(); for (int i = 0; i < cnt; i++) { TreeHtmlAttributeInfo a...
java
public void renderDiv(DivTag.State state, TreeElement elem) { ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_DIV]; assert(al != null); if (al.size() == 0) return; int cnt = al.size(); for (int i = 0; i < cnt; i++) { TreeHtmlAttributeInfo a...
[ "public", "void", "renderDiv", "(", "DivTag", ".", "State", "state", ",", "TreeElement", "elem", ")", "{", "ArrayList", "al", "=", "_lists", "[", "TreeHtmlAttributeInfo", ".", "HTML_LOCATION_DIV", "]", ";", "assert", "(", "al", "!=", "null", ")", ";", "if"...
This method will render the values assocated with the div around a treeItem. @param state @param elem
[ "This", "method", "will", "render", "the", "values", "assocated", "with", "the", "div", "around", "a", "treeItem", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java#L208-L221
JOML-CI/JOML
src/org/joml/Matrix3x2f.java
Matrix3x2f.translateLocal
public Matrix3x2f translateLocal(Vector2fc offset, Matrix3x2f dest) { return translateLocal(offset.x(), offset.y(), dest); }
java
public Matrix3x2f translateLocal(Vector2fc offset, Matrix3x2f dest) { return translateLocal(offset.x(), offset.y(), dest); }
[ "public", "Matrix3x2f", "translateLocal", "(", "Vector2fc", "offset", ",", "Matrix3x2f", "dest", ")", "{", "return", "translateLocal", "(", "offset", ".", "x", "(", ")", ",", "offset", ".", "y", "(", ")", ",", "dest", ")", ";", "}" ]
Pre-multiply a translation to this matrix by translating by the given number of units in x and y and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation matrix, then the new matrix will be <code>T * M</code>. So when transforming a vector <code>v</...
[ "Pre", "-", "multiply", "a", "translation", "to", "this", "matrix", "by", "translating", "by", "the", "given", "number", "of", "units", "in", "x", "and", "y", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L660-L662
JodaOrg/joda-time
src/main/java/org/joda/time/Period.java
Period.plusDays
public Period plusDays(int days) { if (days == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.DAY_INDEX, values, days); return new Period(values, getPeriodType()); }
java
public Period plusDays(int days) { if (days == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.DAY_INDEX, values, days); return new Period(values, getPeriodType()); }
[ "public", "Period", "plusDays", "(", "int", "days", ")", "{", "if", "(", "days", "==", "0", ")", "{", "return", "this", ";", "}", "int", "[", "]", "values", "=", "getValues", "(", ")", ";", "// cloned", "getPeriodType", "(", ")", ".", "addIndexedFiel...
Returns a new period plus the specified number of days added. <p> This period instance is immutable and unaffected by this method call. @param days the amount of days to add, may be negative @return the new period plus the increased days @throws UnsupportedOperationException if the field is not supported
[ "Returns", "a", "new", "period", "plus", "the", "specified", "number", "of", "days", "added", ".", "<p", ">", "This", "period", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Period.java#L1123-L1130
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.notBlank
public static <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { if (chars == null) { throw new NullPointerException(StringUtils.simpleFormat(message, values)); } if (StringUtils.isBlank(chars)) { throw new IllegalArgumentEx...
java
public static <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { if (chars == null) { throw new NullPointerException(StringUtils.simpleFormat(message, values)); } if (StringUtils.isBlank(chars)) { throw new IllegalArgumentEx...
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "notBlank", "(", "final", "T", "chars", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "chars", "==", "null", ")", "{", "throw", "new",...
<p>Validate that the specified argument character sequence is neither {@code null}, a length of zero (no characters), empty nor whitespace; otherwise throwing an exception with the specified message. <pre>Validate.notBlank(myString, "The string must not be blank");</pre> @param <T> the character sequence type @param ...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "character", "sequence", "is", "neither", "{", "@code", "null", "}", "a", "length", "of", "zero", "(", "no", "characters", ")", "empty", "nor", "whitespace", ";", "otherwise", "throwing", "an", ...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L451-L459
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java
ProcessApplicationContext.withProcessApplicationContext
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationInterface processApplication) throws Exception { try { setCurrentProcessApplication(processApplication); return callable.call(); } finally { clear(); } }
java
public static <T> T withProcessApplicationContext(Callable<T> callable, ProcessApplicationInterface processApplication) throws Exception { try { setCurrentProcessApplication(processApplication); return callable.call(); } finally { clear(); } }
[ "public", "static", "<", "T", ">", "T", "withProcessApplicationContext", "(", "Callable", "<", "T", ">", "callable", ",", "ProcessApplicationInterface", "processApplication", ")", "throws", "Exception", "{", "try", "{", "setCurrentProcessApplication", "(", "processApp...
<p>Takes a callable and executes all engine API invocations within that callable in the context of the given process application <p>Equivalent to <pre> try { ProcessApplicationContext.setCurrentProcessApplication("someProcessApplication"); callable.call(); } finally { ProcessApplicationContext.clear(); } </pre> @para...
[ "<p", ">", "Takes", "a", "callable", "and", "executes", "all", "engine", "API", "invocations", "within", "that", "callable", "in", "the", "context", "of", "the", "given", "process", "application" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/application/ProcessApplicationContext.java#L174-L182
phax/ph-css
ph-css/src/main/java/com/helger/css/decl/CSSMediaRule.java
CSSMediaRule.addMediaQuery
@Nonnull public CSSMediaRule addMediaQuery (@Nonnegative final int nIndex, @Nonnull @Nonempty final CSSMediaQuery aMediaQuery) { ValueEnforcer.isGE0 (nIndex, "Index"); ValueEnforcer.notNull (aMediaQuery, "MediaQuery"); if (nIndex >= getMediaQueryCount ()) m_aMediaQueries.add (aMediaQuery); el...
java
@Nonnull public CSSMediaRule addMediaQuery (@Nonnegative final int nIndex, @Nonnull @Nonempty final CSSMediaQuery aMediaQuery) { ValueEnforcer.isGE0 (nIndex, "Index"); ValueEnforcer.notNull (aMediaQuery, "MediaQuery"); if (nIndex >= getMediaQueryCount ()) m_aMediaQueries.add (aMediaQuery); el...
[ "@", "Nonnull", "public", "CSSMediaRule", "addMediaQuery", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "@", "Nonempty", "final", "CSSMediaQuery", "aMediaQuery", ")", "{", "ValueEnforcer", ".", "isGE0", "(", "nIndex", ",", "\"Index\"",...
Add a media query at the specified index. @param nIndex The index to use. Must be &ge; 0. If the index is &ge; {@link #getMediaQueryCount()} than the media query is appended like in {@link #addMediaQuery(CSSMediaQuery)}. @param aMediaQuery The media query to be added. May not be <code>null</code>. @return this for cha...
[ "Add", "a", "media", "query", "at", "the", "specified", "index", "." ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/decl/CSSMediaRule.java#L103-L114
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/util/CompareUtil.java
CompareUtil.elementIsNotContainedInList
public static <T> boolean elementIsNotContainedInList(T element, Collection<T> values) { if (element != null && values != null) { return !values.contains(element); } else { return false; } }
java
public static <T> boolean elementIsNotContainedInList(T element, Collection<T> values) { if (element != null && values != null) { return !values.contains(element); } else { return false; } }
[ "public", "static", "<", "T", ">", "boolean", "elementIsNotContainedInList", "(", "T", "element", ",", "Collection", "<", "T", ">", "values", ")", "{", "if", "(", "element", "!=", "null", "&&", "values", "!=", "null", ")", "{", "return", "!", "values", ...
Checks if the element is not contained within the list of values. If the element, or the list are null then true is returned. @param element to check @param values to check in @param <T> the type of the element @return {@code true} if the element and values are not {@code null} and the values does not contain the elem...
[ "Checks", "if", "the", "element", "is", "not", "contained", "within", "the", "list", "of", "values", ".", "If", "the", "element", "or", "the", "list", "are", "null", "then", "true", "is", "returned", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/util/CompareUtil.java#L86-L93
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetBulkDeploymentStatusResult.java
GetBulkDeploymentStatusResult.withTags
public GetBulkDeploymentStatusResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public GetBulkDeploymentStatusResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "GetBulkDeploymentStatusResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "tags", "for", "the", "definition", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetBulkDeploymentStatusResult.java#L283-L286
knowm/XChange
xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceRawCore.java
DSXMarketDataServiceRawCore.getDSXTrades
public DSXTradesWrapper getDSXTrades(String pairs, int size, String type) throws IOException { if (size < 1) { size = 1; } if (size > FULL_SIZE) { size = FULL_SIZE; } return dsx.getTrades(pairs.toLowerCase(), size, 1, type); }
java
public DSXTradesWrapper getDSXTrades(String pairs, int size, String type) throws IOException { if (size < 1) { size = 1; } if (size > FULL_SIZE) { size = FULL_SIZE; } return dsx.getTrades(pairs.toLowerCase(), size, 1, type); }
[ "public", "DSXTradesWrapper", "getDSXTrades", "(", "String", "pairs", ",", "int", "size", ",", "String", "type", ")", "throws", "IOException", "{", "if", "(", "size", "<", "1", ")", "{", "size", "=", "1", ";", "}", "if", "(", "size", ">", "FULL_SIZE", ...
Get recent trades from exchange @param pairs String of currency pairs to retrieve (e.g. "btcusd-btceur") @param size Integer value from 1 -> get corresponding number of items @return DSXTradesWrapper @throws IOException
[ "Get", "recent", "trades", "from", "exchange" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-dsx/src/main/java/org/knowm/xchange/dsx/service/core/DSXMarketDataServiceRawCore.java#L58-L69
geomajas/geomajas-project-client-gwt2
plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/service/GeometryIndexService.java
GeometryIndexService.isChildOf
public boolean isChildOf(GeometryIndex parentIndex, GeometryIndex childIndex) { return delegate.isChildOf(toDelegate(parentIndex), toDelegate(childIndex)); }
java
public boolean isChildOf(GeometryIndex parentIndex, GeometryIndex childIndex) { return delegate.isChildOf(toDelegate(parentIndex), toDelegate(childIndex)); }
[ "public", "boolean", "isChildOf", "(", "GeometryIndex", "parentIndex", ",", "GeometryIndex", "childIndex", ")", "{", "return", "delegate", ".", "isChildOf", "(", "toDelegate", "(", "parentIndex", ")", ",", "toDelegate", "(", "childIndex", ")", ")", ";", "}" ]
Checks to see if a given index is the child of another index. @param parentIndex The so-called parent index. @param childIndex The so-called child index. @return Is the second index really a child of the first index?
[ "Checks", "to", "see", "if", "a", "given", "index", "is", "the", "child", "of", "another", "index", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/editing/common/src/main/java/org/geomajas/plugin/editing/client/service/GeometryIndexService.java#L221-L223
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java
ImageIOGreyScale.getImageReadersByMIMEType
public static Iterator<ImageReader> getImageReadersByMIMEType(String MIMEType) { if (MIMEType == null) { throw new IllegalArgumentException("MIMEType == null!"); } // Ensure category is present Iterator iter; try { iter = theRegistry.getServiceProviders(ImageReaderSpi.class, new ContainsFilter(re...
java
public static Iterator<ImageReader> getImageReadersByMIMEType(String MIMEType) { if (MIMEType == null) { throw new IllegalArgumentException("MIMEType == null!"); } // Ensure category is present Iterator iter; try { iter = theRegistry.getServiceProviders(ImageReaderSpi.class, new ContainsFilter(re...
[ "public", "static", "Iterator", "<", "ImageReader", ">", "getImageReadersByMIMEType", "(", "String", "MIMEType", ")", "{", "if", "(", "MIMEType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"MIMEType == null!\"", ")", ";", "}", "//...
Returns an <code>Iterator</code> containing all currently registered <code>ImageReader</code>s that claim to be able to decode files with the given MIME type. @param MIMEType a <code>String</code> containing a file suffix (<i>e.g.</i>, "image/jpeg" or "image/x-bmp"). @return an <code>Iterator</code> containing <code>...
[ "Returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "containing", "all", "currently", "registered", "<code", ">", "ImageReader<", "/", "code", ">", "s", "that", "claim", "to", "be", "able", "to", "decode", "files", "with", "the", "given", "MIME",...
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java#L680-L692
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNElement.java
XNElement.getLong
public long getLong(String attribute, String namespace) { return Long.parseLong(get(attribute, namespace)); }
java
public long getLong(String attribute, String namespace) { return Long.parseLong(get(attribute, namespace)); }
[ "public", "long", "getLong", "(", "String", "attribute", ",", "String", "namespace", ")", "{", "return", "Long", ".", "parseLong", "(", "get", "(", "attribute", ",", "namespace", ")", ")", ";", "}" ]
Retrieve an integer attribute or throw an exception if not exists. @param attribute the attribute name @param namespace the attribute namespace URI @return the value
[ "Retrieve", "an", "integer", "attribute", "or", "throw", "an", "exception", "if", "not", "exists", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNElement.java#L872-L874
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.copyDirectories
public static void copyDirectories(String[] directories, String storageFolder) throws IOException { copyDirectories(getFiles(directories), storageFolder); }
java
public static void copyDirectories(String[] directories, String storageFolder) throws IOException { copyDirectories(getFiles(directories), storageFolder); }
[ "public", "static", "void", "copyDirectories", "(", "String", "[", "]", "directories", ",", "String", "storageFolder", ")", "throws", "IOException", "{", "copyDirectories", "(", "getFiles", "(", "directories", ")", ",", "storageFolder", ")", ";", "}" ]
批量复制文件夹 @param directories 文件夹路径数组 @param storageFolder 存储目录 @throws IOException 异常
[ "批量复制文件夹" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L382-L384
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_portability_id_GET
public OvhPortability billingAccount_portability_id_GET(String billingAccount, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/portability/{id}"; StringBuilder sb = path(qPath, billingAccount, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPortabi...
java
public OvhPortability billingAccount_portability_id_GET(String billingAccount, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/portability/{id}"; StringBuilder sb = path(qPath, billingAccount, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPortabi...
[ "public", "OvhPortability", "billingAccount_portability_id_GET", "(", "String", "billingAccount", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/portability/{id}\"", ";", "StringBuilder", "sb", "=", "path", "("...
Get this object properties REST: GET /telephony/{billingAccount}/portability/{id} @param billingAccount [required] The name of your billingAccount @param id [required] The ID of the portability
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L344-L349
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java
FormLayout.addLayoutComponent
@Override public void addLayoutComponent(Component comp, Object constraints) { checkNotNull(constraints, "The constraints must not be null."); if (constraints instanceof String) { setConstraints(comp, new CellConstraints((String) constraints)); } else if (constraints instanceof C...
java
@Override public void addLayoutComponent(Component comp, Object constraints) { checkNotNull(constraints, "The constraints must not be null."); if (constraints instanceof String) { setConstraints(comp, new CellConstraints((String) constraints)); } else if (constraints instanceof C...
[ "@", "Override", "public", "void", "addLayoutComponent", "(", "Component", "comp", ",", "Object", "constraints", ")", "{", "checkNotNull", "(", "constraints", ",", "\"The constraints must not be null.\"", ")", ";", "if", "(", "constraints", "instanceof", "String", "...
Adds the specified component to the layout, using the specified {@code constraints} object. Note that constraints are mutable and are, therefore, cloned when cached. @param comp the component to be added @param constraints the component's cell constraints @throws NullPointerException if {@code constraints} is {@code n...
[ "Adds", "the", "specified", "component", "to", "the", "layout", "using", "the", "specified", "{", "@code", "constraints", "}", "object", ".", "Note", "that", "constraints", "are", "mutable", "and", "are", "therefore", "cloned", "when", "cached", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L1019-L1029
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.updateById
public GenericResourceInner updateById(String resourceId, String apiVersion, GenericResourceInner parameters) { return updateByIdWithServiceResponseAsync(resourceId, apiVersion, parameters).toBlocking().last().body(); }
java
public GenericResourceInner updateById(String resourceId, String apiVersion, GenericResourceInner parameters) { return updateByIdWithServiceResponseAsync(resourceId, apiVersion, parameters).toBlocking().last().body(); }
[ "public", "GenericResourceInner", "updateById", "(", "String", "resourceId", ",", "String", "apiVersion", ",", "GenericResourceInner", "parameters", ")", "{", "return", "updateByIdWithServiceResponseAsync", "(", "resourceId", ",", "apiVersion", ",", "parameters", ")", "...
Updates a resource by ID. @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} @param apiVersion The API version to use for the op...
[ "Updates", "a", "resource", "by", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L2231-L2233
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.downloadPDFAsync
public <T extends IEntity> void downloadPDFAsync(T entity, CallbackHandler callbackHandler) throws FMSException { if(!isAvailableAsPDF(entity)) { throw new FMSException("Following entity: " + entity.getClass().getSimpleName() + " cannot be exported as PDF (Async) " ); } IntuitMessage...
java
public <T extends IEntity> void downloadPDFAsync(T entity, CallbackHandler callbackHandler) throws FMSException { if(!isAvailableAsPDF(entity)) { throw new FMSException("Following entity: " + entity.getClass().getSimpleName() + " cannot be exported as PDF (Async) " ); } IntuitMessage...
[ "public", "<", "T", "extends", "IEntity", ">", "void", "downloadPDFAsync", "(", "T", "entity", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "if", "(", "!", "isAvailableAsPDF", "(", "entity", ")", ")", "{", "throw", "new", "F...
Method to download the file for the given entity id in asynchronous fashion @param entity the entity @param callbackHandler the callback handler @throws FMSException throws FMSException
[ "Method", "to", "download", "the", "file", "for", "the", "given", "entity", "id", "in", "asynchronous", "fashion" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L905-L916
samskivert/samskivert
src/main/java/com/samskivert/util/CollectionUtil.java
CollectionUtil.addAll
@ReplacedBy("java.util.Collections#addAll()") public static <T, E extends T, C extends Collection<T>> C addAll (C col, E[] values) { if (values != null) { for (E value : values) { col.add(value); } } return col; }
java
@ReplacedBy("java.util.Collections#addAll()") public static <T, E extends T, C extends Collection<T>> C addAll (C col, E[] values) { if (values != null) { for (E value : values) { col.add(value); } } return col; }
[ "@", "ReplacedBy", "(", "\"java.util.Collections#addAll()\"", ")", "public", "static", "<", "T", ",", "E", "extends", "T", ",", "C", "extends", "Collection", "<", "T", ">", ">", "C", "addAll", "(", "C", "col", ",", "E", "[", "]", "values", ")", "{", ...
Adds all items in the given object array to the supplied collection and returns the supplied collection. If the supplied array is null, nothing is added to the collection.
[ "Adds", "all", "items", "in", "the", "given", "object", "array", "to", "the", "supplied", "collection", "and", "returns", "the", "supplied", "collection", ".", "If", "the", "supplied", "array", "is", "null", "nothing", "is", "added", "to", "the", "collection...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/CollectionUtil.java#L57-L66
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/CoreJBossASClient.java
CoreJBossASClient.getSystemProperties
public Properties getSystemProperties() throws Exception { final String[] address = { CORE_SERVICE, PLATFORM_MBEAN, "type", "runtime" }; final ModelNode op = createReadAttributeRequest(true, "system-properties", Address.root().add(address)); final ModelNode results = execute(op); if (isS...
java
public Properties getSystemProperties() throws Exception { final String[] address = { CORE_SERVICE, PLATFORM_MBEAN, "type", "runtime" }; final ModelNode op = createReadAttributeRequest(true, "system-properties", Address.root().add(address)); final ModelNode results = execute(op); if (isS...
[ "public", "Properties", "getSystemProperties", "(", ")", "throws", "Exception", "{", "final", "String", "[", "]", "address", "=", "{", "CORE_SERVICE", ",", "PLATFORM_MBEAN", ",", "\"type\"", ",", "\"runtime\"", "}", ";", "final", "ModelNode", "op", "=", "creat...
This returns the system properties that are set in the AS JVM. This is not the system properties in the JVM of this client object - it is actually the system properties in the remote JVM of the AS instance that the client is talking to. @return the AS JVM's system properties @throws Exception any error
[ "This", "returns", "the", "system", "properties", "that", "are", "set", "in", "the", "AS", "JVM", ".", "This", "is", "not", "the", "system", "properties", "in", "the", "JVM", "of", "this", "client", "object", "-", "it", "is", "actually", "the", "system",...
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/CoreJBossASClient.java#L98-L118
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.mediaStopMonitoring
public ApiSuccessResponse mediaStopMonitoring(String mediatype, MediaStopMonitoringData mediaStopMonitoringData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = mediaStopMonitoringWithHttpInfo(mediatype, mediaStopMonitoringData); return resp.getData(); }
java
public ApiSuccessResponse mediaStopMonitoring(String mediatype, MediaStopMonitoringData mediaStopMonitoringData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = mediaStopMonitoringWithHttpInfo(mediatype, mediaStopMonitoringData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "mediaStopMonitoring", "(", "String", "mediatype", ",", "MediaStopMonitoringData", "mediaStopMonitoringData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "mediaStopMonitoringWithHttpInfo", "("...
Stop monitoring an agent Stop supervisor monitoring of an agent on the specified media channel. @param mediatype The media channel. (required) @param mediaStopMonitoringData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize th...
[ "Stop", "monitoring", "an", "agent", "Stop", "supervisor", "monitoring", "of", "an", "agent", "on", "the", "specified", "media", "channel", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L2313-L2316
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.appendTag
private static void appendTag(String tag, StringBuilder buffer) { if (buffer.length() != 0) { buffer.append(UNDERSCORE); } buffer.append(tag); }
java
private static void appendTag(String tag, StringBuilder buffer) { if (buffer.length() != 0) { buffer.append(UNDERSCORE); } buffer.append(tag); }
[ "private", "static", "void", "appendTag", "(", "String", "tag", ",", "StringBuilder", "buffer", ")", "{", "if", "(", "buffer", ".", "length", "(", ")", "!=", "0", ")", "{", "buffer", ".", "append", "(", "UNDERSCORE", ")", ";", "}", "buffer", ".", "ap...
Append a tag to a StringBuilder, adding the separator if necessary.The tag must not be a zero-length string. @param tag The tag to add. @param buffer The output buffer.
[ "Append", "a", "tag", "to", "a", "StringBuilder", "adding", "the", "separator", "if", "necessary", ".", "The", "tag", "must", "not", "be", "a", "zero", "-", "length", "string", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L2603-L2609
alkacon/opencms-core
src/org/opencms/i18n/CmsMessages.java
CmsMessages.getDateTime
public String getDateTime(Date date, int format) { return CmsDateUtil.getDateTime(date, format, m_locale); }
java
public String getDateTime(Date date, int format) { return CmsDateUtil.getDateTime(date, format, m_locale); }
[ "public", "String", "getDateTime", "(", "Date", "date", ",", "int", "format", ")", "{", "return", "CmsDateUtil", ".", "getDateTime", "(", "date", ",", "format", ",", "m_locale", ")", ";", "}" ]
Returns a formated date and time String from a Date value, the formatting based on the provided option and the locale based on this instance.<p> @param date the Date object to format as String @param format the format to use, see {@link CmsMessages} for possible values @return the formatted date and time
[ "Returns", "a", "formated", "date", "and", "time", "String", "from", "a", "Date", "value", "the", "formatting", "based", "on", "the", "provided", "option", "and", "the", "locale", "based", "on", "this", "instance", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsMessages.java#L272-L275
icoloma/simpleds
src/main/java/org/simpleds/util/GenericCollectionTypeResolver.java
GenericCollectionTypeResolver.getGenericParameterType
private static Class<?> getGenericParameterType(MethodParameter methodParam, Class<?> source, int typeIndex) { return extractType(methodParam, GenericTypeResolver.getTargetType(methodParam), source, typeIndex, methodParam.getNestingLevel(), 1); }
java
private static Class<?> getGenericParameterType(MethodParameter methodParam, Class<?> source, int typeIndex) { return extractType(methodParam, GenericTypeResolver.getTargetType(methodParam), source, typeIndex, methodParam.getNestingLevel(), 1); }
[ "private", "static", "Class", "<", "?", ">", "getGenericParameterType", "(", "MethodParameter", "methodParam", ",", "Class", "<", "?", ">", "source", ",", "int", "typeIndex", ")", "{", "return", "extractType", "(", "methodParam", ",", "GenericTypeResolver", ".",...
Extract the generic parameter type from the given method or constructor. @param methodParam the method parameter specification @param source the source class/interface defining the generic parameter types @param typeIndex the index of the type (e.g. 0 for Collections, 0 for Map keys, 1 for Map values) @return the gener...
[ "Extract", "the", "generic", "parameter", "type", "from", "the", "given", "method", "or", "constructor", "." ]
train
https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/util/GenericCollectionTypeResolver.java#L218-L221
UrielCh/ovh-java-sdk
ovh-java-sdk-licenseplesk/src/main/java/net/minidev/ovh/api/ApiOvhLicenseplesk.java
ApiOvhLicenseplesk.serviceName_option_label_GET
public OvhOption serviceName_option_label_GET(String serviceName, net.minidev.ovh.api.license.OvhOptionLabel label) throws IOException { String qPath = "/license/plesk/{serviceName}/option/{label}"; StringBuilder sb = path(qPath, serviceName, label); String resp = exec(qPath, "GET", sb.toString(), null); return...
java
public OvhOption serviceName_option_label_GET(String serviceName, net.minidev.ovh.api.license.OvhOptionLabel label) throws IOException { String qPath = "/license/plesk/{serviceName}/option/{label}"; StringBuilder sb = path(qPath, serviceName, label); String resp = exec(qPath, "GET", sb.toString(), null); return...
[ "public", "OvhOption", "serviceName_option_label_GET", "(", "String", "serviceName", ",", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "license", ".", "OvhOptionLabel", "label", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/license/plesk/{s...
Get this object properties REST: GET /license/plesk/{serviceName}/option/{label} @param serviceName [required] The name of your Plesk license @param label [required] This option designation
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-licenseplesk/src/main/java/net/minidev/ovh/api/ApiOvhLicenseplesk.java#L214-L219
kiswanij/jk-util
src/main/java/com/jk/util/JKDateTimeUtil.java
JKDateTimeUtil.getDifference
public static long getDifference(Time timeFrom, Time timeTo) { try { DateFormat format = new SimpleDateFormat("HH:mm:ss"); // the a means am/pm marker Date date = format.parse(timeFrom.toString()); Date date2 = format.parse(timeTo.toString()); long difference = (date2.getTime() - date.getTime()) ...
java
public static long getDifference(Time timeFrom, Time timeTo) { try { DateFormat format = new SimpleDateFormat("HH:mm:ss"); // the a means am/pm marker Date date = format.parse(timeFrom.toString()); Date date2 = format.parse(timeTo.toString()); long difference = (date2.getTime() - date.getTime()) ...
[ "public", "static", "long", "getDifference", "(", "Time", "timeFrom", ",", "Time", "timeTo", ")", "{", "try", "{", "DateFormat", "format", "=", "new", "SimpleDateFormat", "(", "\"HH:mm:ss\"", ")", ";", "// the a means am/pm marker\r", "Date", "date", "=", "forma...
Gets the difference. @param timeFrom the time from @param timeTo the time to @return the difference
[ "Gets", "the", "difference", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKDateTimeUtil.java#L276-L287
kiswanij/jk-util
src/main/java/com/jk/util/model/table/JKTableModel.java
JKTableModel.getValueAtAsInteger
public int getValueAtAsInteger(final int row, final int col) { final Object valueAt = getValueAt(row, col); int number = 0; if (valueAt != null && !valueAt.toString().equals("")) { number = Integer.parseInt(valueAt.toString().trim()); } return number; }
java
public int getValueAtAsInteger(final int row, final int col) { final Object valueAt = getValueAt(row, col); int number = 0; if (valueAt != null && !valueAt.toString().equals("")) { number = Integer.parseInt(valueAt.toString().trim()); } return number; }
[ "public", "int", "getValueAtAsInteger", "(", "final", "int", "row", ",", "final", "int", "col", ")", "{", "final", "Object", "valueAt", "=", "getValueAt", "(", "row", ",", "col", ")", ";", "int", "number", "=", "0", ";", "if", "(", "valueAt", "!=", "...
Gets the value at as integer. @param row the row @param col the col @return the value at as integer
[ "Gets", "the", "value", "at", "as", "integer", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/model/table/JKTableModel.java#L637-L645
dadoonet/spring-elasticsearch
src/main/java/fr/pilato/spring/elasticsearch/type/TypeSettingsReader.java
TypeSettingsReader.readMapping
static String readMapping(String root, String index) throws IOException { if (root == null) { return readMapping(index); } String mappingFile = root + "/" + index + "/_doc" + Defaults.JsonFileExtension; return readFileFromClasspath(mappingFile); }
java
static String readMapping(String root, String index) throws IOException { if (root == null) { return readMapping(index); } String mappingFile = root + "/" + index + "/_doc" + Defaults.JsonFileExtension; return readFileFromClasspath(mappingFile); }
[ "static", "String", "readMapping", "(", "String", "root", ",", "String", "index", ")", "throws", "IOException", "{", "if", "(", "root", "==", "null", ")", "{", "return", "readMapping", "(", "index", ")", ";", "}", "String", "mappingFile", "=", "root", "+...
Read a mapping from index/_doc.json file @param root dir within the classpath @param index index name @return The mapping @throws IOException if the connection with elasticsearch is failing
[ "Read", "a", "mapping", "from", "index", "/", "_doc", ".", "json", "file" ]
train
https://github.com/dadoonet/spring-elasticsearch/blob/b338223818a5bdf5d9c06c88cb98589c843fd293/src/main/java/fr/pilato/spring/elasticsearch/type/TypeSettingsReader.java#L44-L50
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java
AbstractJsonDeserializer.getDoubleParam
protected Double getDoubleParam(String paramName, String errorMessage, Map<String, Object> mapToUse) throws IOException { Object o = mapToUse.get(paramName); if (o != null) { try { return Double.parseDouble(o.toString()); } catch (NumberFormatException...
java
protected Double getDoubleParam(String paramName, String errorMessage, Map<String, Object> mapToUse) throws IOException { Object o = mapToUse.get(paramName); if (o != null) { try { return Double.parseDouble(o.toString()); } catch (NumberFormatException...
[ "protected", "Double", "getDoubleParam", "(", "String", "paramName", ",", "String", "errorMessage", ",", "Map", "<", "String", ",", "Object", ">", "mapToUse", ")", "throws", "IOException", "{", "Object", "o", "=", "mapToUse", ".", "get", "(", "paramName", ")...
Convenience method for subclasses. Retrieves a double with the given parametername, even if that parametercontent is actually a string containing a number or a long or an int or... Anything that can be converted to a double is returned. @param paramName the name of the parameter @param errorMessage the errormessage...
[ "Convenience", "method", "for", "subclasses", ".", "Retrieves", "a", "double", "with", "the", "given", "parametername", "even", "if", "that", "parametercontent", "is", "actually", "a", "string", "containing", "a", "number", "or", "a", "long", "or", "an", "int"...
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java#L182-L192
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.addOrderer
public Channel addOrderer(Orderer orderer) throws InvalidArgumentException { if (shutdown) { throw new InvalidArgumentException(format("Channel %s has been shutdown.", name)); } if (null == orderer) { throw new InvalidArgumentException("Orderer is invalid can not be nul...
java
public Channel addOrderer(Orderer orderer) throws InvalidArgumentException { if (shutdown) { throw new InvalidArgumentException(format("Channel %s has been shutdown.", name)); } if (null == orderer) { throw new InvalidArgumentException("Orderer is invalid can not be nul...
[ "public", "Channel", "addOrderer", "(", "Orderer", "orderer", ")", "throws", "InvalidArgumentException", "{", "if", "(", "shutdown", ")", "{", "throw", "new", "InvalidArgumentException", "(", "format", "(", "\"Channel %s has been shutdown.\"", ",", "name", ")", ")",...
Add an Orderer to this channel. @param orderer the orderer to add. @return this channel. @throws InvalidArgumentException
[ "Add", "an", "Orderer", "to", "this", "channel", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L923-L939
selendroid/selendroid
selendroid-client/src/main/java/io/selendroid/client/TouchActionBuilder.java
TouchActionBuilder.pointerDown
public TouchActionBuilder pointerDown(WebElement element, int x, int y) { Preconditions.checkState(!isDown); Map<String, Object> params = getTouchParameters(element, x, y); addAction(TouchActionName.POINTER_DOWN, params); isDown = true; return this; }
java
public TouchActionBuilder pointerDown(WebElement element, int x, int y) { Preconditions.checkState(!isDown); Map<String, Object> params = getTouchParameters(element, x, y); addAction(TouchActionName.POINTER_DOWN, params); isDown = true; return this; }
[ "public", "TouchActionBuilder", "pointerDown", "(", "WebElement", "element", ",", "int", "x", ",", "int", "y", ")", "{", "Preconditions", ".", "checkState", "(", "!", "isDown", ")", ";", "Map", "<", "String", ",", "Object", ">", "params", "=", "getTouchPar...
Places pointer down at an offset from the top left corner of the specified WebElement @param element WebElement to place pointer relative to @param x x-offset from top left @param y y-offset from top left @return this
[ "Places", "pointer", "down", "at", "an", "offset", "from", "the", "top", "left", "corner", "of", "the", "specified", "WebElement" ]
train
https://github.com/selendroid/selendroid/blob/a32c1a96c973b80c14a588b1075f084201f7fe94/selendroid-client/src/main/java/io/selendroid/client/TouchActionBuilder.java#L86-L94
lucee/Lucee
core/src/main/java/lucee/commons/lang/StringUtil.java
StringUtil.resolveInternals
private static Map resolveInternals(Map map, boolean ignoreCase, int count) throws PageException { Map result = new HashMap(); Iterator<Map.Entry> it = map.entrySet().iterator(); boolean isModified = false; Map.Entry e; String v, r; while (it.hasNext()) { e = it.next(); v = Caster.toString(e.getValue())...
java
private static Map resolveInternals(Map map, boolean ignoreCase, int count) throws PageException { Map result = new HashMap(); Iterator<Map.Entry> it = map.entrySet().iterator(); boolean isModified = false; Map.Entry e; String v, r; while (it.hasNext()) { e = it.next(); v = Caster.toString(e.getValue())...
[ "private", "static", "Map", "resolveInternals", "(", "Map", "map", ",", "boolean", "ignoreCase", ",", "int", "count", ")", "throws", "PageException", "{", "Map", "result", "=", "new", "HashMap", "(", ")", ";", "Iterator", "<", "Map", ".", "Entry", ">", "...
resolves internal values within the map, so if the map has a key "{signature}" and its value is "Team {group}" and there's a key with the value {group} whose value is "Lucee", then {signature} will resolve to "Team Lucee". {signature} = "Team {group}" {group} = "Lucee" then signature will resolve to {signature} = "T...
[ "resolves", "internal", "values", "within", "the", "map", "so", "if", "the", "map", "has", "a", "key", "{", "signature", "}", "and", "its", "value", "is", "Team", "{", "group", "}", "and", "there", "s", "a", "key", "with", "the", "value", "{", "group...
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L1376-L1393
mirage-sql/mirage
src/main/java/com/miragesql/miragesql/util/MirageUtil.java
MirageUtil.getTableName
public static String getTableName(Class<?> entityClass, NameConverter nameConverter){ Table table = entityClass.getAnnotation(Table.class); if(table != null){ return table.name(); } else { return nameConverter.entityToTable(entityClass.getName()); } }
java
public static String getTableName(Class<?> entityClass, NameConverter nameConverter){ Table table = entityClass.getAnnotation(Table.class); if(table != null){ return table.name(); } else { return nameConverter.entityToTable(entityClass.getName()); } }
[ "public", "static", "String", "getTableName", "(", "Class", "<", "?", ">", "entityClass", ",", "NameConverter", "nameConverter", ")", "{", "Table", "table", "=", "entityClass", ".", "getAnnotation", "(", "Table", ".", "class", ")", ";", "if", "(", "table", ...
Returns the table name from the entity. <p> <b>Note:</b> This should not be used for Maps as entities. <p> If the entity class has {@link Table} annotation then this method returns the annotated table name, otherwise creates table name from the entity class name using {@link NameConverter}. @param entityClass the enti...
[ "Returns", "the", "table", "name", "from", "the", "entity", ".", "<p", ">", "<b", ">", "Note", ":", "<", "/", "b", ">", "This", "should", "not", "be", "used", "for", "Maps", "as", "entities", ".", "<p", ">", "If", "the", "entity", "class", "has", ...
train
https://github.com/mirage-sql/mirage/blob/29a44b7ad267b5a48bc250cd0ef7d74813d46889/src/main/java/com/miragesql/miragesql/util/MirageUtil.java#L80-L87
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
JDBCStorageConnection.readValueData
protected ValueDataWrapper readValueData(String identifier, int orderNumber, int type, String storageId) throws SQLException, IOException, ValueStorageNotFoundException { ValueIOChannel channel = this.containerConfig.valueStorageProvider.getChannel(storageId); try { return channel.re...
java
protected ValueDataWrapper readValueData(String identifier, int orderNumber, int type, String storageId) throws SQLException, IOException, ValueStorageNotFoundException { ValueIOChannel channel = this.containerConfig.valueStorageProvider.getChannel(storageId); try { return channel.re...
[ "protected", "ValueDataWrapper", "readValueData", "(", "String", "identifier", ",", "int", "orderNumber", ",", "int", "type", ",", "String", "storageId", ")", "throws", "SQLException", ",", "IOException", ",", "ValueStorageNotFoundException", "{", "ValueIOChannel", "c...
Read ValueData from External Storage. @param identifier PropertyData @param orderNumber Value order number @param type property type @param storageId external Value storage id @return ValueData @throws SQLException database error @throws IOException I/O error @throws ValueStorageNotFoundException if no such storage fo...
[ "Read", "ValueData", "from", "External", "Storage", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java#L2672-L2684
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/viterbi/ViterbiBuilder.java
ViterbiBuilder.isLatticeBrokenBefore
private boolean isLatticeBrokenBefore(int nodeIndex, ViterbiLattice lattice) { ViterbiNode[][] nodeEndIndices = lattice.getEndIndexArr(); return nodeEndIndices[nodeIndex] == null; }
java
private boolean isLatticeBrokenBefore(int nodeIndex, ViterbiLattice lattice) { ViterbiNode[][] nodeEndIndices = lattice.getEndIndexArr(); return nodeEndIndices[nodeIndex] == null; }
[ "private", "boolean", "isLatticeBrokenBefore", "(", "int", "nodeIndex", ",", "ViterbiLattice", "lattice", ")", "{", "ViterbiNode", "[", "]", "[", "]", "nodeEndIndices", "=", "lattice", ".", "getEndIndexArr", "(", ")", ";", "return", "nodeEndIndices", "[", "nodeI...
Checks whether there exists any node in the lattice that connects to the newly inserted entry on the left side (before the new entry). @param nodeIndex @param lattice @return whether the lattice has a node that ends at nodeIndex
[ "Checks", "whether", "there", "exists", "any", "node", "in", "the", "lattice", "that", "connects", "to", "the", "newly", "inserted", "entry", "on", "the", "left", "side", "(", "before", "the", "new", "entry", ")", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/viterbi/ViterbiBuilder.java#L210-L214
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/database/CmsDatabaseExportDialog.java
CmsDatabaseExportDialog.getComboExportFiles
protected List getComboExportFiles() { List result = new ArrayList(8); Iterator i = CmsDatabaseImportFromServer.getFileListFromServer(true).iterator(); while (i.hasNext()) { String fileName = (String)i.next(); String helpText = key(Messages.GUI_EDITOR_HELP_EXPORTFILE_1, ...
java
protected List getComboExportFiles() { List result = new ArrayList(8); Iterator i = CmsDatabaseImportFromServer.getFileListFromServer(true).iterator(); while (i.hasNext()) { String fileName = (String)i.next(); String helpText = key(Messages.GUI_EDITOR_HELP_EXPORTFILE_1, ...
[ "protected", "List", "getComboExportFiles", "(", ")", "{", "List", "result", "=", "new", "ArrayList", "(", "8", ")", ";", "Iterator", "i", "=", "CmsDatabaseImportFromServer", ".", "getFileListFromServer", "(", "true", ")", ".", "iterator", "(", ")", ";", "wh...
Returns the present export files on the server to show in the combo box.<p> The result list elements are of type <code>{@link org.opencms.widgets.CmsSelectWidgetOption}</code>.<p> @return the present export files on the server to show in the combo box
[ "Returns", "the", "present", "export", "files", "on", "the", "server", "to", "show", "in", "the", "combo", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/database/CmsDatabaseExportDialog.java#L218-L228
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java
WebApplicationResource.getMimeType
private static String getMimeType(ServletContext context, String path) { // If mimetype is known, use defined mimetype String mimetype = context.getMimeType(path); if (mimetype != null) return mimetype; // Otherwise, default to application/octet-stream return "appli...
java
private static String getMimeType(ServletContext context, String path) { // If mimetype is known, use defined mimetype String mimetype = context.getMimeType(path); if (mimetype != null) return mimetype; // Otherwise, default to application/octet-stream return "appli...
[ "private", "static", "String", "getMimeType", "(", "ServletContext", "context", ",", "String", "path", ")", "{", "// If mimetype is known, use defined mimetype", "String", "mimetype", "=", "context", ".", "getMimeType", "(", "path", ")", ";", "if", "(", "mimetype", ...
Derives a mimetype from the filename within the given path using the given ServletContext, if possible. @param context The ServletContext to use to derive the mimetype. @param path The path to derive the mimetype from. @return An appropriate mimetype based on the name of the file in the path, or "application/octet-s...
[ "Derives", "a", "mimetype", "from", "the", "filename", "within", "the", "given", "path", "using", "the", "given", "ServletContext", "if", "possible", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java#L56-L66
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/YearQuarter.java
YearQuarter.plusQuarters
public YearQuarter plusQuarters(long quartersToAdd) { if (quartersToAdd == 0) { return this; } long quarterCount = year * 4L + (quarter.getValue() - 1); long calcQuarters = quarterCount + quartersToAdd; // safe overflow int newYear = YEAR.checkValidIntValue(Math.floo...
java
public YearQuarter plusQuarters(long quartersToAdd) { if (quartersToAdd == 0) { return this; } long quarterCount = year * 4L + (quarter.getValue() - 1); long calcQuarters = quarterCount + quartersToAdd; // safe overflow int newYear = YEAR.checkValidIntValue(Math.floo...
[ "public", "YearQuarter", "plusQuarters", "(", "long", "quartersToAdd", ")", "{", "if", "(", "quartersToAdd", "==", "0", ")", "{", "return", "this", ";", "}", "long", "quarterCount", "=", "year", "*", "4L", "+", "(", "quarter", ".", "getValue", "(", ")", ...
Returns a copy of this year-quarter with the specified period in quarters added. <p> This instance is immutable and unaffected by this method call. @param quartersToAdd the quarters to add, may be negative @return a {@code YearQuarter} based on this year-quarter with the quarters added, not null @throws DateTimeExcep...
[ "Returns", "a", "copy", "of", "this", "year", "-", "quarter", "with", "the", "specified", "period", "in", "quarters", "added", ".", "<p", ">", "This", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/YearQuarter.java#L865-L874
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java
SDLoss.sigmoidCrossEntropy
public SDVariable sigmoidCrossEntropy(String name, @NonNull SDVariable label, @NonNull SDVariable predictions) { return sigmoidCrossEntropy(name, label, predictions, null, LossReduce.MEAN_BY_NONZERO_WEIGHT_COUNT, SigmoidCrossEntropyLoss.DEFAULT_LABEL_SMOOTHING); }
java
public SDVariable sigmoidCrossEntropy(String name, @NonNull SDVariable label, @NonNull SDVariable predictions) { return sigmoidCrossEntropy(name, label, predictions, null, LossReduce.MEAN_BY_NONZERO_WEIGHT_COUNT, SigmoidCrossEntropyLoss.DEFAULT_LABEL_SMOOTHING); }
[ "public", "SDVariable", "sigmoidCrossEntropy", "(", "String", "name", ",", "@", "NonNull", "SDVariable", "label", ",", "@", "NonNull", "SDVariable", "predictions", ")", "{", "return", "sigmoidCrossEntropy", "(", "name", ",", "label", ",", "predictions", ",", "nu...
See {@link #sigmoidCrossEntropy(String, SDVariable, SDVariable, SDVariable, LossReduce, double)}.
[ "See", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDLoss.java#L393-L395
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detdesc/FactoryDetectDescribe.java
FactoryDetectDescribe.surfColorFast
public static <T extends ImageGray<T>, II extends ImageGray<II>> DetectDescribePoint<T,BrightFeature> surfColorFast( @Nullable ConfigFastHessian configDetector , @Nullable ConfigSurfDescribe.Speed configDesc, @Nullable ConfigAverageIntegral configOrientation, ImageType<T> imag...
java
public static <T extends ImageGray<T>, II extends ImageGray<II>> DetectDescribePoint<T,BrightFeature> surfColorFast( @Nullable ConfigFastHessian configDetector , @Nullable ConfigSurfDescribe.Speed configDesc, @Nullable ConfigAverageIntegral configOrientation, ImageType<T> imag...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "II", "extends", "ImageGray", "<", "II", ">", ">", "DetectDescribePoint", "<", "T", ",", "BrightFeature", ">", "surfColorFast", "(", "@", "Nullable", "ConfigFastHessian", "configDetector...
<p> Color version of SURF stable. Features are detected in a gray scale image, but the descriptors are computed using a color image. Each band in the page adds to the descriptor length. See {@link DetectDescribeSurfPlanar} for details. </p> @see FastHessianFeatureDetector @see DescribePointSurf @see DescribePointSu...
[ "<p", ">", "Color", "version", "of", "SURF", "stable", ".", "Features", "are", "detected", "in", "a", "gray", "scale", "image", "but", "the", "descriptors", "are", "computed", "using", "a", "color", "image", ".", "Each", "band", "in", "the", "page", "add...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detdesc/FactoryDetectDescribe.java#L153-L176
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSceneObject.java
GVRSceneObject.forAllComponents
public void forAllComponents(ComponentVisitor visitor, long componentType) { synchronized (mComponents) { GVRComponent comp = getComponent(componentType); if ((comp != null) && !visitor.visit(comp)) { return; } } synchronize...
java
public void forAllComponents(ComponentVisitor visitor, long componentType) { synchronized (mComponents) { GVRComponent comp = getComponent(componentType); if ((comp != null) && !visitor.visit(comp)) { return; } } synchronize...
[ "public", "void", "forAllComponents", "(", "ComponentVisitor", "visitor", ",", "long", "componentType", ")", "{", "synchronized", "(", "mComponents", ")", "{", "GVRComponent", "comp", "=", "getComponent", "(", "componentType", ")", ";", "if", "(", "(", "comp", ...
Visits all the components of the specified type attached to the descendants of this scene object. The ComponentVisitor.visit function is called for every eligible component of each descendant until it returns false. This allows you to traverse the scene graph safely without copying it. This method gives much better per...
[ "Visits", "all", "the", "components", "of", "the", "specified", "type", "attached", "to", "the", "descendants", "of", "this", "scene", "object", ".", "The", "ComponentVisitor", ".", "visit", "function", "is", "called", "for", "every", "eligible", "component", ...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRSceneObject.java#L872-L889
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeLong.java
RedBlackTreeLong.get
public Node<T> get(long value) { if (root == null) return null; if (value == first.value) return first; if (value == last.value) return last; if (value < first.value) return null; if (value > last.value) return null; return get(root, value); }
java
public Node<T> get(long value) { if (root == null) return null; if (value == first.value) return first; if (value == last.value) return last; if (value < first.value) return null; if (value > last.value) return null; return get(root, value); }
[ "public", "Node", "<", "T", ">", "get", "(", "long", "value", ")", "{", "if", "(", "root", "==", "null", ")", "return", "null", ";", "if", "(", "value", "==", "first", ".", "value", ")", "return", "first", ";", "if", "(", "value", "==", "last", ...
Returns the node associated to the given key, or null if no such key exists.
[ "Returns", "the", "node", "associated", "to", "the", "given", "key", "or", "null", "if", "no", "such", "key", "exists", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeLong.java#L67-L74
dbracewell/mango
src/main/java/com/davidbracewell/conversion/Val.java
Val.asClass
@SuppressWarnings("unchecked") public <T> Class<T> asClass(Class<T> defaultValue) { return as(Class.class, defaultValue); }
java
@SuppressWarnings("unchecked") public <T> Class<T> asClass(Class<T> defaultValue) { return as(Class.class, defaultValue); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "Class", "<", "T", ">", "asClass", "(", "Class", "<", "T", ">", "defaultValue", ")", "{", "return", "as", "(", "Class", ".", "class", ",", "defaultValue", ")", ";", "}" ]
As class. @param <T> the type parameter @param defaultValue the default value @return The object as a class
[ "As", "class", "." ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/conversion/Val.java#L382-L385
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/zip/Zipper.java
Zipper.zipFiles
private void zipFiles(final File file, ZipOutputStream zos) throws IOException { if (file.isDirectory()) { File[] fList; List<File> foundedFiles; if (null != this.fileFilter) { final File[] tmpfList = file.listFiles(this.fileFilter); final List<File> foundedDirs = FileSearchExtensions.listDirs(...
java
private void zipFiles(final File file, ZipOutputStream zos) throws IOException { if (file.isDirectory()) { File[] fList; List<File> foundedFiles; if (null != this.fileFilter) { final File[] tmpfList = file.listFiles(this.fileFilter); final List<File> foundedDirs = FileSearchExtensions.listDirs(...
[ "private", "void", "zipFiles", "(", "final", "File", "file", ",", "ZipOutputStream", "zos", ")", "throws", "IOException", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "File", "[", "]", "fList", ";", "List", "<", "File", ">", "founded...
Zip files. @param file the file @throws IOException Signals that an I/O exception has occurred.
[ "Zip", "files", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/zip/Zipper.java#L193-L243
code4everything/util
src/main/java/com/zhazhapan/util/DateUtils.java
DateUtils.add
public static Date add(String date, int field, int amount) throws ParseException { return add(Formatter.stringToDatetime(date), field, amount); }
java
public static Date add(String date, int field, int amount) throws ParseException { return add(Formatter.stringToDatetime(date), field, amount); }
[ "public", "static", "Date", "add", "(", "String", "date", ",", "int", "field", ",", "int", "amount", ")", "throws", "ParseException", "{", "return", "add", "(", "Formatter", ".", "stringToDatetime", "(", "date", ")", ",", "field", ",", "amount", ")", ";"...
日期添加 @param date 日期 @param field 添加区域 {@link Calendar#DATE} {@link Calendar#MONTH} {@link Calendar#YEAR} @param amount 数量 @return 添加后的日期 @throws ParseException 异常
[ "日期添加" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/DateUtils.java#L512-L514
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/http/HttpUtil.java
HttpUtil.getBytes
public static byte[] getBytes(InputStream in) { ByteArrayOutputStream os = new ByteArrayOutputStream(); WritableByteChannel wbc = Channels.newChannel(os); ReadableByteChannel rbc = Channels.newChannel(in); ByteBuffer byteBuffer = ByteBuffer.allocate(1024); try { while...
java
public static byte[] getBytes(InputStream in) { ByteArrayOutputStream os = new ByteArrayOutputStream(); WritableByteChannel wbc = Channels.newChannel(os); ReadableByteChannel rbc = Channels.newChannel(in); ByteBuffer byteBuffer = ByteBuffer.allocate(1024); try { while...
[ "public", "static", "byte", "[", "]", "getBytes", "(", "InputStream", "in", ")", "{", "ByteArrayOutputStream", "os", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "WritableByteChannel", "wbc", "=", "Channels", ".", "newChannel", "(", "os", ")", ";", "R...
Converts an {@link InputStream} to a byte array @param in input stream to convert @return byte array
[ "Converts", "an", "{" ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/http/HttpUtil.java#L108-L125
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java
CommerceTierPriceEntryPersistenceImpl.removeByC_LtM
@Override public void removeByC_LtM(long commercePriceEntryId, int minQuantity) { for (CommerceTierPriceEntry commerceTierPriceEntry : findByC_LtM( commercePriceEntryId, minQuantity, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceTierPriceEntry); } }
java
@Override public void removeByC_LtM(long commercePriceEntryId, int minQuantity) { for (CommerceTierPriceEntry commerceTierPriceEntry : findByC_LtM( commercePriceEntryId, minQuantity, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceTierPriceEntry); } }
[ "@", "Override", "public", "void", "removeByC_LtM", "(", "long", "commercePriceEntryId", ",", "int", "minQuantity", ")", "{", "for", "(", "CommerceTierPriceEntry", "commerceTierPriceEntry", ":", "findByC_LtM", "(", "commercePriceEntryId", ",", "minQuantity", ",", "Que...
Removes all the commerce tier price entries where commercePriceEntryId = &#63; and minQuantity &le; &#63; from the database. @param commercePriceEntryId the commerce price entry ID @param minQuantity the min quantity
[ "Removes", "all", "the", "commerce", "tier", "price", "entries", "where", "commercePriceEntryId", "=", "&#63", ";", "and", "minQuantity", "&le", ";", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java#L3744-L3751
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.listCertificatesWithServiceResponseAsync
public Observable<ServiceResponse<Page<AppServiceCertificateResourceInner>>> listCertificatesWithServiceResponseAsync(final String resourceGroupName, final String certificateOrderName) { return listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName) .concatMap(new Func1<ServiceRespo...
java
public Observable<ServiceResponse<Page<AppServiceCertificateResourceInner>>> listCertificatesWithServiceResponseAsync(final String resourceGroupName, final String certificateOrderName) { return listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName) .concatMap(new Func1<ServiceRespo...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "AppServiceCertificateResourceInner", ">", ">", ">", "listCertificatesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "certificateOrderName", ")", "{", "retur...
List all certificates associated with a certificate order. List all certificates associated with a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail ...
[ "List", "all", "certificates", "associated", "with", "a", "certificate", "order", ".", "List", "all", "certificates", "associated", "with", "a", "certificate", "order", "." ]
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/AppServiceCertificateOrdersInner.java#L1022-L1034
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/KnIPDeviceMgmtAdapter.java
KnIPDeviceMgmtAdapter.setProperty
public void setProperty(int objIndex, int pid, int start, int elements, byte[] data) throws KNXTimeoutException, KNXRemoteException, KNXConnectionClosedException { if (closed) throw new KNXIllegalStateException("adapter closed"); conn.send(new CEMIDevMgmt(CEMIDevMgmt.MC_PROPWRITE_REQ, getObjectType(objIn...
java
public void setProperty(int objIndex, int pid, int start, int elements, byte[] data) throws KNXTimeoutException, KNXRemoteException, KNXConnectionClosedException { if (closed) throw new KNXIllegalStateException("adapter closed"); conn.send(new CEMIDevMgmt(CEMIDevMgmt.MC_PROPWRITE_REQ, getObjectType(objIn...
[ "public", "void", "setProperty", "(", "int", "objIndex", ",", "int", "pid", ",", "int", "start", ",", "int", "elements", ",", "byte", "[", "]", "data", ")", "throws", "KNXTimeoutException", ",", "KNXRemoteException", ",", "KNXConnectionClosedException", "{", "...
/* (non-Javadoc) @see tuwien.auto.calimero.mgmt.PropertyAdapter#setProperty (int, int, int, int, byte[])
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/KnIPDeviceMgmtAdapter.java#L195-L203
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java
SourceTreeManager.parseToNode
public int parseToNode(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { try { Object xowner = xctxt.getOwnerObject(); DTM dtm; if(null != xowner && xowner instanceof org.apache.xml.dtm.DTMWSFilter) { dtm = xctxt.getDTM(sou...
java
public int parseToNode(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { try { Object xowner = xctxt.getOwnerObject(); DTM dtm; if(null != xowner && xowner instanceof org.apache.xml.dtm.DTMWSFilter) { dtm = xctxt.getDTM(sou...
[ "public", "int", "parseToNode", "(", "Source", "source", ",", "SourceLocator", "locator", ",", "XPathContext", "xctxt", ")", "throws", "TransformerException", "{", "try", "{", "Object", "xowner", "=", "xctxt", ".", "getOwnerObject", "(", ")", ";", "DTM", "dtm"...
Try to create a DOM source tree from the input source. @param source The Source object that identifies the source node. @param locator The location of the caller, for diagnostic purposes. @return non-null reference to node identified by the source argument. @throws TransformerException if the source argument can not...
[ "Try", "to", "create", "a", "DOM", "source", "tree", "from", "the", "input", "source", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L300-L325
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/internal/util/json/FbBotMillJsonUtils.java
FbBotMillJsonUtils.fromJson
public static <T> T fromJson(String json, Class<T> T) { return getGson().fromJson(json, T); }
java
public static <T> T fromJson(String json, Class<T> T) { return getGson().fromJson(json, T); }
[ "public", "static", "<", "T", ">", "T", "fromJson", "(", "String", "json", ",", "Class", "<", "T", ">", "T", ")", "{", "return", "getGson", "(", ")", ".", "fromJson", "(", "json", ",", "T", ")", ";", "}" ]
From json. @param <T> the generic type @param json the string from which the object is to be deserialized. @param T the type of the desired object. @return an object of type T from the string. Returns null if json is null. @see Gson#fromJson(String, Class)
[ "From", "json", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/internal/util/json/FbBotMillJsonUtils.java#L109-L111
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java
NetworkServiceRecordAgent.getVNFDependency
@Help( help = "Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id" ) public VNFRecordDependency getVNFDependency(final String idNsr, final String idVnfrDep) throws SDKException { String url = idNsr + "/vnfdependencies" + "/" + idVnfrDep; return (VNFR...
java
@Help( help = "Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id" ) public VNFRecordDependency getVNFDependency(final String idNsr, final String idVnfrDep) throws SDKException { String url = idNsr + "/vnfdependencies" + "/" + idVnfrDep; return (VNFR...
[ "@", "Help", "(", "help", "=", "\"Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id\"", ")", "public", "VNFRecordDependency", "getVNFDependency", "(", "final", "String", "idNsr", ",", "final", "String", "idVnfrDep", ")", "throws", "SDK...
Returns a specific VNFRecordDependency from a particular NetworkServiceRecord. @param idNsr the ID of the NetworkServiceRecord @param idVnfrDep the ID of the requested VNFRecordDependency @return the VNFRecordDependency @throws SDKException if the request fails
[ "Returns", "a", "specific", "VNFRecordDependency", "from", "a", "particular", "NetworkServiceRecord", "." ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java#L432-L440
alibaba/otter
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java
ObjectProfiler.sizedelta
public static long sizedelta(final Object base, final Object obj) { if (null == obj || isSharedFlyweight(obj)) { return 0; } if (null == base) { throw new IllegalArgumentException("null input: base"); } final IdentityHashMap visited = new IdentityHashMap(...
java
public static long sizedelta(final Object base, final Object obj) { if (null == obj || isSharedFlyweight(obj)) { return 0; } if (null == base) { throw new IllegalArgumentException("null input: base"); } final IdentityHashMap visited = new IdentityHashMap(...
[ "public", "static", "long", "sizedelta", "(", "final", "Object", "base", ",", "final", "Object", "obj", ")", "{", "if", "(", "null", "==", "obj", "||", "isSharedFlyweight", "(", "obj", ")", ")", "{", "return", "0", ";", "}", "if", "(", "null", "==", ...
Estimates the full size of the object graph rooted at 'obj' by pre-populating the "visited" set with the object graph rooted at 'base'. The net effect is to compute the size of 'obj' by summing over all instance data contained in 'obj' but not in 'base'. @param base graph boundary [may not be null] @param obj input ob...
[ "Estimates", "the", "full", "size", "of", "the", "object", "graph", "rooted", "at", "obj", "by", "pre", "-", "populating", "the", "visited", "set", "with", "the", "object", "graph", "rooted", "at", "base", ".", "The", "net", "effect", "is", "to", "comput...
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java#L116-L140
UrielCh/ovh-java-sdk
ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java
ApiOvhCaascontainers.serviceName_slaves_slaveId_GET
public OvhSlave serviceName_slaves_slaveId_GET(String serviceName, String slaveId) throws IOException { String qPath = "/caas/containers/{serviceName}/slaves/{slaveId}"; StringBuilder sb = path(qPath, serviceName, slaveId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSlave.c...
java
public OvhSlave serviceName_slaves_slaveId_GET(String serviceName, String slaveId) throws IOException { String qPath = "/caas/containers/{serviceName}/slaves/{slaveId}"; StringBuilder sb = path(qPath, serviceName, slaveId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSlave.c...
[ "public", "OvhSlave", "serviceName_slaves_slaveId_GET", "(", "String", "serviceName", ",", "String", "slaveId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/caas/containers/{serviceName}/slaves/{slaveId}\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Inspect the argument user slave instance REST: GET /caas/containers/{serviceName}/slaves/{slaveId} @param slaveId [required] slave id @param serviceName [required] service name API beta
[ "Inspect", "the", "argument", "user", "slave", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java#L247-L252