repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
jvirtanen/config-extras
src/main/java/org/jvirtanen/config/Configs.java
Configs.getPort
public static int getPort(Config config, String path) { try { return new InetSocketAddress(config.getInt(path)).getPort(); } catch (IllegalArgumentException e) { throw badValue(e, config, path); } }
java
public static int getPort(Config config, String path) { try { return new InetSocketAddress(config.getInt(path)).getPort(); } catch (IllegalArgumentException e) { throw badValue(e, config, path); } }
[ "public", "static", "int", "getPort", "(", "Config", "config", ",", "String", "path", ")", "{", "try", "{", "return", "new", "InetSocketAddress", "(", "config", ".", "getInt", "(", "path", ")", ")", ".", "getPort", "(", ")", ";", "}", "catch", "(", "...
Get a port number. @param config a configuration object @param path the path expression @return a port number @throws ConfigException.Missing if the value is absent or null @throws ConfigException.WrongType if the value is not convertible to an integer @throws ConfigException.BadValue if the value is outside the port ...
[ "Get", "a", "port", "number", "." ]
train
https://github.com/jvirtanen/config-extras/blob/eba3cff680c302fe07625dc8046f0bd4a56b9fc3/src/main/java/org/jvirtanen/config/Configs.java#L76-L82
Cornutum/tcases
tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java
SystemInputJson.asSystemInputDef
public static SystemInputDef asSystemInputDef( JsonObject json) { String systemName = json.getString( SYSTEM_KEY); try { SystemInputDef systemInputDef = new SystemInputDef( validIdentifier( systemName)); // Get system annotations Optional.ofNullable( json.getJsonObject( HAS_KE...
java
public static SystemInputDef asSystemInputDef( JsonObject json) { String systemName = json.getString( SYSTEM_KEY); try { SystemInputDef systemInputDef = new SystemInputDef( validIdentifier( systemName)); // Get system annotations Optional.ofNullable( json.getJsonObject( HAS_KE...
[ "public", "static", "SystemInputDef", "asSystemInputDef", "(", "JsonObject", "json", ")", "{", "String", "systemName", "=", "json", ".", "getString", "(", "SYSTEM_KEY", ")", ";", "try", "{", "SystemInputDef", "systemInputDef", "=", "new", "SystemInputDef", "(", ...
Returns the SystemInputDef represented by the given JSON object.
[ "Returns", "the", "SystemInputDef", "represented", "by", "the", "given", "JSON", "object", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-io/src/main/java/org/cornutum/tcases/io/SystemInputJson.java#L176-L198
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/StringUtils.java
StringUtils.toCharCount
public static String toCharCount(final String aString, final int aCount) { final StringBuilder builder = new StringBuilder(); final String[] words = aString.split("\\s"); int count = 0; for (final String word : words) { count += word.length(); if (count < aCount...
java
public static String toCharCount(final String aString, final int aCount) { final StringBuilder builder = new StringBuilder(); final String[] words = aString.split("\\s"); int count = 0; for (final String word : words) { count += word.length(); if (count < aCount...
[ "public", "static", "String", "toCharCount", "(", "final", "String", "aString", ",", "final", "int", "aCount", ")", "{", "final", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "final", "String", "[", "]", "words", "=", "aString", ...
Formats a string with or without line breaks into a string with lines with less than a supplied number of characters per line. @param aString A string to format @param aCount A number of characters to allow per line @return A string formatted using the supplied count
[ "Formats", "a", "string", "with", "or", "without", "line", "breaks", "into", "a", "string", "with", "lines", "with", "less", "than", "a", "supplied", "number", "of", "characters", "per", "line", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/StringUtils.java#L207-L231
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.getByResourceGroup
public AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); }
java
public AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); }
[ "public", "AppServiceCertificateOrderInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "certificateOrderName", ")", ".", "toBl...
Get a certificate order. Get 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 the validation @throws DefaultErrorResponseException thrown if the ...
[ "Get", "a", "certificate", "order", ".", "Get", "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#L503-L505
infinispan/infinispan
core/src/main/java/org/infinispan/metadata/Metadatas.java
Metadatas.updateMetadata
public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) { if (entry != null && providedMetadata != null) { Metadata mergedMetadata; if (entry.getMetadata() == null) { mergedMetadata = providedMetadata; } else { mergedMetadata = applyVersion...
java
public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) { if (entry != null && providedMetadata != null) { Metadata mergedMetadata; if (entry.getMetadata() == null) { mergedMetadata = providedMetadata; } else { mergedMetadata = applyVersion...
[ "public", "static", "void", "updateMetadata", "(", "CacheEntry", "entry", ",", "Metadata", "providedMetadata", ")", "{", "if", "(", "entry", "!=", "null", "&&", "providedMetadata", "!=", "null", ")", "{", "Metadata", "mergedMetadata", ";", "if", "(", "entry", ...
Set the {@code providedMetadata} on the cache entry. If the entry already has a version, copy the version in the new metadata.
[ "Set", "the", "{", "@code", "providedMetadata", "}", "on", "the", "cache", "entry", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/metadata/Metadatas.java#L41-L51
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/Utils.java
Utils.createUrl
public static URL createUrl(String url) { try { return new URL(url); } catch (MalformedURLException e) { throw new SdkClientException("Could not create URL: " + url, e); } }
java
public static URL createUrl(String url) { try { return new URL(url); } catch (MalformedURLException e) { throw new SdkClientException("Could not create URL: " + url, e); } }
[ "public", "static", "URL", "createUrl", "(", "String", "url", ")", "{", "try", "{", "return", "new", "URL", "(", "url", ")", ";", "}", "catch", "(", "MalformedURLException", "e", ")", "{", "throw", "new", "SdkClientException", "(", "\"Could not create URL: \...
Helper method to create a {@link URL} without dealing with a checked exception. @param url String URL. @return {@link URL} object.
[ "Helper", "method", "to", "create", "a", "{", "@link", "URL", "}", "without", "dealing", "with", "a", "checked", "exception", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/message/Utils.java#L39-L45
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/BitmapUtil.java
BitmapUtil.clipCircle
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size, final int borderWidth, @ColorInt final int borderColor) { Condition.INSTANCE.ensureAtLeast(borderWidth, 0, "The border width must be at least 0"); Bitmap clippedBitmap = clipCircle(bitmap, s...
java
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size, final int borderWidth, @ColorInt final int borderColor) { Condition.INSTANCE.ensureAtLeast(borderWidth, 0, "The border width must be at least 0"); Bitmap clippedBitmap = clipCircle(bitmap, s...
[ "public", "static", "Bitmap", "clipCircle", "(", "@", "NonNull", "final", "Bitmap", "bitmap", ",", "final", "int", "size", ",", "final", "int", "borderWidth", ",", "@", "ColorInt", "final", "int", "borderColor", ")", "{", "Condition", ".", "INSTANCE", ".", ...
Clips the corners of a bitmap in order to transform it into a round shape. Additionally, the bitmap is resized to a specific size and a border will be added. Bitmaps, whose width and height are not equal, will be clipped to a square beforehand. @param bitmap The bitmap, which should be clipped, as an instance of the c...
[ "Clips", "the", "corners", "of", "a", "bitmap", "in", "order", "to", "transform", "it", "into", "a", "round", "shape", ".", "Additionally", "the", "bitmap", "is", "resized", "to", "a", "specific", "size", "and", "a", "border", "will", "be", "added", ".",...
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/BitmapUtil.java#L191-L219
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java
WeeklyAutoScalingSchedule.withSaturday
public WeeklyAutoScalingSchedule withSaturday(java.util.Map<String, String> saturday) { setSaturday(saturday); return this; }
java
public WeeklyAutoScalingSchedule withSaturday(java.util.Map<String, String> saturday) { setSaturday(saturday); return this; }
[ "public", "WeeklyAutoScalingSchedule", "withSaturday", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "saturday", ")", "{", "setSaturday", "(", "saturday", ")", ";", "return", "this", ";", "}" ]
<p> The schedule for Saturday. </p> @param saturday The schedule for Saturday. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "schedule", "for", "Saturday", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java#L457-L460
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/sjavac/Source.java
Source.hasFileMatch
static private boolean hasFileMatch(String path, List<String> patterns) { path = Util.normalizeDriveLetter(path); for (String p : patterns) { // Exact match if (p.equals(path)) { return true; } // Single dot the end matches this package and...
java
static private boolean hasFileMatch(String path, List<String> patterns) { path = Util.normalizeDriveLetter(path); for (String p : patterns) { // Exact match if (p.equals(path)) { return true; } // Single dot the end matches this package and...
[ "static", "private", "boolean", "hasFileMatch", "(", "String", "path", ",", "List", "<", "String", ">", "patterns", ")", "{", "path", "=", "Util", ".", "normalizeDriveLetter", "(", "path", ")", ";", "for", "(", "String", "p", ":", "patterns", ")", "{", ...
The pattern */bar.java matches foo/bar.java and zoo/bar.java etc
[ "The", "pattern", "*", "/", "bar", ".", "java", "matches", "foo", "/", "bar", ".", "java", "and", "zoo", "/", "bar", ".", "java", "etc" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Source.java#L253-L271
bsblabs/embed-for-vaadin
com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/util/PropertiesHelper.java
PropertiesHelper.getBooleanProperty
public boolean getBooleanProperty(String key, boolean defaultValue) { final String value = properties.getProperty(key, String.valueOf(defaultValue)); return Boolean.valueOf(value); }
java
public boolean getBooleanProperty(String key, boolean defaultValue) { final String value = properties.getProperty(key, String.valueOf(defaultValue)); return Boolean.valueOf(value); }
[ "public", "boolean", "getBooleanProperty", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "final", "String", "value", "=", "properties", ".", "getProperty", "(", "key", ",", "String", ".", "valueOf", "(", "defaultValue", ")", ")", ";", "retu...
Returns the boolean value for the specified property. If no such key is found, returns the <tt>defaultValue</tt> instead. @param key the key of the property @param defaultValue the default value if no such property is found @return a boolean value @see Properties#getProperty(String, String)
[ "Returns", "the", "boolean", "value", "for", "the", "specified", "property", ".", "If", "no", "such", "key", "is", "found", "returns", "the", "<tt", ">", "defaultValue<", "/", "tt", ">", "instead", "." ]
train
https://github.com/bsblabs/embed-for-vaadin/blob/f902e70def56ab54d287d2600f9c6eef9e66c225/com.bsb.common.vaadin.embed/src/main/java/com/bsb/common/vaadin/embed/util/PropertiesHelper.java#L51-L54
kejunxia/AndroidMvc
library/poke/src/main/java/com/shipdream/lib/poke/util/CommonUtils.java
CommonUtils.areObjectsEqual
public static boolean areObjectsEqual(Object obj1, Object obj2) { boolean equal = false; if(obj1 == null && obj2 == null) { equal = true; } else { if(obj1 != null) { if(obj1.equals(obj2)) { equal = true; } } ...
java
public static boolean areObjectsEqual(Object obj1, Object obj2) { boolean equal = false; if(obj1 == null && obj2 == null) { equal = true; } else { if(obj1 != null) { if(obj1.equals(obj2)) { equal = true; } } ...
[ "public", "static", "boolean", "areObjectsEqual", "(", "Object", "obj1", ",", "Object", "obj2", ")", "{", "boolean", "equal", "=", "false", ";", "if", "(", "obj1", "==", "null", "&&", "obj2", "==", "null", ")", "{", "equal", "=", "true", ";", "}", "e...
Check if the two of the given objects are equal with their {@link Object#equals(Object)} methods. It's safe to pass NULL as the objects, and when they are both NULL they will be considered equal. @param obj1 @param obj2 @return
[ "Check", "if", "the", "two", "of", "the", "given", "objects", "are", "equal", "with", "their", "{" ]
train
https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/poke/src/main/java/com/shipdream/lib/poke/util/CommonUtils.java#L28-L40
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/CorruptReplicasMap.java
CorruptReplicasMap.addToCorruptReplicasMap
public boolean addToCorruptReplicasMap(Block blk, DatanodeDescriptor dn) { Collection<DatanodeDescriptor> nodes = getNodes(blk); if (nodes == null) { nodes = new TreeSet<DatanodeDescriptor>(); corruptReplicasMap.put(blk, nodes); } boolean added = false; if (!nodes.contains(dn)) { a...
java
public boolean addToCorruptReplicasMap(Block blk, DatanodeDescriptor dn) { Collection<DatanodeDescriptor> nodes = getNodes(blk); if (nodes == null) { nodes = new TreeSet<DatanodeDescriptor>(); corruptReplicasMap.put(blk, nodes); } boolean added = false; if (!nodes.contains(dn)) { a...
[ "public", "boolean", "addToCorruptReplicasMap", "(", "Block", "blk", ",", "DatanodeDescriptor", "dn", ")", "{", "Collection", "<", "DatanodeDescriptor", ">", "nodes", "=", "getNodes", "(", "blk", ")", ";", "if", "(", "nodes", "==", "null", ")", "{", "nodes",...
Mark the block belonging to datanode as corrupt. @param blk Block to be added to CorruptReplicasMap @param dn DatanodeDescriptor which holds the corrupt replica @return if the block gets added or not
[ "Mark", "the", "block", "belonging", "to", "datanode", "as", "corrupt", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/CorruptReplicasMap.java#L46-L67
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java
UpgradableLock.tryLockForUpgrade
public final boolean tryLockForUpgrade(L locker, long timeout, TimeUnit unit) throws InterruptedException { return tryLockForUpgrade_(locker, timeout, unit) != Result.FAILED; }
java
public final boolean tryLockForUpgrade(L locker, long timeout, TimeUnit unit) throws InterruptedException { return tryLockForUpgrade_(locker, timeout, unit) != Result.FAILED; }
[ "public", "final", "boolean", "tryLockForUpgrade", "(", "L", "locker", ",", "long", "timeout", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "return", "tryLockForUpgrade_", "(", "locker", ",", "timeout", ",", "unit", ")", "!=", "Result", ...
Attempt to acquire an upgrade lock, waiting a maximum amount of time. @param locker object trying to become lock owner @return true if acquired
[ "Attempt", "to", "acquire", "an", "upgrade", "lock", "waiting", "a", "maximum", "amount", "of", "time", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java#L325-L329
jbundle/jbundle
base/db/client/src/main/java/org/jbundle/base/db/client/ClientTable.java
ClientTable.doSetHandle
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException { boolean bIsOpen = m_bIsOpen; this.checkCacheMode(Boolean.FALSE); // Make sure the cache is set up correctly for this type of query (typically not needed) if (((iHandleType & DBConstants.OBJECT_SOURCE_HAND...
java
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException { boolean bIsOpen = m_bIsOpen; this.checkCacheMode(Boolean.FALSE); // Make sure the cache is set up correctly for this type of query (typically not needed) if (((iHandleType & DBConstants.OBJECT_SOURCE_HAND...
[ "public", "boolean", "doSetHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "boolean", "bIsOpen", "=", "m_bIsOpen", ";", "this", ".", "checkCacheMode", "(", "Boolean", ".", "FALSE", ")", ";", "// Make sure the cac...
Reposition to this record using this bookmark. @param bookmark The handle to use to position the record. @param iHandleType The type of handle (DATA_SOURCE/OBJECT_ID,OBJECT_SOURCE,BOOKMARK). @return - true - record found/false - record not found @exception FILE_NOT_OPEN. @exception DBException File exception.
[ "Reposition", "to", "this", "record", "using", "this", "bookmark", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/client/src/main/java/org/jbundle/base/db/client/ClientTable.java#L459-L495
ebean-orm/ebean-querybean
src/main/java/io/ebean/typequery/TQRootBean.java
TQRootBean.textQueryString
public R textQueryString(String query, TextQueryString options) { peekExprList().textQueryString(query, options); return root; }
java
public R textQueryString(String query, TextQueryString options) { peekExprList().textQueryString(query, options); return root; }
[ "public", "R", "textQueryString", "(", "String", "query", ",", "TextQueryString", "options", ")", "{", "peekExprList", "(", ")", ".", "textQueryString", "(", "query", ",", "options", ")", ";", "return", "root", ";", "}" ]
Add a Text query string expression (document store only). <p> This automatically makes the query a document store query. </p>
[ "Add", "a", "Text", "query", "string", "expression", "(", "document", "store", "only", ")", ".", "<p", ">", "This", "automatically", "makes", "the", "query", "a", "document", "store", "query", ".", "<", "/", "p", ">" ]
train
https://github.com/ebean-orm/ebean-querybean/blob/821650cb817c9c0fdcc97f93408dc79170b12423/src/main/java/io/ebean/typequery/TQRootBean.java#L1421-L1424
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java
PersonGroupPersonsImpl.deleteFace
public void deleteFace(String personGroupId, UUID personId, UUID persistedFaceId) { deleteFaceWithServiceResponseAsync(personGroupId, personId, persistedFaceId).toBlocking().single().body(); }
java
public void deleteFace(String personGroupId, UUID personId, UUID persistedFaceId) { deleteFaceWithServiceResponseAsync(personGroupId, personId, persistedFaceId).toBlocking().single().body(); }
[ "public", "void", "deleteFace", "(", "String", "personGroupId", ",", "UUID", "personId", ",", "UUID", "persistedFaceId", ")", "{", "deleteFaceWithServiceResponseAsync", "(", "personGroupId", ",", "personId", ",", "persistedFaceId", ")", ".", "toBlocking", "(", ")", ...
Delete a face from a person. Relative image for the persisted face will also be deleted. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @param persistedFaceId Id referencing a particular persistedFaceId of an existing face. @throws IllegalArgumentExce...
[ "Delete", "a", "face", "from", "a", "person", ".", "Relative", "image", "for", "the", "persisted", "face", "will", "also", "be", "deleted", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java#L799-L801
konvergeio/cofoja
src/main/java/com/google/java/contract/core/agent/ContractAnalyzer.java
ContractAnalyzer.descArgumentsMatch
@Requires({ "desc1 != null", "desc2 != null", "offset >= 0" }) private boolean descArgumentsMatch(String desc1, String desc2, int offset) { Type[] types1 = Type.getArgumentTypes(desc1); Type[] types2 = Type.getArgumentTypes(desc2); if (types2.length - types1.length != offset) { return...
java
@Requires({ "desc1 != null", "desc2 != null", "offset >= 0" }) private boolean descArgumentsMatch(String desc1, String desc2, int offset) { Type[] types1 = Type.getArgumentTypes(desc1); Type[] types2 = Type.getArgumentTypes(desc2); if (types2.length - types1.length != offset) { return...
[ "@", "Requires", "(", "{", "\"desc1 != null\"", ",", "\"desc2 != null\"", ",", "\"offset >= 0\"", "}", ")", "private", "boolean", "descArgumentsMatch", "(", "String", "desc1", ",", "String", "desc2", ",", "int", "offset", ")", "{", "Type", "[", "]", "types1", ...
Returns {@code true} if the argument descriptors {@code desc1} and {@code desc2} are equal (return type is ignored), ignoring the last {@code offset} parameters of {@code desc2}.
[ "Returns", "{" ]
train
https://github.com/konvergeio/cofoja/blob/6ded58fa05eb5bf85f16353c8dd4c70bee59121a/src/main/java/com/google/java/contract/core/agent/ContractAnalyzer.java#L195-L213
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/metadata/builder/HandlerChainInfoBuilder.java
HandlerChainInfoBuilder.buildHandlerChainsInfoFromAnnotation
public HandlerChainsInfo buildHandlerChainsInfoFromAnnotation(ClassInfo clzInfo, String seiClassName, InfoStore infoStore, QName portQName, QName serviceQName, String bindingID) { HandlerChainsInfo chainsInfo = new HandlerChainsInfo(); HandlerChainAnnotation hcAnn = findHandlerChainAnnotation(clzInfo, ...
java
public HandlerChainsInfo buildHandlerChainsInfoFromAnnotation(ClassInfo clzInfo, String seiClassName, InfoStore infoStore, QName portQName, QName serviceQName, String bindingID) { HandlerChainsInfo chainsInfo = new HandlerChainsInfo(); HandlerChainAnnotation hcAnn = findHandlerChainAnnotation(clzInfo, ...
[ "public", "HandlerChainsInfo", "buildHandlerChainsInfoFromAnnotation", "(", "ClassInfo", "clzInfo", ",", "String", "seiClassName", ",", "InfoStore", "infoStore", ",", "QName", "portQName", ",", "QName", "serviceQName", ",", "String", "bindingID", ")", "{", "HandlerChain...
Get the handlerChainsInfo from @HandlerChain @param clz @param portQName @param serviceQName @param bindingID @return
[ "Get", "the", "handlerChainsInfo", "from", "@HandlerChain" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/metadata/builder/HandlerChainInfoBuilder.java#L162-L173
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/parallel/AbstractParallelVisualization.java
AbstractParallelVisualization.setupCanvas
public Element setupCanvas(SVGPlot svgp, ProjectionParallel proj, double width, double height) { Element layer = SVGUtil.svgElement(svgp.getDocument(), SVGConstants.SVG_G_TAG); final String transform = SVGUtil.makeMarginTransform(width, height, size[0], size[1], margins[0], margins[1], margins[2], margins[3]); ...
java
public Element setupCanvas(SVGPlot svgp, ProjectionParallel proj, double width, double height) { Element layer = SVGUtil.svgElement(svgp.getDocument(), SVGConstants.SVG_G_TAG); final String transform = SVGUtil.makeMarginTransform(width, height, size[0], size[1], margins[0], margins[1], margins[2], margins[3]); ...
[ "public", "Element", "setupCanvas", "(", "SVGPlot", "svgp", ",", "ProjectionParallel", "proj", ",", "double", "width", ",", "double", "height", ")", "{", "Element", "layer", "=", "SVGUtil", ".", "svgElement", "(", "svgp", ".", "getDocument", "(", ")", ",", ...
Utility function to setup a canvas element for the visualization. @param svgp Plot element @param proj Projection to use @param width Width @param height Height @return wrapper element with appropriate view box.
[ "Utility", "function", "to", "setup", "a", "canvas", "element", "for", "the", "visualization", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/parallel/AbstractParallelVisualization.java#L107-L112
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.removeByLtE_S
@Override public void removeByLtE_S(Date expirationDate, int status) { for (CommerceDiscount commerceDiscount : findByLtE_S(expirationDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceDiscount); } }
java
@Override public void removeByLtE_S(Date expirationDate, int status) { for (CommerceDiscount commerceDiscount : findByLtE_S(expirationDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceDiscount); } }
[ "@", "Override", "public", "void", "removeByLtE_S", "(", "Date", "expirationDate", ",", "int", "status", ")", "{", "for", "(", "CommerceDiscount", "commerceDiscount", ":", "findByLtE_S", "(", "expirationDate", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ","...
Removes all the commerce discounts where expirationDate &lt; &#63; and status = &#63; from the database. @param expirationDate the expiration date @param status the status
[ "Removes", "all", "the", "commerce", "discounts", "where", "expirationDate", "&lt", ";", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L4423-L4429
thelinmichael/spotify-web-api-java
src/main/java/com/wrapper/spotify/SpotifyApi.java
SpotifyApi.getPlaylistCoverImage
@Deprecated public GetPlaylistCoverImageRequest.Builder getPlaylistCoverImage(String user_id, String playlist_id) { return new GetPlaylistCoverImageRequest.Builder(accessToken) .setDefaults(httpManager, scheme, host, port) .user_id(user_id) .playlist_id(playlist_id); }
java
@Deprecated public GetPlaylistCoverImageRequest.Builder getPlaylistCoverImage(String user_id, String playlist_id) { return new GetPlaylistCoverImageRequest.Builder(accessToken) .setDefaults(httpManager, scheme, host, port) .user_id(user_id) .playlist_id(playlist_id); }
[ "@", "Deprecated", "public", "GetPlaylistCoverImageRequest", ".", "Builder", "getPlaylistCoverImage", "(", "String", "user_id", ",", "String", "playlist_id", ")", "{", "return", "new", "GetPlaylistCoverImageRequest", ".", "Builder", "(", "accessToken", ")", ".", "setD...
Get the image used to represent a specific playlist. @deprecated Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/) @param user_id The users Spotify user ID. @param playlist_id The Spotify ID for the pla...
[ "Get", "the", "image", "used", "to", "represent", "a", "specific", "playlist", "." ]
train
https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L1229-L1235
wisdom-framework/wisdom
core/content-manager/src/main/java/org/wisdom/content/jackson/JacksonSingleton.java
JacksonSingleton.fromInputStream
@Override public Document fromInputStream(InputStream stream, Charset encoding) throws IOException { try { DocumentBuilder builder = factory.newDocumentBuilder(); InputSource is = new InputSource(stream); if (encoding == null) { is.setEncoding(Charsets.UT...
java
@Override public Document fromInputStream(InputStream stream, Charset encoding) throws IOException { try { DocumentBuilder builder = factory.newDocumentBuilder(); InputSource is = new InputSource(stream); if (encoding == null) { is.setEncoding(Charsets.UT...
[ "@", "Override", "public", "Document", "fromInputStream", "(", "InputStream", "stream", ",", "Charset", "encoding", ")", "throws", "IOException", "{", "try", "{", "DocumentBuilder", "builder", "=", "factory", ".", "newDocumentBuilder", "(", ")", ";", "InputSource"...
Builds a new XML Document from the given input stream. The stream is not closed by this method, and so you must close it. @param stream the input stream, must not be {@literal null} @param encoding the encoding, if {@literal null}, UTF-8 is used. @return the built document @throws java.io.IOException if the given st...
[ "Builds", "a", "new", "XML", "Document", "from", "the", "given", "input", "stream", ".", "The", "stream", "is", "not", "closed", "by", "this", "method", "and", "so", "you", "must", "close", "it", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/content-manager/src/main/java/org/wisdom/content/jackson/JacksonSingleton.java#L477-L494
Waikato/moa
moa/src/main/java/moa/classifiers/lazy/neighboursearch/NormalizableDistance.java
NormalizableDistance.initializeRangesEmpty
public void initializeRangesEmpty(int numAtt, double[][] ranges) { for (int j = 0; j < numAtt; j++) { ranges[j][R_MIN] = Double.POSITIVE_INFINITY; ranges[j][R_MAX] = -Double.POSITIVE_INFINITY; ranges[j][R_WIDTH] = Double.POSITIVE_INFINITY; } }
java
public void initializeRangesEmpty(int numAtt, double[][] ranges) { for (int j = 0; j < numAtt; j++) { ranges[j][R_MIN] = Double.POSITIVE_INFINITY; ranges[j][R_MAX] = -Double.POSITIVE_INFINITY; ranges[j][R_WIDTH] = Double.POSITIVE_INFINITY; } }
[ "public", "void", "initializeRangesEmpty", "(", "int", "numAtt", ",", "double", "[", "]", "[", "]", "ranges", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "numAtt", ";", "j", "++", ")", "{", "ranges", "[", "j", "]", "[", "R_MIN", ...
Used to initialize the ranges. @param numAtt number of attributes in the model @param ranges low, high and width values for all attributes
[ "Used", "to", "initialize", "the", "ranges", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/lazy/neighboursearch/NormalizableDistance.java#L546-L552
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java
Utils.copyDocFiles
public void copyDocFiles(Configuration configuration, PackageDoc pd) { Location locn = configuration.getLocationForPackage(pd); copyDocFiles(configuration, locn, DocPath.forPackage(pd).resolve(DocPaths.DOC_FILES)); }
java
public void copyDocFiles(Configuration configuration, PackageDoc pd) { Location locn = configuration.getLocationForPackage(pd); copyDocFiles(configuration, locn, DocPath.forPackage(pd).resolve(DocPaths.DOC_FILES)); }
[ "public", "void", "copyDocFiles", "(", "Configuration", "configuration", ",", "PackageDoc", "pd", ")", "{", "Location", "locn", "=", "configuration", ".", "getLocationForPackage", "(", "pd", ")", ";", "copyDocFiles", "(", "configuration", ",", "locn", ",", "DocP...
Copy the given directory contents from the source package directory to the generated documentation directory. For example for a package java.lang this method find out the source location of the package using {@link SourcePath} and if given directory is found in the source directory structure, copy the entire directory,...
[ "Copy", "the", "given", "directory", "contents", "from", "the", "source", "package", "directory", "to", "the", "generated", "documentation", "directory", ".", "For", "example", "for", "a", "package", "java", ".", "lang", "this", "method", "find", "out", "the",...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/Utils.java#L207-L210
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/Exceptions.java
Exceptions.logIfUnexpected
public static void logIfUnexpected(Logger logger, Channel ch, String debugData, Throwable cause) { if (!logger.isWarnEnabled() || isExpected(cause)) { return; } logger.warn("{} Unexpected exception: {}", ch, debugData, cause); }
java
public static void logIfUnexpected(Logger logger, Channel ch, String debugData, Throwable cause) { if (!logger.isWarnEnabled() || isExpected(cause)) { return; } logger.warn("{} Unexpected exception: {}", ch, debugData, cause); }
[ "public", "static", "void", "logIfUnexpected", "(", "Logger", "logger", ",", "Channel", "ch", ",", "String", "debugData", ",", "Throwable", "cause", ")", "{", "if", "(", "!", "logger", ".", "isWarnEnabled", "(", ")", "||", "isExpected", "(", "cause", ")", ...
Logs the specified exception if it is {@linkplain #isExpected(Throwable) unexpected}.
[ "Logs", "the", "specified", "exception", "if", "it", "is", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/Exceptions.java#L90-L97
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.addComment
public Comment addComment(Object projectIdOrPath, String sha, String note) throws GitLabApiException { return (addComment(projectIdOrPath, sha, note, null, null, null)); }
java
public Comment addComment(Object projectIdOrPath, String sha, String note) throws GitLabApiException { return (addComment(projectIdOrPath, sha, note, null, null, null)); }
[ "public", "Comment", "addComment", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "String", "note", ")", "throws", "GitLabApiException", "{", "return", "(", "addComment", "(", "projectIdOrPath", ",", "sha", ",", "note", ",", "null", ",", "null", ...
Add a comment to a commit. <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @param note the text of the comment, required ...
[ "Add", "a", "comment", "to", "a", "commit", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L547-L549
bluelinelabs/Conductor
conductor/src/main/java/com/bluelinelabs/conductor/Controller.java
Controller.startActivityForResult
public final void startActivityForResult(@NonNull final Intent intent, final int requestCode, @Nullable final Bundle options) { executeWithRouter(new RouterRequiringFunc() { @Override public void execute() { router.startActivityForResult(instanceId, intent, requestCode, options); } }); }
java
public final void startActivityForResult(@NonNull final Intent intent, final int requestCode, @Nullable final Bundle options) { executeWithRouter(new RouterRequiringFunc() { @Override public void execute() { router.startActivityForResult(instanceId, intent, requestCode, options); } }); }
[ "public", "final", "void", "startActivityForResult", "(", "@", "NonNull", "final", "Intent", "intent", ",", "final", "int", "requestCode", ",", "@", "Nullable", "final", "Bundle", "options", ")", "{", "executeWithRouter", "(", "new", "RouterRequiringFunc", "(", ...
Calls startActivityForResult(Intent, int, Bundle) from this Controller's host Activity.
[ "Calls", "startActivityForResult", "(", "Intent", "int", "Bundle", ")", "from", "this", "Controller", "s", "host", "Activity", "." ]
train
https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Controller.java#L522-L526
apache/incubator-heron
heron/common/src/java/org/apache/heron/common/basics/NIOLooper.java
NIOLooper.registerRead
public void registerRead(SelectableChannel channel, ISelectHandler callback) throws ClosedChannelException { assert channel.keyFor(selector) == null || (channel.keyFor(selector).interestOps() & SelectionKey.OP_CONNECT) == 0; addInterest(channel, SelectionKey.OP_READ, callback); }
java
public void registerRead(SelectableChannel channel, ISelectHandler callback) throws ClosedChannelException { assert channel.keyFor(selector) == null || (channel.keyFor(selector).interestOps() & SelectionKey.OP_CONNECT) == 0; addInterest(channel, SelectionKey.OP_READ, callback); }
[ "public", "void", "registerRead", "(", "SelectableChannel", "channel", ",", "ISelectHandler", "callback", ")", "throws", "ClosedChannelException", "{", "assert", "channel", ".", "keyFor", "(", "selector", ")", "==", "null", "||", "(", "channel", ".", "keyFor", "...
Followings are the register, unregister, isRegister for different operations for the selector and channel
[ "Followings", "are", "the", "register", "unregister", "isRegister", "for", "different", "operations", "for", "the", "selector", "and", "channel" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/common/src/java/org/apache/heron/common/basics/NIOLooper.java#L138-L143
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/Drawable.java
Drawable.loadSpriteParallaxed
public static SpriteParallaxed loadSpriteParallaxed(Media media, int linesNumber, int startWidth, int startHeight) { return new SpriteParallaxedImpl(getMediaDpi(media), linesNumber, startWidth, startHeight); }
java
public static SpriteParallaxed loadSpriteParallaxed(Media media, int linesNumber, int startWidth, int startHeight) { return new SpriteParallaxedImpl(getMediaDpi(media), linesNumber, startWidth, startHeight); }
[ "public", "static", "SpriteParallaxed", "loadSpriteParallaxed", "(", "Media", "media", ",", "int", "linesNumber", ",", "int", "startWidth", ",", "int", "startHeight", ")", "{", "return", "new", "SpriteParallaxedImpl", "(", "getMediaDpi", "(", "media", ")", ",", ...
Load a parallaxed sprite, for parallax effect. <p> Once created, sprite must call {@link SpriteParallaxed#load(boolean)} before any other operations. </p> @param media The sprite media (must not be <code>null</code>). @param linesNumber The number of parallax lines. @param startWidth The starting width percent (100 is...
[ "Load", "a", "parallaxed", "sprite", "for", "parallax", "effect", ".", "<p", ">", "Once", "created", "sprite", "must", "call", "{", "@link", "SpriteParallaxed#load", "(", "boolean", ")", "}", "before", "any", "other", "operations", ".", "<", "/", "p", ">" ...
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/Drawable.java#L250-L253
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.accessories_GET
public ArrayList<OvhAccessoryOffer> accessories_GET(OvhNumberCountryEnum country) throws IOException { String qPath = "/telephony/accessories"; StringBuilder sb = path(qPath); query(sb, "country", country); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t19); }
java
public ArrayList<OvhAccessoryOffer> accessories_GET(OvhNumberCountryEnum country) throws IOException { String qPath = "/telephony/accessories"; StringBuilder sb = path(qPath); query(sb, "country", country); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t19); }
[ "public", "ArrayList", "<", "OvhAccessoryOffer", ">", "accessories_GET", "(", "OvhNumberCountryEnum", "country", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/accessories\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";",...
Get all available accessories REST: GET /telephony/accessories @param country [required] The country
[ "Get", "all", "available", "accessories" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8513-L8519
cqyijifu/watcher
watcher-core/src/main/java/com/yiji/framework/watcher/extension/ExtensionLoader.java
ExtensionLoader.load
public <T> void load(ExtensionRepository<T> repository, Class<T> extensionType) { // loadExtensionFromPackage(repository, extensionType, getDefaultScanPackage()); // String customScanPackage = getCustomScanPackage(); // if (!Strings.isNullOrEmpty(customScanPackage)) { // loadExtensionFromPackage(repository, extens...
java
public <T> void load(ExtensionRepository<T> repository, Class<T> extensionType) { // loadExtensionFromPackage(repository, extensionType, getDefaultScanPackage()); // String customScanPackage = getCustomScanPackage(); // if (!Strings.isNullOrEmpty(customScanPackage)) { // loadExtensionFromPackage(repository, extens...
[ "public", "<", "T", ">", "void", "load", "(", "ExtensionRepository", "<", "T", ">", "repository", ",", "Class", "<", "T", ">", "extensionType", ")", "{", "//\t\tloadExtensionFromPackage(repository, extensionType, getDefaultScanPackage());", "//\t\tString customScanPackage =...
加载扩展类到仓储中 @param repository 扩展类存储仓储 @param extensionType 扩展类类型 @param <T> 类型
[ "加载扩展类到仓储中" ]
train
https://github.com/cqyijifu/watcher/blob/9032ede2743de751d8ae4b77ade39726f016457d/watcher-core/src/main/java/com/yiji/framework/watcher/extension/ExtensionLoader.java#L39-L46
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/randomprojection/RPForest.java
RPForest.queryAll
public INDArray queryAll(INDArray toQuery,int n) { return RPUtils.queryAll(toQuery,data,trees,n,similarityFunction); }
java
public INDArray queryAll(INDArray toQuery,int n) { return RPUtils.queryAll(toQuery,data,trees,n,similarityFunction); }
[ "public", "INDArray", "queryAll", "(", "INDArray", "toQuery", ",", "int", "n", ")", "{", "return", "RPUtils", ".", "queryAll", "(", "toQuery", ",", "data", ",", "trees", ",", "n", ",", "similarityFunction", ")", ";", "}" ]
Query results up to length n nearest neighbors @param toQuery the query item @param n the number of nearest neighbors for the given data point @return the indices for the nearest neighbors
[ "Query", "results", "up", "to", "length", "n", "nearest", "neighbors" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nearestneighbors-parent/nearestneighbor-core/src/main/java/org/deeplearning4j/clustering/randomprojection/RPForest.java#L83-L85
hibernate/hibernate-ogm
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/GeoPolygon.java
GeoPolygon.addHole
public GeoPolygon addHole(GeoPoint firstPoint, GeoPoint secondPoint, GeoPoint thirdPoint, GeoPoint fourthPoint, GeoPoint... additionalPoints) { Contracts.assertNotNull( firstPoint, "firstPoint" ); Contracts.assertNotNull( secondPoint, "secondPoint" ); Contracts.assertNotNull( thirdPoint, "thirdPoint" ); Contrac...
java
public GeoPolygon addHole(GeoPoint firstPoint, GeoPoint secondPoint, GeoPoint thirdPoint, GeoPoint fourthPoint, GeoPoint... additionalPoints) { Contracts.assertNotNull( firstPoint, "firstPoint" ); Contracts.assertNotNull( secondPoint, "secondPoint" ); Contracts.assertNotNull( thirdPoint, "thirdPoint" ); Contrac...
[ "public", "GeoPolygon", "addHole", "(", "GeoPoint", "firstPoint", ",", "GeoPoint", "secondPoint", ",", "GeoPoint", "thirdPoint", ",", "GeoPoint", "fourthPoint", ",", "GeoPoint", "...", "additionalPoints", ")", "{", "Contracts", ".", "assertNotNull", "(", "firstPoint...
Adds a new hole to the polygon. @param firstPoint the first point of the polygon @param secondPoint the second point of the polygon @param thirdPoint the third point of the polygon @param fourthPoint the third point of the polygon @param additionalPoints the additional points of the polygon
[ "Adds", "a", "new", "hole", "to", "the", "polygon", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/GeoPolygon.java#L91-L108
banq/jdonframework
JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java
PageIteratorSolver.getPageIterator
public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, Collection queryParams, int startIndex, int count) { Debug.logVerbose("[JdonFramework]enter getPageIterator .. start= " + startIndex + " count=" + count, module); if (queryParams == null) { Debug.logError(" the parameters collection...
java
public PageIterator getPageIterator(String sqlqueryAllCount, String sqlquery, Collection queryParams, int startIndex, int count) { Debug.logVerbose("[JdonFramework]enter getPageIterator .. start= " + startIndex + " count=" + count, module); if (queryParams == null) { Debug.logError(" the parameters collection...
[ "public", "PageIterator", "getPageIterator", "(", "String", "sqlqueryAllCount", ",", "String", "sqlquery", ",", "Collection", "queryParams", ",", "int", "startIndex", ",", "int", "count", ")", "{", "Debug", ".", "logVerbose", "(", "\"[JdonFramework]enter getPageIterat...
get a PageIterator @param sqlqueryAllCount the sql sentence for "select count(1) .." @param sqlquery the sql sentence for "select id from xxxx"; @param queryParams the parameter collection for the sqlquery. @param start the starting number of a page in allCount; @param count the display number of a page @return
[ "get", "a", "PageIterator" ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-jdbc/src/main/java/com/jdon/model/query/PageIteratorSolver.java#L228-L252
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/svg/Gradient.java
Gradient.getColorAt
public Color getColorAt(float p) { if (p <= 0) { return ((Step) steps.get(0)).col; } if (p > 1) { return ((Step) steps.get(steps.size()-1)).col; } for (int i=1;i<steps.size();i++) { Step prev = ((Step) steps.get(i-1)); Step current = ((Step) steps.get(i)); if (p <= current.lo...
java
public Color getColorAt(float p) { if (p <= 0) { return ((Step) steps.get(0)).col; } if (p > 1) { return ((Step) steps.get(steps.size()-1)).col; } for (int i=1;i<steps.size();i++) { Step prev = ((Step) steps.get(i-1)); Step current = ((Step) steps.get(i)); if (p <= current.lo...
[ "public", "Color", "getColorAt", "(", "float", "p", ")", "{", "if", "(", "p", "<=", "0", ")", "{", "return", "(", "(", "Step", ")", "steps", ".", "get", "(", "0", ")", ")", ".", "col", ";", "}", "if", "(", "p", ">", "1", ")", "{", "return",...
Get the intepolated colour at the given location on the gradient @param p The point of the gradient (0 >= n >= 1) @return The interpolated colour at the given location
[ "Get", "the", "intepolated", "colour", "at", "the", "given", "location", "on", "the", "gradient" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/svg/Gradient.java#L236-L265
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java
CommonConfigUtils.getRequiredConfigAttributeWithDefaultValueAndConfigId
public String getRequiredConfigAttributeWithDefaultValueAndConfigId(Map<String, Object> props, String key, String defaultValue, String configId) { String result = getAndTrimConfigAttribute(props, key); if (key != null && result == null) { if (defaultValue != null) { result = ...
java
public String getRequiredConfigAttributeWithDefaultValueAndConfigId(Map<String, Object> props, String key, String defaultValue, String configId) { String result = getAndTrimConfigAttribute(props, key); if (key != null && result == null) { if (defaultValue != null) { result = ...
[ "public", "String", "getRequiredConfigAttributeWithDefaultValueAndConfigId", "(", "Map", "<", "String", ",", "Object", ">", "props", ",", "String", "key", ",", "String", "defaultValue", ",", "String", "configId", ")", "{", "String", "result", "=", "getAndTrimConfigA...
Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned. If the default value is also null, an error message will be logged.
[ "Returns", "the", "value", "for", "the", "configuration", "attribute", "matching", "the", "key", "provided", ".", "If", "the", "value", "does", "not", "exist", "or", "is", "empty", "the", "provided", "default", "value", "will", "be", "returned", ".", "If", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java#L76-L86
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java
ProviderManager.removeExtensionProvider
public static String removeExtensionProvider(String elementName, String namespace) { String key = getKey(elementName, namespace); extensionProviders.remove(key); return key; }
java
public static String removeExtensionProvider(String elementName, String namespace) { String key = getKey(elementName, namespace); extensionProviders.remove(key); return key; }
[ "public", "static", "String", "removeExtensionProvider", "(", "String", "elementName", ",", "String", "namespace", ")", "{", "String", "key", "=", "getKey", "(", "elementName", ",", "namespace", ")", ";", "extensionProviders", ".", "remove", "(", "key", ")", "...
Removes an extension provider with the specified element name and namespace. This method is typically called to cleanup providers that are programmatically added using the {@link #addExtensionProvider(String, String, Object) addExtensionProvider} method. @param elementName the XML element name. @param namespace the XM...
[ "Removes", "an", "extension", "provider", "with", "the", "specified", "element", "name", "and", "namespace", ".", "This", "method", "is", "typically", "called", "to", "cleanup", "providers", "that", "are", "programmatically", "added", "using", "the", "{", "@link...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java#L280-L284
OpenLiberty/open-liberty
dev/com.ibm.ws.anno/src/com/ibm/ws/anno/classsource/internal/ClassSourceImpl_MappedSimple.java
ClassSourceImpl_MappedSimple.openResourceStream
@Override public InputStream openResourceStream(String className, String resourceName) throws ClassSource_Exception { String methodName = "openResourceStream"; if (!isProviderResource(resourceName)) { if (tc.isDebugEnabled()) { Tr.debug(tc, MessageFor...
java
@Override public InputStream openResourceStream(String className, String resourceName) throws ClassSource_Exception { String methodName = "openResourceStream"; if (!isProviderResource(resourceName)) { if (tc.isDebugEnabled()) { Tr.debug(tc, MessageFor...
[ "@", "Override", "public", "InputStream", "openResourceStream", "(", "String", "className", ",", "String", "resourceName", ")", "throws", "ClassSource_Exception", "{", "String", "methodName", "=", "\"openResourceStream\"", ";", "if", "(", "!", "isProviderResource", "(...
<p>Open a stream for a named class which used a named resource.</p> <p>Answer null if the provider does not contain the named resource. See {@link #isProviderResource(String)}.</p> @param className The name of the class which mapped to the resource. @param resourceName The name of the resource used by the class. @re...
[ "<p", ">", "Open", "a", "stream", "for", "a", "named", "class", "which", "used", "a", "named", "resource", ".", "<", "/", "p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.anno/src/com/ibm/ws/anno/classsource/internal/ClassSourceImpl_MappedSimple.java#L510-L560
apache/incubator-druid
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java
ApproximateHistogram.toHistogram
public Histogram toHistogram(final float[] breaks) { final double[] approximateBins = new double[breaks.length - 1]; double prev = sum(breaks[0]); for (int i = 1; i < breaks.length; ++i) { double s = sum(breaks[i]); approximateBins[i - 1] = (float) (s - prev); prev = s; } retur...
java
public Histogram toHistogram(final float[] breaks) { final double[] approximateBins = new double[breaks.length - 1]; double prev = sum(breaks[0]); for (int i = 1; i < breaks.length; ++i) { double s = sum(breaks[i]); approximateBins[i - 1] = (float) (s - prev); prev = s; } retur...
[ "public", "Histogram", "toHistogram", "(", "final", "float", "[", "]", "breaks", ")", "{", "final", "double", "[", "]", "approximateBins", "=", "new", "double", "[", "breaks", ".", "length", "-", "1", "]", ";", "double", "prev", "=", "sum", "(", "break...
Computes a visual representation of the approximate histogram with bins laid out according to the given breaks @param breaks breaks defining the histogram bins @return visual representation of the histogram
[ "Computes", "a", "visual", "representation", "of", "the", "approximate", "histogram", "with", "bins", "laid", "out", "according", "to", "the", "given", "breaks" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogram.java#L1610-L1622
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmptyNoNullValue
public static <T> T [] notEmptyNoNullValue (final T [] aValue, final String sName) { if (isEnabled ()) return notEmptyNoNullValue (aValue, () -> sName); return aValue; }
java
public static <T> T [] notEmptyNoNullValue (final T [] aValue, final String sName) { if (isEnabled ()) return notEmptyNoNullValue (aValue, () -> sName); return aValue; }
[ "public", "static", "<", "T", ">", "T", "[", "]", "notEmptyNoNullValue", "(", "final", "T", "[", "]", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "return", "notEmptyNoNullValue", "(", "aValue", ",", "(", ...
Check that the passed Array is neither <code>null</code> nor empty and that no <code>null</code> value is contained. @param <T> Type to be checked and returned @param aValue The Array to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if th...
[ "Check", "that", "the", "passed", "Array", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "and", "that", "no", "<code", ">", "null<", "/", "code", ">", "value", "is", "contained", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L1180-L1185
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/ServletUtil.java
ServletUtil.getParameter
public static String getParameter(ServletRequest request, String name) { String s = request.getParameter(name); if (s == null) { return null; } s = s.trim(); return s.length() == 0? null: s; }
java
public static String getParameter(ServletRequest request, String name) { String s = request.getParameter(name); if (s == null) { return null; } s = s.trim(); return s.length() == 0? null: s; }
[ "public", "static", "String", "getParameter", "(", "ServletRequest", "request", ",", "String", "name", ")", "{", "String", "s", "=", "request", ".", "getParameter", "(", "name", ")", ";", "if", "(", "s", "==", "null", ")", "{", "return", "null", ";", "...
Get a parameter from a ServletRequest. Return null if the parameter contains only white spaces.
[ "Get", "a", "parameter", "from", "a", "ServletRequest", ".", "Return", "null", "if", "the", "parameter", "contains", "only", "white", "spaces", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/ServletUtil.java#L45-L52
cogroo/cogroo4
cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java
PortugueseSDContextGenerator.previousSpaceIndex
private static final int previousSpaceIndex(CharSequence sb, int seek) { seek--; while (seek > 0 && !StringUtil.isWhitespace(sb.charAt(seek))) { seek--; } if (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek))) { while (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek - 1))) seek...
java
private static final int previousSpaceIndex(CharSequence sb, int seek) { seek--; while (seek > 0 && !StringUtil.isWhitespace(sb.charAt(seek))) { seek--; } if (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek))) { while (seek > 0 && StringUtil.isWhitespace(sb.charAt(seek - 1))) seek...
[ "private", "static", "final", "int", "previousSpaceIndex", "(", "CharSequence", "sb", ",", "int", "seek", ")", "{", "seek", "--", ";", "while", "(", "seek", ">", "0", "&&", "!", "StringUtil", ".", "isWhitespace", "(", "sb", ".", "charAt", "(", "seek", ...
Finds the index of the nearest space before a specified index which is not itself preceded by a space. @param sb The string buffer which contains the text being examined. @param seek The index to begin searching from. @return The index which contains the nearest space.
[ "Finds", "the", "index", "of", "the", "nearest", "space", "before", "a", "specified", "index", "which", "is", "not", "itself", "preceded", "by", "a", "space", "." ]
train
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-nlp/src/main/java/org/cogroo/tools/sentdetect/PortugueseSDContextGenerator.java#L257-L268
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java
HttpRequestFactory.buildGetRequest
public HttpRequest buildGetRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.GET, url, null); }
java
public HttpRequest buildGetRequest(GenericUrl url) throws IOException { return buildRequest(HttpMethods.GET, url, null); }
[ "public", "HttpRequest", "buildGetRequest", "(", "GenericUrl", "url", ")", "throws", "IOException", "{", "return", "buildRequest", "(", "HttpMethods", ".", "GET", ",", "url", ",", "null", ")", ";", "}" ]
Builds a {@code GET} request for the given URL. @param url HTTP request URL or {@code null} for none @return new HTTP request
[ "Builds", "a", "{", "@code", "GET", "}", "request", "for", "the", "given", "URL", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java#L116-L118
geomajas/geomajas-project-client-gwt
plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/widget/CombinedLayertree.java
CombinedLayertree.processNode
protected void processNode(final ClientAbstractNodeInfo treeNode, final TreeNode nodeRoot, final boolean refresh) { // Branches if (null != treeNode && treeNode instanceof ClientBranchNodeInfo) { String treeNodeLabel = ((ClientBranchNodeInfo) treeNode).getLabel(); final TreeNode node = new TreeNode(treeNodeLa...
java
protected void processNode(final ClientAbstractNodeInfo treeNode, final TreeNode nodeRoot, final boolean refresh) { // Branches if (null != treeNode && treeNode instanceof ClientBranchNodeInfo) { String treeNodeLabel = ((ClientBranchNodeInfo) treeNode).getLabel(); final TreeNode node = new TreeNode(treeNodeLa...
[ "protected", "void", "processNode", "(", "final", "ClientAbstractNodeInfo", "treeNode", ",", "final", "TreeNode", "nodeRoot", ",", "final", "boolean", "refresh", ")", "{", "// Branches", "if", "(", "null", "!=", "treeNode", "&&", "treeNode", "instanceof", "ClientB...
Processes a treeNode (add it to the TreeGrid). @param treeNode The treeNode to process @param nodeRoot The root node to which the treeNode has to be added @param refresh True if the tree is refreshed (causing it to keep its expanded state)
[ "Processes", "a", "treeNode", "(", "add", "it", "to", "the", "TreeGrid", ")", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-layer/layer-gwt/src/main/java/org/geomajas/widget/layer/client/widget/CombinedLayertree.java#L115-L140
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsADEManager.java
CmsADEManager.getInheritedContainerState
public CmsInheritedContainerState getInheritedContainerState(CmsObject cms, CmsResource resource, String name) { String rootPath = resource.getRootPath(); if (!resource.isFolder()) { rootPath = CmsResource.getParentFolder(rootPath); } CmsInheritedContainerState result = new ...
java
public CmsInheritedContainerState getInheritedContainerState(CmsObject cms, CmsResource resource, String name) { String rootPath = resource.getRootPath(); if (!resource.isFolder()) { rootPath = CmsResource.getParentFolder(rootPath); } CmsInheritedContainerState result = new ...
[ "public", "CmsInheritedContainerState", "getInheritedContainerState", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "String", "name", ")", "{", "String", "rootPath", "=", "resource", ".", "getRootPath", "(", ")", ";", "if", "(", "!", "resource", ...
Returns the inheritance state for the given inheritance name and resource.<p> @param cms the current cms context @param resource the resource @param name the inheritance name @return the inheritance state
[ "Returns", "the", "inheritance", "state", "for", "the", "given", "inheritance", "name", "and", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsADEManager.java#L661-L675
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/transform/serde/BaseSerializer.java
BaseSerializer.deserializeFilterList
public List<Filter> deserializeFilterList(String str) { return load(str, ListWrappers.FilterList.class).getList(); }
java
public List<Filter> deserializeFilterList(String str) { return load(str, ListWrappers.FilterList.class).getList(); }
[ "public", "List", "<", "Filter", ">", "deserializeFilterList", "(", "String", "str", ")", "{", "return", "load", "(", "str", ",", "ListWrappers", ".", "FilterList", ".", "class", ")", ".", "getList", "(", ")", ";", "}" ]
Deserialize a Filter List serialized using {@link #serializeFilterList(List)}, or an array serialized using {@link #serialize(Filter[])} @param str String representation (YAML/JSON) of the Filter list @return {@code List<Filter>}
[ "Deserialize", "a", "Filter", "List", "serialized", "using", "{", "@link", "#serializeFilterList", "(", "List", ")", "}", "or", "an", "array", "serialized", "using", "{", "@link", "#serialize", "(", "Filter", "[]", ")", "}" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/transform/serde/BaseSerializer.java#L289-L291
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/io/support/PathMatchingResourcePatternResolver.java
PathMatchingResourcePatternResolver.doFindPathMatchingFileResources
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException { File rootDir; try { rootDir = rootDirResource.getFile().getAbsoluteFile(); } catch (IOException ex) { return Collections.emptySet(); ...
java
protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException { File rootDir; try { rootDir = rootDirResource.getFile().getAbsoluteFile(); } catch (IOException ex) { return Collections.emptySet(); ...
[ "protected", "Set", "<", "Resource", ">", "doFindPathMatchingFileResources", "(", "Resource", "rootDirResource", ",", "String", "subPattern", ")", "throws", "IOException", "{", "File", "rootDir", ";", "try", "{", "rootDir", "=", "rootDirResource", ".", "getFile", ...
Find all resources in the file system that match the given location pattern via the Ant-style PathMatcher. @param rootDirResource the root directory as Resource @param subPattern the sub pattern to match (below the root directory) @return the Set of matching Resource instances @throws IOException in case of I/O e...
[ "Find", "all", "resources", "in", "the", "file", "system", "that", "match", "the", "given", "location", "pattern", "via", "the", "Ant", "-", "style", "PathMatcher", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/io/support/PathMatchingResourcePatternResolver.java#L467-L477
zaproxy/zaproxy
src/org/parosproxy/paros/network/HttpSender.java
HttpSender.setMaxRetriesOnIOError
public void setMaxRetriesOnIOError(int retries) { if (retries < 0) { throw new IllegalArgumentException("Parameter retries must be greater or equal to zero."); } HttpMethodRetryHandler retryHandler = new DefaultHttpMethodRetryHandler(retries, false); client.getParams()...
java
public void setMaxRetriesOnIOError(int retries) { if (retries < 0) { throw new IllegalArgumentException("Parameter retries must be greater or equal to zero."); } HttpMethodRetryHandler retryHandler = new DefaultHttpMethodRetryHandler(retries, false); client.getParams()...
[ "public", "void", "setMaxRetriesOnIOError", "(", "int", "retries", ")", "{", "if", "(", "retries", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Parameter retries must be greater or equal to zero.\"", ")", ";", "}", "HttpMethodRetryHandler", ...
Sets the maximum number of retries of an unsuccessful request caused by I/O errors. <p> The default number of retries is 3. @param retries the number of retries @throws IllegalArgumentException if {@code retries} is negative. @since 2.4.0
[ "Sets", "the", "maximum", "number", "of", "retries", "of", "an", "unsuccessful", "request", "caused", "by", "I", "/", "O", "errors", ".", "<p", ">", "The", "default", "number", "of", "retries", "is", "3", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/network/HttpSender.java#L824-L832
GoogleCloudPlatform/bigdata-interop
gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemBase.java
GoogleHadoopFileSystemBase.mkdirs
@Override public boolean mkdirs(Path hadoopPath, FsPermission permission) throws IOException { long startTime = System.nanoTime(); Preconditions.checkArgument(hadoopPath != null, "hadoopPath must not be null"); checkOpen(); logger.atFine().log("GHFS.mkdirs: %s, perm: %s", hadoopPath, permissi...
java
@Override public boolean mkdirs(Path hadoopPath, FsPermission permission) throws IOException { long startTime = System.nanoTime(); Preconditions.checkArgument(hadoopPath != null, "hadoopPath must not be null"); checkOpen(); logger.atFine().log("GHFS.mkdirs: %s, perm: %s", hadoopPath, permissi...
[ "@", "Override", "public", "boolean", "mkdirs", "(", "Path", "hadoopPath", ",", "FsPermission", "permission", ")", "throws", "IOException", "{", "long", "startTime", "=", "System", ".", "nanoTime", "(", ")", ";", "Preconditions", ".", "checkArgument", "(", "ha...
Makes the given path and all non-existent parents directories. Has the semantics of Unix 'mkdir -p'. @param hadoopPath Given path. @param permission Permissions to set on the given directory. @return true on success, false otherwise. @throws IOException if an error occurs.
[ "Makes", "the", "given", "path", "and", "all", "non", "-", "existent", "parents", "directories", ".", "Has", "the", "semantics", "of", "Unix", "mkdir", "-", "p", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemBase.java#L1046-L1070
kiegroup/jbpm
jbpm-services/jbpm-services-cdi/src/main/java/org/jbpm/services/cdi/impl/manager/InjectableRegisterableItemsFactory.java
InjectableRegisterableItemsFactory.getFactory
public static RegisterableItemsFactory getFactory(BeanManager beanManager, AuditEventBuilder eventBuilder) { InjectableRegisterableItemsFactory instance = getInstanceByType(beanManager, InjectableRegisterableItemsFactory.class, new Annotation[]{}); instance.setAuditBuilder(eventBuilder); return ...
java
public static RegisterableItemsFactory getFactory(BeanManager beanManager, AuditEventBuilder eventBuilder) { InjectableRegisterableItemsFactory instance = getInstanceByType(beanManager, InjectableRegisterableItemsFactory.class, new Annotation[]{}); instance.setAuditBuilder(eventBuilder); return ...
[ "public", "static", "RegisterableItemsFactory", "getFactory", "(", "BeanManager", "beanManager", ",", "AuditEventBuilder", "eventBuilder", ")", "{", "InjectableRegisterableItemsFactory", "instance", "=", "getInstanceByType", "(", "beanManager", ",", "InjectableRegisterableItems...
Allows to create instance of this class dynamically via <code>BeanManager</code>. This is useful in case multiple independent instances are required on runtime and that need cannot be satisfied with regular CDI practices. @param beanManager - bean manager instance of the container @param eventBuilder - <code>AuditEvent...
[ "Allows", "to", "create", "instance", "of", "this", "class", "dynamically", "via", "<code", ">", "BeanManager<", "/", "code", ">", ".", "This", "is", "useful", "in", "case", "multiple", "independent", "instances", "are", "required", "on", "runtime", "and", "...
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-services/jbpm-services-cdi/src/main/java/org/jbpm/services/cdi/impl/manager/InjectableRegisterableItemsFactory.java#L321-L325
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/UcsApi.java
UcsApi.setCallCompleted
public ApiSuccessResponse setCallCompleted(String id, CallCompletedData callCompletedData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = setCallCompletedWithHttpInfo(id, callCompletedData); return resp.getData(); }
java
public ApiSuccessResponse setCallCompleted(String id, CallCompletedData callCompletedData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = setCallCompletedWithHttpInfo(id, callCompletedData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "setCallCompleted", "(", "String", "id", ",", "CallCompletedData", "callCompletedData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "setCallCompletedWithHttpInfo", "(", "id", ",", "callC...
Set the call as being completed @param id id of the Interaction (required) @param callCompletedData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Set", "the", "call", "as", "being", "completed" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/UcsApi.java#L1917-L1920
policeman-tools/forbidden-apis
src/main/java/de/thetaphi/forbiddenapis/Checker.java
Checker.loadClassFromJigsaw
private ClassSignature loadClassFromJigsaw(String classname) throws IOException { if (method_Class_getModule == null || method_Module_getName == null) { return null; // not Jigsaw Module System } final Class<?> clazz; final String moduleName; try { clazz = Class.forName(classname, f...
java
private ClassSignature loadClassFromJigsaw(String classname) throws IOException { if (method_Class_getModule == null || method_Module_getName == null) { return null; // not Jigsaw Module System } final Class<?> clazz; final String moduleName; try { clazz = Class.forName(classname, f...
[ "private", "ClassSignature", "loadClassFromJigsaw", "(", "String", "classname", ")", "throws", "IOException", "{", "if", "(", "method_Class_getModule", "==", "null", "||", "method_Module_getName", "==", "null", ")", "{", "return", "null", ";", "// not Jigsaw Module Sy...
Loads the class from Java9's module system and uses reflection to get methods and fields.
[ "Loads", "the", "class", "from", "Java9", "s", "module", "system", "and", "uses", "reflection", "to", "get", "methods", "and", "fields", "." ]
train
https://github.com/policeman-tools/forbidden-apis/blob/df5f00c6bb779875ec6bae967f7cec96670b27d9/src/main/java/de/thetaphi/forbiddenapis/Checker.java#L187-L203
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java
SpecializedOps_DDRM.subvector
public static void subvector(DMatrix1Row A, int rowA, int colA, int length , boolean row, int offsetV, DMatrix1Row v) { if( row ) { for( int i = 0; i < length; i++ ) { v.set( offsetV +i , A.get(rowA,colA+i) ); } } else { for( int i = 0; i < length; i++...
java
public static void subvector(DMatrix1Row A, int rowA, int colA, int length , boolean row, int offsetV, DMatrix1Row v) { if( row ) { for( int i = 0; i < length; i++ ) { v.set( offsetV +i , A.get(rowA,colA+i) ); } } else { for( int i = 0; i < length; i++...
[ "public", "static", "void", "subvector", "(", "DMatrix1Row", "A", ",", "int", "rowA", ",", "int", "colA", ",", "int", "length", ",", "boolean", "row", ",", "int", "offsetV", ",", "DMatrix1Row", "v", ")", "{", "if", "(", "row", ")", "{", "for", "(", ...
<p> Extracts a row or column vector from matrix A. The first element in the matrix is at element (rowA,colA). The next 'length' elements are extracted along a row or column. The results are put into vector 'v' start at its element v0. </p> @param A Matrix that the vector is being extracted from. Not modified. @para...
[ "<p", ">", "Extracts", "a", "row", "or", "column", "vector", "from", "matrix", "A", ".", "The", "first", "element", "in", "the", "matrix", "is", "at", "element", "(", "rowA", "colA", ")", ".", "The", "next", "length", "elements", "are", "extracted", "a...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java#L320-L330
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java
StatementManager.getStatementID
private long getStatementID(HsqlName schema, String sql) { LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schema.hashCode()); if (sqlMap == null) { return -1; } return sqlMap.get(sql, -1); }
java
private long getStatementID(HsqlName schema, String sql) { LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schema.hashCode()); if (sqlMap == null) { return -1; } return sqlMap.get(sql, -1); }
[ "private", "long", "getStatementID", "(", "HsqlName", "schema", ",", "String", "sql", ")", "{", "LongValueHashMap", "sqlMap", "=", "(", "LongValueHashMap", ")", "schemaMap", ".", "get", "(", "schema", ".", "hashCode", "(", ")", ")", ";", "if", "(", "sqlMap...
Retrieves the registered compiled statement identifier associated with the specified SQL String, or a value less than zero, if no such statement has been registered. @param schema the schema id @param sql the SQL String @return the compiled statement identifier associated with the specified SQL String
[ "Retrieves", "the", "registered", "compiled", "statement", "identifier", "associated", "with", "the", "specified", "SQL", "String", "or", "a", "value", "less", "than", "zero", "if", "no", "such", "statement", "has", "been", "registered", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/StatementManager.java#L177-L187
JDBDT/jdbdt
src/main/java/org/jdbdt/JDBDT.java
JDBDT.assertTableDoesNotExist
public static void assertTableDoesNotExist(DB db, String tableName) throws DBAssertionError { DBAssert.assertTableExistence(CallInfo.create(), db, tableName, false); }
java
public static void assertTableDoesNotExist(DB db, String tableName) throws DBAssertionError { DBAssert.assertTableExistence(CallInfo.create(), db, tableName, false); }
[ "public", "static", "void", "assertTableDoesNotExist", "(", "DB", "db", ",", "String", "tableName", ")", "throws", "DBAssertionError", "{", "DBAssert", ".", "assertTableExistence", "(", "CallInfo", ".", "create", "(", ")", ",", "db", ",", "tableName", ",", "fa...
Assert that table does not exist in a database. @param db Database. @param tableName Table name. @throws DBAssertionError If the assertion fails. @see #assertTableExists(DB,String) @see #drop(Table)
[ "Assert", "that", "table", "does", "not", "exist", "in", "a", "database", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/JDBDT.java#L766-L768
apache/flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java
NFA.open
public void open(RuntimeContext cepRuntimeContext, Configuration conf) throws Exception { for (State<T> state : getStates()) { for (StateTransition<T> transition : state.getStateTransitions()) { IterativeCondition condition = transition.getCondition(); FunctionUtils.setFunctionRuntimeContext(condition, cep...
java
public void open(RuntimeContext cepRuntimeContext, Configuration conf) throws Exception { for (State<T> state : getStates()) { for (StateTransition<T> transition : state.getStateTransitions()) { IterativeCondition condition = transition.getCondition(); FunctionUtils.setFunctionRuntimeContext(condition, cep...
[ "public", "void", "open", "(", "RuntimeContext", "cepRuntimeContext", ",", "Configuration", "conf", ")", "throws", "Exception", "{", "for", "(", "State", "<", "T", ">", "state", ":", "getStates", "(", ")", ")", "{", "for", "(", "StateTransition", "<", "T",...
Initialization method for the NFA. It is called before any element is passed and thus suitable for one time setup work. @param cepRuntimeContext runtime context of the enclosing operator @param conf The configuration containing the parameters attached to the contract.
[ "Initialization", "method", "for", "the", "NFA", ".", "It", "is", "called", "before", "any", "element", "is", "passed", "and", "thus", "suitable", "for", "one", "time", "setup", "work", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java#L179-L187
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/I18nObject.java
I18nObject.getI18n
protected String getI18n(final String aMessageKey, final int aIntDetail) { return StringUtils.normalizeWS(myBundle.get(aMessageKey, Integer.toString(aIntDetail))); }
java
protected String getI18n(final String aMessageKey, final int aIntDetail) { return StringUtils.normalizeWS(myBundle.get(aMessageKey, Integer.toString(aIntDetail))); }
[ "protected", "String", "getI18n", "(", "final", "String", "aMessageKey", ",", "final", "int", "aIntDetail", ")", "{", "return", "StringUtils", ".", "normalizeWS", "(", "myBundle", ".", "get", "(", "aMessageKey", ",", "Integer", ".", "toString", "(", "aIntDetai...
Gets the internationalized value for the supplied message key, using an int as additional information. @param aMessageKey A message key @param aIntDetail Additional details for the message @return The internationalized message
[ "Gets", "the", "internationalized", "value", "for", "the", "supplied", "message", "key", "using", "an", "int", "as", "additional", "information", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/I18nObject.java#L68-L70
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java
SlingApi.postConfigApacheSlingGetServletAsync
public com.squareup.okhttp.Call postConfigApacheSlingGetServletAsync(String runmode, String jsonMaximumresults, String jsonMaximumresultsTypeHint, Boolean enableHtml, String enableHtmlTypeHint, Boolean enableTxt, String enableTxtTypeHint, Boolean enableXml, String enableXmlTypeHint, final ApiCallback<Void> callback) th...
java
public com.squareup.okhttp.Call postConfigApacheSlingGetServletAsync(String runmode, String jsonMaximumresults, String jsonMaximumresultsTypeHint, Boolean enableHtml, String enableHtmlTypeHint, Boolean enableTxt, String enableTxtTypeHint, Boolean enableXml, String enableXmlTypeHint, final ApiCallback<Void> callback) th...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postConfigApacheSlingGetServletAsync", "(", "String", "runmode", ",", "String", "jsonMaximumresults", ",", "String", "jsonMaximumresultsTypeHint", ",", "Boolean", "enableHtml", ",", "String", "enableHtmlType...
(asynchronously) @param runmode (required) @param jsonMaximumresults (optional) @param jsonMaximumresultsTypeHint (optional) @param enableHtml (optional) @param enableHtmlTypeHint (optional) @param enableTxt (optional) @param enableTxtTypeHint (optional) @param enableXml (optional) @param enableXmlTypeHint (o...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java#L3430-L3454
agmip/ace-core
src/main/java/org/agmip/ace/io/AceGenerator.java
AceGenerator.generateACEB
public static void generateACEB(File dest, AceDataset set) throws IOException { FileOutputStream fos = new FileOutputStream(dest); GZIPOutputStream gos = new GZIPOutputStream(fos); generate(gos, set, false); gos.close(); fos.close(); }
java
public static void generateACEB(File dest, AceDataset set) throws IOException { FileOutputStream fos = new FileOutputStream(dest); GZIPOutputStream gos = new GZIPOutputStream(fos); generate(gos, set, false); gos.close(); fos.close(); }
[ "public", "static", "void", "generateACEB", "(", "File", "dest", ",", "AceDataset", "set", ")", "throws", "IOException", "{", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "dest", ")", ";", "GZIPOutputStream", "gos", "=", "new", "GZIPOutputStre...
Write a dataset to a file (compressed). <p> This utility method uses {@link #generate} to write the GZIP compressed JSON to a file. This method automatically closes the OutputStream used to create the file. @param dest Destination {@link File} @param set the {@link AceDataset} to compress and write. @throws IOExceptio...
[ "Write", "a", "dataset", "to", "a", "file", "(", "compressed", ")", ".", "<p", ">", "This", "utility", "method", "uses", "{", "@link", "#generate", "}", "to", "write", "the", "GZIP", "compressed", "JSON", "to", "a", "file", ".", "This", "method", "auto...
train
https://github.com/agmip/ace-core/blob/51957e79b4567d0083c52d0720f4a268c3a02f44/src/main/java/org/agmip/ace/io/AceGenerator.java#L108-L115
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/OrmElf.java
OrmElf.insertListNotBatched
public static <T> void insertListNotBatched(Connection connection, Iterable<T> iterable) throws SQLException { OrmWriter.insertListNotBatched(connection, iterable); }
java
public static <T> void insertListNotBatched(Connection connection, Iterable<T> iterable) throws SQLException { OrmWriter.insertListNotBatched(connection, iterable); }
[ "public", "static", "<", "T", ">", "void", "insertListNotBatched", "(", "Connection", "connection", ",", "Iterable", "<", "T", ">", "iterable", ")", "throws", "SQLException", "{", "OrmWriter", ".", "insertListNotBatched", "(", "connection", ",", "iterable", ")",...
Insert a collection of objects in a non-batched manner (i.e. using iteration and individual INSERTs). @param connection a SQL connection @param iterable a list (or other {@link Iterable} collection) of annotated objects to insert @param <T> the class template @throws SQLException if a {@link SQLException} occurs
[ "Insert", "a", "collection", "of", "objects", "in", "a", "non", "-", "batched", "manner", "(", "i", ".", "e", ".", "using", "iteration", "and", "individual", "INSERTs", ")", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/OrmElf.java#L220-L223
snazy/ohc
ohc-benchmark/src/main/java/org/caffinitas/ohc/benchmark/distribution/GroupedOptions.java
GroupedOptions.select
public static <G extends GroupedOptions> G select(String[] params, G... groupings) { for (String param : params) { boolean accepted = false; for (GroupedOptions grouping : groupings) accepted |= grouping.accept(param); if (!accepted) ...
java
public static <G extends GroupedOptions> G select(String[] params, G... groupings) { for (String param : params) { boolean accepted = false; for (GroupedOptions grouping : groupings) accepted |= grouping.accept(param); if (!accepted) ...
[ "public", "static", "<", "G", "extends", "GroupedOptions", ">", "G", "select", "(", "String", "[", "]", "params", ",", "G", "...", "groupings", ")", "{", "for", "(", "String", "param", ":", "params", ")", "{", "boolean", "accepted", "=", "false", ";", ...
option group that is happy() after this is done, that also accepted all the parameters
[ "option", "group", "that", "is", "happy", "()", "after", "this", "is", "done", "that", "also", "accepted", "all", "the", "parameters" ]
train
https://github.com/snazy/ohc/blob/af47142711993a3eaaf3b496332c27e2b43454e4/ohc-benchmark/src/main/java/org/caffinitas/ohc/benchmark/distribution/GroupedOptions.java#L59-L73
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/views/ViewUtils.java
ViewUtils.tintWidget
static void tintWidget(@NonNull ProgressBar progressBar, @ColorInt int color) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ColorStateList tint = ColorStateList.valueOf(color); progressBar.setIndeterminateTintList(tint); } }
java
static void tintWidget(@NonNull ProgressBar progressBar, @ColorInt int color) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ColorStateList tint = ColorStateList.valueOf(color); progressBar.setIndeterminateTintList(tint); } }
[ "static", "void", "tintWidget", "(", "@", "NonNull", "ProgressBar", "progressBar", ",", "@", "ColorInt", "int", "color", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "{", "ColorSta...
Tints the progress bar drawable to the given color. Only for devices running Lollipop or greater. @param progressBar the view to tint @param color the color to use
[ "Tints", "the", "progress", "bar", "drawable", "to", "the", "given", "color", ".", "Only", "for", "devices", "running", "Lollipop", "or", "greater", "." ]
train
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/views/ViewUtils.java#L166-L171
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.getCurrentStyleInt
public static int getCurrentStyleInt(Element element, Style style) { String currentStyle = getCurrentStyle(element, style); return CmsClientStringUtil.parseInt(currentStyle); }
java
public static int getCurrentStyleInt(Element element, Style style) { String currentStyle = getCurrentStyle(element, style); return CmsClientStringUtil.parseInt(currentStyle); }
[ "public", "static", "int", "getCurrentStyleInt", "(", "Element", "element", ",", "Style", "style", ")", "{", "String", "currentStyle", "=", "getCurrentStyle", "(", "element", ",", "style", ")", ";", "return", "CmsClientStringUtil", ".", "parseInt", "(", "current...
Returns the computed style of the given element as number.<p> @param element the element @param style the CSS property @return the currently computed style
[ "Returns", "the", "computed", "style", "of", "the", "given", "element", "as", "number", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1232-L1236
alkacon/opencms-core
src/org/opencms/acacia/shared/CmsEntityAttribute.java
CmsEntityAttribute.createEntityAttribute
public static CmsEntityAttribute createEntityAttribute(String name, List<CmsEntity> values) { CmsEntityAttribute result = new CmsEntityAttribute(); result.m_name = name; result.m_entityValues = Collections.unmodifiableList(values); return result; }
java
public static CmsEntityAttribute createEntityAttribute(String name, List<CmsEntity> values) { CmsEntityAttribute result = new CmsEntityAttribute(); result.m_name = name; result.m_entityValues = Collections.unmodifiableList(values); return result; }
[ "public", "static", "CmsEntityAttribute", "createEntityAttribute", "(", "String", "name", ",", "List", "<", "CmsEntity", ">", "values", ")", "{", "CmsEntityAttribute", "result", "=", "new", "CmsEntityAttribute", "(", ")", ";", "result", ".", "m_name", "=", "name...
Creates a entity type attribute.<p> @param name the attribute name @param values the attribute values @return the newly created attribute
[ "Creates", "a", "entity", "type", "attribute", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/CmsEntityAttribute.java#L67-L73
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/ReturnValueIgnored.java
ReturnValueIgnored.javaTimeTypes
private static boolean javaTimeTypes(ExpressionTree tree, VisitorState state) { if (packageStartsWith("java.time").matches(tree, state)) { return false; } Symbol symbol = ASTHelpers.getSymbol(tree); if (symbol instanceof MethodSymbol) { MethodSymbol methodSymbol = (MethodSymbol) symbol; ...
java
private static boolean javaTimeTypes(ExpressionTree tree, VisitorState state) { if (packageStartsWith("java.time").matches(tree, state)) { return false; } Symbol symbol = ASTHelpers.getSymbol(tree); if (symbol instanceof MethodSymbol) { MethodSymbol methodSymbol = (MethodSymbol) symbol; ...
[ "private", "static", "boolean", "javaTimeTypes", "(", "ExpressionTree", "tree", ",", "VisitorState", "state", ")", "{", "if", "(", "packageStartsWith", "(", "\"java.time\"", ")", ".", "matches", "(", "tree", ",", "state", ")", ")", "{", "return", "false", ";...
{@link java.time} types are immutable. The only methods we allow ignoring the return value on are the {@code parse}-style APIs since folks often use it for validation.
[ "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/ReturnValueIgnored.java#L105-L121
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/PartitionRequestClient.java
PartitionRequestClient.sendTaskEvent
public void sendTaskEvent(ResultPartitionID partitionId, TaskEvent event, final RemoteInputChannel inputChannel) throws IOException { checkNotClosed(); tcpChannel.writeAndFlush(new TaskEventRequest(event, partitionId, inputChannel.getInputChannelId())) .addListener( new ChannelFutureListener() { @...
java
public void sendTaskEvent(ResultPartitionID partitionId, TaskEvent event, final RemoteInputChannel inputChannel) throws IOException { checkNotClosed(); tcpChannel.writeAndFlush(new TaskEventRequest(event, partitionId, inputChannel.getInputChannelId())) .addListener( new ChannelFutureListener() { @...
[ "public", "void", "sendTaskEvent", "(", "ResultPartitionID", "partitionId", ",", "TaskEvent", "event", ",", "final", "RemoteInputChannel", "inputChannel", ")", "throws", "IOException", "{", "checkNotClosed", "(", ")", ";", "tcpChannel", ".", "writeAndFlush", "(", "n...
Sends a task event backwards to an intermediate result partition producer. <p> Backwards task events flow between readers and writers and therefore will only work when both are running at the same time, which is only guaranteed to be the case when both the respective producer and consumer task run pipelined.
[ "Sends", "a", "task", "event", "backwards", "to", "an", "intermediate", "result", "partition", "producer", ".", "<p", ">", "Backwards", "task", "events", "flow", "between", "readers", "and", "writers", "and", "therefore", "will", "only", "work", "when", "both"...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/PartitionRequestClient.java#L154-L171
Jasig/uPortal
uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java
DistributedLayoutManager.updateNodeAttribute
private void updateNodeAttribute( Element ilfNode, String nodeId, String attName, String newVal, String oldVal, List<ILayoutProcessingAction> pendingActions) throws PortalException { if (newVal == null && oldVal != null ...
java
private void updateNodeAttribute( Element ilfNode, String nodeId, String attName, String newVal, String oldVal, List<ILayoutProcessingAction> pendingActions) throws PortalException { if (newVal == null && oldVal != null ...
[ "private", "void", "updateNodeAttribute", "(", "Element", "ilfNode", ",", "String", "nodeId", ",", "String", "attName", ",", "String", "newVal", ",", "String", "oldVal", ",", "List", "<", "ILayoutProcessingAction", ">", "pendingActions", ")", "throws", "PortalExce...
Handles checking for updates to a named attribute, verifying such change is allowed, and generates an action object to make that change. @param ilfNode the node in the viewed layout @param nodeId the id of the ilfNode @param attName the attribute to be checked @param newVal the attribute's new value @param oldVal the ...
[ "Handles", "checking", "for", "updates", "to", "a", "named", "attribute", "verifying", "such", "change", "is", "allowed", "and", "generates", "an", "action", "object", "to", "make", "that", "change", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java#L659-L721
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/Database.java
Database.findMap
public @NotNull <K,V> Map<K, V> findMap(@NotNull Class<K> keyType, @NotNull Class<V> valueType, @NotNull @SQL String sql, Object... args) { return findMap(keyType, valueType, SqlQuery.query(sql, args)); ...
java
public @NotNull <K,V> Map<K, V> findMap(@NotNull Class<K> keyType, @NotNull Class<V> valueType, @NotNull @SQL String sql, Object... args) { return findMap(keyType, valueType, SqlQuery.query(sql, args)); ...
[ "public", "@", "NotNull", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "findMap", "(", "@", "NotNull", "Class", "<", "K", ">", "keyType", ",", "@", "NotNull", "Class", "<", "V", ">", "valueType", ",", "@", "NotNull", "@", "SQL", "St...
Executes a query that returns at least two values and creates a map from the results, using the first value as the key and rest of the values for instantiating {@code V}. <p>If the keys of the result are not distinct, the result contains the last binding of given key.
[ "Executes", "a", "query", "that", "returns", "at", "least", "two", "values", "and", "creates", "a", "map", "from", "the", "results", "using", "the", "first", "value", "as", "the", "key", "and", "rest", "of", "the", "values", "for", "instantiating", "{", ...
train
https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/Database.java#L575-L580
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.listAsync
public Observable<Page<CloudTask>> listAsync(final String jobId, final TaskListOptions taskListOptions) { return listWithServiceResponseAsync(jobId, taskListOptions) .map(new Func1<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>, Page<CloudTask>>() { @Override ...
java
public Observable<Page<CloudTask>> listAsync(final String jobId, final TaskListOptions taskListOptions) { return listWithServiceResponseAsync(jobId, taskListOptions) .map(new Func1<ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders>, Page<CloudTask>>() { @Override ...
[ "public", "Observable", "<", "Page", "<", "CloudTask", ">", ">", "listAsync", "(", "final", "String", "jobId", ",", "final", "TaskListOptions", "taskListOptions", ")", "{", "return", "listWithServiceResponseAsync", "(", "jobId", ",", "taskListOptions", ")", ".", ...
Lists all of the tasks that are associated with the specified job. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks. @param jobId The ID of the job. @param taskListOptions Additional paramete...
[ "Lists", "all", "of", "the", "tasks", "that", "are", "associated", "with", "the", "specified", "job", ".", "For", "multi", "-", "instance", "tasks", "information", "such", "as", "affinityId", "executionInfo", "and", "nodeInfo", "refer", "to", "the", "primary",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L537-L545
integration-technology/amazon-mws-orders
src/main/java/com/amazonservices/mws/client/MwsUtl.java
MwsUtl.replaceAll
static String replaceAll(String s, Pattern p, String r) { int n = s == null ? 0 : s.length(); if (n == 0) { return s; } Matcher m = p.matcher(s); if (!m.find()) { return s; } StringBuilder buf = new StringBuilder(n + 12); int k = 0;...
java
static String replaceAll(String s, Pattern p, String r) { int n = s == null ? 0 : s.length(); if (n == 0) { return s; } Matcher m = p.matcher(s); if (!m.find()) { return s; } StringBuilder buf = new StringBuilder(n + 12); int k = 0;...
[ "static", "String", "replaceAll", "(", "String", "s", ",", "Pattern", "p", ",", "String", "r", ")", "{", "int", "n", "=", "s", "==", "null", "?", "0", ":", "s", ".", "length", "(", ")", ";", "if", "(", "n", "==", "0", ")", "{", "return", "s",...
Replace a pattern in a string. <p> Do not do recursive replacement. Return the original string if no changes are required. @param s The string to search. @param p The pattern to search for. @param r The string to replace occurrences with. @return The new string.
[ "Replace", "a", "pattern", "in", "a", "string", ".", "<p", ">", "Do", "not", "do", "recursive", "replacement", ".", "Return", "the", "original", "string", "if", "no", "changes", "are", "required", "." ]
train
https://github.com/integration-technology/amazon-mws-orders/blob/042e8cd5b10588a30150222bf9c91faf4f130b3c/src/main/java/com/amazonservices/mws/client/MwsUtl.java#L224-L244
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/SparkUtils.java
SparkUtils.writeObjectToFile
public static void writeObjectToFile(String path, Object toWrite, SparkContext sc) throws IOException { FileSystem fileSystem = FileSystem.get(sc.hadoopConfiguration()); try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) { ObjectOutputStream oos = ne...
java
public static void writeObjectToFile(String path, Object toWrite, SparkContext sc) throws IOException { FileSystem fileSystem = FileSystem.get(sc.hadoopConfiguration()); try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) { ObjectOutputStream oos = ne...
[ "public", "static", "void", "writeObjectToFile", "(", "String", "path", ",", "Object", "toWrite", ",", "SparkContext", "sc", ")", "throws", "IOException", "{", "FileSystem", "fileSystem", "=", "FileSystem", ".", "get", "(", "sc", ".", "hadoopConfiguration", "(",...
Write an object to HDFS (or local) using default Java object serialization @param path Path to write the object to @param toWrite Object to write @param sc Spark context
[ "Write", "an", "object", "to", "HDFS", "(", "or", "local", ")", "using", "default", "Java", "object", "serialization" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/SparkUtils.java#L206-L212
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsPushButton.java
CmsPushButton.setUpFace
public void setUpFace(String text, String imageClass) { m_text = text; m_imageClass = imageClass; getUpFace().setHTML(getFaceHtml(text, imageClass)); }
java
public void setUpFace(String text, String imageClass) { m_text = text; m_imageClass = imageClass; getUpFace().setHTML(getFaceHtml(text, imageClass)); }
[ "public", "void", "setUpFace", "(", "String", "text", ",", "String", "imageClass", ")", "{", "m_text", "=", "text", ";", "m_imageClass", "=", "imageClass", ";", "getUpFace", "(", ")", ".", "setHTML", "(", "getFaceHtml", "(", "text", ",", "imageClass", ")",...
Sets the up face text and image.<p> @param text the up face text to set, set to <code>null</code> to not show any @param imageClass the up face image class to use, set to <code>null</code> to not show any
[ "Sets", "the", "up", "face", "text", "and", "image", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsPushButton.java#L411-L416
googleapis/google-cloud-java
google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java
CloudTasksClient.updateQueue
public final Queue updateQueue(Queue queue, FieldMask updateMask) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder().setQueue(queue).setUpdateMask(updateMask).build(); return updateQueue(request); }
java
public final Queue updateQueue(Queue queue, FieldMask updateMask) { UpdateQueueRequest request = UpdateQueueRequest.newBuilder().setQueue(queue).setUpdateMask(updateMask).build(); return updateQueue(request); }
[ "public", "final", "Queue", "updateQueue", "(", "Queue", "queue", ",", "FieldMask", "updateMask", ")", "{", "UpdateQueueRequest", "request", "=", "UpdateQueueRequest", ".", "newBuilder", "(", ")", ".", "setQueue", "(", "queue", ")", ".", "setUpdateMask", "(", ...
Updates a queue. <p>This method creates the queue if it does not exist and updates the queue if it does exist. <p>Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. <p>WARNING: Using this ...
[ "Updates", "a", "queue", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java#L572-L577
rhuss/jolokia
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
HttpRequestHandler.handleGetRequest
public JSONAware handleGetRequest(String pUri, String pPathInfo, Map<String, String[]> pParameterMap) { String pathInfo = extractPathInfo(pUri, pPathInfo); JmxRequest jmxReq = JmxRequestFactory.createGetRequest(pathInfo,getProcessingParameter(pParameterMap)); if (backendManager...
java
public JSONAware handleGetRequest(String pUri, String pPathInfo, Map<String, String[]> pParameterMap) { String pathInfo = extractPathInfo(pUri, pPathInfo); JmxRequest jmxReq = JmxRequestFactory.createGetRequest(pathInfo,getProcessingParameter(pParameterMap)); if (backendManager...
[ "public", "JSONAware", "handleGetRequest", "(", "String", "pUri", ",", "String", "pPathInfo", ",", "Map", "<", "String", ",", "String", "[", "]", ">", "pParameterMap", ")", "{", "String", "pathInfo", "=", "extractPathInfo", "(", "pUri", ",", "pPathInfo", ")"...
Handle a GET request @param pUri URI leading to this request @param pPathInfo path of the request @param pParameterMap parameters of the GET request @return the response
[ "Handle", "a", "GET", "request" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java#L75-L87
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/EmbedBuilder.java
EmbedBuilder.setAuthor
public EmbedBuilder setAuthor(String name, String url) { return setAuthor(name, url, null); }
java
public EmbedBuilder setAuthor(String name, String url) { return setAuthor(name, url, null); }
[ "public", "EmbedBuilder", "setAuthor", "(", "String", "name", ",", "String", "url", ")", "{", "return", "setAuthor", "(", "name", ",", "url", ",", "null", ")", ";", "}" ]
Sets the Author of the embed. The author appears in the top left of the embed and can have a small image beside it along with the author's name being made clickable by way of providing a url. This convenience method just sets the name and the url. <p><b><a href="http://i.imgur.com/JgZtxIM.png">Example</a></b> @param ...
[ "Sets", "the", "Author", "of", "the", "embed", ".", "The", "author", "appears", "in", "the", "top", "left", "of", "the", "embed", "and", "can", "have", "a", "small", "image", "beside", "it", "along", "with", "the", "author", "s", "name", "being", "made...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/EmbedBuilder.java#L562-L565
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/backup_policy.java
backup_policy.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { backup_policy_responses result = (backup_policy_responses) service.get_payload_formatter().string_to_resource(backup_policy_responses.class, response); if(result.errorcode != 0) { if (result.error...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { backup_policy_responses result = (backup_policy_responses) service.get_payload_formatter().string_to_resource(backup_policy_responses.class, response); if(result.errorcode != 0) { if (result.error...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "backup_policy_responses", "result", "=", "(", "backup_policy_responses", ")", "service", ".", "get_payload_fo...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/backup_policy.java#L223-L240
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/worker/Worker.java
Worker.mk_worker
@SuppressWarnings("rawtypes") public static WorkerShutdown mk_worker(Map conf, IContext context, String topologyId, String supervisorId, int port, String workerId, String jarPath) throws Exception { StringBuilder sb = new StringBuilder(); sb.append("topolog...
java
@SuppressWarnings("rawtypes") public static WorkerShutdown mk_worker(Map conf, IContext context, String topologyId, String supervisorId, int port, String workerId, String jarPath) throws Exception { StringBuilder sb = new StringBuilder(); sb.append("topolog...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "WorkerShutdown", "mk_worker", "(", "Map", "conf", ",", "IContext", "context", ",", "String", "topologyId", ",", "String", "supervisorId", ",", "int", "port", ",", "String", "workerId", ",", ...
create worker instance and run it @param conf storm conf @param topologyId topology id @param supervisorId supervisor iid @param port worker port @param workerId worker id @return WorkerShutDown @throws Exception
[ "create", "worker", "instance", "and", "run", "it" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/worker/Worker.java#L227-L241
gwtbootstrap3/gwtbootstrap3
gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/form/validator/AbstractValidator.java
AbstractValidator.createErrorList
public List<EditorError> createErrorList(Editor<T> editor, T value, String messageKey) { List<EditorError> result = new ArrayList<EditorError>(); result.add(new BasicEditorError(editor, value, getInvalidMessage(messageKey))); return result; }
java
public List<EditorError> createErrorList(Editor<T> editor, T value, String messageKey) { List<EditorError> result = new ArrayList<EditorError>(); result.add(new BasicEditorError(editor, value, getInvalidMessage(messageKey))); return result; }
[ "public", "List", "<", "EditorError", ">", "createErrorList", "(", "Editor", "<", "T", ">", "editor", ",", "T", "value", ",", "String", "messageKey", ")", "{", "List", "<", "EditorError", ">", "result", "=", "new", "ArrayList", "<", "EditorError", ">", "...
Creates the error list. @param editor the editor @param value the value @param messageKey the message key @return the list
[ "Creates", "the", "error", "list", "." ]
train
https://github.com/gwtbootstrap3/gwtbootstrap3/blob/54bdbd0b12ba7a436b278c007df960d1adf2e641/gwtbootstrap3/src/main/java/org/gwtbootstrap3/client/ui/form/validator/AbstractValidator.java#L80-L84
berkesa/datatree
src/main/java/io/datatree/Tree.java
Tree.getObject
@SuppressWarnings("unchecked") public <TO> TO getObject(String path, TO defaultValue) { Tree child = getChild(path, false); if (child != null && defaultValue != null) { TO converted = DataConverterRegistry.convert((Class<TO>) defaultValue.getClass(), child.value); if (converted == null && (defaultValue ...
java
@SuppressWarnings("unchecked") public <TO> TO getObject(String path, TO defaultValue) { Tree child = getChild(path, false); if (child != null && defaultValue != null) { TO converted = DataConverterRegistry.convert((Class<TO>) defaultValue.getClass(), child.value); if (converted == null && (defaultValue ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "TO", ">", "TO", "getObject", "(", "String", "path", ",", "TO", "defaultValue", ")", "{", "Tree", "child", "=", "getChild", "(", "path", ",", "false", ")", ";", "if", "(", "child", "!="...
Returns the Object to which the specified path is mapped. The method returns the default value argument if the path is not valid. This method performs automatic type conversion if needed (eg. IP String to InetAddress, etc.). Sample code:<br> @param <TO> output's type of this method @param path path (e.g. "path.to.node...
[ "Returns", "the", "Object", "to", "which", "the", "specified", "path", "is", "mapped", ".", "The", "method", "returns", "the", "default", "value", "argument", "if", "the", "path", "is", "not", "valid", ".", "This", "method", "performs", "automatic", "type", ...
train
https://github.com/berkesa/datatree/blob/79aea9b45c7b46ab28af0a09310bc01c421c6b3a/src/main/java/io/datatree/Tree.java#L2965-L2976
JoeKerouac/utils
src/main/java/com/joe/utils/common/IOUtils.java
IOUtils.saveAsFile
public static void saveAsFile(String data, String charset, String addr) throws IOException { charset = StringUtils.isEmpty(charset) ? "UTF8" : charset; saveAsFile(data.getBytes(charset), addr); }
java
public static void saveAsFile(String data, String charset, String addr) throws IOException { charset = StringUtils.isEmpty(charset) ? "UTF8" : charset; saveAsFile(data.getBytes(charset), addr); }
[ "public", "static", "void", "saveAsFile", "(", "String", "data", ",", "String", "charset", ",", "String", "addr", ")", "throws", "IOException", "{", "charset", "=", "StringUtils", ".", "isEmpty", "(", "charset", ")", "?", "\"UTF8\"", ":", "charset", ";", "...
将文本保存到本地文件 @param data 文本 @param charset 文本的字符集,不填默认为UTF8 @param addr 保存本地的路径,包含文件名,例如D://a.txt @throws IOException IO异常
[ "将文本保存到本地文件" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/common/IOUtils.java#L51-L54
beangle/beangle3
ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java
BeanDefinitionParser.parseQualifierElements
public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ELEMENT)) parseQualifierElement((Element) n...
java
public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ELEMENT)) parseQualifierElement((Element) n...
[ "public", "void", "parseQualifierElements", "(", "Element", "beanEle", ",", "AbstractBeanDefinition", "bd", ")", "{", "NodeList", "nl", "=", "beanEle", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nl", ".", "getL...
Parse qualifier sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.support.AbstractBeanDefinition} object.
[ "Parse", "qualifier", "sub", "-", "elements", "of", "the", "given", "bean", "element", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L407-L414
networknt/light-4j
metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java
InstrumentedExecutors.defaultThreadFactory
public static InstrumentedThreadFactory defaultThreadFactory(MetricRegistry registry, String name) { return new InstrumentedThreadFactory(Executors.defaultThreadFactory(), registry, name); }
java
public static InstrumentedThreadFactory defaultThreadFactory(MetricRegistry registry, String name) { return new InstrumentedThreadFactory(Executors.defaultThreadFactory(), registry, name); }
[ "public", "static", "InstrumentedThreadFactory", "defaultThreadFactory", "(", "MetricRegistry", "registry", ",", "String", "name", ")", "{", "return", "new", "InstrumentedThreadFactory", "(", "Executors", ".", "defaultThreadFactory", "(", ")", ",", "registry", ",", "n...
Returns an instrumented default thread factory used to create new threads. This factory creates all new threads used by an Executor in the same {@link ThreadGroup}. If there is a {@link java.lang.SecurityManager}, it uses the group of {@link System#getSecurityManager}, else the group of the thread invoking this {@code ...
[ "Returns", "an", "instrumented", "default", "thread", "factory", "used", "to", "create", "new", "threads", ".", "This", "factory", "creates", "all", "new", "threads", "used", "by", "an", "Executor", "in", "the", "same", "{", "@link", "ThreadGroup", "}", ".",...
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/metrics/src/main/java/io/dropwizard/metrics/InstrumentedExecutors.java#L483-L485
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/code/Types.java
Types.isAssignable
public boolean isAssignable(Type t, Type s, Warner warn) { if (t.hasTag(ERROR)) return true; if (t.getTag().isSubRangeOf(INT) && t.constValue() != null) { int value = ((Number)t.constValue()).intValue(); switch (s.getTag()) { case BYTE: if ...
java
public boolean isAssignable(Type t, Type s, Warner warn) { if (t.hasTag(ERROR)) return true; if (t.getTag().isSubRangeOf(INT) && t.constValue() != null) { int value = ((Number)t.constValue()).intValue(); switch (s.getTag()) { case BYTE: if ...
[ "public", "boolean", "isAssignable", "(", "Type", "t", ",", "Type", "s", ",", "Warner", "warn", ")", "{", "if", "(", "t", ".", "hasTag", "(", "ERROR", ")", ")", "return", "true", ";", "if", "(", "t", ".", "getTag", "(", ")", ".", "isSubRangeOf", ...
Is t assignable to s?<br> Equivalent to subtype except for constant values and raw types.<br> (not defined for Method and ForAll types)
[ "Is", "t", "assignable", "to", "s?<br", ">", "Equivalent", "to", "subtype", "except", "for", "constant", "values", "and", "raw", "types", ".", "<br", ">", "(", "not", "defined", "for", "Method", "and", "ForAll", "types", ")" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Types.java#L2134-L2165
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/algos/deeplearning/DeeplearningMojoModel.java
DeeplearningMojoModel.calculateReconstructionErrorPerRowData
public double calculateReconstructionErrorPerRowData(double [] original, double [] reconstructed){ assert (original != null && original.length > 0) && (reconstructed != null && reconstructed.length > 0); assert original.length == reconstructed.length; int numStartIndex = original.length - this._nums; do...
java
public double calculateReconstructionErrorPerRowData(double [] original, double [] reconstructed){ assert (original != null && original.length > 0) && (reconstructed != null && reconstructed.length > 0); assert original.length == reconstructed.length; int numStartIndex = original.length - this._nums; do...
[ "public", "double", "calculateReconstructionErrorPerRowData", "(", "double", "[", "]", "original", ",", "double", "[", "]", "reconstructed", ")", "{", "assert", "(", "original", "!=", "null", "&&", "original", ".", "length", ">", "0", ")", "&&", "(", "recons...
Calculates average reconstruction error (MSE). Uses a normalization defined for the numerical features of the trained model. @return average reconstruction error = ||original - reconstructed||^2 / length(original)
[ "Calculates", "average", "reconstruction", "error", "(", "MSE", ")", ".", "Uses", "a", "normalization", "defined", "for", "the", "numerical", "features", "of", "the", "trained", "model", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/deeplearning/DeeplearningMojoModel.java#L142-L153
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/impl/handlers/MapReduceServletImpl.java
MapReduceServletImpl.checkForAjax
private static boolean checkForAjax(HttpServletRequest request, HttpServletResponse response) throws IOException { if (!"XMLHttpRequest".equals(request.getHeader("X-Requested-With"))) { log.log( Level.SEVERE, "Received unexpected non-XMLHttpRequest command. Possible CSRF attack."); respo...
java
private static boolean checkForAjax(HttpServletRequest request, HttpServletResponse response) throws IOException { if (!"XMLHttpRequest".equals(request.getHeader("X-Requested-With"))) { log.log( Level.SEVERE, "Received unexpected non-XMLHttpRequest command. Possible CSRF attack."); respo...
[ "private", "static", "boolean", "checkForAjax", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "if", "(", "!", "\"XMLHttpRequest\"", ".", "equals", "(", "request", ".", "getHeader", "(", "\"X-Requeste...
Checks to ensure that the current request was sent via an AJAX request. If the request was not sent by an AJAX request, returns false, and sets the response status code to 403. This protects against CSRF attacks against AJAX only handlers. @return true if the request is a task queue request
[ "Checks", "to", "ensure", "that", "the", "current", "request", "was", "sent", "via", "an", "AJAX", "request", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/handlers/MapReduceServletImpl.java#L133-L143
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java
ViewFetcher.getRecyclerView
public <T extends View> ViewGroup getRecyclerView(int recyclerViewIndex, int timeOut) { final long endTime = SystemClock.uptimeMillis() + timeOut; while (SystemClock.uptimeMillis() < endTime) { View recyclerView = getRecyclerView(true, recyclerViewIndex); if(recyclerView != null){ return (ViewGroup) recy...
java
public <T extends View> ViewGroup getRecyclerView(int recyclerViewIndex, int timeOut) { final long endTime = SystemClock.uptimeMillis() + timeOut; while (SystemClock.uptimeMillis() < endTime) { View recyclerView = getRecyclerView(true, recyclerViewIndex); if(recyclerView != null){ return (ViewGroup) recy...
[ "public", "<", "T", "extends", "View", ">", "ViewGroup", "getRecyclerView", "(", "int", "recyclerViewIndex", ",", "int", "timeOut", ")", "{", "final", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "timeOut", ";", "while", "(", ...
Waits for a RecyclerView and returns it. @param recyclerViewIndex the index of the RecyclerView @return {@code ViewGroup} if RecycleView is displayed
[ "Waits", "for", "a", "RecyclerView", "and", "returns", "it", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/ViewFetcher.java#L417-L427
calimero-project/calimero-core
src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java
TunnelingFeature.newGet
public static TunnelingFeature newGet(final int channelId, final int seq, final InterfaceFeature featureId) { return new TunnelingFeature(KNXnetIPHeader.TunnelingFeatureGet, channelId, seq, featureId, Success); }
java
public static TunnelingFeature newGet(final int channelId, final int seq, final InterfaceFeature featureId) { return new TunnelingFeature(KNXnetIPHeader.TunnelingFeatureGet, channelId, seq, featureId, Success); }
[ "public", "static", "TunnelingFeature", "newGet", "(", "final", "int", "channelId", ",", "final", "int", "seq", ",", "final", "InterfaceFeature", "featureId", ")", "{", "return", "new", "TunnelingFeature", "(", "KNXnetIPHeader", ".", "TunnelingFeatureGet", ",", "c...
Creates a new tunneling feature-get service. @param channelId tunneling connection channel identifier @param seq tunneling connection send sequence number @param featureId the requested interface feature @return new tunneling feature-get service
[ "Creates", "a", "new", "tunneling", "feature", "-", "get", "service", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java#L81-L83
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.getToleranceDistance
public static double getToleranceDistance(View view, GoogleMap map) { BoundingBox boundingBox = getBoundingBox(map); double boundingBoxWidth = TileBoundingBoxMapUtils.getLongitudeDistance(boundingBox); double boundingBoxHeight = TileBoundingBoxMapUtils.getLatitudeDistance(boundingBox); ...
java
public static double getToleranceDistance(View view, GoogleMap map) { BoundingBox boundingBox = getBoundingBox(map); double boundingBoxWidth = TileBoundingBoxMapUtils.getLongitudeDistance(boundingBox); double boundingBoxHeight = TileBoundingBoxMapUtils.getLatitudeDistance(boundingBox); ...
[ "public", "static", "double", "getToleranceDistance", "(", "View", "view", ",", "GoogleMap", "map", ")", "{", "BoundingBox", "boundingBox", "=", "getBoundingBox", "(", "map", ")", ";", "double", "boundingBoxWidth", "=", "TileBoundingBoxMapUtils", ".", "getLongitudeD...
Get the tolerance distance meters in the current region of the map @param view view @param map google map @return tolerance distance in meters
[ "Get", "the", "tolerance", "distance", "meters", "in", "the", "current", "region", "of", "the", "map" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L51-L72
square/okhttp
okhttp/src/main/java/okhttp3/internal/cache2/Relay.java
Relay.edit
public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); Relay result = new Relay(randomAccessFile, upstream, 0L, metadata, bufferMaxSize); // Write a dirty header. That wa...
java
public static Relay edit( File file, Source upstream, ByteString metadata, long bufferMaxSize) throws IOException { RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw"); Relay result = new Relay(randomAccessFile, upstream, 0L, metadata, bufferMaxSize); // Write a dirty header. That wa...
[ "public", "static", "Relay", "edit", "(", "File", "file", ",", "Source", "upstream", ",", "ByteString", "metadata", ",", "long", "bufferMaxSize", ")", "throws", "IOException", "{", "RandomAccessFile", "randomAccessFile", "=", "new", "RandomAccessFile", "(", "file"...
Creates a new relay that reads a live stream from {@code upstream}, using {@code file} to share that data with other sources. <p><strong>Warning:</strong> callers to this method must immediately call {@link #newSource} to create a source and close that when they're done. Otherwise a handle to {@code file} will be leak...
[ "Creates", "a", "new", "relay", "that", "reads", "a", "live", "stream", "from", "{", "@code", "upstream", "}", "using", "{", "@code", "file", "}", "to", "share", "that", "data", "with", "other", "sources", "." ]
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/cache2/Relay.java#L124-L134
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java
EnumConstantBuilder.getInstance
public static EnumConstantBuilder getInstance(Context context, TypeElement typeElement, EnumConstantWriter writer) { return new EnumConstantBuilder(context, typeElement, writer); }
java
public static EnumConstantBuilder getInstance(Context context, TypeElement typeElement, EnumConstantWriter writer) { return new EnumConstantBuilder(context, typeElement, writer); }
[ "public", "static", "EnumConstantBuilder", "getInstance", "(", "Context", "context", ",", "TypeElement", "typeElement", ",", "EnumConstantWriter", "writer", ")", "{", "return", "new", "EnumConstantBuilder", "(", "context", ",", "typeElement", ",", "writer", ")", ";"...
Construct a new EnumConstantsBuilder. @param context the build context. @param typeElement the class whoses members are being documented. @param writer the doclet specific writer. @return the new EnumConstantsBuilder
[ "Construct", "a", "new", "EnumConstantsBuilder", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java#L105-L108
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java
ClassUtility.getAnnotationAttribute
public static Object getAnnotationAttribute(final Annotation annotation, final String attributeName) { Object object = null; try { // Get the annotation method for the given name final Method attributeMethod = annotation.annotationType().getDeclaredMethod(attributeName); ...
java
public static Object getAnnotationAttribute(final Annotation annotation, final String attributeName) { Object object = null; try { // Get the annotation method for the given name final Method attributeMethod = annotation.annotationType().getDeclaredMethod(attributeName); ...
[ "public", "static", "Object", "getAnnotationAttribute", "(", "final", "Annotation", "annotation", ",", "final", "String", "attributeName", ")", "{", "Object", "object", "=", "null", ";", "try", "{", "// Get the annotation method for the given name", "final", "Method", ...
Retrieve an annotation property dynamically by reflection. @param annotation the annotation to explore @param attributeName the name of the method to call @return the property value
[ "Retrieve", "an", "annotation", "property", "dynamically", "by", "reflection", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/util/ClassUtility.java#L417-L432
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java
ReplicationLinksInner.beginFailover
public void beginFailover(String resourceGroupName, String serverName, String databaseName, String linkId) { beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).toBlocking().single().body(); }
java
public void beginFailover(String resourceGroupName, String serverName, String databaseName, String linkId) { beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).toBlocking().single().body(); }
[ "public", "void", "beginFailover", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "linkId", ")", "{", "beginFailoverWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "databaseName...
Sets which replica database is primary by failing over from the current primary replica database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseNam...
[ "Sets", "which", "replica", "database", "is", "primary", "by", "failing", "over", "from", "the", "current", "primary", "replica", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java#L380-L382
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationAssertionAxiomImpl_CustomFieldSerializer.java
OWLAnnotationAssertionAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLAnnotationAssertionAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLAnnotationAssertionAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLAnnotationAssertionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationAssertionAxiomImpl_CustomFieldSerializer.java#L71-L74
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newTerm
public Term newTerm(String id, Span<WF> span) { idManager.updateCounter(AnnotationType.TERM, id); Term newTerm = new Term(id, span, false); annotationContainer.add(newTerm, Layer.TERMS, AnnotationType.TERM); addToWfTermIndex(newTerm.getSpan().getTargets(), newTerm); // Rodrirekin hitz egin hau kentzeko return newT...
java
public Term newTerm(String id, Span<WF> span) { idManager.updateCounter(AnnotationType.TERM, id); Term newTerm = new Term(id, span, false); annotationContainer.add(newTerm, Layer.TERMS, AnnotationType.TERM); addToWfTermIndex(newTerm.getSpan().getTargets(), newTerm); // Rodrirekin hitz egin hau kentzeko return newT...
[ "public", "Term", "newTerm", "(", "String", "id", ",", "Span", "<", "WF", ">", "span", ")", "{", "idManager", ".", "updateCounter", "(", "AnnotationType", ".", "TERM", ",", "id", ")", ";", "Term", "newTerm", "=", "new", "Term", "(", "id", ",", "span"...
Creates a Term object to load an existing term. It receives the ID as an argument. The Term is added to the document object. @param id term's ID. @param type type of term. There are two types of term: open and close. @param lemma the lemma of the term. @param pos part of speech of the term. @param wfs the list of word ...
[ "Creates", "a", "Term", "object", "to", "load", "an", "existing", "term", ".", "It", "receives", "the", "ID", "as", "an", "argument", ".", "The", "Term", "is", "added", "to", "the", "document", "object", "." ]
train
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L582-L588
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkTapsInner.java
VirtualNetworkTapsInner.updateTagsAsync
public Observable<VirtualNetworkTapInner> updateTagsAsync(String resourceGroupName, String tapName) { return updateTagsWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1<ServiceResponse<VirtualNetworkTapInner>, VirtualNetworkTapInner>() { @Override public VirtualNetworkTa...
java
public Observable<VirtualNetworkTapInner> updateTagsAsync(String resourceGroupName, String tapName) { return updateTagsWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1<ServiceResponse<VirtualNetworkTapInner>, VirtualNetworkTapInner>() { @Override public VirtualNetworkTa...
[ "public", "Observable", "<", "VirtualNetworkTapInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "tapName", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "tapName", ")", ".", "map", "(", "new"...
Updates an VirtualNetworkTap tags. @param resourceGroupName The name of the resource group. @param tapName The name of the tap. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "an", "VirtualNetworkTap", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkTapsInner.java#L554-L561
kiswanij/jk-util
src/main/java/com/jk/util/security/JKSecurityManager.java
JKSecurityManager.matchPassword
public static boolean matchPassword(String plain, JKUser user) { JK.implementMe(); return JKSecurityUtil.encode(plain).equals(user.getPassword()); }
java
public static boolean matchPassword(String plain, JKUser user) { JK.implementMe(); return JKSecurityUtil.encode(plain).equals(user.getPassword()); }
[ "public", "static", "boolean", "matchPassword", "(", "String", "plain", ",", "JKUser", "user", ")", "{", "JK", ".", "implementMe", "(", ")", ";", "return", "JKSecurityUtil", ".", "encode", "(", "plain", ")", ".", "equals", "(", "user", ".", "getPassword", ...
Match password. @param plain the plain @param user the user @return true, if successful
[ "Match", "password", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/security/JKSecurityManager.java#L134-L137
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/TransformationsInner.java
TransformationsInner.updateAsync
public Observable<TransformationInner> updateAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch).map(new Func1<ServiceRespon...
java
public Observable<TransformationInner> updateAsync(String resourceGroupName, String jobName, String transformationName, TransformationInner transformation, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, jobName, transformationName, transformation, ifMatch).map(new Func1<ServiceRespon...
[ "public", "Observable", "<", "TransformationInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "String", "transformationName", ",", "TransformationInner", "transformation", ",", "String", "ifMatch", ")", "{", "return", "upda...
Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. @param resourceGroupName The name of the resource group that contains the resource. You can obtai...
[ "Updates", "an", "existing", "transformation", "under", "an", "existing", "streaming", "job", ".", "This", "can", "be", "used", "to", "partially", "update", "(", "ie", ".", "update", "one", "or", "two", "properties", ")", "a", "transformation", "without", "a...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/TransformationsInner.java#L420-L427
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/layout/Layout.java
Layout.previousGeneration
public Layout previousGeneration() throws FetchException { Cursor<StoredLayout> cursor = mLayoutFactory.mLayoutStorage .query("storableTypeName = ? & generation < ?") .with(getStorableTypeName()).with(getGeneration()) .orderBy("-generation") .fetch(); ...
java
public Layout previousGeneration() throws FetchException { Cursor<StoredLayout> cursor = mLayoutFactory.mLayoutStorage .query("storableTypeName = ? & generation < ?") .with(getStorableTypeName()).with(getGeneration()) .orderBy("-generation") .fetch(); ...
[ "public", "Layout", "previousGeneration", "(", ")", "throws", "FetchException", "{", "Cursor", "<", "StoredLayout", ">", "cursor", "=", "mLayoutFactory", ".", "mLayoutStorage", ".", "query", "(", "\"storableTypeName = ? & generation < ?\"", ")", ".", "with", "(", "g...
Returns the previous known generation of the storable's layout, or null if none. @return a layout with a lower generation, or null if none
[ "Returns", "the", "previous", "known", "generation", "of", "the", "storable", "s", "layout", "or", "null", "if", "none", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/layout/Layout.java#L429-L445
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/geo/pose/PnPStereoJacobianRodrigues.java
PnPStereoJacobianRodrigues.addRodriguesJacobian
private void addRodriguesJacobian( DMatrixRMaj Rj , Point3D_F64 worldPt , Point3D_F64 cameraPt ) { // (1/z)*dot(R)*X double Rx = (Rj.data[0]*worldPt.x + Rj.data[1]*worldPt.y + Rj.data[2]*worldPt.z)/cameraPt.z; double Ry = (Rj.data[3]*worldPt.x + Rj.data[4]*worldPt.y + Rj.data[5]*worldPt.z)/cameraPt.z; // dot(...
java
private void addRodriguesJacobian( DMatrixRMaj Rj , Point3D_F64 worldPt , Point3D_F64 cameraPt ) { // (1/z)*dot(R)*X double Rx = (Rj.data[0]*worldPt.x + Rj.data[1]*worldPt.y + Rj.data[2]*worldPt.z)/cameraPt.z; double Ry = (Rj.data[3]*worldPt.x + Rj.data[4]*worldPt.y + Rj.data[5]*worldPt.z)/cameraPt.z; // dot(...
[ "private", "void", "addRodriguesJacobian", "(", "DMatrixRMaj", "Rj", ",", "Point3D_F64", "worldPt", ",", "Point3D_F64", "cameraPt", ")", "{", "// (1/z)*dot(R)*X", "double", "Rx", "=", "(", "Rj", ".", "data", "[", "0", "]", "*", "worldPt", ".", "x", "+", "R...
Adds to the Jacobian matrix using the derivative from a Rodrigues parameter. deriv [x,y] = -dot(z)/(z^2)*(R*X+T) + (1/z)*dot(R)*X where R is rotation matrix, T is translation, z = z-coordinate of point in camera frame @param Rj Jacobian for Rodrigues @param worldPt Location of point in world coordinates @param camer...
[ "Adds", "to", "the", "Jacobian", "matrix", "using", "the", "derivative", "from", "a", "Rodrigues", "parameter", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/geo/pose/PnPStereoJacobianRodrigues.java#L154-L166
bazaarvoice/emodb
event/src/main/java/com/bazaarvoice/emodb/event/owner/OstrichOwnerGroup.java
OstrichOwnerGroup.awaitRunning
private boolean awaitRunning(Service service, long timeoutAt) { if (service.isRunning()) { return true; } long waitMillis = timeoutAt - System.currentTimeMillis(); if (waitMillis <= 0) { return false; } try { service.start().get(waitMil...
java
private boolean awaitRunning(Service service, long timeoutAt) { if (service.isRunning()) { return true; } long waitMillis = timeoutAt - System.currentTimeMillis(); if (waitMillis <= 0) { return false; } try { service.start().get(waitMil...
[ "private", "boolean", "awaitRunning", "(", "Service", "service", ",", "long", "timeoutAt", ")", "{", "if", "(", "service", ".", "isRunning", "(", ")", ")", "{", "return", "true", ";", "}", "long", "waitMillis", "=", "timeoutAt", "-", "System", ".", "curr...
Returns true if the Guava service entered the RUNNING state within the specified time period.
[ "Returns", "true", "if", "the", "Guava", "service", "entered", "the", "RUNNING", "state", "within", "the", "specified", "time", "period", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/event/src/main/java/com/bazaarvoice/emodb/event/owner/OstrichOwnerGroup.java#L241-L255